@cjlapao/ui-kit 0.2.30 → 0.2.32
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-DtgCXUPd.d.cts → CodeBlock-Dm0yAxf-.d.cts} +42 -8
- package/dist/{CapsuleBlueprint-DtgCXUPd.d.ts → CodeBlock-Dm0yAxf-.d.ts} +42 -8
- package/dist/index.cjs +521 -205
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +150 -0
- package/dist/index.d.cts +83 -100
- package/dist/index.d.ts +83 -100
- package/dist/index.js +509 -197
- package/dist/index.js.map +1 -1
- package/dist/markdown.cjs +165 -7
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.d.cts +7 -3
- package/dist/markdown.d.ts +7 -3
- package/dist/markdown.js +162 -6
- package/dist/markdown.js.map +1 -1
- package/package.json +4 -2
package/dist/index.cjs
CHANGED
|
@@ -88,6 +88,7 @@ __export(src_exports, {
|
|
|
88
88
|
Chart: () => Chart,
|
|
89
89
|
Chat: () => Chat_default,
|
|
90
90
|
Checkbox: () => Checkbox_default,
|
|
91
|
+
CodeBlock: () => CodeBlock,
|
|
91
92
|
CollapseChevron: () => CollapseChevron,
|
|
92
93
|
CollapseToggleButton: () => CollapseToggleButton,
|
|
93
94
|
CollapsibleHelpText: () => CollapsibleHelpText_default,
|
|
@@ -102,6 +103,7 @@ __export(src_exports, {
|
|
|
102
103
|
ConnectionFlowNodeBody: () => ConnectionFlowNodeBody_default,
|
|
103
104
|
ConnectionFlowSkeleton: () => ConnectionFlowSkeleton_default,
|
|
104
105
|
ConnectionFlowSvg: () => ConnectionFlowSvg_default,
|
|
106
|
+
ContentActions: () => ContentActions_default,
|
|
105
107
|
CustomIcon: () => CustomIcon_default,
|
|
106
108
|
DATEPICKER_APPEND_TO: () => DATEPICKER_APPEND_TO,
|
|
107
109
|
DATEPICKER_SELECTION_MODES: () => DATEPICKER_SELECTION_MODES,
|
|
@@ -302,6 +304,7 @@ __export(src_exports, {
|
|
|
302
304
|
SURFACE_GLASS_RIM: () => SURFACE_GLASS_RIM,
|
|
303
305
|
SURFACE_GUTTER_AXES: () => SURFACE_GUTTER_AXES,
|
|
304
306
|
SURFACE_PADDINGS: () => SURFACE_PADDINGS,
|
|
307
|
+
SURFACE_TONES: () => SURFACE_TONES,
|
|
305
308
|
SURFACE_TO_BUTTON_VARIANT: () => SURFACE_TO_BUTTON_VARIANT,
|
|
306
309
|
SURFACE_TRANSPARENCIES: () => SURFACE_TRANSPARENCIES,
|
|
307
310
|
SURFACE_VARIANTS: () => SURFACE_VARIANTS,
|
|
@@ -558,6 +561,7 @@ __export(src_exports, {
|
|
|
558
561
|
getStatusSpinnerToneTokens: () => getStatusSpinnerToneTokens,
|
|
559
562
|
getStatusTokens: () => getStatusTokens,
|
|
560
563
|
getStepperTonePalette: () => getStepperTonePalette,
|
|
564
|
+
getSurfaceAccentColor: () => getSurfaceAccentColor,
|
|
561
565
|
getSurfaceCornerClass: () => getSurfaceCornerClass,
|
|
562
566
|
getSurfaceCornerRem: () => getSurfaceCornerRem,
|
|
563
567
|
getSurfaceGutterClass: () => getSurfaceGutterClass,
|
|
@@ -5590,6 +5594,7 @@ var getSurfaceGlassFillClass = (color2, opacity) => {
|
|
|
5590
5594
|
if (opacity === "clear") return 5;
|
|
5591
5595
|
return 15;
|
|
5592
5596
|
})();
|
|
5597
|
+
if (color2 === "none") return `bg-white/${litOpacity} dark:bg-neutral-900/${drkOpacity}`;
|
|
5593
5598
|
const safeBase = GLASS_COLOR_SAFELIST.has(color2) ? color2 : "neutral";
|
|
5594
5599
|
return `bg-${safeBase}-100/${litOpacity} dark:bg-${safeBase}-500/${drkOpacity}`;
|
|
5595
5600
|
};
|
|
@@ -5756,6 +5761,8 @@ var TRUE_COLORS = [
|
|
|
5756
5761
|
"neutral",
|
|
5757
5762
|
"stone"
|
|
5758
5763
|
];
|
|
5764
|
+
var SURFACE_TONES = ["none", ...TRUE_COLORS];
|
|
5765
|
+
var getSurfaceAccentColor = (tone) => tone === "none" ? "neutral" : tone;
|
|
5759
5766
|
var TRUE_COLOR_DOT_CLASSES = {
|
|
5760
5767
|
red: "bg-red-500 dark:bg-red-400",
|
|
5761
5768
|
orange: "bg-orange-500 dark:bg-orange-400",
|
|
@@ -6021,6 +6028,7 @@ var FIELD_STATUS_CLASSES = {
|
|
|
6021
6028
|
success: "border-emerald-500 dark:border-emerald-400 focus-within:border-emerald-500 dark:focus-within:border-emerald-400 focus-within:ring-2 focus-within:ring-inset focus-within:ring-emerald-500/60 dark:focus-within:ring-emerald-400/60"
|
|
6022
6029
|
};
|
|
6023
6030
|
var SURFACE_VARIANTS = [
|
|
6031
|
+
"none",
|
|
6024
6032
|
"elevated",
|
|
6025
6033
|
"outlined",
|
|
6026
6034
|
"subtle",
|
|
@@ -6031,6 +6039,7 @@ var SURFACE_VARIANTS = [
|
|
|
6031
6039
|
"liquid-glass"
|
|
6032
6040
|
];
|
|
6033
6041
|
var SURFACE_TO_BUTTON_VARIANT = {
|
|
6042
|
+
none: "ghost",
|
|
6034
6043
|
elevated: "solid",
|
|
6035
6044
|
outlined: "outline",
|
|
6036
6045
|
subtle: "ghost",
|
|
@@ -6073,7 +6082,7 @@ var surfaceTriggerTokens = Object.fromEntries(
|
|
|
6073
6082
|
}
|
|
6074
6083
|
])
|
|
6075
6084
|
);
|
|
6076
|
-
var getSurfaceTriggerTokens = (color2) => surfaceTriggerTokens[color2] ?? surfaceTriggerTokens.
|
|
6085
|
+
var getSurfaceTriggerTokens = (color2) => surfaceTriggerTokens[getSurfaceAccentColor(color2)] ?? surfaceTriggerTokens.neutral;
|
|
6077
6086
|
var collapsibleHelpToneTokens = Object.fromEntries(
|
|
6078
6087
|
TRUE_COLORS.map((color2) => [
|
|
6079
6088
|
color2,
|
|
@@ -6136,8 +6145,9 @@ var SURFACE_VARIANT_FOR_FIELD = {
|
|
|
6136
6145
|
glass: "glass"
|
|
6137
6146
|
};
|
|
6138
6147
|
var isGlassSurface = (variant) => variant === "glass" || variant === "liquid-glass";
|
|
6139
|
-
var PANEL_TONE_FOR_FIELD = "
|
|
6148
|
+
var PANEL_TONE_FOR_FIELD = "none";
|
|
6140
6149
|
var INPUT_VARIANT_FOR_SURFACE = {
|
|
6150
|
+
none: "flat",
|
|
6141
6151
|
elevated: "flat",
|
|
6142
6152
|
outlined: "flat",
|
|
6143
6153
|
subtle: "ghost",
|
|
@@ -6148,7 +6158,7 @@ var INPUT_VARIANT_FOR_SURFACE = {
|
|
|
6148
6158
|
"liquid-glass": "glass",
|
|
6149
6159
|
plain: "flat"
|
|
6150
6160
|
};
|
|
6151
|
-
var DEFAULT_SURFACE_TONE = "
|
|
6161
|
+
var DEFAULT_SURFACE_TONE = "none";
|
|
6152
6162
|
var CASCADE_EXPAND = {
|
|
6153
6163
|
/** Per-item cascade step, expanding. */
|
|
6154
6164
|
stepMs: 20,
|
|
@@ -6896,6 +6906,7 @@ var getMultiToggleColorTokens = (color2) => currentTheme.multiToggle[color2] ??
|
|
|
6896
6906
|
var getMultiToggleVariantTokens = (color2) => currentTheme.multiToggleVariant[color2] ?? currentTheme.multiToggleVariant.blue;
|
|
6897
6907
|
var getTabsColorTokens = (color2) => currentTheme.tabs[color2] ?? currentTheme.tabs.blue;
|
|
6898
6908
|
var SURFACE_VARIANT_BASE = {
|
|
6909
|
+
none: "",
|
|
6899
6910
|
elevated: "bg-white shadow-xl ring-1 ring-black/5 dark:bg-neutral-900 dark:ring-white/10",
|
|
6900
6911
|
// A real 1px border, not a ring. `ring-1` with no ring colour resolves to
|
|
6901
6912
|
// currentColor, which painted a near-black rule in light mode.
|
|
@@ -6914,10 +6925,12 @@ var TRANSLUCENT_SURFACE_VARIANTS = [
|
|
|
6914
6925
|
"default"
|
|
6915
6926
|
];
|
|
6916
6927
|
var getRawSurfaceVariantClasses = (variant, tone, overrides = {}) => {
|
|
6917
|
-
const palette =
|
|
6928
|
+
const palette = getPanelToneStyles(tone);
|
|
6918
6929
|
const { bgClass, borderClass, liquidExtras } = overrides;
|
|
6919
6930
|
const base = SURFACE_VARIANT_BASE[variant] ?? SURFACE_VARIANT_BASE.elevated;
|
|
6920
6931
|
switch (variant) {
|
|
6932
|
+
case "none":
|
|
6933
|
+
return tone === "none" ? "" : bgClass ?? palette.subtleBg;
|
|
6921
6934
|
case "outlined":
|
|
6922
6935
|
return [base, borderClass ?? palette.outlineBorder].join(" ");
|
|
6923
6936
|
case "subtle":
|
|
@@ -6950,7 +6963,15 @@ var getRawSurfaceVariantClasses = (variant, tone, overrides = {}) => {
|
|
|
6950
6963
|
return [bgClass ?? "", base].join(" ");
|
|
6951
6964
|
}
|
|
6952
6965
|
};
|
|
6953
|
-
var getPanelToneStyles = (tone) =>
|
|
6966
|
+
var getPanelToneStyles = (tone = DEFAULT_SURFACE_TONE) => tone === "none" ? {
|
|
6967
|
+
...currentTheme.panel.neutral,
|
|
6968
|
+
subtleBg: "bg-white dark:bg-neutral-900",
|
|
6969
|
+
tonalBg: "bg-white dark:bg-neutral-900",
|
|
6970
|
+
glassBg: "bg-white/40 dark:bg-neutral-900/20",
|
|
6971
|
+
liquidBg: "bg-white/45 dark:bg-neutral-900/15",
|
|
6972
|
+
decorationShape: "",
|
|
6973
|
+
decorationGradient: ""
|
|
6974
|
+
} : currentTheme.panel[tone] ?? currentTheme.panel.neutral;
|
|
6954
6975
|
var getSurfaceVariantClasses = (variant, tone, overrides = {}) => getSurfaceTransparencyClasses(getRawSurfaceVariantClasses(variant, tone, overrides), variant, overrides.transparency);
|
|
6955
6976
|
var getStepperTonePalette = (tone) => currentTheme.stepper[tone] ?? currentTheme.stepper.blue;
|
|
6956
6977
|
var getBadgeColorClasses = (color2) => currentTheme.badge[color2] ?? currentTheme.badge.blue;
|
|
@@ -9224,6 +9245,13 @@ var DE_KIT_CATALOG = {
|
|
|
9224
9245
|
// ../common/i18n/builtIn/en.ts
|
|
9225
9246
|
var EN_KIT_CATALOG = {
|
|
9226
9247
|
kit: {
|
|
9248
|
+
codeBlock: {
|
|
9249
|
+
code: "Code",
|
|
9250
|
+
edit: "Edit code",
|
|
9251
|
+
copy: "Copy code",
|
|
9252
|
+
copied: "Copied",
|
|
9253
|
+
copyFailed: "Could not copy code. Select and copy it manually."
|
|
9254
|
+
},
|
|
9227
9255
|
knowledge: {
|
|
9228
9256
|
"library": "Memory library",
|
|
9229
9257
|
"map": "Knowledge map",
|
|
@@ -12059,6 +12087,7 @@ function hasInteractiveDescendant(root) {
|
|
|
12059
12087
|
// src/components/Panel.tsx
|
|
12060
12088
|
var import_jsx_runtime159 = require("react/jsx-runtime");
|
|
12061
12089
|
var variantBaseStyles = {
|
|
12090
|
+
none: "",
|
|
12062
12091
|
elevated: "bg-white shadow-xl ring-1 ring-black/5 dark:bg-neutral-900 dark:ring-white/10",
|
|
12063
12092
|
// A real 1px border, not a ring. `ring-1` with no ring colour resolves to
|
|
12064
12093
|
// currentColor, which painted a near-black rule in light mode.
|
|
@@ -12076,6 +12105,8 @@ var getPanelEdgeChrome = (variant, tone, glassOpacity = "frosted", vibrancy = "m
|
|
|
12076
12105
|
const palette = getPanelToneStyles(tone);
|
|
12077
12106
|
const chrome = (() => {
|
|
12078
12107
|
switch (variant) {
|
|
12108
|
+
case "none":
|
|
12109
|
+
return { fill: tone === "none" ? "" : palette.subtleBg, border: "", backdrop: "" };
|
|
12079
12110
|
case "outlined":
|
|
12080
12111
|
return {
|
|
12081
12112
|
fill: "bg-white/90 dark:bg-neutral-900/80",
|
|
@@ -12357,6 +12388,8 @@ var Panel = import_react158.default.forwardRef(function Panel2({
|
|
|
12357
12388
|
const glassFillClass = getSurfaceGlassFillClass(resolvedTone, glassOpacity);
|
|
12358
12389
|
const variantClasses = getSurfaceTransparencyClasses((0, import_classnames7.default)((() => {
|
|
12359
12390
|
switch (variant) {
|
|
12391
|
+
case "none":
|
|
12392
|
+
return resolvedTone === "none" ? "" : palette.subtleBg;
|
|
12360
12393
|
case "outlined":
|
|
12361
12394
|
return (0, import_classnames7.default)(
|
|
12362
12395
|
variantBaseStyles.outlined,
|
|
@@ -12897,8 +12930,8 @@ var ActionPanel = import_react159.default.forwardRef(
|
|
|
12897
12930
|
}, ref) {
|
|
12898
12931
|
const renderIcon2 = useIconRenderer();
|
|
12899
12932
|
const generatedTitleId = (0, import_react159.useId)();
|
|
12900
|
-
const resolvedTone = tone ?? color2 ?? "
|
|
12901
|
-
const resolvedAccent = accentColor ?? resolvedTone;
|
|
12933
|
+
const resolvedTone = tone ?? color2 ?? "none";
|
|
12934
|
+
const resolvedAccent = accentColor ?? getSurfaceAccentColor(resolvedTone);
|
|
12902
12935
|
const palette = getPanelToneStyles(resolvedAccent);
|
|
12903
12936
|
const surfaceText = getSurfaceTextTokens(variant);
|
|
12904
12937
|
const sizeTokens12 = SIZE_TOKENS[size] ?? SIZE_TOKENS.sm;
|
|
@@ -14148,7 +14181,8 @@ var EmptyState = import_react165.default.forwardRef(
|
|
|
14148
14181
|
...rest
|
|
14149
14182
|
}, ref) => {
|
|
14150
14183
|
const titleId = (0, import_react165.useId)();
|
|
14151
|
-
const
|
|
14184
|
+
const surfaceTone = tone ?? color2 ?? "none";
|
|
14185
|
+
const effectiveTone = getSurfaceAccentColor(surfaceTone);
|
|
14152
14186
|
const iconTone = iconColor ?? effectiveTone;
|
|
14153
14187
|
const effectiveSize = size ?? textSize ?? "md";
|
|
14154
14188
|
const sizeToken = SIZE_STYLES3[effectiveSize] ?? SIZE_STYLES3.md;
|
|
@@ -14212,7 +14246,7 @@ var EmptyState = import_react165.default.forwardRef(
|
|
|
14212
14246
|
{
|
|
14213
14247
|
ref,
|
|
14214
14248
|
variant: effectiveVariant,
|
|
14215
|
-
tone:
|
|
14249
|
+
tone: surfaceTone,
|
|
14216
14250
|
corner,
|
|
14217
14251
|
padding,
|
|
14218
14252
|
fullWidth,
|
|
@@ -15358,7 +15392,7 @@ var PanelHero = ({
|
|
|
15358
15392
|
children,
|
|
15359
15393
|
...rest
|
|
15360
15394
|
}) => {
|
|
15361
|
-
const accent = tone ?? color2 ?? "
|
|
15395
|
+
const accent = getSurfaceAccentColor(tone ?? color2 ?? "none");
|
|
15362
15396
|
const effectiveCorner = corner ?? (rounded ? DEFAULT_SURFACE_CORNER : "none");
|
|
15363
15397
|
const showShapes = decoration === "shapes" || decoration === "both";
|
|
15364
15398
|
const showGradient = decoration === "gradient" || decoration === "both";
|
|
@@ -15381,7 +15415,7 @@ var PanelHero = ({
|
|
|
15381
15415
|
{
|
|
15382
15416
|
className: (0, import_classnames22.default)("w-full", className),
|
|
15383
15417
|
variant,
|
|
15384
|
-
tone:
|
|
15418
|
+
tone: tone ?? "none",
|
|
15385
15419
|
corner: effectiveCorner,
|
|
15386
15420
|
padding,
|
|
15387
15421
|
decoration,
|
|
@@ -15430,7 +15464,7 @@ var PanelHero = ({
|
|
|
15430
15464
|
backgroundImage: `linear-gradient(to bottom right, ${stopFrom}, ${stopTo})`
|
|
15431
15465
|
},
|
|
15432
15466
|
"data-variant": "gradient",
|
|
15433
|
-
"data-tone":
|
|
15467
|
+
"data-tone": tone ?? "none",
|
|
15434
15468
|
...rest,
|
|
15435
15469
|
children: [
|
|
15436
15470
|
showShapes && /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
|
|
@@ -19158,7 +19192,7 @@ Combobox.displayName = "Combobox";
|
|
|
19158
19192
|
var Combobox_default = Combobox;
|
|
19159
19193
|
|
|
19160
19194
|
// src/components/Picker.tsx
|
|
19161
|
-
var import_react185 = require("react");
|
|
19195
|
+
var import_react185 = __toESM(require("react"), 1);
|
|
19162
19196
|
var import_react_dom5 = require("react-dom");
|
|
19163
19197
|
var import_classnames38 = __toESM(require("classnames"), 1);
|
|
19164
19198
|
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
@@ -19233,6 +19267,7 @@ var Picker = ({
|
|
|
19233
19267
|
selectedIds: selectedIdsProp,
|
|
19234
19268
|
onMultiChange,
|
|
19235
19269
|
maxPillsShown = 3,
|
|
19270
|
+
groupSelectable = false,
|
|
19236
19271
|
size = "md",
|
|
19237
19272
|
fullWidth = true,
|
|
19238
19273
|
fullHeight = false
|
|
@@ -19282,10 +19317,21 @@ var Picker = ({
|
|
|
19282
19317
|
);
|
|
19283
19318
|
const filtered = (0, import_react185.useMemo)(() => {
|
|
19284
19319
|
const q = query.trim().toLowerCase();
|
|
19285
|
-
|
|
19286
|
-
return baseItems.filter(
|
|
19320
|
+
const matched = !q ? baseItems : baseItems.filter(
|
|
19287
19321
|
(item) => (item.textValue ?? item.title ?? item.id).toLowerCase().includes(q) || (item.subtitle ?? "").toLowerCase().includes(q) || (item.description ?? "").toLowerCase().includes(q) || (item.tags ?? []).some((t2) => t2.label.toLowerCase().includes(q))
|
|
19288
19322
|
);
|
|
19323
|
+
if (!matched.some((item) => item.group)) return matched;
|
|
19324
|
+
const order = [];
|
|
19325
|
+
const buckets = /* @__PURE__ */ new Map();
|
|
19326
|
+
for (const item of matched) {
|
|
19327
|
+
const key = item.group ?? "";
|
|
19328
|
+
if (!buckets.has(key)) {
|
|
19329
|
+
buckets.set(key, []);
|
|
19330
|
+
order.push(key);
|
|
19331
|
+
}
|
|
19332
|
+
buckets.get(key).push(item);
|
|
19333
|
+
}
|
|
19334
|
+
return order.flatMap((key) => buckets.get(key));
|
|
19289
19335
|
}, [baseItems, query]);
|
|
19290
19336
|
const updatePosition = (0, import_react185.useCallback)(() => {
|
|
19291
19337
|
if (!open || !triggerRef.current || !dropdownRef.current) return;
|
|
@@ -19417,6 +19463,13 @@ var Picker = ({
|
|
|
19417
19463
|
setQuery("");
|
|
19418
19464
|
}
|
|
19419
19465
|
};
|
|
19466
|
+
const handleToggleGroup = (group) => {
|
|
19467
|
+
const ids = filtered.filter((i) => i.group === group).map((i) => i.id);
|
|
19468
|
+
const allOn = ids.every((id) => effectiveSelectedIds.includes(id));
|
|
19469
|
+
onMultiChange?.(
|
|
19470
|
+
allOn ? effectiveSelectedIds.filter((id) => !ids.includes(id)) : [...effectiveSelectedIds, ...ids.filter((id) => !effectiveSelectedIds.includes(id))]
|
|
19471
|
+
);
|
|
19472
|
+
};
|
|
19420
19473
|
const handleClearMulti = () => {
|
|
19421
19474
|
onMultiChange?.([]);
|
|
19422
19475
|
};
|
|
@@ -19594,12 +19647,77 @@ var Picker = ({
|
|
|
19594
19647
|
"aria-multiselectable": multi || void 0,
|
|
19595
19648
|
children: filtered.map((item, index) => {
|
|
19596
19649
|
const isSelected = effectiveSelectedIds.includes(item.id);
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
|
|
19601
|
-
|
|
19602
|
-
|
|
19650
|
+
const showHeader = !!item.group && item.group !== filtered[index - 1]?.group;
|
|
19651
|
+
let header = null;
|
|
19652
|
+
if (showHeader) {
|
|
19653
|
+
const g = item.group;
|
|
19654
|
+
const members = filtered.filter((i) => i.group === g);
|
|
19655
|
+
const on = members.filter(
|
|
19656
|
+
(i) => effectiveSelectedIds.includes(i.id)
|
|
19657
|
+
).length;
|
|
19658
|
+
const state = on === 0 ? "none" : on === members.length ? "all" : "some";
|
|
19659
|
+
const selectable = multi && groupSelectable;
|
|
19660
|
+
const label = /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(import_jsx_runtime191.Fragment, { children: [
|
|
19661
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
19662
|
+
"span",
|
|
19663
|
+
{
|
|
19664
|
+
className: (0, import_classnames38.default)(
|
|
19665
|
+
"flex h-4 w-4 shrink-0 items-center justify-center rounded border transition-colors",
|
|
19666
|
+
state === "none" ? "border-neutral-300 dark:border-neutral-600" : (0, import_classnames38.default)(
|
|
19667
|
+
colorTokens.optionSelectedBg,
|
|
19668
|
+
"border-current",
|
|
19669
|
+
colorTokens.optionSelectedIcon
|
|
19670
|
+
)
|
|
19671
|
+
),
|
|
19672
|
+
children: state !== "none" && /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
19673
|
+
"svg",
|
|
19674
|
+
{
|
|
19675
|
+
className: "h-3.5 w-3.5",
|
|
19676
|
+
viewBox: "0 0 24 24",
|
|
19677
|
+
fill: "none",
|
|
19678
|
+
stroke: "currentColor",
|
|
19679
|
+
strokeWidth: 2.5,
|
|
19680
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
19681
|
+
"path",
|
|
19682
|
+
{
|
|
19683
|
+
strokeLinecap: "round",
|
|
19684
|
+
strokeLinejoin: "round",
|
|
19685
|
+
d: state === "all" ? "m5 13 4 4L19 7" : "M6 12h12"
|
|
19686
|
+
}
|
|
19687
|
+
)
|
|
19688
|
+
}
|
|
19689
|
+
)
|
|
19690
|
+
}
|
|
19691
|
+
),
|
|
19692
|
+
/* @__PURE__ */ (0, import_jsx_runtime191.jsx)("span", { className: "flex-1 truncate text-left", children: g }),
|
|
19693
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("span", { className: "shrink-0 tabular-nums", children: [
|
|
19694
|
+
on,
|
|
19695
|
+
"/",
|
|
19696
|
+
members.length
|
|
19697
|
+
] })
|
|
19698
|
+
] });
|
|
19699
|
+
const headerClass = (0, import_classnames38.default)(
|
|
19700
|
+
"flex w-full items-center gap-3 px-4 py-1.5 text-[11px] font-semibold uppercase tracking-wide",
|
|
19701
|
+
popupText.muted
|
|
19702
|
+
);
|
|
19703
|
+
header = /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("li", { role: "presentation", className: "m-0 list-none p-0", children: selectable ? /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
19704
|
+
"button",
|
|
19705
|
+
{
|
|
19706
|
+
type: "button",
|
|
19707
|
+
role: "checkbox",
|
|
19708
|
+
"aria-checked": state === "all" ? true : state === "some" ? "mixed" : false,
|
|
19709
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
19710
|
+
onClick: () => handleToggleGroup(g),
|
|
19711
|
+
className: (0, import_classnames38.default)(
|
|
19712
|
+
headerClass,
|
|
19713
|
+
"cursor-pointer border-0 bg-transparent hover:bg-neutral-50 dark:hover:bg-neutral-800/60"
|
|
19714
|
+
),
|
|
19715
|
+
children: label
|
|
19716
|
+
}
|
|
19717
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("div", { className: headerClass, children: label }) });
|
|
19718
|
+
}
|
|
19719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(import_react185.default.Fragment, { children: [
|
|
19720
|
+
header,
|
|
19603
19721
|
/* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
|
|
19604
19722
|
"li",
|
|
19605
19723
|
{
|
|
@@ -19732,10 +19850,9 @@ var Picker = ({
|
|
|
19732
19850
|
ti
|
|
19733
19851
|
)) })
|
|
19734
19852
|
]
|
|
19735
|
-
}
|
|
19736
|
-
item.id
|
|
19853
|
+
}
|
|
19737
19854
|
)
|
|
19738
|
-
);
|
|
19855
|
+
] }, item.id);
|
|
19739
19856
|
})
|
|
19740
19857
|
}
|
|
19741
19858
|
)
|
|
@@ -21975,7 +22092,7 @@ function StackCarousel({
|
|
|
21975
22092
|
getItemLabel,
|
|
21976
22093
|
emptyState = "No items to display.",
|
|
21977
22094
|
variant = "elevated",
|
|
21978
|
-
tone = "
|
|
22095
|
+
tone: surfaceTone = "none",
|
|
21979
22096
|
corner = "auto",
|
|
21980
22097
|
padding = "sm",
|
|
21981
22098
|
transparency,
|
|
@@ -22220,7 +22337,7 @@ function StackCarousel({
|
|
|
22220
22337
|
Panel_default,
|
|
22221
22338
|
{
|
|
22222
22339
|
variant,
|
|
22223
|
-
tone,
|
|
22340
|
+
tone: surfaceTone,
|
|
22224
22341
|
corner,
|
|
22225
22342
|
padding,
|
|
22226
22343
|
transparency,
|
|
@@ -23004,7 +23121,7 @@ var TraceGraph = (0, import_react191.forwardRef)(function TraceGraph2({
|
|
|
23004
23121
|
flareSize,
|
|
23005
23122
|
pulseScale,
|
|
23006
23123
|
junctionGlowIntensity = 1,
|
|
23007
|
-
tone = "
|
|
23124
|
+
tone = "none",
|
|
23008
23125
|
variant = "outlined",
|
|
23009
23126
|
corner = "auto",
|
|
23010
23127
|
padding = "none",
|
|
@@ -23313,7 +23430,7 @@ var TraceGraph = (0, import_react191.forwardRef)(function TraceGraph2({
|
|
|
23313
23430
|
style: { position: "fixed", zIndex: 100, width: 300, maxWidth: "calc(100vw - 16px)", visibility: "hidden" },
|
|
23314
23431
|
role: showPopover ? "dialog" : "tooltip",
|
|
23315
23432
|
"aria-label": overlayNode.label ?? overlayNode.id,
|
|
23316
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(Panel_default, { variant: "elevated", tone
|
|
23433
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(Panel_default, { variant: "elevated", tone, corner, padding: "xs", scrollable: false, children: [
|
|
23317
23434
|
showPopover && /* @__PURE__ */ (0, import_jsx_runtime198.jsx)("button", { type: "button", className: `${buttonClass} float-right ml-2`, "aria-label": copy("close"), onClick: () => {
|
|
23318
23435
|
setDetailsOpen(false);
|
|
23319
23436
|
hostRef.current?.focus();
|
|
@@ -23329,7 +23446,7 @@ var TraceGraph = (0, import_react191.forwardRef)(function TraceGraph2({
|
|
|
23329
23446
|
{
|
|
23330
23447
|
...panelProps,
|
|
23331
23448
|
variant,
|
|
23332
|
-
tone
|
|
23449
|
+
tone,
|
|
23333
23450
|
backgroundColor: tone === "none" ? "neutral" : panelProps.backgroundColor,
|
|
23334
23451
|
style: tone === "none" && variant === "simple" ? { borderWidth: 0, boxShadow: "none", ...panelProps.style } : panelProps.style,
|
|
23335
23452
|
corner,
|
|
@@ -24797,7 +24914,7 @@ var FormSection = ({
|
|
|
24797
24914
|
className,
|
|
24798
24915
|
padding = "md",
|
|
24799
24916
|
variant = "elevated",
|
|
24800
|
-
tone = "
|
|
24917
|
+
tone = "none",
|
|
24801
24918
|
corner = "rounded-md",
|
|
24802
24919
|
vibrancy,
|
|
24803
24920
|
glassOpacity,
|
|
@@ -25437,6 +25554,8 @@ var Toolbar = ({
|
|
|
25437
25554
|
const palette = getPanelToneStyles(tone);
|
|
25438
25555
|
const variantClasses = getSurfaceTransparencyClasses((() => {
|
|
25439
25556
|
switch (variant) {
|
|
25557
|
+
case "none":
|
|
25558
|
+
return tone === "none" ? "" : palette.subtleBg;
|
|
25440
25559
|
case "outlined":
|
|
25441
25560
|
return (0, import_classnames53.default)(variantBaseStyles.outlined, palette.outlineBorder);
|
|
25442
25561
|
case "subtle":
|
|
@@ -25502,7 +25621,7 @@ var PageHeader = ({
|
|
|
25502
25621
|
children,
|
|
25503
25622
|
variant = "default",
|
|
25504
25623
|
accentColor = "blue",
|
|
25505
|
-
tone = "
|
|
25624
|
+
tone = "none",
|
|
25506
25625
|
glassOpacity,
|
|
25507
25626
|
transparency,
|
|
25508
25627
|
vibrancy,
|
|
@@ -26520,7 +26639,7 @@ var Chat2 = ({
|
|
|
26520
26639
|
renderMessage,
|
|
26521
26640
|
onEvent,
|
|
26522
26641
|
variant = "outlined",
|
|
26523
|
-
tone = "
|
|
26642
|
+
tone: surfaceTone = "none",
|
|
26524
26643
|
padding = "none",
|
|
26525
26644
|
className = "",
|
|
26526
26645
|
style,
|
|
@@ -26929,7 +27048,7 @@ var Chat2 = ({
|
|
|
26929
27048
|
{
|
|
26930
27049
|
...rest,
|
|
26931
27050
|
variant,
|
|
26932
|
-
tone,
|
|
27051
|
+
tone: surfaceTone,
|
|
26933
27052
|
padding,
|
|
26934
27053
|
className: (0, import_classnames57.default)("relative overflow-hidden", className),
|
|
26935
27054
|
style: { ...style, height },
|
|
@@ -27282,12 +27401,13 @@ var ActivityFeed = ({
|
|
|
27282
27401
|
loadMoreLabel = "Load more",
|
|
27283
27402
|
totalCount,
|
|
27284
27403
|
variant = "outlined",
|
|
27285
|
-
tone = "
|
|
27404
|
+
tone: surfaceTone = "none",
|
|
27286
27405
|
padding = "md",
|
|
27287
27406
|
corner,
|
|
27288
27407
|
className = "",
|
|
27289
27408
|
...rest
|
|
27290
27409
|
}) => {
|
|
27410
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
27291
27411
|
const [active, setActive] = (0, import_react202.useState)(defaultFilter);
|
|
27292
27412
|
const options = (0, import_react202.useMemo)(
|
|
27293
27413
|
() => [{ label: "All", value: "all" }, ...filters],
|
|
@@ -27306,7 +27426,7 @@ var ActivityFeed = ({
|
|
|
27306
27426
|
{
|
|
27307
27427
|
...rest,
|
|
27308
27428
|
variant,
|
|
27309
|
-
tone,
|
|
27429
|
+
tone: surfaceTone,
|
|
27310
27430
|
padding,
|
|
27311
27431
|
corner,
|
|
27312
27432
|
className: (0, import_classnames58.default)("w-full", className),
|
|
@@ -38392,7 +38512,7 @@ var BreakdownCard = ({
|
|
|
38392
38512
|
loading = false,
|
|
38393
38513
|
ctaVariant,
|
|
38394
38514
|
variant = "outlined",
|
|
38395
|
-
tone = "
|
|
38515
|
+
tone: surfaceTone = "none",
|
|
38396
38516
|
padding = "md",
|
|
38397
38517
|
corner,
|
|
38398
38518
|
className = "",
|
|
@@ -38404,7 +38524,7 @@ var BreakdownCard = ({
|
|
|
38404
38524
|
{
|
|
38405
38525
|
...rest,
|
|
38406
38526
|
variant,
|
|
38407
|
-
tone,
|
|
38527
|
+
tone: surfaceTone,
|
|
38408
38528
|
padding,
|
|
38409
38529
|
corner,
|
|
38410
38530
|
className: (0, import_classnames59.default)("w-full", className),
|
|
@@ -38962,7 +39082,7 @@ var InfoRow = (props) => {
|
|
|
38962
39082
|
value,
|
|
38963
39083
|
hideIfEmpty = true,
|
|
38964
39084
|
variant = "elevated",
|
|
38965
|
-
tone = "
|
|
39085
|
+
tone = "none",
|
|
38966
39086
|
corner = DEFAULT_SURFACE_CORNER,
|
|
38967
39087
|
loading = false,
|
|
38968
39088
|
error,
|
|
@@ -39003,7 +39123,7 @@ var InfoRow = (props) => {
|
|
|
39003
39123
|
{
|
|
39004
39124
|
...props,
|
|
39005
39125
|
normalised,
|
|
39006
|
-
rowTone: tone,
|
|
39126
|
+
rowTone: getSurfaceAccentColor(tone),
|
|
39007
39127
|
rootProps: rest,
|
|
39008
39128
|
className
|
|
39009
39129
|
}
|
|
@@ -39014,7 +39134,7 @@ var InfoRow = (props) => {
|
|
|
39014
39134
|
{
|
|
39015
39135
|
...rest,
|
|
39016
39136
|
variant,
|
|
39017
|
-
|
|
39137
|
+
tone,
|
|
39018
39138
|
corner,
|
|
39019
39139
|
padding: "none",
|
|
39020
39140
|
scrollable: false,
|
|
@@ -39027,7 +39147,7 @@ var InfoRow = (props) => {
|
|
|
39027
39147
|
{
|
|
39028
39148
|
...props,
|
|
39029
39149
|
normalised,
|
|
39030
|
-
rowTone: tone,
|
|
39150
|
+
rowTone: getSurfaceAccentColor(tone),
|
|
39031
39151
|
className: void 0
|
|
39032
39152
|
}
|
|
39033
39153
|
)
|
|
@@ -39336,7 +39456,7 @@ var PagedPanel = ({
|
|
|
39336
39456
|
error,
|
|
39337
39457
|
emptyState,
|
|
39338
39458
|
emptyMessage,
|
|
39339
|
-
tone = "
|
|
39459
|
+
tone: surfaceTone = "none",
|
|
39340
39460
|
size = "md",
|
|
39341
39461
|
page,
|
|
39342
39462
|
onPageChange,
|
|
@@ -39348,6 +39468,7 @@ var PagedPanel = ({
|
|
|
39348
39468
|
loadingState,
|
|
39349
39469
|
...rest
|
|
39350
39470
|
}) => {
|
|
39471
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
39351
39472
|
const t = useKitT();
|
|
39352
39473
|
const pager = usePager({ count: pages.length, page, onPageChange });
|
|
39353
39474
|
const { page: current, total } = pager;
|
|
@@ -39381,7 +39502,7 @@ var PagedPanel = ({
|
|
|
39381
39502
|
Panel_default,
|
|
39382
39503
|
{
|
|
39383
39504
|
...rest,
|
|
39384
|
-
tone,
|
|
39505
|
+
tone: surfaceTone,
|
|
39385
39506
|
padding: "none",
|
|
39386
39507
|
bodyClassName: total === 0 && !loading ? "h-full" : "",
|
|
39387
39508
|
className: (0, import_classnames63.default)("relative overflow-hidden", rest.className),
|
|
@@ -39884,7 +40005,7 @@ var DetailItemCard = ({
|
|
|
39884
40005
|
expanded,
|
|
39885
40006
|
onToggle,
|
|
39886
40007
|
variant = "plain",
|
|
39887
|
-
tone = "
|
|
40008
|
+
tone: surfaceTone = "none",
|
|
39888
40009
|
corner = DEFAULT_SURFACE_CORNER,
|
|
39889
40010
|
padding = "sm",
|
|
39890
40011
|
glassOpacity,
|
|
@@ -39894,6 +40015,7 @@ var DetailItemCard = ({
|
|
|
39894
40015
|
className,
|
|
39895
40016
|
...rest
|
|
39896
40017
|
}) => {
|
|
40018
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
39897
40019
|
const [internalExpanded, setInternalExpanded] = (0, import_react232.useState)(defaultExpanded);
|
|
39898
40020
|
const isControlled = typeof expanded === "boolean";
|
|
39899
40021
|
const isExpanded = isControlled ? expanded : internalExpanded;
|
|
@@ -39918,7 +40040,7 @@ var DetailItemCard = ({
|
|
|
39918
40040
|
Panel_default,
|
|
39919
40041
|
{
|
|
39920
40042
|
variant,
|
|
39921
|
-
tone,
|
|
40043
|
+
tone: surfaceTone,
|
|
39922
40044
|
corner,
|
|
39923
40045
|
padding,
|
|
39924
40046
|
glassOpacity,
|
|
@@ -40239,7 +40361,7 @@ function ScrollBody({
|
|
|
40239
40361
|
}
|
|
40240
40362
|
function InfiniteScrollPanel({
|
|
40241
40363
|
variant = "plain",
|
|
40242
|
-
tone = "
|
|
40364
|
+
tone: surfaceTone = "none",
|
|
40243
40365
|
corner = DEFAULT_SURFACE_CORNER,
|
|
40244
40366
|
padding = "none",
|
|
40245
40367
|
glassOpacity,
|
|
@@ -40249,6 +40371,7 @@ function InfiniteScrollPanel({
|
|
|
40249
40371
|
className,
|
|
40250
40372
|
...rest
|
|
40251
40373
|
}) {
|
|
40374
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
40252
40375
|
const body = /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(ScrollBody, { tone, padding, ...rest });
|
|
40253
40376
|
if (variant === "plain") {
|
|
40254
40377
|
return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)("div", { className: (0, import_classnames67.default)("h-full min-h-0", className), children: body });
|
|
@@ -40257,7 +40380,7 @@ function InfiniteScrollPanel({
|
|
|
40257
40380
|
Panel_default,
|
|
40258
40381
|
{
|
|
40259
40382
|
variant,
|
|
40260
|
-
tone,
|
|
40383
|
+
tone: surfaceTone,
|
|
40261
40384
|
corner,
|
|
40262
40385
|
glassOpacity,
|
|
40263
40386
|
transparency,
|
|
@@ -40394,7 +40517,7 @@ var CollapsibleHelpText = ({
|
|
|
40394
40517
|
icon = "Help",
|
|
40395
40518
|
children,
|
|
40396
40519
|
className,
|
|
40397
|
-
tone = "
|
|
40520
|
+
tone = "none",
|
|
40398
40521
|
variant = "card",
|
|
40399
40522
|
corner = DEFAULT_SURFACE_CORNER,
|
|
40400
40523
|
padding = "sm",
|
|
@@ -40412,7 +40535,7 @@ var CollapsibleHelpText = ({
|
|
|
40412
40535
|
const sanitized = text2?.trim() ?? "";
|
|
40413
40536
|
const needsTruncation = sanitized.length > maxLength;
|
|
40414
40537
|
const displayText = expanded || !needsTruncation ? sanitized : truncate(sanitized, maxLength);
|
|
40415
|
-
const toneTokens3 = getCollapsibleHelpToneTokens(tone);
|
|
40538
|
+
const toneTokens3 = getCollapsibleHelpToneTokens(getSurfaceAccentColor(tone));
|
|
40416
40539
|
const bare = variant === "plain";
|
|
40417
40540
|
const body = /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
40418
40541
|
HelpBody,
|
|
@@ -40567,6 +40690,7 @@ var HelpButton = ({
|
|
|
40567
40690
|
content,
|
|
40568
40691
|
title,
|
|
40569
40692
|
placement = "auto",
|
|
40693
|
+
tone = "none",
|
|
40570
40694
|
color: color2 = "sky",
|
|
40571
40695
|
variant = "elevated",
|
|
40572
40696
|
corner = DEFAULT_SURFACE_CORNER,
|
|
@@ -40667,7 +40791,7 @@ var HelpButton = ({
|
|
|
40667
40791
|
Panel_default,
|
|
40668
40792
|
{
|
|
40669
40793
|
variant,
|
|
40670
|
-
tone
|
|
40794
|
+
tone,
|
|
40671
40795
|
corner,
|
|
40672
40796
|
padding: "none",
|
|
40673
40797
|
scrollable: false,
|
|
@@ -42248,7 +42372,7 @@ var Popover = ({
|
|
|
42248
42372
|
children,
|
|
42249
42373
|
placement = "auto",
|
|
42250
42374
|
variant = "elevated",
|
|
42251
|
-
tone = "
|
|
42375
|
+
tone = "none",
|
|
42252
42376
|
corner = DEFAULT_SURFACE_CORNER,
|
|
42253
42377
|
padding = "sm",
|
|
42254
42378
|
maxWidth = 320,
|
|
@@ -43679,7 +43803,7 @@ var AccordionBody = ({
|
|
|
43679
43803
|
const renderIcon2 = useIconRenderer();
|
|
43680
43804
|
const surface = useSurfaceText();
|
|
43681
43805
|
const trigger = getSurfaceTriggerTokens(tone);
|
|
43682
|
-
const chip = getPillColorClasses(tone, "soft");
|
|
43806
|
+
const chip = getPillColorClasses(getSurfaceAccentColor(tone), "soft");
|
|
43683
43807
|
const inset = getSurfacePaddingClass(padding);
|
|
43684
43808
|
const tokens = SIZE_TOKENS4[size] ?? SIZE_TOKENS4.md;
|
|
43685
43809
|
const headerRefs = (0, import_react249.useRef)(/* @__PURE__ */ new Map());
|
|
@@ -43691,7 +43815,7 @@ var AccordionBody = ({
|
|
|
43691
43815
|
dashed: false,
|
|
43692
43816
|
icon: "ViewRows",
|
|
43693
43817
|
title: t("kit.accordion.noItemsTitle"),
|
|
43694
|
-
tone,
|
|
43818
|
+
tone: getSurfaceAccentColor(tone),
|
|
43695
43819
|
size
|
|
43696
43820
|
}
|
|
43697
43821
|
) });
|
|
@@ -43823,7 +43947,7 @@ var AccordionBody = ({
|
|
|
43823
43947
|
item.badge ? /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
43824
43948
|
Pill_default,
|
|
43825
43949
|
{
|
|
43826
|
-
tone,
|
|
43950
|
+
tone: getSurfaceAccentColor(tone),
|
|
43827
43951
|
variant: "soft",
|
|
43828
43952
|
size: tokens.pill,
|
|
43829
43953
|
className: "flex-none",
|
|
@@ -43910,7 +44034,7 @@ var AccordionBody = ({
|
|
|
43910
44034
|
title: t("kit.accordion.loadingTitle"),
|
|
43911
44035
|
className: "rounded-none",
|
|
43912
44036
|
size: "md",
|
|
43913
|
-
color: tone
|
|
44037
|
+
color: getSurfaceAccentColor(tone)
|
|
43914
44038
|
}
|
|
43915
44039
|
) : null
|
|
43916
44040
|
]
|
|
@@ -44726,7 +44850,7 @@ var Modal = ({
|
|
|
44726
44850
|
container,
|
|
44727
44851
|
corner = DEFAULT_SURFACE_CORNER,
|
|
44728
44852
|
variant = "elevated",
|
|
44729
|
-
tone = "
|
|
44853
|
+
tone = "none",
|
|
44730
44854
|
glassOpacity,
|
|
44731
44855
|
transparency,
|
|
44732
44856
|
vibrancy,
|
|
@@ -46148,8 +46272,8 @@ var SideMenuCtaCard = ({
|
|
|
46148
46272
|
Panel_default,
|
|
46149
46273
|
{
|
|
46150
46274
|
className: cta.onDismiss ? "relative" : void 0,
|
|
46151
|
-
variant: glass ? "glass" : "outlined",
|
|
46152
|
-
tone,
|
|
46275
|
+
variant: cta.variant ?? (glass ? "glass" : "outlined"),
|
|
46276
|
+
tone: cta.surfaceTone ?? "none",
|
|
46153
46277
|
padding: "sm",
|
|
46154
46278
|
mediaPlacement: "top",
|
|
46155
46279
|
media: cta.media,
|
|
@@ -46836,7 +46960,7 @@ var SideMenu = ({
|
|
|
46836
46960
|
SideMenuDetailPanel,
|
|
46837
46961
|
{
|
|
46838
46962
|
items: footerDetails,
|
|
46839
|
-
tone: footerDetailsTone ??
|
|
46963
|
+
tone: footerDetailsTone ?? "none",
|
|
46840
46964
|
menuTone: color2,
|
|
46841
46965
|
glass: surface.idleCopy === "glass",
|
|
46842
46966
|
idleCopy: surface.idleCopy
|
|
@@ -47412,7 +47536,7 @@ var SidePanel = ({
|
|
|
47412
47536
|
transparency,
|
|
47413
47537
|
vibrancy,
|
|
47414
47538
|
specularMode,
|
|
47415
|
-
surfaceTone = "
|
|
47539
|
+
surfaceTone = "none",
|
|
47416
47540
|
size = "md",
|
|
47417
47541
|
side = "right",
|
|
47418
47542
|
overlay = false,
|
|
@@ -47440,7 +47564,7 @@ var SidePanel = ({
|
|
|
47440
47564
|
);
|
|
47441
47565
|
const surface = getSidebarSurfaceTokens(
|
|
47442
47566
|
legacyVariant ? variant : "sidebar",
|
|
47443
|
-
surfaceTone
|
|
47567
|
+
getSurfaceAccentColor(surfaceTone)
|
|
47444
47568
|
);
|
|
47445
47569
|
const surfaceText = getSidePanelTextTokens(variant);
|
|
47446
47570
|
const insetValue = inset ?? surface.offset !== "";
|
|
@@ -48187,6 +48311,7 @@ var ROW_ICON_VARIANT = "ghost";
|
|
|
48187
48311
|
var EDITOR_BUTTON_FOR_SURFACE = {
|
|
48188
48312
|
// `plain` means "the background is unknown". Glass is the treatment built
|
|
48189
48313
|
// for exactly that: a frosted backdrop reads on a white page and on a photo.
|
|
48314
|
+
none: "ghost",
|
|
48190
48315
|
plain: "glass",
|
|
48191
48316
|
elevated: "outline",
|
|
48192
48317
|
outlined: "outline",
|
|
@@ -48591,7 +48716,7 @@ var SmartGridLayout = ({
|
|
|
48591
48716
|
tone,
|
|
48592
48717
|
editThemeColor,
|
|
48593
48718
|
variant = "plain",
|
|
48594
|
-
surfaceTone = "
|
|
48719
|
+
surfaceTone = "none",
|
|
48595
48720
|
size = "md",
|
|
48596
48721
|
controlVariant,
|
|
48597
48722
|
readOnly = false,
|
|
@@ -51574,6 +51699,7 @@ var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
|
51574
51699
|
var import_react263 = require("react");
|
|
51575
51700
|
var SPLIT_VIEW_LOADERS = ["skeleton", "spinner", "progress"];
|
|
51576
51701
|
var SEARCH_VARIANT_FOR_SURFACE = {
|
|
51702
|
+
none: "flat",
|
|
51577
51703
|
elevated: "elevated",
|
|
51578
51704
|
outlined: "flat",
|
|
51579
51705
|
subtle: "ghost",
|
|
@@ -51662,7 +51788,7 @@ var SplitView = ({
|
|
|
51662
51788
|
tone,
|
|
51663
51789
|
color: color2,
|
|
51664
51790
|
variant = "elevated",
|
|
51665
|
-
surfaceTone = "
|
|
51791
|
+
surfaceTone = "none",
|
|
51666
51792
|
searchVariant,
|
|
51667
51793
|
size = "md",
|
|
51668
51794
|
showHighlightIndicator = true,
|
|
@@ -54091,7 +54217,7 @@ var StatCard = ({
|
|
|
54091
54217
|
iconTone,
|
|
54092
54218
|
trend: trendProp,
|
|
54093
54219
|
size = "md",
|
|
54094
|
-
tone,
|
|
54220
|
+
tone: surfaceTone = "none",
|
|
54095
54221
|
gradient = false,
|
|
54096
54222
|
progress: progressProp = false,
|
|
54097
54223
|
progressType = "spinner",
|
|
@@ -54132,6 +54258,7 @@ var StatCard = ({
|
|
|
54132
54258
|
children,
|
|
54133
54259
|
...rest
|
|
54134
54260
|
}) => {
|
|
54261
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
54135
54262
|
const pager = usePager({
|
|
54136
54263
|
count: pages?.length ?? 0,
|
|
54137
54264
|
page,
|
|
@@ -54200,7 +54327,7 @@ var StatCard = ({
|
|
|
54200
54327
|
Panel_default,
|
|
54201
54328
|
{
|
|
54202
54329
|
variant,
|
|
54203
|
-
tone,
|
|
54330
|
+
tone: surfaceTone,
|
|
54204
54331
|
corner,
|
|
54205
54332
|
padding,
|
|
54206
54333
|
decoration: resolvedDecoration,
|
|
@@ -56275,7 +56402,7 @@ var Stepper = ({
|
|
|
56275
56402
|
completedStepIds,
|
|
56276
56403
|
orientation = "horizontal",
|
|
56277
56404
|
variant = "elevated",
|
|
56278
|
-
tone = "
|
|
56405
|
+
tone: surfaceTone = "none",
|
|
56279
56406
|
size = "md",
|
|
56280
56407
|
nodeCorner = "full",
|
|
56281
56408
|
padding = "md",
|
|
@@ -56305,6 +56432,7 @@ var Stepper = ({
|
|
|
56305
56432
|
className,
|
|
56306
56433
|
...panelRest
|
|
56307
56434
|
}) => {
|
|
56435
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
56308
56436
|
const state = useStepper(steps, {
|
|
56309
56437
|
currentIndex,
|
|
56310
56438
|
currentStepId,
|
|
@@ -56320,7 +56448,7 @@ var Stepper = ({
|
|
|
56320
56448
|
{
|
|
56321
56449
|
className: (0, import_classnames94.default)("w-full", className),
|
|
56322
56450
|
variant,
|
|
56323
|
-
tone,
|
|
56451
|
+
tone: surfaceTone,
|
|
56324
56452
|
padding,
|
|
56325
56453
|
corner,
|
|
56326
56454
|
loaderType: loaderType === "skeleton" ? "spinner" : loaderType,
|
|
@@ -57700,7 +57828,7 @@ function TableComponent({
|
|
|
57700
57828
|
density = "default",
|
|
57701
57829
|
bordered = false,
|
|
57702
57830
|
corner,
|
|
57703
|
-
tone = "
|
|
57831
|
+
tone: surfaceTone = "none",
|
|
57704
57832
|
panelVariant = "auto",
|
|
57705
57833
|
panelTone = "auto",
|
|
57706
57834
|
panelCorner = "auto",
|
|
@@ -57765,6 +57893,7 @@ function TableComponent({
|
|
|
57765
57893
|
storage,
|
|
57766
57894
|
color: color2
|
|
57767
57895
|
}) {
|
|
57896
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
57768
57897
|
const t = useKitT();
|
|
57769
57898
|
const uid = (0, import_react276.useId)();
|
|
57770
57899
|
const getDefaultColumnVisibility = (column) => {
|
|
@@ -57794,7 +57923,7 @@ function TableComponent({
|
|
|
57794
57923
|
};
|
|
57795
57924
|
const controlColor = color2 ?? (tone === "neutral" ? "blue" : tone);
|
|
57796
57925
|
const resolvedPanelVariant = panelVariant === "auto" ? isGlassSurface(variant) ? "default" : variant : panelVariant;
|
|
57797
|
-
const resolvedPanelTone = panelTone === "auto" ?
|
|
57926
|
+
const resolvedPanelTone = panelTone === "auto" ? surfaceTone : panelTone;
|
|
57798
57927
|
const resolvedPanelCorner = panelCorner === "auto" ? corner : panelCorner;
|
|
57799
57928
|
const focusRingClass = `focus-visible:ring-${controlColor}-500 dark:focus-visible:ring-${controlColor}-400`;
|
|
57800
57929
|
const densityTokens = getTableDensityTokens(density);
|
|
@@ -58408,7 +58537,7 @@ function TableComponent({
|
|
|
58408
58537
|
Panel_default,
|
|
58409
58538
|
{
|
|
58410
58539
|
variant,
|
|
58411
|
-
tone,
|
|
58540
|
+
tone: surfaceTone,
|
|
58412
58541
|
padding: "none",
|
|
58413
58542
|
corner,
|
|
58414
58543
|
scrollable: false,
|
|
@@ -59423,7 +59552,7 @@ var AccessMatrix = ({
|
|
|
59423
59552
|
permissions,
|
|
59424
59553
|
limit = 5,
|
|
59425
59554
|
variant = "outlined",
|
|
59426
|
-
tone = "
|
|
59555
|
+
tone: surfaceTone = "none",
|
|
59427
59556
|
density,
|
|
59428
59557
|
bordered = false,
|
|
59429
59558
|
corner,
|
|
@@ -59439,6 +59568,7 @@ var AccessMatrix = ({
|
|
|
59439
59568
|
loaderProgress,
|
|
59440
59569
|
emptyState
|
|
59441
59570
|
}) => {
|
|
59571
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
59442
59572
|
const [expanded, setExpanded] = (0, import_react277.useState)(false);
|
|
59443
59573
|
const [collapsedGroups, setCollapsedGroups] = (0, import_react277.useState)(
|
|
59444
59574
|
/* @__PURE__ */ new Set()
|
|
@@ -59568,7 +59698,7 @@ var AccessMatrix = ({
|
|
|
59568
59698
|
columns,
|
|
59569
59699
|
data: rows,
|
|
59570
59700
|
variant,
|
|
59571
|
-
tone,
|
|
59701
|
+
tone: surfaceTone,
|
|
59572
59702
|
density,
|
|
59573
59703
|
bordered,
|
|
59574
59704
|
corner,
|
|
@@ -59805,7 +59935,7 @@ var KeyValueArrayField = ({
|
|
|
59805
59935
|
disabled = false,
|
|
59806
59936
|
flagDuplicateKeys = true,
|
|
59807
59937
|
variant = "outlined",
|
|
59808
|
-
tone = "
|
|
59938
|
+
tone: surfaceTone = "none",
|
|
59809
59939
|
corner = DEFAULT_SURFACE_CORNER,
|
|
59810
59940
|
padding = "sm",
|
|
59811
59941
|
glassOpacity,
|
|
@@ -59816,6 +59946,7 @@ var KeyValueArrayField = ({
|
|
|
59816
59946
|
size = "sm",
|
|
59817
59947
|
className
|
|
59818
59948
|
}) => {
|
|
59949
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
59819
59950
|
const baseId = (0, import_react278.useId)();
|
|
59820
59951
|
const labelId = `${baseId}-label`;
|
|
59821
59952
|
const errorId = `${baseId}-error`;
|
|
@@ -59912,7 +60043,7 @@ var KeyValueArrayField = ({
|
|
|
59912
60043
|
Panel_default,
|
|
59913
60044
|
{
|
|
59914
60045
|
variant,
|
|
59915
|
-
tone,
|
|
60046
|
+
tone: surfaceTone,
|
|
59916
60047
|
corner,
|
|
59917
60048
|
padding,
|
|
59918
60049
|
glassOpacity,
|
|
@@ -60017,7 +60148,7 @@ var DynamicFormField = ({
|
|
|
60017
60148
|
isVisible = true,
|
|
60018
60149
|
size = "md",
|
|
60019
60150
|
variant = "elevated",
|
|
60020
|
-
tone = "
|
|
60151
|
+
tone: surfaceTone = "none",
|
|
60021
60152
|
corner = DEFAULT_SURFACE_CORNER,
|
|
60022
60153
|
padding = "md",
|
|
60023
60154
|
inputVariant = "auto",
|
|
@@ -60032,6 +60163,7 @@ var DynamicFormField = ({
|
|
|
60032
60163
|
vibrancy,
|
|
60033
60164
|
specularMode
|
|
60034
60165
|
}) => {
|
|
60166
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
60035
60167
|
const t = useKitT();
|
|
60036
60168
|
const generatedId = (0, import_react279.useId)();
|
|
60037
60169
|
const resolvedInputVariant = inputVariant === "auto" ? INPUT_VARIANT_FOR_SURFACE[variant] : inputVariant;
|
|
@@ -60183,7 +60315,7 @@ var DynamicFormField = ({
|
|
|
60183
60315
|
{
|
|
60184
60316
|
className: (0, import_classnames99.default)("w-full", className),
|
|
60185
60317
|
variant,
|
|
60186
|
-
tone,
|
|
60318
|
+
tone: surfaceTone,
|
|
60187
60319
|
corner,
|
|
60188
60320
|
padding,
|
|
60189
60321
|
glassOpacity,
|
|
@@ -60236,6 +60368,7 @@ var NotificationModal = ({
|
|
|
60236
60368
|
onSecondaryAction,
|
|
60237
60369
|
icon,
|
|
60238
60370
|
tone,
|
|
60371
|
+
surfaceTone = "none",
|
|
60239
60372
|
size = "sm",
|
|
60240
60373
|
...rest
|
|
60241
60374
|
}) => {
|
|
@@ -60257,7 +60390,7 @@ var NotificationModal = ({
|
|
|
60257
60390
|
onClose,
|
|
60258
60391
|
title,
|
|
60259
60392
|
size,
|
|
60260
|
-
tone:
|
|
60393
|
+
tone: surfaceTone,
|
|
60261
60394
|
icon: icon ?? config.icon,
|
|
60262
60395
|
actions: /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)(Modal_default.Actions, { children: [
|
|
60263
60396
|
secondaryActionLabel && /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
@@ -61038,7 +61171,7 @@ var TimelinePanel = ({
|
|
|
61038
61171
|
headerAction,
|
|
61039
61172
|
items,
|
|
61040
61173
|
variant = "simple",
|
|
61041
|
-
tone = "
|
|
61174
|
+
tone: surfaceTone = "none",
|
|
61042
61175
|
padding = "sm",
|
|
61043
61176
|
corner = "none",
|
|
61044
61177
|
lineColor,
|
|
@@ -61057,6 +61190,7 @@ var TimelinePanel = ({
|
|
|
61057
61190
|
glassOpacity,
|
|
61058
61191
|
specularMode
|
|
61059
61192
|
}) => {
|
|
61193
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
61060
61194
|
const isDark = useIsDark();
|
|
61061
61195
|
const palette = getPanelToneStyles(tone);
|
|
61062
61196
|
const itemEls = (0, import_react280.useRef)([]);
|
|
@@ -61160,7 +61294,7 @@ var TimelinePanel = ({
|
|
|
61160
61294
|
Panel_default,
|
|
61161
61295
|
{
|
|
61162
61296
|
variant,
|
|
61163
|
-
tone,
|
|
61297
|
+
tone: surfaceTone,
|
|
61164
61298
|
padding,
|
|
61165
61299
|
corner,
|
|
61166
61300
|
className,
|
|
@@ -61621,6 +61755,7 @@ var connectorVisual = (connector) => {
|
|
|
61621
61755
|
};
|
|
61622
61756
|
var GLASS_RIM2 = "stroke-white/50 dark:stroke-white/10";
|
|
61623
61757
|
var NODE_SURFACES = {
|
|
61758
|
+
none: () => ({ fill: "fill-transparent", stroke: "stroke-none", effect: "" }),
|
|
61624
61759
|
elevated: () => ({
|
|
61625
61760
|
fill: "fill-white dark:fill-neutral-900",
|
|
61626
61761
|
stroke: "stroke-black/5 dark:stroke-white/10",
|
|
@@ -65194,7 +65329,7 @@ var ConnectionFlow = import_react285.default.forwardRef(function ConnectionFlow2
|
|
|
65194
65329
|
editMode = false,
|
|
65195
65330
|
onNodeCreate,
|
|
65196
65331
|
variant = "outlined",
|
|
65197
|
-
tone = "
|
|
65332
|
+
tone: surfaceTone = "none",
|
|
65198
65333
|
size = "md",
|
|
65199
65334
|
corner = DEFAULT_SURFACE_CORNER,
|
|
65200
65335
|
edgeStyle = "orthogonal",
|
|
@@ -65239,6 +65374,7 @@ var ConnectionFlow = import_react285.default.forwardRef(function ConnectionFlow2
|
|
|
65239
65374
|
onZoomChange,
|
|
65240
65375
|
renderNode
|
|
65241
65376
|
}, ref) {
|
|
65377
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
65242
65378
|
const editorRef = (0, import_react285.useRef)(null);
|
|
65243
65379
|
const [editBounds, setEditBounds] = (0, import_react285.useState)(null);
|
|
65244
65380
|
const onEditBounds = (0, import_react285.useCallback)((next) => setEditBounds(
|
|
@@ -65785,7 +65921,7 @@ var ConnectionFlow = import_react285.default.forwardRef(function ConnectionFlow2
|
|
|
65785
65921
|
{
|
|
65786
65922
|
className: (0, import_classnames107.default)("flex min-h-0 w-full min-w-0 flex-col", className),
|
|
65787
65923
|
variant,
|
|
65788
|
-
tone,
|
|
65924
|
+
tone: surfaceTone,
|
|
65789
65925
|
corner,
|
|
65790
65926
|
padding: "none",
|
|
65791
65927
|
flexBody: true,
|
|
@@ -68784,7 +68920,7 @@ var resolveLabels = (labelOverrides) => labelOverrides ? {
|
|
|
68784
68920
|
} : DEFAULT_LABELS;
|
|
68785
68921
|
var buildCardProps = ({
|
|
68786
68922
|
variant = "outlined",
|
|
68787
|
-
cardTone = "
|
|
68923
|
+
cardTone = "none",
|
|
68788
68924
|
corner = DEFAULT_SURFACE_CORNER,
|
|
68789
68925
|
glassOpacity = "light",
|
|
68790
68926
|
vibrancy,
|
|
@@ -69634,7 +69770,7 @@ var WorkflowTracker = ({
|
|
|
69634
69770
|
customStatuses,
|
|
69635
69771
|
mutedColor = "neutral",
|
|
69636
69772
|
variant = "outlined",
|
|
69637
|
-
cardTone = "
|
|
69773
|
+
cardTone = "none",
|
|
69638
69774
|
translucentSurfaces,
|
|
69639
69775
|
glassOpacity = "light",
|
|
69640
69776
|
vibrancy,
|
|
@@ -72091,6 +72227,7 @@ function nearestPreset(zoom, presets) {
|
|
|
72091
72227
|
}
|
|
72092
72228
|
var GanttToolbar = ({
|
|
72093
72229
|
variant = "elevated",
|
|
72230
|
+
tone = "none",
|
|
72094
72231
|
zoom,
|
|
72095
72232
|
presets,
|
|
72096
72233
|
onZoomTo,
|
|
@@ -72105,8 +72242,8 @@ var GanttToolbar = ({
|
|
|
72105
72242
|
};
|
|
72106
72243
|
const active = (0, import_react300.useMemo)(() => nearestPreset(zoom, presets), [zoom, presets]);
|
|
72107
72244
|
const chrome = (0, import_react300.useMemo)(
|
|
72108
|
-
() => getSurfaceVariantClasses(variant,
|
|
72109
|
-
[variant]
|
|
72245
|
+
() => getSurfaceVariantClasses(variant, tone),
|
|
72246
|
+
[variant, tone]
|
|
72110
72247
|
);
|
|
72111
72248
|
return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
|
|
72112
72249
|
"div",
|
|
@@ -72530,6 +72667,7 @@ var Gantt = ({
|
|
|
72530
72667
|
height = 520,
|
|
72531
72668
|
color: color2 = "blue",
|
|
72532
72669
|
variant = "elevated",
|
|
72670
|
+
tone = "none",
|
|
72533
72671
|
corner = "rounded-sm",
|
|
72534
72672
|
padding = "none",
|
|
72535
72673
|
vibrancy,
|
|
@@ -73040,6 +73178,7 @@ var Gantt = ({
|
|
|
73040
73178
|
{
|
|
73041
73179
|
ref: rootRef,
|
|
73042
73180
|
variant,
|
|
73181
|
+
tone,
|
|
73043
73182
|
padding,
|
|
73044
73183
|
corner,
|
|
73045
73184
|
vibrancy,
|
|
@@ -73067,7 +73206,7 @@ var Gantt = ({
|
|
|
73067
73206
|
{
|
|
73068
73207
|
className: (0, import_classnames128.default)(
|
|
73069
73208
|
"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",
|
|
73070
|
-
getSurfaceVariantClasses(variant,
|
|
73209
|
+
getSurfaceVariantClasses(variant, tone)
|
|
73071
73210
|
),
|
|
73072
73211
|
children: icon
|
|
73073
73212
|
}
|
|
@@ -73080,6 +73219,7 @@ var Gantt = ({
|
|
|
73080
73219
|
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "ml-auto shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
73081
73220
|
GanttToolbar,
|
|
73082
73221
|
{
|
|
73222
|
+
tone,
|
|
73083
73223
|
variant,
|
|
73084
73224
|
zoom,
|
|
73085
73225
|
presets: GANTT_ZOOM_PRESETS,
|
|
@@ -76790,7 +76930,7 @@ var Terminal = (0, import_react318.forwardRef)(
|
|
|
76790
76930
|
style,
|
|
76791
76931
|
padding = "sm",
|
|
76792
76932
|
variant = "outlined",
|
|
76793
|
-
tone = "
|
|
76933
|
+
tone = "none",
|
|
76794
76934
|
...surface
|
|
76795
76935
|
}, ref) {
|
|
76796
76936
|
return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
@@ -76853,7 +76993,7 @@ var TerminalTabs = (0, import_react319.forwardRef)(
|
|
|
76853
76993
|
height = 360,
|
|
76854
76994
|
style,
|
|
76855
76995
|
variant = "outlined",
|
|
76856
|
-
tone = "
|
|
76996
|
+
tone: surfaceTone = "none",
|
|
76857
76997
|
padding = "sm",
|
|
76858
76998
|
readOnly,
|
|
76859
76999
|
scheme,
|
|
@@ -76865,6 +77005,7 @@ var TerminalTabs = (0, import_react319.forwardRef)(
|
|
|
76865
77005
|
emptyState = "No terminal sessions",
|
|
76866
77006
|
...surface
|
|
76867
77007
|
}, ref) {
|
|
77008
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
76868
77009
|
const prefix = (0, import_react319.useId)();
|
|
76869
77010
|
const [selected, setSelected] = (0, import_react319.useState)(defaultValue ?? sessions[0]?.id);
|
|
76870
77011
|
const requested = value ?? selected;
|
|
@@ -76885,7 +77026,7 @@ var TerminalTabs = (0, import_react319.forwardRef)(
|
|
|
76885
77026
|
...surface,
|
|
76886
77027
|
"data-color-scheme": scheme ?? "auto",
|
|
76887
77028
|
className: (0, import_classnames142.default)(surface.className, scheme === "dark" && "dark"),
|
|
76888
|
-
...{ variant, tone, padding },
|
|
77029
|
+
...{ variant, tone: surfaceTone, padding },
|
|
76889
77030
|
flexBody: true,
|
|
76890
77031
|
scrollable: false,
|
|
76891
77032
|
style: {
|
|
@@ -77172,7 +77313,7 @@ function MenuRow({ item, state, depth }) {
|
|
|
77172
77313
|
item.label && /* @__PURE__ */ (0, import_jsx_runtime346.jsx)("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold text-neutral-500 dark:text-neutral-400", children: item.label }),
|
|
77173
77314
|
item.items && /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(MenuList, { items: item.disabled ? item.items.map((child) => ({ ...child, disabled: true })) : item.items, state, depth, parentLabel: label, grouped: true })
|
|
77174
77315
|
] });
|
|
77175
|
-
const itemTone2 = item.tone ?? props.itemTone ?? props.tone ?? "
|
|
77316
|
+
const itemTone2 = getSurfaceAccentColor(item.tone ?? props.itemTone ?? props.tone ?? "none");
|
|
77176
77317
|
const itemPadding = item.padding ?? props.itemPadding;
|
|
77177
77318
|
const tokens = getSideMenuItemTokens(itemTone2);
|
|
77178
77319
|
const checkable = item.type === "checkbox" || item.type === "radio";
|
|
@@ -77265,7 +77406,7 @@ function MenuSurface({ state, children, root = false }) {
|
|
|
77265
77406
|
Panel_default,
|
|
77266
77407
|
{
|
|
77267
77408
|
variant: props.variant ?? "outlined",
|
|
77268
|
-
tone: props.tone ?? "
|
|
77409
|
+
tone: props.tone ?? "none",
|
|
77269
77410
|
corner: props.corner,
|
|
77270
77411
|
padding: "none",
|
|
77271
77412
|
glassOpacity: props.glassOpacity,
|
|
@@ -77476,7 +77617,7 @@ function FileUpload({ embedded = false, compact: compact2 = false, value, defaul
|
|
|
77476
77617
|
const files = value ?? internal;
|
|
77477
77618
|
const locked = disabled || loading;
|
|
77478
77619
|
const labels = { ...defaultLabels, ...overrides };
|
|
77479
|
-
const tokens = getSideMenuItemTokens(surface.tone ?? "
|
|
77620
|
+
const tokens = getSideMenuItemTokens(getSurfaceAccentColor(surface.tone ?? "none"));
|
|
77480
77621
|
const change = (next) => {
|
|
77481
77622
|
if (value === void 0) setInternal(next);
|
|
77482
77623
|
onChange?.(next);
|
|
@@ -77531,7 +77672,7 @@ function FileUpload({ embedded = false, compact: compact2 = false, value, defaul
|
|
|
77531
77672
|
choose(Array.from(event.target.files ?? []));
|
|
77532
77673
|
event.target.value = "";
|
|
77533
77674
|
} }),
|
|
77534
|
-
/* @__PURE__ */ (0, import_jsx_runtime348.jsx)(Button_default, { size, className: compact2 ? "shrink-0" : void 0, variant: "soft", color: surface.tone ?? "
|
|
77675
|
+
/* @__PURE__ */ (0, import_jsx_runtime348.jsx)(Button_default, { size, className: compact2 ? "shrink-0" : void 0, variant: "soft", color: getSurfaceAccentColor(surface.tone ?? "none"), disabled: locked, loading, onClick: () => input.current?.click(), children: labels.browse })
|
|
77535
77676
|
]
|
|
77536
77677
|
}
|
|
77537
77678
|
),
|
|
@@ -77551,7 +77692,7 @@ function FileUpload({ embedded = false, compact: compact2 = false, value, defaul
|
|
|
77551
77692
|
] }, `${file.name}-${file.lastModified}-${index}`)) }) : !compact2 && /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("p", { className: (0, import_classnames145.default)("mt-3 text-neutral-500", density.detail), role: "status", children: labels.empty }),
|
|
77552
77693
|
(error || rejections.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("div", { role: "alert", className: "mt-3 text-xs text-rose-700 dark:text-rose-300", children: error || /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("ul", { children: rejections.map((rejection, i) => /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("li", { children: rejectionMessage?.(rejection) ?? rejection.message }, i)) }) })
|
|
77553
77694
|
] });
|
|
77554
|
-
return embedded ? /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("div", { className, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(Panel_default, { ...surface, variant: surface.variant ?? "outlined", tone: surface.tone ?? "
|
|
77695
|
+
return embedded ? /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("div", { className, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(Panel_default, { ...surface, variant: surface.variant ?? "outlined", tone: surface.tone ?? "none", padding: surface.padding ?? "sm", className, children: content });
|
|
77555
77696
|
}
|
|
77556
77697
|
|
|
77557
77698
|
// src/components/IdentityPicker/IdentityPicker.tsx
|
|
@@ -77757,7 +77898,7 @@ function IdentityPicker({
|
|
|
77757
77898
|
const selected = value === void 0 ? internal : value;
|
|
77758
77899
|
const labels = { ...defaults, ...overrides };
|
|
77759
77900
|
const locked = disabled || loading;
|
|
77760
|
-
const tone = surface.tone ?? "
|
|
77901
|
+
const tone = getSurfaceAccentColor(surface.tone ?? "none");
|
|
77761
77902
|
const tokens = getSideMenuItemTokens(tone);
|
|
77762
77903
|
const automatic = initials(name);
|
|
77763
77904
|
const change = (next) => {
|
|
@@ -77933,12 +78074,13 @@ function ActivePopover({ trigger, content, options }) {
|
|
|
77933
78074
|
onOpenChange?.(value);
|
|
77934
78075
|
}, children: content });
|
|
77935
78076
|
}
|
|
77936
|
-
function DotStepper({ steps, currentIndex, currentStepId, maxVisible = 5, size = "sm", corner = "full", tone = "
|
|
78077
|
+
function DotStepper({ steps, currentIndex, currentStepId, maxVisible = 5, size = "sm", corner = "full", tone: surfaceTone = "none", variant = "tonal", padding = "none", doneColor = "emerald", nextColor = "neutral", errorColor: errorColor2 = "rose", animated = true, disabled = false, onStepSelect, renderActiveContent, popoverProps, className, style, "aria-label": label = "Workflow progress", ...surface }) {
|
|
78078
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
77937
78079
|
const plan = planDotSteps(steps, currentIndex, currentStepId, maxVisible);
|
|
77938
78080
|
const density = sizes[size];
|
|
77939
78081
|
const fill = (status) => status === "completed" ? getTrueColorDotClass(doneColor) : status === "error" ? getTrueColorDotClass(errorColor2) : status === "active" ? getTrueColorDotClass(tone) : (0, import_classnames147.default)(getTrueColorDotClass(nextColor), "opacity-20 dark:opacity-25");
|
|
77940
78082
|
const overflow = (side, count) => count > 0 && /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(TooltipWrapper_default, { text: `${count} more steps ${side}`, children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("span", { tabIndex: disabled ? -1 : 0, role: "img", "aria-label": `${count} more steps ${side}`, className: (0, import_classnames147.default)("relative inline-flex shrink-0 items-center justify-center rounded-full focus-visible:outline-2 focus-visible:outline-offset-2", density.target), children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("span", { "aria-hidden": "true", className: (0, import_classnames147.default)("relative inline-flex items-center", density.stack), children: [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("span", { className: (0, import_classnames147.default)("absolute rounded-full", density.dot, fill(overflowStatus(side === "before" ? plan.statuses.slice(0, plan.start) : plan.statuses.slice(plan.end)))), style: { left: index === 0 ? 0 : "35%", transform: "scale(.72)", filter: index === (side === "before" ? 0 : 1) ? "opacity(.55)" : void 0, zIndex: side === "before" ? index : 1 - index } }, index)) }) }) }, side);
|
|
77941
|
-
return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(Panel_default, { ...surface, role: "group", "aria-label": label, "aria-disabled": disabled || void 0, variant, tone, corner: corner === "full" ? "none" : corner, padding: "none", className: (0, import_classnames147.default)("align-middle", disabled && "opacity-50", className), style: { width: "max-content", overflow: "visible", ...corner === "full" ? { borderRadius: 9999 } : {}, ...style }, children: /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)("div", { className: (0, import_classnames147.default)("flex w-max items-center", density.gap, getCompactSurfacePaddingClass(padding)), children: [
|
|
78083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(Panel_default, { ...surface, role: "group", "aria-label": label, "aria-disabled": disabled || void 0, variant, tone: surfaceTone, corner: corner === "full" ? "none" : corner, padding: "none", className: (0, import_classnames147.default)("align-middle", disabled && "opacity-50", className), style: { width: "max-content", overflow: "visible", ...corner === "full" ? { borderRadius: 9999 } : {}, ...style }, children: /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)("div", { className: (0, import_classnames147.default)("flex w-max items-center", density.gap, getCompactSurfacePaddingClass(padding)), children: [
|
|
77942
78084
|
overflow("before", plan.before),
|
|
77943
78085
|
plan.indices.map((index) => {
|
|
77944
78086
|
const step = steps[index];
|
|
@@ -78067,7 +78209,7 @@ function MemoryCard({
|
|
|
78067
78209
|
] })
|
|
78068
78210
|
] })
|
|
78069
78211
|
] });
|
|
78070
|
-
return /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(Panel_default, { tone: "
|
|
78212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(Panel_default, { tone: "none", variant: "outlined", padding: "none", disabled, ...surface, className: `kit-knowledge kit-memory-card ${className}`, "data-layout": layout, "data-selected": selected, "data-highlighted": highlighted, children: [
|
|
78071
78213
|
onSelect ? /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("button", { className: "kit-memory-select", type: "button", disabled, "aria-pressed": selected, onClick: () => onSelect(memory), children: body }) : /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("div", { className: "kit-memory-select", children: body }),
|
|
78072
78214
|
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)(MemoryActionButtons, { memory, disabled, onEdit, onPinChange, onArchive, copy })
|
|
78073
78215
|
] });
|
|
@@ -78204,7 +78346,7 @@ function MemoryLibrary({
|
|
|
78204
78346
|
function changeFilter(key, value) {
|
|
78205
78347
|
setFilters({ ...filters, [key]: value || void 0 });
|
|
78206
78348
|
}
|
|
78207
|
-
return /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(Panel_default, { tone: "
|
|
78349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime353.jsxs)(Panel_default, { tone: "none", variant: "outlined", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-memory-library ${className}`, "aria-busy": loading, children: [
|
|
78208
78350
|
/* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("div", { className: "kit-knowledge-toolbar", children: [
|
|
78209
78351
|
/* @__PURE__ */ (0, import_jsx_runtime353.jsxs)("label", { className: "kit-knowledge-search", children: [
|
|
78210
78352
|
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)("span", { children: copy("search") }),
|
|
@@ -78269,7 +78411,7 @@ function MemoryDetail({
|
|
|
78269
78411
|
...surface
|
|
78270
78412
|
}) {
|
|
78271
78413
|
const copy = useKnowledgeCopy(labels);
|
|
78272
|
-
return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(Panel_default, { tone: "
|
|
78414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(Panel_default, { tone: "none", variant: "outlined", padding: "none", disabled, ...surface, className: `kit-knowledge kit-memory-detail ${className}`, children: !memory ? /* @__PURE__ */ (0, import_jsx_runtime354.jsx)("p", { className: "kit-knowledge-empty", children: copy("selectMemory") }) : /* @__PURE__ */ (0, import_jsx_runtime354.jsxs)("div", { className: "kit-memory-detail-body", children: [
|
|
78273
78415
|
/* @__PURE__ */ (0, import_jsx_runtime354.jsxs)("div", { className: "kit-memory-meta", children: [
|
|
78274
78416
|
/* @__PURE__ */ (0, import_jsx_runtime354.jsx)("span", { children: copy(`kinds.${memory.kind}`) }),
|
|
78275
78417
|
/* @__PURE__ */ (0, import_jsx_runtime354.jsx)("span", { children: copy(`statuses.${memory.status ?? "active"}`) }),
|
|
@@ -78519,7 +78661,7 @@ function KnowledgeMap({
|
|
|
78519
78661
|
const matches = (0, import_react328.useMemo)(() => scene.points.filter((point) => (!selectedTopic || point.memory.topic === selectedTopic) && `${point.memory.title} ${point.memory.topic ?? ""}`.toLocaleLowerCase().includes(query.toLocaleLowerCase())), [scene, query, selectedTopic]);
|
|
78520
78662
|
const lastPage = Math.max(0, Math.ceil(matches.length / PAGE_SIZE) - 1), currentPage = Math.min(page, lastPage);
|
|
78521
78663
|
const selectableRelationships = geometry.edges.filter((edge) => edge.source.memoryId === selection || edge.target.memoryId === selection);
|
|
78522
|
-
return /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(Panel_default, { tone: "
|
|
78664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(Panel_default, { tone: "none", variant: "outlined", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-knowledge-map ${className}`, "aria-busy": loading, children: [
|
|
78523
78665
|
/* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "kit-knowledge-toolbar", children: [
|
|
78524
78666
|
/* @__PURE__ */ (0, import_jsx_runtime355.jsx)("strong", { children: copy("map") }),
|
|
78525
78667
|
/* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "kit-knowledge-view", children: [
|
|
@@ -78689,18 +78831,187 @@ function KnowledgeExplorer({
|
|
|
78689
78831
|
] });
|
|
78690
78832
|
return trace && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(TraceGraph, { ...trace, disabled: disabled || trace.disabled, nodes: traceNodes, selectedNodeId: traceId, onNodeSelect: (node) => selectTrace(node?.id ?? null) });
|
|
78691
78833
|
};
|
|
78692
|
-
return /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(Panel_default, { tone: "
|
|
78834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(Panel_default, { tone: "none", variant: "simple", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-knowledge-explorer ${className}`, children: [
|
|
78693
78835
|
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { className: "kit-knowledge-mobile-nav", role: "group", "aria-label": copy("library"), children: enabled.map((region) => /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("button", { type: "button", "aria-pressed": view === region, onClick: () => setMobileView(region), children: copy(region === "detail" ? "details" : region) }, region)) }),
|
|
78694
78836
|
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { className: "kit-knowledge-regions", children: enabled.map((region) => /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("section", { className: `kit-knowledge-region kit-knowledge-region-${region}`, "data-mobile-active": view === region, "aria-label": copy(region === "detail" ? "details" : region), children: content(region) }, region)) })
|
|
78695
78837
|
] });
|
|
78696
78838
|
}
|
|
78697
78839
|
|
|
78698
|
-
// src/
|
|
78699
|
-
var import_react330 = require("react");
|
|
78700
|
-
var import_react_dom21 = require("react-dom");
|
|
78840
|
+
// src/components/ContentActions.tsx
|
|
78701
78841
|
var import_classnames148 = __toESM(require("classnames"), 1);
|
|
78842
|
+
|
|
78843
|
+
// ../common/components/contentActions.ts
|
|
78844
|
+
var CONTENT_ACTIONS_GAPS = {
|
|
78845
|
+
xs: "gap-1",
|
|
78846
|
+
sm: "gap-2",
|
|
78847
|
+
md: "gap-3",
|
|
78848
|
+
lg: "gap-4",
|
|
78849
|
+
xl: "gap-6"
|
|
78850
|
+
};
|
|
78851
|
+
var CONTENT_ACTIONS_ALIGN = {
|
|
78852
|
+
start: "items-start",
|
|
78853
|
+
center: "items-center",
|
|
78854
|
+
end: "items-end"
|
|
78855
|
+
};
|
|
78856
|
+
|
|
78857
|
+
// src/components/ContentActions.tsx
|
|
78702
78858
|
var import_jsx_runtime357 = require("react/jsx-runtime");
|
|
78703
|
-
|
|
78859
|
+
function ContentActions({
|
|
78860
|
+
children,
|
|
78861
|
+
actions,
|
|
78862
|
+
gap = "md",
|
|
78863
|
+
align = "start",
|
|
78864
|
+
contentClassName,
|
|
78865
|
+
actionsClassName,
|
|
78866
|
+
className,
|
|
78867
|
+
...rest
|
|
78868
|
+
}) {
|
|
78869
|
+
const hasActions = actions != null && typeof actions !== "boolean";
|
|
78870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime357.jsxs)(
|
|
78871
|
+
"div",
|
|
78872
|
+
{
|
|
78873
|
+
...rest,
|
|
78874
|
+
"data-slot": "content-actions",
|
|
78875
|
+
className: (0, import_classnames148.default)("flex min-w-0 flex-nowrap", CONTENT_ACTIONS_ALIGN[align], CONTENT_ACTIONS_GAPS[gap], className),
|
|
78876
|
+
children: [
|
|
78877
|
+
/* @__PURE__ */ (0, import_jsx_runtime357.jsx)("div", { "data-slot": "content-actions-content", className: (0, import_classnames148.default)("min-w-0 flex-1", contentClassName), children }),
|
|
78878
|
+
hasActions && /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
|
|
78879
|
+
"div",
|
|
78880
|
+
{
|
|
78881
|
+
"data-slot": "content-actions-actions",
|
|
78882
|
+
className: (0, import_classnames148.default)(
|
|
78883
|
+
"flex min-w-0 flex-initial flex-nowrap items-center overflow-x-auto [&>*]:shrink-0",
|
|
78884
|
+
CONTENT_ACTIONS_GAPS[gap],
|
|
78885
|
+
actionsClassName
|
|
78886
|
+
),
|
|
78887
|
+
children: actions
|
|
78888
|
+
}
|
|
78889
|
+
)
|
|
78890
|
+
]
|
|
78891
|
+
}
|
|
78892
|
+
);
|
|
78893
|
+
}
|
|
78894
|
+
var ContentActions_default = ContentActions;
|
|
78895
|
+
|
|
78896
|
+
// src/components/CodeBlock.tsx
|
|
78897
|
+
var import_react330 = __toESM(require("react"), 1);
|
|
78898
|
+
var import_refractor = require("refractor");
|
|
78899
|
+
var import_tsx = __toESM(require("refractor/tsx"), 1);
|
|
78900
|
+
var import_jsx_runtime358 = require("react/jsx-runtime");
|
|
78901
|
+
import_refractor.refractor.register(import_tsx.default);
|
|
78902
|
+
function tokenRuns(nodes, inherited = "") {
|
|
78903
|
+
return nodes.flatMap((node) => {
|
|
78904
|
+
if (node.type === "text") return [{ text: node.value, className: inherited }];
|
|
78905
|
+
if (node.type !== "element") return [];
|
|
78906
|
+
const classes = node.properties.className;
|
|
78907
|
+
const className = [inherited, Array.isArray(classes) ? classes.join(" ") : String(classes ?? "")].filter(Boolean).join(" ");
|
|
78908
|
+
return tokenRuns(node.children, className);
|
|
78909
|
+
});
|
|
78910
|
+
}
|
|
78911
|
+
function renderLines(runs, numbered, value) {
|
|
78912
|
+
const lines = [[]];
|
|
78913
|
+
let key = 0;
|
|
78914
|
+
for (const run of runs) {
|
|
78915
|
+
run.text.split("\n").forEach((text2, index) => {
|
|
78916
|
+
if (index) lines.push([]);
|
|
78917
|
+
if (text2) lines[lines.length - 1].push(/* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: run.className || void 0, children: text2 }, key++));
|
|
78918
|
+
});
|
|
78919
|
+
}
|
|
78920
|
+
const digits = String(value.split("\n").length).length;
|
|
78921
|
+
return lines.map((line3, index) => /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(import_react330.default.Fragment, { children: [
|
|
78922
|
+
index > 0 ? "\n" : null,
|
|
78923
|
+
/* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("span", { className: "ui-code-block-line", children: [
|
|
78924
|
+
numbered && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: "ui-code-block-line-number", "aria-hidden": "true", "data-line": index + 1, style: { width: `${digits}ch` } }),
|
|
78925
|
+
/* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: "ui-code-block-line-text", children: line3 })
|
|
78926
|
+
] })
|
|
78927
|
+
] }, index));
|
|
78928
|
+
}
|
|
78929
|
+
function CodeBlock({
|
|
78930
|
+
value,
|
|
78931
|
+
onChange,
|
|
78932
|
+
readOnly = true,
|
|
78933
|
+
language,
|
|
78934
|
+
filename,
|
|
78935
|
+
showTitle = true,
|
|
78936
|
+
showCopy = true,
|
|
78937
|
+
showLineNumbers = false,
|
|
78938
|
+
wrapLines = false,
|
|
78939
|
+
maxHeight,
|
|
78940
|
+
tone = "none",
|
|
78941
|
+
color: color2 = "blue",
|
|
78942
|
+
variant = "subtle",
|
|
78943
|
+
corner = "rounded-md",
|
|
78944
|
+
editorLabel,
|
|
78945
|
+
className,
|
|
78946
|
+
...rest
|
|
78947
|
+
}) {
|
|
78948
|
+
const t = useKitT();
|
|
78949
|
+
const [copyState, setCopyState] = (0, import_react330.useState)("idle");
|
|
78950
|
+
const timer = (0, import_react330.useRef)(void 0);
|
|
78951
|
+
const generation = (0, import_react330.useRef)(0);
|
|
78952
|
+
(0, import_react330.useEffect)(() => {
|
|
78953
|
+
generation.current++;
|
|
78954
|
+
setCopyState("idle");
|
|
78955
|
+
clearTimeout(timer.current);
|
|
78956
|
+
return () => {
|
|
78957
|
+
generation.current++;
|
|
78958
|
+
clearTimeout(timer.current);
|
|
78959
|
+
};
|
|
78960
|
+
}, [value]);
|
|
78961
|
+
const highlighted = (0, import_react330.useMemo)(() => {
|
|
78962
|
+
if (!readOnly || !language) return [{ text: value, className: "" }];
|
|
78963
|
+
try {
|
|
78964
|
+
return tokenRuns(import_refractor.refractor.highlight(value, language.toLowerCase()).children);
|
|
78965
|
+
} catch {
|
|
78966
|
+
return [{ text: value, className: "" }];
|
|
78967
|
+
}
|
|
78968
|
+
}, [value, language, readOnly]);
|
|
78969
|
+
const copy = async () => {
|
|
78970
|
+
const current = ++generation.current;
|
|
78971
|
+
clearTimeout(timer.current);
|
|
78972
|
+
try {
|
|
78973
|
+
await navigator.clipboard.writeText(value);
|
|
78974
|
+
if (current !== generation.current) return;
|
|
78975
|
+
setCopyState("success");
|
|
78976
|
+
} catch {
|
|
78977
|
+
if (current !== generation.current) return;
|
|
78978
|
+
setCopyState("error");
|
|
78979
|
+
}
|
|
78980
|
+
timer.current = setTimeout(() => setCopyState("idle"), 2e3);
|
|
78981
|
+
};
|
|
78982
|
+
const copyLabel = t(copyState === "success" ? "kit.codeBlock.copied" : "kit.codeBlock.copy");
|
|
78983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("div", { ...rest, className: ["ui-code-block relative w-full min-w-0", className].filter(Boolean).join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(Panel_default, { className: "ui-code-block-surface", tone, variant, corner, padding: "none", bodyClassName: "min-w-0 overflow-hidden", children: [
|
|
78984
|
+
(showTitle || showCopy) && /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("div", { "data-slot": "code-block-header", className: `relative flex min-w-0 items-center gap-3 px-4 py-2 ${showTitle ? "justify-between border-b border-current/10" : "justify-end"}`, children: [
|
|
78985
|
+
showTitle && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: "truncate font-mono text-xs", children: filename || language || t("kit.codeBlock.code") }),
|
|
78986
|
+
showCopy && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(IconButton_default, { icon: copyState === "success" ? "Check" : "CopyClipboard", color: color2, variant: "ghost", size: "xs", srLabel: copyLabel, tooltip: copyLabel, onClick: copy })
|
|
78987
|
+
] }),
|
|
78988
|
+
/* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
|
|
78989
|
+
ScrollArea_default,
|
|
78990
|
+
{
|
|
78991
|
+
variant: "hover",
|
|
78992
|
+
className: "ui-code-block-scroll",
|
|
78993
|
+
"data-wrap": wrapLines || void 0,
|
|
78994
|
+
style: { maxHeight },
|
|
78995
|
+
tabIndex: readOnly ? 0 : -1,
|
|
78996
|
+
role: "region",
|
|
78997
|
+
"aria-label": filename || t("kit.codeBlock.code"),
|
|
78998
|
+
children: readOnly ? /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("pre", { className: "ui-code-block-source", style: { whiteSpace: wrapLines ? "pre-wrap" : "pre", overflowWrap: wrapLines ? "anywhere" : void 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("code", { className: language ? `language-${language}` : void 0, children: renderLines(highlighted, showLineNumbers, value) }) }) : /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)("div", { className: "ui-code-block-editor-layout", "data-wrap": wrapLines || void 0, children: [
|
|
78999
|
+
/* @__PURE__ */ (0, import_jsx_runtime358.jsx)("pre", { "aria-hidden": "true", className: "ui-code-block-editor-mirror", style: { whiteSpace: wrapLines ? "pre-wrap" : "pre", overflowWrap: wrapLines ? "anywhere" : void 0 }, children: value + "\n" }),
|
|
79000
|
+
/* @__PURE__ */ (0, import_jsx_runtime358.jsx)("textarea", { className: "ui-code-block-editor", "aria-label": editorLabel || t("kit.codeBlock.edit"), value, onChange: (event) => onChange?.(event.target.value), spellCheck: false, autoCapitalize: "off", autoCorrect: "off", wrap: wrapLines ? "soft" : "off" })
|
|
79001
|
+
] })
|
|
79002
|
+
}
|
|
79003
|
+
),
|
|
79004
|
+
/* @__PURE__ */ (0, import_jsx_runtime358.jsx)("span", { className: "sr-only", role: "status", children: copyState === "success" ? t("kit.codeBlock.copied") : copyState === "error" ? t("kit.codeBlock.copyFailed") : "" }),
|
|
79005
|
+
copyState === "error" && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("p", { className: "px-4 pb-2 text-xs", children: t("kit.codeBlock.copyFailed") })
|
|
79006
|
+
] }) });
|
|
79007
|
+
}
|
|
79008
|
+
|
|
79009
|
+
// src/contexts/BottomSheetContext.tsx
|
|
79010
|
+
var import_react331 = require("react");
|
|
79011
|
+
var import_react_dom21 = require("react-dom");
|
|
79012
|
+
var import_classnames149 = __toESM(require("classnames"), 1);
|
|
79013
|
+
var import_jsx_runtime359 = require("react/jsx-runtime");
|
|
79014
|
+
var BottomSheetContext = (0, import_react331.createContext)(null);
|
|
78704
79015
|
var TRANSITION_MS2 = 260;
|
|
78705
79016
|
var renderSlot = (slot, controls) => {
|
|
78706
79017
|
if (!slot) {
|
|
@@ -78711,13 +79022,13 @@ var renderSlot = (slot, controls) => {
|
|
|
78711
79022
|
var BottomSheetProvider = ({
|
|
78712
79023
|
children
|
|
78713
79024
|
}) => {
|
|
78714
|
-
const [sheet, setSheet] = (0,
|
|
78715
|
-
const [isVisible, setIsVisible] = (0,
|
|
78716
|
-
const pendingCloseRef = (0,
|
|
78717
|
-
const dismissSheet = (0,
|
|
79025
|
+
const [sheet, setSheet] = (0, import_react331.useState)(null);
|
|
79026
|
+
const [isVisible, setIsVisible] = (0, import_react331.useState)(false);
|
|
79027
|
+
const pendingCloseRef = (0, import_react331.useRef)(null);
|
|
79028
|
+
const dismissSheet = (0, import_react331.useCallback)(() => {
|
|
78718
79029
|
setIsVisible(false);
|
|
78719
79030
|
}, []);
|
|
78720
|
-
const presentSheet = (0,
|
|
79031
|
+
const presentSheet = (0, import_react331.useCallback)((options) => {
|
|
78721
79032
|
if (pendingCloseRef.current) {
|
|
78722
79033
|
clearTimeout(pendingCloseRef.current);
|
|
78723
79034
|
pendingCloseRef.current = null;
|
|
@@ -78730,7 +79041,7 @@ var BottomSheetProvider = ({
|
|
|
78730
79041
|
setTimeout(animateIn, 0);
|
|
78731
79042
|
}
|
|
78732
79043
|
}, []);
|
|
78733
|
-
(0,
|
|
79044
|
+
(0, import_react331.useEffect)(() => {
|
|
78734
79045
|
if (!isVisible && sheet) {
|
|
78735
79046
|
pendingCloseRef.current = setTimeout(() => {
|
|
78736
79047
|
sheet.onClose?.();
|
|
@@ -78745,7 +79056,7 @@ var BottomSheetProvider = ({
|
|
|
78745
79056
|
}
|
|
78746
79057
|
return void 0;
|
|
78747
79058
|
}, [isVisible, sheet]);
|
|
78748
|
-
(0,
|
|
79059
|
+
(0, import_react331.useEffect)(
|
|
78749
79060
|
() => () => {
|
|
78750
79061
|
if (pendingCloseRef.current) {
|
|
78751
79062
|
clearTimeout(pendingCloseRef.current);
|
|
@@ -78753,13 +79064,13 @@ var BottomSheetProvider = ({
|
|
|
78753
79064
|
},
|
|
78754
79065
|
[]
|
|
78755
79066
|
);
|
|
78756
|
-
const controls = (0,
|
|
79067
|
+
const controls = (0, import_react331.useMemo)(
|
|
78757
79068
|
() => ({
|
|
78758
79069
|
dismiss: dismissSheet
|
|
78759
79070
|
}),
|
|
78760
79071
|
[dismissSheet]
|
|
78761
79072
|
);
|
|
78762
|
-
const contextValue = (0,
|
|
79073
|
+
const contextValue = (0, import_react331.useMemo)(
|
|
78763
79074
|
() => ({
|
|
78764
79075
|
presentSheet,
|
|
78765
79076
|
dismissSheet,
|
|
@@ -78769,11 +79080,11 @@ var BottomSheetProvider = ({
|
|
|
78769
79080
|
[presentSheet, dismissSheet, sheet, isVisible]
|
|
78770
79081
|
);
|
|
78771
79082
|
const overlayNode = typeof document !== "undefined" && sheet ? (0, import_react_dom21.createPortal)(
|
|
78772
|
-
/* @__PURE__ */ (0,
|
|
78773
|
-
/* @__PURE__ */ (0,
|
|
79083
|
+
/* @__PURE__ */ (0, import_jsx_runtime359.jsxs)("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
|
|
79084
|
+
/* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
|
|
78774
79085
|
"div",
|
|
78775
79086
|
{
|
|
78776
|
-
className: (0,
|
|
79087
|
+
className: (0, import_classnames149.default)(
|
|
78777
79088
|
"absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
|
|
78778
79089
|
isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
|
|
78779
79090
|
),
|
|
@@ -78783,24 +79094,24 @@ var BottomSheetProvider = ({
|
|
|
78783
79094
|
}
|
|
78784
79095
|
}
|
|
78785
79096
|
),
|
|
78786
|
-
/* @__PURE__ */ (0,
|
|
79097
|
+
/* @__PURE__ */ (0, import_jsx_runtime359.jsx)("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(
|
|
78787
79098
|
"section",
|
|
78788
79099
|
{
|
|
78789
79100
|
role: "dialog",
|
|
78790
79101
|
"aria-modal": "true",
|
|
78791
|
-
className: (0,
|
|
79102
|
+
className: (0, import_classnames149.default)(
|
|
78792
79103
|
"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",
|
|
78793
79104
|
sheet.className,
|
|
78794
79105
|
isVisible ? "translate-y-0" : "translate-y-full"
|
|
78795
79106
|
),
|
|
78796
79107
|
style: { minHeight: "25vh", maxHeight: "85vh" },
|
|
78797
79108
|
children: [
|
|
78798
|
-
/* @__PURE__ */ (0,
|
|
78799
|
-
/* @__PURE__ */ (0,
|
|
78800
|
-
sheet.title && /* @__PURE__ */ (0,
|
|
78801
|
-
sheet.description && /* @__PURE__ */ (0,
|
|
79109
|
+
/* @__PURE__ */ (0, import_jsx_runtime359.jsxs)("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
|
|
79110
|
+
/* @__PURE__ */ (0, import_jsx_runtime359.jsxs)("div", { className: "space-y-1", children: [
|
|
79111
|
+
sheet.title && /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
|
|
79112
|
+
sheet.description && /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
|
|
78802
79113
|
] }),
|
|
78803
|
-
(sheet.showCloseButton ?? true) && /* @__PURE__ */ (0,
|
|
79114
|
+
(sheet.showCloseButton ?? true) && /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
|
|
78804
79115
|
IconButton_default,
|
|
78805
79116
|
{
|
|
78806
79117
|
icon: "Close",
|
|
@@ -78812,21 +79123,21 @@ var BottomSheetProvider = ({
|
|
|
78812
79123
|
}
|
|
78813
79124
|
)
|
|
78814
79125
|
] }),
|
|
78815
|
-
/* @__PURE__ */ (0,
|
|
78816
|
-
sheet.actions && /* @__PURE__ */ (0,
|
|
79126
|
+
/* @__PURE__ */ (0, import_jsx_runtime359.jsx)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
|
|
79127
|
+
sheet.actions && /* @__PURE__ */ (0, import_jsx_runtime359.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) })
|
|
78817
79128
|
]
|
|
78818
79129
|
}
|
|
78819
79130
|
) })
|
|
78820
79131
|
] }),
|
|
78821
79132
|
document.body
|
|
78822
79133
|
) : null;
|
|
78823
|
-
return /* @__PURE__ */ (0,
|
|
79134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(BottomSheetContext.Provider, { value: contextValue, children: [
|
|
78824
79135
|
children,
|
|
78825
79136
|
overlayNode
|
|
78826
79137
|
] });
|
|
78827
79138
|
};
|
|
78828
79139
|
var useBottomSheet = () => {
|
|
78829
|
-
const context = (0,
|
|
79140
|
+
const context = (0, import_react331.useContext)(BottomSheetContext);
|
|
78830
79141
|
if (!context) {
|
|
78831
79142
|
throw new Error("useBottomSheet must be used within a BottomSheetProvider");
|
|
78832
79143
|
}
|
|
@@ -79460,8 +79771,8 @@ var SYSTEM_VARIABLES = [
|
|
|
79460
79771
|
];
|
|
79461
79772
|
|
|
79462
79773
|
// src/components/MetricBar.tsx
|
|
79463
|
-
var
|
|
79464
|
-
var
|
|
79774
|
+
var import_classnames150 = __toESM(require("classnames"), 1);
|
|
79775
|
+
var import_jsx_runtime360 = require("react/jsx-runtime");
|
|
79465
79776
|
var MetricBar = ({
|
|
79466
79777
|
label,
|
|
79467
79778
|
value,
|
|
@@ -79471,7 +79782,7 @@ var MetricBar = ({
|
|
|
79471
79782
|
size = "sm",
|
|
79472
79783
|
className,
|
|
79473
79784
|
...rest
|
|
79474
|
-
}) => /* @__PURE__ */ (0,
|
|
79785
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
|
|
79475
79786
|
Progress_default,
|
|
79476
79787
|
{
|
|
79477
79788
|
...rest,
|
|
@@ -79481,13 +79792,13 @@ var MetricBar = ({
|
|
|
79481
79792
|
formatValue: value !== void 0 ? () => String(value) : void 0,
|
|
79482
79793
|
size,
|
|
79483
79794
|
color: tone ?? color2 ?? "blue",
|
|
79484
|
-
className: (0,
|
|
79795
|
+
className: (0, import_classnames150.default)("w-full", className)
|
|
79485
79796
|
}
|
|
79486
79797
|
);
|
|
79487
79798
|
MetricBar.displayName = "MetricBar";
|
|
79488
79799
|
|
|
79489
79800
|
// src/components/NetworkGraph/NetworkGraph.tsx
|
|
79490
|
-
var
|
|
79801
|
+
var import_react333 = require("react");
|
|
79491
79802
|
|
|
79492
79803
|
// src/components/NetworkGraph/model.ts
|
|
79493
79804
|
var CELL = 64;
|
|
@@ -79631,17 +79942,17 @@ function findNetworkPath(edges, source, target) {
|
|
|
79631
79942
|
}
|
|
79632
79943
|
|
|
79633
79944
|
// src/components/NetworkGraph/useNetworkCanvas.ts
|
|
79634
|
-
var
|
|
79945
|
+
var import_react332 = require("react");
|
|
79635
79946
|
function useNetworkCanvas(options) {
|
|
79636
|
-
const canvasRef = (0,
|
|
79637
|
-
const view = (0,
|
|
79638
|
-
const size = (0,
|
|
79639
|
-
const latest = (0,
|
|
79640
|
-
const frame = (0,
|
|
79641
|
-
const [zoom, setZoom] = (0,
|
|
79642
|
-
const colors3 = (0,
|
|
79643
|
-
const textColor = (0,
|
|
79644
|
-
const draw = (0,
|
|
79947
|
+
const canvasRef = (0, import_react332.useRef)(null);
|
|
79948
|
+
const view = (0, import_react332.useRef)({ x: 0, y: 0, zoom: 1 });
|
|
79949
|
+
const size = (0, import_react332.useRef)({ width: 1, height: 1 });
|
|
79950
|
+
const latest = (0, import_react332.useRef)(options);
|
|
79951
|
+
const frame = (0, import_react332.useRef)(null);
|
|
79952
|
+
const [zoom, setZoom] = (0, import_react332.useState)(1);
|
|
79953
|
+
const colors3 = (0, import_react332.useRef)(/* @__PURE__ */ new Map());
|
|
79954
|
+
const textColor = (0, import_react332.useRef)("#737373");
|
|
79955
|
+
const draw = (0, import_react332.useCallback)(() => {
|
|
79645
79956
|
const canvas = canvasRef.current;
|
|
79646
79957
|
const ctx = canvas?.getContext("2d");
|
|
79647
79958
|
if (!canvas || !ctx) return;
|
|
@@ -79741,14 +80052,14 @@ function useNetworkCanvas(options) {
|
|
|
79741
80052
|
}
|
|
79742
80053
|
ctx.globalAlpha = 1;
|
|
79743
80054
|
}, []);
|
|
79744
|
-
const requestDraw = (0,
|
|
80055
|
+
const requestDraw = (0, import_react332.useCallback)(() => {
|
|
79745
80056
|
if (frame.current !== null) return;
|
|
79746
80057
|
frame.current = requestAnimationFrame(() => {
|
|
79747
80058
|
frame.current = null;
|
|
79748
80059
|
draw();
|
|
79749
80060
|
});
|
|
79750
80061
|
}, [draw]);
|
|
79751
|
-
const update = (0,
|
|
80062
|
+
const update = (0, import_react332.useCallback)(
|
|
79752
80063
|
(next) => {
|
|
79753
80064
|
view.current = next;
|
|
79754
80065
|
setZoom(next.zoom);
|
|
@@ -79757,7 +80068,7 @@ function useNetworkCanvas(options) {
|
|
|
79757
80068
|
},
|
|
79758
80069
|
[requestDraw]
|
|
79759
80070
|
);
|
|
79760
|
-
const fit = (0,
|
|
80071
|
+
const fit = (0, import_react332.useCallback)(
|
|
79761
80072
|
() => update(
|
|
79762
80073
|
fitNetwork(
|
|
79763
80074
|
latest.current.nodes,
|
|
@@ -79767,11 +80078,11 @@ function useNetworkCanvas(options) {
|
|
|
79767
80078
|
),
|
|
79768
80079
|
[update]
|
|
79769
80080
|
);
|
|
79770
|
-
const zoomBy = (0,
|
|
80081
|
+
const zoomBy = (0, import_react332.useCallback)(
|
|
79771
80082
|
(factor, x = size.current.width / 2, y = size.current.height / 2) => update(zoomAt(view.current, factor, x, y)),
|
|
79772
80083
|
[update]
|
|
79773
80084
|
);
|
|
79774
|
-
const focusNode = (0,
|
|
80085
|
+
const focusNode = (0, import_react332.useCallback)(
|
|
79775
80086
|
(node) => {
|
|
79776
80087
|
update({
|
|
79777
80088
|
...view.current,
|
|
@@ -79781,14 +80092,14 @@ function useNetworkCanvas(options) {
|
|
|
79781
80092
|
},
|
|
79782
80093
|
[update]
|
|
79783
80094
|
);
|
|
79784
|
-
(0,
|
|
80095
|
+
(0, import_react332.useEffect)(() => {
|
|
79785
80096
|
latest.current = options;
|
|
79786
80097
|
requestDraw();
|
|
79787
80098
|
}, [options, requestDraw]);
|
|
79788
|
-
(0,
|
|
80099
|
+
(0, import_react332.useEffect)(() => {
|
|
79789
80100
|
fit();
|
|
79790
80101
|
}, [options.model, fit]);
|
|
79791
|
-
(0,
|
|
80102
|
+
(0, import_react332.useEffect)(() => {
|
|
79792
80103
|
const canvas = canvasRef.current;
|
|
79793
80104
|
if (!canvas) return;
|
|
79794
80105
|
const measure = () => {
|
|
@@ -79841,7 +80152,7 @@ function useNetworkCanvas(options) {
|
|
|
79841
80152
|
}
|
|
79842
80153
|
|
|
79843
80154
|
// src/components/NetworkGraph/NetworkGraph.tsx
|
|
79844
|
-
var
|
|
80155
|
+
var import_jsx_runtime361 = require("react/jsx-runtime");
|
|
79845
80156
|
var NO_COMMUNITIES = [];
|
|
79846
80157
|
var NO_HIGHLIGHTS = [];
|
|
79847
80158
|
function NetworkGraph({
|
|
@@ -79865,18 +80176,19 @@ function NetworkGraph({
|
|
|
79865
80176
|
ariaLabel,
|
|
79866
80177
|
emptyMessage,
|
|
79867
80178
|
onViewportChange,
|
|
79868
|
-
tone = "
|
|
80179
|
+
tone: surfaceTone = "none",
|
|
79869
80180
|
variant = "elevated",
|
|
79870
80181
|
disabled = false,
|
|
79871
80182
|
loading = false,
|
|
79872
80183
|
...panelProps
|
|
79873
80184
|
}) {
|
|
80185
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
79874
80186
|
const t = useKitT();
|
|
79875
|
-
const helpId = (0,
|
|
79876
|
-
const layoutRef = (0,
|
|
79877
|
-
const [hasLegendSpace, setHasLegendSpace] = (0,
|
|
80187
|
+
const helpId = (0, import_react333.useId)();
|
|
80188
|
+
const layoutRef = (0, import_react333.useRef)(null);
|
|
80189
|
+
const [hasLegendSpace, setHasLegendSpace] = (0, import_react333.useState)(true);
|
|
79878
80190
|
const legendOnRight = legendPosition === "right" || legendPosition === "auto" && hasLegendSpace;
|
|
79879
|
-
(0,
|
|
80191
|
+
(0, import_react333.useEffect)(() => {
|
|
79880
80192
|
const element = layoutRef.current;
|
|
79881
80193
|
if (!element || legendPosition !== "auto") return;
|
|
79882
80194
|
const measure = () => setHasLegendSpace(element.getBoundingClientRect().width >= 600);
|
|
@@ -79885,38 +80197,38 @@ function NetworkGraph({
|
|
|
79885
80197
|
observer.observe(element);
|
|
79886
80198
|
return () => observer.disconnect();
|
|
79887
80199
|
}, [legendPosition, loading]);
|
|
79888
|
-
const model = (0,
|
|
80200
|
+
const model = (0, import_react333.useMemo)(
|
|
79889
80201
|
() => buildNetwork(nodes, edges, communities),
|
|
79890
80202
|
[nodes, edges, communities]
|
|
79891
80203
|
);
|
|
79892
|
-
const [internalSelected, setInternalSelected] = (0,
|
|
80204
|
+
const [internalSelected, setInternalSelected] = (0, import_react333.useState)(
|
|
79893
80205
|
defaultSelectedNodeId
|
|
79894
80206
|
);
|
|
79895
|
-
const [hidden, setHidden] = (0,
|
|
79896
|
-
const [focused, setFocused] = (0,
|
|
79897
|
-
const [query, setQuery] = (0,
|
|
79898
|
-
const enabled = (0,
|
|
80207
|
+
const [hidden, setHidden] = (0, import_react333.useState)(() => /* @__PURE__ */ new Set());
|
|
80208
|
+
const [focused, setFocused] = (0, import_react333.useState)(null);
|
|
80209
|
+
const [query, setQuery] = (0, import_react333.useState)("");
|
|
80210
|
+
const enabled = (0, import_react333.useMemo)(
|
|
79899
80211
|
() => new Set(
|
|
79900
80212
|
visibleCommunityIds ?? model.groups.filter((g) => !hidden.has(g.id)).map((g) => g.id)
|
|
79901
80213
|
),
|
|
79902
80214
|
[visibleCommunityIds, model, hidden]
|
|
79903
80215
|
);
|
|
79904
|
-
const visibleNodes = (0,
|
|
80216
|
+
const visibleNodes = (0, import_react333.useMemo)(
|
|
79905
80217
|
() => model.nodes.filter((n) => !n.community || enabled.has(n.community)),
|
|
79906
80218
|
[model, enabled]
|
|
79907
80219
|
);
|
|
79908
|
-
const visible = (0,
|
|
80220
|
+
const visible = (0, import_react333.useMemo)(
|
|
79909
80221
|
() => new Set(visibleNodes.map((n) => n.id)),
|
|
79910
80222
|
[visibleNodes]
|
|
79911
80223
|
);
|
|
79912
80224
|
const selection = selectedNodeId === void 0 ? internalSelected : selectedNodeId;
|
|
79913
80225
|
const selected = selection !== null && visible.has(selection) ? selection : null;
|
|
79914
80226
|
const activeFocus = focused !== null && visible.has(focused) ? focused : null;
|
|
79915
|
-
const highlighted = (0,
|
|
80227
|
+
const highlighted = (0, import_react333.useMemo)(
|
|
79916
80228
|
() => new Set(highlightedEdgeIds),
|
|
79917
80229
|
[highlightedEdgeIds]
|
|
79918
80230
|
);
|
|
79919
|
-
const counts = (0,
|
|
80231
|
+
const counts = (0, import_react333.useMemo)(() => {
|
|
79920
80232
|
const result = /* @__PURE__ */ new Map();
|
|
79921
80233
|
for (const n of model.nodes)
|
|
79922
80234
|
if (n.community)
|
|
@@ -79936,7 +80248,7 @@ function NetworkGraph({
|
|
|
79936
80248
|
onViewportChange
|
|
79937
80249
|
});
|
|
79938
80250
|
const locked = disabled || loading;
|
|
79939
|
-
const drag = (0,
|
|
80251
|
+
const drag = (0, import_react333.useRef)(null);
|
|
79940
80252
|
const select = (id) => {
|
|
79941
80253
|
if (locked) return;
|
|
79942
80254
|
if (selectedNodeId === void 0) setInternalSelected(id);
|
|
@@ -79952,7 +80264,7 @@ function NetworkGraph({
|
|
|
79952
80264
|
);
|
|
79953
80265
|
onVisibleCommunitiesChange?.(ids);
|
|
79954
80266
|
};
|
|
79955
|
-
(0,
|
|
80267
|
+
(0, import_react333.useEffect)(() => {
|
|
79956
80268
|
const element = canvas.canvasRef.current;
|
|
79957
80269
|
if (!element || locked) return;
|
|
79958
80270
|
const wheel = (event) => {
|
|
@@ -80001,13 +80313,13 @@ function NetworkGraph({
|
|
|
80001
80313
|
}
|
|
80002
80314
|
};
|
|
80003
80315
|
const focusedNode = model.byId.get(activeFocus ?? selected ?? "");
|
|
80004
|
-
const matchingNodes = (0,
|
|
80316
|
+
const matchingNodes = (0, import_react333.useMemo)(() => {
|
|
80005
80317
|
const search = query.toLocaleLowerCase();
|
|
80006
80318
|
return visibleNodes.filter((n) => (n.label ?? n.id).toLocaleLowerCase().includes(search)).slice(0, 50).map((n) => ({ value: n.id, label: n.label ?? n.id }));
|
|
80007
80319
|
}, [visibleNodes, query]);
|
|
80008
80320
|
const graphHeight = Number.isFinite(height) ? Math.max(160, height) : 480;
|
|
80009
|
-
const resolvedLegendTone = legendTone === "auto" ?
|
|
80010
|
-
const legendContent = /* @__PURE__ */ (0,
|
|
80321
|
+
const resolvedLegendTone = legendTone === "auto" ? surfaceTone : legendTone;
|
|
80322
|
+
const legendContent = /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
|
|
80011
80323
|
"fieldset",
|
|
80012
80324
|
{
|
|
80013
80325
|
disabled: locked,
|
|
@@ -80016,24 +80328,24 @@ function NetworkGraph({
|
|
|
80016
80328
|
maxHeight: legendPanel ? Math.max(96, graphHeight - 64) : graphHeight
|
|
80017
80329
|
},
|
|
80018
80330
|
children: [
|
|
80019
|
-
/* @__PURE__ */ (0,
|
|
80020
|
-
/* @__PURE__ */ (0,
|
|
80331
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
|
|
80332
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80021
80333
|
Checkbox_default,
|
|
80022
80334
|
{
|
|
80023
80335
|
size: "sm",
|
|
80024
|
-
tone: resolvedLegendTone,
|
|
80336
|
+
tone: getSurfaceAccentColor(resolvedLegendTone),
|
|
80025
80337
|
label: t("kit.networkGraph.selectAll"),
|
|
80026
80338
|
checked: model.groups.every((g) => enabled.has(g.id)),
|
|
80027
80339
|
indeterminate: model.groups.some((g) => enabled.has(g.id)) && !model.groups.every((g) => enabled.has(g.id)),
|
|
80028
80340
|
onChange: (event) => filter(event.target.checked ? model.groups.map((g) => g.id) : [])
|
|
80029
80341
|
}
|
|
80030
80342
|
),
|
|
80031
|
-
model.groups.map((group) => /* @__PURE__ */ (0,
|
|
80032
|
-
/* @__PURE__ */ (0,
|
|
80343
|
+
model.groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
80344
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80033
80345
|
Checkbox_default,
|
|
80034
80346
|
{
|
|
80035
80347
|
size: "sm",
|
|
80036
|
-
tone: group.tone ?? resolvedLegendTone,
|
|
80348
|
+
tone: group.tone ?? getSurfaceAccentColor(resolvedLegendTone),
|
|
80037
80349
|
label: group.label,
|
|
80038
80350
|
checked: enabled.has(group.id),
|
|
80039
80351
|
onChange: (event) => filter(
|
|
@@ -80041,23 +80353,23 @@ function NetworkGraph({
|
|
|
80041
80353
|
)
|
|
80042
80354
|
}
|
|
80043
80355
|
),
|
|
80044
|
-
/* @__PURE__ */ (0,
|
|
80356
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
|
|
80045
80357
|
] }, group.id))
|
|
80046
80358
|
]
|
|
80047
80359
|
}
|
|
80048
80360
|
);
|
|
80049
|
-
return /* @__PURE__ */ (0,
|
|
80361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80050
80362
|
Panel_default,
|
|
80051
80363
|
{
|
|
80052
80364
|
...panelProps,
|
|
80053
|
-
tone,
|
|
80365
|
+
tone: surfaceTone,
|
|
80054
80366
|
variant,
|
|
80055
80367
|
padding: "sm",
|
|
80056
80368
|
disabled,
|
|
80057
80369
|
loading,
|
|
80058
80370
|
clickable: false,
|
|
80059
80371
|
scrollable: false,
|
|
80060
|
-
children: /* @__PURE__ */ (0,
|
|
80372
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
|
|
80061
80373
|
"div",
|
|
80062
80374
|
{
|
|
80063
80375
|
className: "flex min-w-0 flex-col gap-3",
|
|
@@ -80065,7 +80377,7 @@ function NetworkGraph({
|
|
|
80065
80377
|
"aria-label": ariaLabel ?? t("kit.networkGraph.name"),
|
|
80066
80378
|
"aria-disabled": locked || void 0,
|
|
80067
80379
|
children: [
|
|
80068
|
-
showControls && /* @__PURE__ */ (0,
|
|
80380
|
+
showControls && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80069
80381
|
Combobox_default,
|
|
80070
80382
|
{
|
|
80071
80383
|
size: "sm",
|
|
@@ -80087,7 +80399,7 @@ function NetworkGraph({
|
|
|
80087
80399
|
}
|
|
80088
80400
|
}
|
|
80089
80401
|
) }) }),
|
|
80090
|
-
/* @__PURE__ */ (0,
|
|
80402
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
|
|
80091
80403
|
"div",
|
|
80092
80404
|
{
|
|
80093
80405
|
ref: layoutRef,
|
|
@@ -80095,13 +80407,13 @@ function NetworkGraph({
|
|
|
80095
80407
|
style: { flexDirection: legendOnRight ? "row" : "column" },
|
|
80096
80408
|
"data-legend-position": legendOnRight ? "right" : "bottom",
|
|
80097
80409
|
children: [
|
|
80098
|
-
/* @__PURE__ */ (0,
|
|
80410
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
|
|
80099
80411
|
"div",
|
|
80100
80412
|
{
|
|
80101
80413
|
className: "relative min-w-0 flex-1",
|
|
80102
80414
|
style: { height: graphHeight, minHeight: graphHeight },
|
|
80103
80415
|
children: [
|
|
80104
|
-
/* @__PURE__ */ (0,
|
|
80416
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80105
80417
|
"canvas",
|
|
80106
80418
|
{
|
|
80107
80419
|
ref: canvas.canvasRef,
|
|
@@ -80170,11 +80482,11 @@ function NetworkGraph({
|
|
|
80170
80482
|
}
|
|
80171
80483
|
}
|
|
80172
80484
|
),
|
|
80173
|
-
showControls && /* @__PURE__ */ (0,
|
|
80174
|
-
/* @__PURE__ */ (0,
|
|
80485
|
+
showControls && /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)("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: [
|
|
80486
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80175
80487
|
IconButton_default,
|
|
80176
80488
|
{
|
|
80177
|
-
icon: /* @__PURE__ */ (0,
|
|
80489
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
|
|
80178
80490
|
"svg",
|
|
80179
80491
|
{
|
|
80180
80492
|
viewBox: "0 0 24 24",
|
|
@@ -80185,10 +80497,10 @@ function NetworkGraph({
|
|
|
80185
80497
|
strokeLinejoin: "round",
|
|
80186
80498
|
"aria-hidden": "true",
|
|
80187
80499
|
children: [
|
|
80188
|
-
/* @__PURE__ */ (0,
|
|
80189
|
-
/* @__PURE__ */ (0,
|
|
80190
|
-
/* @__PURE__ */ (0,
|
|
80191
|
-
/* @__PURE__ */ (0,
|
|
80500
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
|
|
80501
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
|
|
80502
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
|
|
80503
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
|
|
80192
80504
|
]
|
|
80193
80505
|
}
|
|
80194
80506
|
),
|
|
@@ -80201,10 +80513,10 @@ function NetworkGraph({
|
|
|
80201
80513
|
onClick: canvas.fit
|
|
80202
80514
|
}
|
|
80203
80515
|
),
|
|
80204
|
-
/* @__PURE__ */ (0,
|
|
80516
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80205
80517
|
IconButton_default,
|
|
80206
80518
|
{
|
|
80207
|
-
icon: /* @__PURE__ */ (0,
|
|
80519
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80208
80520
|
"svg",
|
|
80209
80521
|
{
|
|
80210
80522
|
viewBox: "0 0 24 24",
|
|
@@ -80213,7 +80525,7 @@ function NetworkGraph({
|
|
|
80213
80525
|
strokeWidth: 2,
|
|
80214
80526
|
strokeLinecap: "round",
|
|
80215
80527
|
"aria-hidden": "true",
|
|
80216
|
-
children: /* @__PURE__ */ (0,
|
|
80528
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("path", { d: "M6 12h12" })
|
|
80217
80529
|
}
|
|
80218
80530
|
),
|
|
80219
80531
|
size: "xs",
|
|
@@ -80225,7 +80537,7 @@ function NetworkGraph({
|
|
|
80225
80537
|
onClick: () => canvas.zoomBy(0.8)
|
|
80226
80538
|
}
|
|
80227
80539
|
),
|
|
80228
|
-
/* @__PURE__ */ (0,
|
|
80540
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsxs)(
|
|
80229
80541
|
"span",
|
|
80230
80542
|
{
|
|
80231
80543
|
className: "min-w-[3.5ch] px-1 text-center text-[11px] tabular-nums text-neutral-500 dark:text-neutral-400",
|
|
@@ -80236,7 +80548,7 @@ function NetworkGraph({
|
|
|
80236
80548
|
]
|
|
80237
80549
|
}
|
|
80238
80550
|
),
|
|
80239
|
-
/* @__PURE__ */ (0,
|
|
80551
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80240
80552
|
IconButton_default,
|
|
80241
80553
|
{
|
|
80242
80554
|
icon: "Add",
|
|
@@ -80249,7 +80561,7 @@ function NetworkGraph({
|
|
|
80249
80561
|
onClick: () => canvas.zoomBy(1.25)
|
|
80250
80562
|
}
|
|
80251
80563
|
),
|
|
80252
|
-
/* @__PURE__ */ (0,
|
|
80564
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80253
80565
|
IconButton_default,
|
|
80254
80566
|
{
|
|
80255
80567
|
icon: "Reset",
|
|
@@ -80267,18 +80579,18 @@ function NetworkGraph({
|
|
|
80267
80579
|
}
|
|
80268
80580
|
)
|
|
80269
80581
|
] }),
|
|
80270
|
-
!visibleNodes.length && /* @__PURE__ */ (0,
|
|
80582
|
+
!visibleNodes.length && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center text-sm", children: emptyMessage ?? t("kit.networkGraph.empty") })
|
|
80271
80583
|
]
|
|
80272
80584
|
}
|
|
80273
80585
|
),
|
|
80274
|
-
showCommunities && model.groups.length > 0 && /* @__PURE__ */ (0,
|
|
80586
|
+
showCommunities && model.groups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80275
80587
|
"div",
|
|
80276
80588
|
{
|
|
80277
80589
|
className: "min-w-0 shrink-0",
|
|
80278
80590
|
style: {
|
|
80279
80591
|
width: legendOnRight ? legendPanel ? 224 : 192 : "100%"
|
|
80280
80592
|
},
|
|
80281
|
-
children: legendPanel ? /* @__PURE__ */ (0,
|
|
80593
|
+
children: legendPanel ? /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80282
80594
|
Panel_default,
|
|
80283
80595
|
{
|
|
80284
80596
|
variant: legendVariant === "auto" ? variant : legendVariant,
|
|
@@ -80297,8 +80609,8 @@ function NetworkGraph({
|
|
|
80297
80609
|
]
|
|
80298
80610
|
}
|
|
80299
80611
|
),
|
|
80300
|
-
/* @__PURE__ */ (0,
|
|
80301
|
-
/* @__PURE__ */ (0,
|
|
80612
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
|
|
80613
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
|
|
80302
80614
|
"p",
|
|
80303
80615
|
{
|
|
80304
80616
|
role: "status",
|
|
@@ -80380,6 +80692,7 @@ function NetworkGraph({
|
|
|
80380
80692
|
Chart,
|
|
80381
80693
|
Chat,
|
|
80382
80694
|
Checkbox,
|
|
80695
|
+
CodeBlock,
|
|
80383
80696
|
CollapseChevron,
|
|
80384
80697
|
CollapseToggleButton,
|
|
80385
80698
|
CollapsibleHelpText,
|
|
@@ -80394,6 +80707,7 @@ function NetworkGraph({
|
|
|
80394
80707
|
ConnectionFlowNodeBody,
|
|
80395
80708
|
ConnectionFlowSkeleton,
|
|
80396
80709
|
ConnectionFlowSvg,
|
|
80710
|
+
ContentActions,
|
|
80397
80711
|
CustomIcon,
|
|
80398
80712
|
DATEPICKER_APPEND_TO,
|
|
80399
80713
|
DATEPICKER_SELECTION_MODES,
|
|
@@ -80594,6 +80908,7 @@ function NetworkGraph({
|
|
|
80594
80908
|
SURFACE_GLASS_RIM,
|
|
80595
80909
|
SURFACE_GUTTER_AXES,
|
|
80596
80910
|
SURFACE_PADDINGS,
|
|
80911
|
+
SURFACE_TONES,
|
|
80597
80912
|
SURFACE_TO_BUTTON_VARIANT,
|
|
80598
80913
|
SURFACE_TRANSPARENCIES,
|
|
80599
80914
|
SURFACE_VARIANTS,
|
|
@@ -80850,6 +81165,7 @@ function NetworkGraph({
|
|
|
80850
81165
|
getStatusSpinnerToneTokens,
|
|
80851
81166
|
getStatusTokens,
|
|
80852
81167
|
getStepperTonePalette,
|
|
81168
|
+
getSurfaceAccentColor,
|
|
80853
81169
|
getSurfaceCornerClass,
|
|
80854
81170
|
getSurfaceCornerRem,
|
|
80855
81171
|
getSurfaceGutterClass,
|