@cjlapao/ui-kit 0.2.31 → 0.2.33
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-QDW3hqU0.d.cts} +43 -9
- package/dist/{CapsuleBlueprint-DtgCXUPd.d.ts → CodeBlock-QDW3hqU0.d.ts} +43 -9
- package/dist/index.cjs +912 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +813 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +186 -103
- package/dist/index.d.ts +186 -103
- package/dist/index.js +901 -224
- package/dist/index.js.map +1 -1
- package/dist/markdown.cjs +267 -10
- 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 +264 -9
- package/dist/markdown.js.map +1 -1
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -4868,6 +4868,7 @@ var getSurfaceGlassFillClass = (color2, opacity) => {
|
|
|
4868
4868
|
if (opacity === "clear") return 5;
|
|
4869
4869
|
return 15;
|
|
4870
4870
|
})();
|
|
4871
|
+
if (color2 === "none") return `bg-white/${litOpacity} dark:bg-neutral-900/${drkOpacity}`;
|
|
4871
4872
|
const safeBase = GLASS_COLOR_SAFELIST.has(color2) ? color2 : "neutral";
|
|
4872
4873
|
return `bg-${safeBase}-100/${litOpacity} dark:bg-${safeBase}-500/${drkOpacity}`;
|
|
4873
4874
|
};
|
|
@@ -5034,6 +5035,8 @@ var TRUE_COLORS = [
|
|
|
5034
5035
|
"neutral",
|
|
5035
5036
|
"stone"
|
|
5036
5037
|
];
|
|
5038
|
+
var SURFACE_TONES = ["none", ...TRUE_COLORS];
|
|
5039
|
+
var getSurfaceAccentColor = (tone) => tone === "none" ? "neutral" : tone;
|
|
5037
5040
|
var TRUE_COLOR_DOT_CLASSES = {
|
|
5038
5041
|
red: "bg-red-500 dark:bg-red-400",
|
|
5039
5042
|
orange: "bg-orange-500 dark:bg-orange-400",
|
|
@@ -5299,6 +5302,7 @@ var FIELD_STATUS_CLASSES = {
|
|
|
5299
5302
|
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"
|
|
5300
5303
|
};
|
|
5301
5304
|
var SURFACE_VARIANTS = [
|
|
5305
|
+
"none",
|
|
5302
5306
|
"elevated",
|
|
5303
5307
|
"outlined",
|
|
5304
5308
|
"subtle",
|
|
@@ -5309,6 +5313,7 @@ var SURFACE_VARIANTS = [
|
|
|
5309
5313
|
"liquid-glass"
|
|
5310
5314
|
];
|
|
5311
5315
|
var SURFACE_TO_BUTTON_VARIANT = {
|
|
5316
|
+
none: "ghost",
|
|
5312
5317
|
elevated: "solid",
|
|
5313
5318
|
outlined: "outline",
|
|
5314
5319
|
subtle: "ghost",
|
|
@@ -5351,7 +5356,7 @@ var surfaceTriggerTokens = Object.fromEntries(
|
|
|
5351
5356
|
}
|
|
5352
5357
|
])
|
|
5353
5358
|
);
|
|
5354
|
-
var getSurfaceTriggerTokens = (color2) => surfaceTriggerTokens[color2] ?? surfaceTriggerTokens.
|
|
5359
|
+
var getSurfaceTriggerTokens = (color2) => surfaceTriggerTokens[getSurfaceAccentColor(color2)] ?? surfaceTriggerTokens.neutral;
|
|
5355
5360
|
var collapsibleHelpToneTokens = Object.fromEntries(
|
|
5356
5361
|
TRUE_COLORS.map((color2) => [
|
|
5357
5362
|
color2,
|
|
@@ -5414,8 +5419,9 @@ var SURFACE_VARIANT_FOR_FIELD = {
|
|
|
5414
5419
|
glass: "glass"
|
|
5415
5420
|
};
|
|
5416
5421
|
var isGlassSurface = (variant) => variant === "glass" || variant === "liquid-glass";
|
|
5417
|
-
var PANEL_TONE_FOR_FIELD = "
|
|
5422
|
+
var PANEL_TONE_FOR_FIELD = "none";
|
|
5418
5423
|
var INPUT_VARIANT_FOR_SURFACE = {
|
|
5424
|
+
none: "flat",
|
|
5419
5425
|
elevated: "flat",
|
|
5420
5426
|
outlined: "flat",
|
|
5421
5427
|
subtle: "ghost",
|
|
@@ -5426,7 +5432,7 @@ var INPUT_VARIANT_FOR_SURFACE = {
|
|
|
5426
5432
|
"liquid-glass": "glass",
|
|
5427
5433
|
plain: "flat"
|
|
5428
5434
|
};
|
|
5429
|
-
var DEFAULT_SURFACE_TONE = "
|
|
5435
|
+
var DEFAULT_SURFACE_TONE = "none";
|
|
5430
5436
|
var CASCADE_EXPAND = {
|
|
5431
5437
|
/** Per-item cascade step, expanding. */
|
|
5432
5438
|
stepMs: 20,
|
|
@@ -6174,6 +6180,7 @@ var getMultiToggleColorTokens = (color2) => currentTheme.multiToggle[color2] ??
|
|
|
6174
6180
|
var getMultiToggleVariantTokens = (color2) => currentTheme.multiToggleVariant[color2] ?? currentTheme.multiToggleVariant.blue;
|
|
6175
6181
|
var getTabsColorTokens = (color2) => currentTheme.tabs[color2] ?? currentTheme.tabs.blue;
|
|
6176
6182
|
var SURFACE_VARIANT_BASE = {
|
|
6183
|
+
none: "",
|
|
6177
6184
|
elevated: "bg-white shadow-xl ring-1 ring-black/5 dark:bg-neutral-900 dark:ring-white/10",
|
|
6178
6185
|
// A real 1px border, not a ring. `ring-1` with no ring colour resolves to
|
|
6179
6186
|
// currentColor, which painted a near-black rule in light mode.
|
|
@@ -6192,10 +6199,12 @@ var TRANSLUCENT_SURFACE_VARIANTS = [
|
|
|
6192
6199
|
"default"
|
|
6193
6200
|
];
|
|
6194
6201
|
var getRawSurfaceVariantClasses = (variant, tone, overrides = {}) => {
|
|
6195
|
-
const palette =
|
|
6202
|
+
const palette = getPanelToneStyles(tone);
|
|
6196
6203
|
const { bgClass, borderClass, liquidExtras } = overrides;
|
|
6197
6204
|
const base = SURFACE_VARIANT_BASE[variant] ?? SURFACE_VARIANT_BASE.elevated;
|
|
6198
6205
|
switch (variant) {
|
|
6206
|
+
case "none":
|
|
6207
|
+
return tone === "none" ? "" : bgClass ?? palette.subtleBg;
|
|
6199
6208
|
case "outlined":
|
|
6200
6209
|
return [base, borderClass ?? palette.outlineBorder].join(" ");
|
|
6201
6210
|
case "subtle":
|
|
@@ -6228,7 +6237,15 @@ var getRawSurfaceVariantClasses = (variant, tone, overrides = {}) => {
|
|
|
6228
6237
|
return [bgClass ?? "", base].join(" ");
|
|
6229
6238
|
}
|
|
6230
6239
|
};
|
|
6231
|
-
var getPanelToneStyles = (tone) =>
|
|
6240
|
+
var getPanelToneStyles = (tone = DEFAULT_SURFACE_TONE) => tone === "none" ? {
|
|
6241
|
+
...currentTheme.panel.neutral,
|
|
6242
|
+
subtleBg: "bg-white dark:bg-neutral-900",
|
|
6243
|
+
tonalBg: "bg-white dark:bg-neutral-900",
|
|
6244
|
+
glassBg: "bg-white/40 dark:bg-neutral-900/20",
|
|
6245
|
+
liquidBg: "bg-white/45 dark:bg-neutral-900/15",
|
|
6246
|
+
decorationShape: "",
|
|
6247
|
+
decorationGradient: ""
|
|
6248
|
+
} : currentTheme.panel[tone] ?? currentTheme.panel.neutral;
|
|
6232
6249
|
var getSurfaceVariantClasses = (variant, tone, overrides = {}) => getSurfaceTransparencyClasses(getRawSurfaceVariantClasses(variant, tone, overrides), variant, overrides.transparency);
|
|
6233
6250
|
var getStepperTonePalette = (tone) => currentTheme.stepper[tone] ?? currentTheme.stepper.blue;
|
|
6234
6251
|
var getBadgeColorClasses = (color2) => currentTheme.badge[color2] ?? currentTheme.badge.blue;
|
|
@@ -8019,6 +8036,13 @@ function getLocalizedParseNames(locale, catalog) {
|
|
|
8019
8036
|
// ../common/i18n/builtIn/de.ts
|
|
8020
8037
|
var DE_KIT_CATALOG = {
|
|
8021
8038
|
kit: {
|
|
8039
|
+
codeBlock: {
|
|
8040
|
+
code: "Code",
|
|
8041
|
+
edit: "Code bearbeiten",
|
|
8042
|
+
copy: "Code kopieren",
|
|
8043
|
+
copied: "Kopiert",
|
|
8044
|
+
copyFailed: "Kopieren fehlgeschlagen. Code ausw\xE4hlen und manuell kopieren."
|
|
8045
|
+
},
|
|
8022
8046
|
knowledge: {
|
|
8023
8047
|
"library": "Erinnerungsbibliothek",
|
|
8024
8048
|
"map": "Wissenskarte",
|
|
@@ -8291,6 +8315,20 @@ var DE_KIT_CATALOG = {
|
|
|
8291
8315
|
progressspinner: {
|
|
8292
8316
|
loading: "Wird geladen"
|
|
8293
8317
|
},
|
|
8318
|
+
filterbar: {
|
|
8319
|
+
filters: "Filter",
|
|
8320
|
+
search: "Suchen",
|
|
8321
|
+
empty: "Keine Filter angewendet",
|
|
8322
|
+
add: "Filter hinzuf\xFCgen",
|
|
8323
|
+
filterBy: "Filtern nach",
|
|
8324
|
+
back: "Zur\xFCck",
|
|
8325
|
+
clear: "Leeren",
|
|
8326
|
+
done: "Fertig",
|
|
8327
|
+
clearAll: "Alle l\xF6schen",
|
|
8328
|
+
items: "Eintr\xE4ge",
|
|
8329
|
+
summary: "{filtered} von {total} {items}",
|
|
8330
|
+
remove: "Filter {label} entfernen"
|
|
8331
|
+
},
|
|
8294
8332
|
searchbar: {
|
|
8295
8333
|
clearAria: "Suche l\xF6schen",
|
|
8296
8334
|
placeholder: "Suchen..."
|
|
@@ -8515,6 +8553,13 @@ var DE_KIT_CATALOG = {
|
|
|
8515
8553
|
// ../common/i18n/builtIn/en.ts
|
|
8516
8554
|
var EN_KIT_CATALOG = {
|
|
8517
8555
|
kit: {
|
|
8556
|
+
codeBlock: {
|
|
8557
|
+
code: "Code",
|
|
8558
|
+
edit: "Edit code",
|
|
8559
|
+
copy: "Copy code",
|
|
8560
|
+
copied: "Copied",
|
|
8561
|
+
copyFailed: "Could not copy code. Select and copy it manually."
|
|
8562
|
+
},
|
|
8518
8563
|
knowledge: {
|
|
8519
8564
|
"library": "Memory library",
|
|
8520
8565
|
"map": "Knowledge map",
|
|
@@ -8787,6 +8832,20 @@ var EN_KIT_CATALOG = {
|
|
|
8787
8832
|
progressspinner: {
|
|
8788
8833
|
loading: "Loading"
|
|
8789
8834
|
},
|
|
8835
|
+
filterbar: {
|
|
8836
|
+
filters: "Filters",
|
|
8837
|
+
search: "Search",
|
|
8838
|
+
empty: "No filters applied",
|
|
8839
|
+
add: "Add filter",
|
|
8840
|
+
filterBy: "Filter by",
|
|
8841
|
+
back: "Back",
|
|
8842
|
+
clear: "Clear",
|
|
8843
|
+
done: "Done",
|
|
8844
|
+
clearAll: "Clear all",
|
|
8845
|
+
items: "items",
|
|
8846
|
+
summary: "{filtered} of {total} {items}",
|
|
8847
|
+
remove: "Remove {label} filter"
|
|
8848
|
+
},
|
|
8790
8849
|
searchbar: {
|
|
8791
8850
|
clearAria: "Clear search",
|
|
8792
8851
|
placeholder: "Search..."
|
|
@@ -9011,6 +9070,13 @@ var EN_KIT_CATALOG = {
|
|
|
9011
9070
|
// ../common/i18n/builtIn/es.ts
|
|
9012
9071
|
var ES_KIT_CATALOG = {
|
|
9013
9072
|
kit: {
|
|
9073
|
+
codeBlock: {
|
|
9074
|
+
code: "C\xF3digo",
|
|
9075
|
+
edit: "Editar c\xF3digo",
|
|
9076
|
+
copy: "Copiar c\xF3digo",
|
|
9077
|
+
copied: "Copiado",
|
|
9078
|
+
copyFailed: "No se pudo copiar. Selecciona y copia el c\xF3digo manualmente."
|
|
9079
|
+
},
|
|
9014
9080
|
knowledge: {
|
|
9015
9081
|
"library": "Biblioteca de memorias",
|
|
9016
9082
|
"map": "Mapa de conocimiento",
|
|
@@ -9283,6 +9349,20 @@ var ES_KIT_CATALOG = {
|
|
|
9283
9349
|
progressspinner: {
|
|
9284
9350
|
loading: "Cargando"
|
|
9285
9351
|
},
|
|
9352
|
+
filterbar: {
|
|
9353
|
+
filters: "Filtros",
|
|
9354
|
+
search: "Buscar",
|
|
9355
|
+
empty: "Sin filtros aplicados",
|
|
9356
|
+
add: "A\xF1adir filtro",
|
|
9357
|
+
filterBy: "Filtrar por",
|
|
9358
|
+
back: "Volver",
|
|
9359
|
+
clear: "Limpiar",
|
|
9360
|
+
done: "Listo",
|
|
9361
|
+
clearAll: "Borrar todos",
|
|
9362
|
+
items: "elementos",
|
|
9363
|
+
summary: "{filtered} de {total} {items}",
|
|
9364
|
+
remove: "Eliminar filtro {label}"
|
|
9365
|
+
},
|
|
9286
9366
|
searchbar: {
|
|
9287
9367
|
clearAria: "Borrar b\xFAsqueda",
|
|
9288
9368
|
placeholder: "Buscar..."
|
|
@@ -9507,6 +9587,13 @@ var ES_KIT_CATALOG = {
|
|
|
9507
9587
|
// ../common/i18n/builtIn/fr.ts
|
|
9508
9588
|
var FR_KIT_CATALOG = {
|
|
9509
9589
|
kit: {
|
|
9590
|
+
codeBlock: {
|
|
9591
|
+
code: "Code",
|
|
9592
|
+
edit: "Modifier le code",
|
|
9593
|
+
copy: "Copier le code",
|
|
9594
|
+
copied: "Copi\xE9",
|
|
9595
|
+
copyFailed: "Copie impossible. S\xE9lectionnez et copiez le code manuellement."
|
|
9596
|
+
},
|
|
9510
9597
|
knowledge: {
|
|
9511
9598
|
"library": "Biblioth\xE8que de m\xE9moires",
|
|
9512
9599
|
"map": "Carte des connaissances",
|
|
@@ -9779,6 +9866,20 @@ var FR_KIT_CATALOG = {
|
|
|
9779
9866
|
progressspinner: {
|
|
9780
9867
|
loading: "Chargement"
|
|
9781
9868
|
},
|
|
9869
|
+
filterbar: {
|
|
9870
|
+
filters: "Filtres",
|
|
9871
|
+
search: "Rechercher",
|
|
9872
|
+
empty: "Aucun filtre appliqu\xE9",
|
|
9873
|
+
add: "Ajouter un filtre",
|
|
9874
|
+
filterBy: "Filtrer par",
|
|
9875
|
+
back: "Retour",
|
|
9876
|
+
clear: "Effacer",
|
|
9877
|
+
done: "Termin\xE9",
|
|
9878
|
+
clearAll: "Tout effacer",
|
|
9879
|
+
items: "\xE9l\xE9ments",
|
|
9880
|
+
summary: "{filtered} sur {total} {items}",
|
|
9881
|
+
remove: "Supprimer le filtre {label}"
|
|
9882
|
+
},
|
|
9782
9883
|
searchbar: {
|
|
9783
9884
|
clearAria: "Effacer la recherche",
|
|
9784
9885
|
placeholder: "Rechercher..."
|
|
@@ -10003,6 +10104,13 @@ var FR_KIT_CATALOG = {
|
|
|
10003
10104
|
// ../common/i18n/builtIn/pt.ts
|
|
10004
10105
|
var PT_KIT_CATALOG = {
|
|
10005
10106
|
kit: {
|
|
10107
|
+
codeBlock: {
|
|
10108
|
+
code: "C\xF3digo",
|
|
10109
|
+
edit: "Editar c\xF3digo",
|
|
10110
|
+
copy: "Copiar c\xF3digo",
|
|
10111
|
+
copied: "Copiado",
|
|
10112
|
+
copyFailed: "N\xE3o foi poss\xEDvel copiar. Selecione e copie o c\xF3digo manualmente."
|
|
10113
|
+
},
|
|
10006
10114
|
knowledge: {
|
|
10007
10115
|
"library": "Biblioteca de mem\xF3rias",
|
|
10008
10116
|
"map": "Mapa de conhecimento",
|
|
@@ -10275,6 +10383,20 @@ var PT_KIT_CATALOG = {
|
|
|
10275
10383
|
progressspinner: {
|
|
10276
10384
|
loading: "Carregando"
|
|
10277
10385
|
},
|
|
10386
|
+
filterbar: {
|
|
10387
|
+
filters: "Filtros",
|
|
10388
|
+
search: "Pesquisar",
|
|
10389
|
+
empty: "Nenhum filtro aplicado",
|
|
10390
|
+
add: "Adicionar filtro",
|
|
10391
|
+
filterBy: "Filtrar por",
|
|
10392
|
+
back: "Voltar",
|
|
10393
|
+
clear: "Limpar",
|
|
10394
|
+
done: "Conclu\xEDdo",
|
|
10395
|
+
clearAll: "Limpar todos",
|
|
10396
|
+
items: "itens",
|
|
10397
|
+
summary: "{filtered} de {total} {items}",
|
|
10398
|
+
remove: "Remover filtro {label}"
|
|
10399
|
+
},
|
|
10278
10400
|
searchbar: {
|
|
10279
10401
|
clearAria: "Limpar busca",
|
|
10280
10402
|
placeholder: "Buscar..."
|
|
@@ -11350,6 +11472,7 @@ function hasInteractiveDescendant(root) {
|
|
|
11350
11472
|
// src/components/Panel.tsx
|
|
11351
11473
|
import { Fragment as Fragment3, jsx as jsx159, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
11352
11474
|
var variantBaseStyles = {
|
|
11475
|
+
none: "",
|
|
11353
11476
|
elevated: "bg-white shadow-xl ring-1 ring-black/5 dark:bg-neutral-900 dark:ring-white/10",
|
|
11354
11477
|
// A real 1px border, not a ring. `ring-1` with no ring colour resolves to
|
|
11355
11478
|
// currentColor, which painted a near-black rule in light mode.
|
|
@@ -11367,6 +11490,8 @@ var getPanelEdgeChrome = (variant, tone, glassOpacity = "frosted", vibrancy = "m
|
|
|
11367
11490
|
const palette = getPanelToneStyles(tone);
|
|
11368
11491
|
const chrome = (() => {
|
|
11369
11492
|
switch (variant) {
|
|
11493
|
+
case "none":
|
|
11494
|
+
return { fill: tone === "none" ? "" : palette.subtleBg, border: "", backdrop: "" };
|
|
11370
11495
|
case "outlined":
|
|
11371
11496
|
return {
|
|
11372
11497
|
fill: "bg-white/90 dark:bg-neutral-900/80",
|
|
@@ -11613,7 +11738,7 @@ var Panel = React10.forwardRef(function Panel2({
|
|
|
11613
11738
|
if (specularHighlight === false) return "none";
|
|
11614
11739
|
return "classic";
|
|
11615
11740
|
})();
|
|
11616
|
-
const effectiveHoverColor = hoverColor ?? (
|
|
11741
|
+
const effectiveHoverColor = hoverColor ?? (resolvedTone !== "none" && resolvedTone !== "neutral" ? resolvedTone : void 0);
|
|
11617
11742
|
const hoverColorName = effectiveHoverColor ? effectiveHoverColor : void 0;
|
|
11618
11743
|
const borderPalette = borderColor ? getPanelToneStyles(borderColor) : void 0;
|
|
11619
11744
|
const effectiveBorderClass = borderPalette?.border;
|
|
@@ -11648,6 +11773,8 @@ var Panel = React10.forwardRef(function Panel2({
|
|
|
11648
11773
|
const glassFillClass = getSurfaceGlassFillClass(resolvedTone, glassOpacity);
|
|
11649
11774
|
const variantClasses = getSurfaceTransparencyClasses(classNames7((() => {
|
|
11650
11775
|
switch (variant) {
|
|
11776
|
+
case "none":
|
|
11777
|
+
return resolvedTone === "none" ? "" : palette.subtleBg;
|
|
11651
11778
|
case "outlined":
|
|
11652
11779
|
return classNames7(
|
|
11653
11780
|
variantBaseStyles.outlined,
|
|
@@ -12188,8 +12315,8 @@ var ActionPanel = React11.forwardRef(
|
|
|
12188
12315
|
}, ref) {
|
|
12189
12316
|
const renderIcon2 = useIconRenderer();
|
|
12190
12317
|
const generatedTitleId = useId3();
|
|
12191
|
-
const resolvedTone = tone ?? color2 ?? "
|
|
12192
|
-
const resolvedAccent = accentColor ?? resolvedTone;
|
|
12318
|
+
const resolvedTone = tone ?? color2 ?? "none";
|
|
12319
|
+
const resolvedAccent = accentColor ?? getSurfaceAccentColor(resolvedTone);
|
|
12193
12320
|
const palette = getPanelToneStyles(resolvedAccent);
|
|
12194
12321
|
const surfaceText = getSurfaceTextTokens(variant);
|
|
12195
12322
|
const sizeTokens12 = SIZE_TOKENS[size] ?? SIZE_TOKENS.sm;
|
|
@@ -13442,7 +13569,8 @@ var EmptyState = React16.forwardRef(
|
|
|
13442
13569
|
...rest
|
|
13443
13570
|
}, ref) => {
|
|
13444
13571
|
const titleId = useId4();
|
|
13445
|
-
const
|
|
13572
|
+
const surfaceTone = tone ?? color2 ?? "none";
|
|
13573
|
+
const effectiveTone = getSurfaceAccentColor(surfaceTone);
|
|
13446
13574
|
const iconTone = iconColor ?? effectiveTone;
|
|
13447
13575
|
const effectiveSize = size ?? textSize ?? "md";
|
|
13448
13576
|
const sizeToken = SIZE_STYLES3[effectiveSize] ?? SIZE_STYLES3.md;
|
|
@@ -13506,7 +13634,7 @@ var EmptyState = React16.forwardRef(
|
|
|
13506
13634
|
{
|
|
13507
13635
|
ref,
|
|
13508
13636
|
variant: effectiveVariant,
|
|
13509
|
-
tone:
|
|
13637
|
+
tone: surfaceTone,
|
|
13510
13638
|
corner,
|
|
13511
13639
|
padding,
|
|
13512
13640
|
fullWidth,
|
|
@@ -14652,7 +14780,7 @@ var PanelHero = ({
|
|
|
14652
14780
|
children,
|
|
14653
14781
|
...rest
|
|
14654
14782
|
}) => {
|
|
14655
|
-
const accent = tone ?? color2 ?? "
|
|
14783
|
+
const accent = getSurfaceAccentColor(tone ?? color2 ?? "none");
|
|
14656
14784
|
const effectiveCorner = corner ?? (rounded ? DEFAULT_SURFACE_CORNER : "none");
|
|
14657
14785
|
const showShapes = decoration === "shapes" || decoration === "both";
|
|
14658
14786
|
const showGradient = decoration === "gradient" || decoration === "both";
|
|
@@ -14675,7 +14803,7 @@ var PanelHero = ({
|
|
|
14675
14803
|
{
|
|
14676
14804
|
className: classNames22("w-full", className),
|
|
14677
14805
|
variant,
|
|
14678
|
-
tone:
|
|
14806
|
+
tone: tone ?? "none",
|
|
14679
14807
|
corner: effectiveCorner,
|
|
14680
14808
|
padding,
|
|
14681
14809
|
decoration,
|
|
@@ -14724,7 +14852,7 @@ var PanelHero = ({
|
|
|
14724
14852
|
backgroundImage: `linear-gradient(to bottom right, ${stopFrom}, ${stopTo})`
|
|
14725
14853
|
},
|
|
14726
14854
|
"data-variant": "gradient",
|
|
14727
|
-
"data-tone":
|
|
14855
|
+
"data-tone": tone ?? "none",
|
|
14728
14856
|
...rest,
|
|
14729
14857
|
children: [
|
|
14730
14858
|
showShapes && /* @__PURE__ */ jsxs73(Fragment8, { children: [
|
|
@@ -15195,7 +15323,7 @@ var ExpandableButton = forwardRef152(
|
|
|
15195
15323
|
fadeDuration,
|
|
15196
15324
|
labelGap,
|
|
15197
15325
|
labelSlide,
|
|
15198
|
-
elevate =
|
|
15326
|
+
elevate = false,
|
|
15199
15327
|
iconMotion = "pop-tilt",
|
|
15200
15328
|
squish = true,
|
|
15201
15329
|
labelPlacement = "after",
|
|
@@ -18204,6 +18332,7 @@ var Combobox = React30.forwardRef(
|
|
|
18204
18332
|
leadingIcon,
|
|
18205
18333
|
visibleRows = 6,
|
|
18206
18334
|
panelVariant = "auto",
|
|
18335
|
+
panelTone = "auto",
|
|
18207
18336
|
panelCorner = "auto",
|
|
18208
18337
|
className,
|
|
18209
18338
|
listClassName,
|
|
@@ -18349,7 +18478,7 @@ var Combobox = React30.forwardRef(
|
|
|
18349
18478
|
Panel_default,
|
|
18350
18479
|
{
|
|
18351
18480
|
variant: resolvedPanelVariant,
|
|
18352
|
-
tone: PANEL_TONE_FOR_FIELD,
|
|
18481
|
+
tone: panelTone === "auto" ? PANEL_TONE_FOR_FIELD : panelTone,
|
|
18353
18482
|
corner: panelCorner,
|
|
18354
18483
|
padding: "none",
|
|
18355
18484
|
scrollable: false,
|
|
@@ -18509,7 +18638,7 @@ Combobox.displayName = "Combobox";
|
|
|
18509
18638
|
var Combobox_default = Combobox;
|
|
18510
18639
|
|
|
18511
18640
|
// src/components/Picker.tsx
|
|
18512
|
-
import {
|
|
18641
|
+
import React31, {
|
|
18513
18642
|
useCallback as useCallback9,
|
|
18514
18643
|
useEffect as useEffect10,
|
|
18515
18644
|
useId as useId10,
|
|
@@ -18586,12 +18715,14 @@ var Picker = ({
|
|
|
18586
18715
|
glowIntensity = DEFAULT_GLOW_INTENSITY,
|
|
18587
18716
|
validationStatus = "none",
|
|
18588
18717
|
panelVariant = "auto",
|
|
18718
|
+
panelTone = "auto",
|
|
18589
18719
|
panelCorner = "auto",
|
|
18590
18720
|
disabled = false,
|
|
18591
18721
|
multi = false,
|
|
18592
18722
|
selectedIds: selectedIdsProp,
|
|
18593
18723
|
onMultiChange,
|
|
18594
18724
|
maxPillsShown = 3,
|
|
18725
|
+
groupSelectable = false,
|
|
18595
18726
|
size = "md",
|
|
18596
18727
|
fullWidth = true,
|
|
18597
18728
|
fullHeight = false
|
|
@@ -18641,10 +18772,21 @@ var Picker = ({
|
|
|
18641
18772
|
);
|
|
18642
18773
|
const filtered = useMemo9(() => {
|
|
18643
18774
|
const q = query.trim().toLowerCase();
|
|
18644
|
-
|
|
18645
|
-
return baseItems.filter(
|
|
18775
|
+
const matched = !q ? baseItems : baseItems.filter(
|
|
18646
18776
|
(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))
|
|
18647
18777
|
);
|
|
18778
|
+
if (!matched.some((item) => item.group)) return matched;
|
|
18779
|
+
const order = [];
|
|
18780
|
+
const buckets = /* @__PURE__ */ new Map();
|
|
18781
|
+
for (const item of matched) {
|
|
18782
|
+
const key = item.group ?? "";
|
|
18783
|
+
if (!buckets.has(key)) {
|
|
18784
|
+
buckets.set(key, []);
|
|
18785
|
+
order.push(key);
|
|
18786
|
+
}
|
|
18787
|
+
buckets.get(key).push(item);
|
|
18788
|
+
}
|
|
18789
|
+
return order.flatMap((key) => buckets.get(key));
|
|
18648
18790
|
}, [baseItems, query]);
|
|
18649
18791
|
const updatePosition = useCallback9(() => {
|
|
18650
18792
|
if (!open || !triggerRef.current || !dropdownRef.current) return;
|
|
@@ -18776,6 +18918,13 @@ var Picker = ({
|
|
|
18776
18918
|
setQuery("");
|
|
18777
18919
|
}
|
|
18778
18920
|
};
|
|
18921
|
+
const handleToggleGroup = (group) => {
|
|
18922
|
+
const ids = filtered.filter((i) => i.group === group).map((i) => i.id);
|
|
18923
|
+
const allOn = ids.every((id) => effectiveSelectedIds.includes(id));
|
|
18924
|
+
onMultiChange?.(
|
|
18925
|
+
allOn ? effectiveSelectedIds.filter((id) => !ids.includes(id)) : [...effectiveSelectedIds, ...ids.filter((id) => !effectiveSelectedIds.includes(id))]
|
|
18926
|
+
);
|
|
18927
|
+
};
|
|
18779
18928
|
const handleClearMulti = () => {
|
|
18780
18929
|
onMultiChange?.([]);
|
|
18781
18930
|
};
|
|
@@ -18797,7 +18946,7 @@ var Picker = ({
|
|
|
18797
18946
|
Panel_default,
|
|
18798
18947
|
{
|
|
18799
18948
|
variant: resolvedPanelVariant,
|
|
18800
|
-
tone: PANEL_TONE_FOR_FIELD,
|
|
18949
|
+
tone: panelTone === "auto" ? PANEL_TONE_FOR_FIELD : panelTone,
|
|
18801
18950
|
corner: panelCorner,
|
|
18802
18951
|
padding: "none",
|
|
18803
18952
|
scrollable: false,
|
|
@@ -18899,14 +19048,19 @@ var Picker = ({
|
|
|
18899
19048
|
}
|
|
18900
19049
|
)
|
|
18901
19050
|
] }),
|
|
18902
|
-
multi &&
|
|
19051
|
+
multi && /* @__PURE__ */ jsxs86(
|
|
18903
19052
|
"button",
|
|
18904
19053
|
{
|
|
18905
19054
|
type: "button",
|
|
19055
|
+
disabled: effectiveSelectedIds.length === 0,
|
|
18906
19056
|
onMouseDown: (e) => e.preventDefault(),
|
|
18907
19057
|
onClick: handleClearMulti,
|
|
18908
19058
|
className: classNames38(
|
|
18909
|
-
|
|
19059
|
+
// Always rendered: mounting it on the first pick pushed the
|
|
19060
|
+
// list down and resized the popup (flicker). Hidden, not
|
|
19061
|
+
// removed, while nothing is selected.
|
|
19062
|
+
"flex w-full select-none items-center justify-between border-b border-black/5 px-4 py-1.5 text-xs dark:border-white/10",
|
|
19063
|
+
effectiveSelectedIds.length > 0 ? "cursor-pointer hover:bg-neutral-50 dark:hover:bg-neutral-800/60" : "invisible",
|
|
18910
19064
|
popupText.muted
|
|
18911
19065
|
),
|
|
18912
19066
|
children: [
|
|
@@ -18953,12 +19107,77 @@ var Picker = ({
|
|
|
18953
19107
|
"aria-multiselectable": multi || void 0,
|
|
18954
19108
|
children: filtered.map((item, index) => {
|
|
18955
19109
|
const isSelected = effectiveSelectedIds.includes(item.id);
|
|
18956
|
-
|
|
18957
|
-
|
|
18958
|
-
|
|
18959
|
-
|
|
18960
|
-
|
|
18961
|
-
|
|
19110
|
+
const showHeader = !!item.group && item.group !== filtered[index - 1]?.group;
|
|
19111
|
+
let header = null;
|
|
19112
|
+
if (showHeader) {
|
|
19113
|
+
const g = item.group;
|
|
19114
|
+
const members = filtered.filter((i) => i.group === g);
|
|
19115
|
+
const on = members.filter(
|
|
19116
|
+
(i) => effectiveSelectedIds.includes(i.id)
|
|
19117
|
+
).length;
|
|
19118
|
+
const state = on === 0 ? "none" : on === members.length ? "all" : "some";
|
|
19119
|
+
const selectable = multi && groupSelectable;
|
|
19120
|
+
const label = /* @__PURE__ */ jsxs86(Fragment11, { children: [
|
|
19121
|
+
selectable && /* @__PURE__ */ jsx191(
|
|
19122
|
+
"span",
|
|
19123
|
+
{
|
|
19124
|
+
className: classNames38(
|
|
19125
|
+
"flex h-4 w-4 shrink-0 items-center justify-center rounded border transition-colors",
|
|
19126
|
+
state === "none" ? "border-neutral-300 dark:border-neutral-600" : classNames38(
|
|
19127
|
+
colorTokens.optionSelectedBg,
|
|
19128
|
+
"border-current",
|
|
19129
|
+
colorTokens.optionSelectedIcon
|
|
19130
|
+
)
|
|
19131
|
+
),
|
|
19132
|
+
children: state !== "none" && /* @__PURE__ */ jsx191(
|
|
19133
|
+
"svg",
|
|
19134
|
+
{
|
|
19135
|
+
className: "h-3.5 w-3.5",
|
|
19136
|
+
viewBox: "0 0 24 24",
|
|
19137
|
+
fill: "none",
|
|
19138
|
+
stroke: "currentColor",
|
|
19139
|
+
strokeWidth: 2.5,
|
|
19140
|
+
children: /* @__PURE__ */ jsx191(
|
|
19141
|
+
"path",
|
|
19142
|
+
{
|
|
19143
|
+
strokeLinecap: "round",
|
|
19144
|
+
strokeLinejoin: "round",
|
|
19145
|
+
d: state === "all" ? "m5 13 4 4L19 7" : "M6 12h12"
|
|
19146
|
+
}
|
|
19147
|
+
)
|
|
19148
|
+
}
|
|
19149
|
+
)
|
|
19150
|
+
}
|
|
19151
|
+
),
|
|
19152
|
+
/* @__PURE__ */ jsx191("span", { className: "flex-1 truncate text-left", children: g }),
|
|
19153
|
+
selectable && /* @__PURE__ */ jsxs86("span", { className: "shrink-0 tabular-nums", children: [
|
|
19154
|
+
on,
|
|
19155
|
+
"/",
|
|
19156
|
+
members.length
|
|
19157
|
+
] })
|
|
19158
|
+
] });
|
|
19159
|
+
const headerClass = classNames38(
|
|
19160
|
+
"flex w-full items-center gap-3 px-4 py-1.5 text-[11px] font-semibold uppercase tracking-wide",
|
|
19161
|
+
popupText.muted
|
|
19162
|
+
);
|
|
19163
|
+
header = /* @__PURE__ */ jsx191("li", { role: "presentation", className: "m-0 list-none p-0", children: selectable ? /* @__PURE__ */ jsx191(
|
|
19164
|
+
"button",
|
|
19165
|
+
{
|
|
19166
|
+
type: "button",
|
|
19167
|
+
role: "checkbox",
|
|
19168
|
+
"aria-checked": state === "all" ? true : state === "some" ? "mixed" : false,
|
|
19169
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
19170
|
+
onClick: () => handleToggleGroup(g),
|
|
19171
|
+
className: classNames38(
|
|
19172
|
+
headerClass,
|
|
19173
|
+
"cursor-pointer border-0 bg-transparent hover:bg-neutral-50 dark:hover:bg-neutral-800/60"
|
|
19174
|
+
),
|
|
19175
|
+
children: label
|
|
19176
|
+
}
|
|
19177
|
+
) : /* @__PURE__ */ jsx191("div", { className: headerClass, children: label }) });
|
|
19178
|
+
}
|
|
19179
|
+
return /* @__PURE__ */ jsxs86(React31.Fragment, { children: [
|
|
19180
|
+
header,
|
|
18962
19181
|
/* @__PURE__ */ jsxs86(
|
|
18963
19182
|
"li",
|
|
18964
19183
|
{
|
|
@@ -19091,10 +19310,9 @@ var Picker = ({
|
|
|
19091
19310
|
ti
|
|
19092
19311
|
)) })
|
|
19093
19312
|
]
|
|
19094
|
-
}
|
|
19095
|
-
item.id
|
|
19313
|
+
}
|
|
19096
19314
|
)
|
|
19097
|
-
);
|
|
19315
|
+
] }, item.id);
|
|
19098
19316
|
})
|
|
19099
19317
|
}
|
|
19100
19318
|
)
|
|
@@ -19429,6 +19647,7 @@ var TagPicker = ({
|
|
|
19429
19647
|
glowIntensity = DEFAULT_GLOW_INTENSITY,
|
|
19430
19648
|
validationStatus = "none",
|
|
19431
19649
|
panelVariant = "auto",
|
|
19650
|
+
panelTone = "auto",
|
|
19432
19651
|
panelCorner = "auto",
|
|
19433
19652
|
tagLimit = 3,
|
|
19434
19653
|
highlightNew = true,
|
|
@@ -19612,7 +19831,7 @@ var TagPicker = ({
|
|
|
19612
19831
|
const idx = filtered.findIndex((item) => selectedSet.has(item.id));
|
|
19613
19832
|
setFocusedIndex(idx >= 0 ? idx : multi || filtered.length === 0 ? -1 : 0);
|
|
19614
19833
|
}, [open]);
|
|
19615
|
-
const
|
|
19834
|
+
const normalize2 = useCallback10(
|
|
19616
19835
|
(v) => normalizeValue ? normalizeValue(v) : v,
|
|
19617
19836
|
[normalizeValue]
|
|
19618
19837
|
);
|
|
@@ -19622,7 +19841,7 @@ var TagPicker = ({
|
|
|
19622
19841
|
filtered.findIndex((candidate) => candidate.id === item.id)
|
|
19623
19842
|
);
|
|
19624
19843
|
setCursorByKeyboard(fromKeyboard);
|
|
19625
|
-
const id =
|
|
19844
|
+
const id = normalize2(item.id);
|
|
19626
19845
|
if (!multi) {
|
|
19627
19846
|
onChange([id]);
|
|
19628
19847
|
setOpen(false);
|
|
@@ -19635,14 +19854,14 @@ var TagPicker = ({
|
|
|
19635
19854
|
onChange([...value, id]);
|
|
19636
19855
|
}
|
|
19637
19856
|
},
|
|
19638
|
-
[multi,
|
|
19857
|
+
[multi, normalize2, onChange, selectedSet, value, filtered]
|
|
19639
19858
|
);
|
|
19640
19859
|
const handleRemove = useCallback10(
|
|
19641
19860
|
(v) => onChange(value.filter((x) => x !== v)),
|
|
19642
19861
|
[onChange, value]
|
|
19643
19862
|
);
|
|
19644
19863
|
const handleCreate = useCallback10(() => {
|
|
19645
|
-
const label =
|
|
19864
|
+
const label = normalize2(query.trim());
|
|
19646
19865
|
if (!label) return;
|
|
19647
19866
|
if (onCreateItem) {
|
|
19648
19867
|
onCreateItem(label);
|
|
@@ -19653,7 +19872,7 @@ var TagPicker = ({
|
|
|
19653
19872
|
}
|
|
19654
19873
|
if (!multi) setOpen(false);
|
|
19655
19874
|
setQuery("");
|
|
19656
|
-
}, [query,
|
|
19875
|
+
}, [query, normalize2, onCreateItem, multi, onChange, value]);
|
|
19657
19876
|
const handleKeyDown = (e) => {
|
|
19658
19877
|
if (e.key === "ArrowDown") {
|
|
19659
19878
|
e.preventDefault();
|
|
@@ -19689,7 +19908,7 @@ var TagPicker = ({
|
|
|
19689
19908
|
Panel_default,
|
|
19690
19909
|
{
|
|
19691
19910
|
variant: resolvedPanelVariant,
|
|
19692
|
-
tone: PANEL_TONE_FOR_FIELD,
|
|
19911
|
+
tone: panelTone === "auto" ? PANEL_TONE_FOR_FIELD : panelTone,
|
|
19693
19912
|
corner: panelCorner,
|
|
19694
19913
|
padding: "none",
|
|
19695
19914
|
scrollable: false,
|
|
@@ -21359,7 +21578,7 @@ function StackCarousel({
|
|
|
21359
21578
|
getItemLabel,
|
|
21360
21579
|
emptyState = "No items to display.",
|
|
21361
21580
|
variant = "elevated",
|
|
21362
|
-
tone = "
|
|
21581
|
+
tone: surfaceTone = "none",
|
|
21363
21582
|
corner = "auto",
|
|
21364
21583
|
padding = "sm",
|
|
21365
21584
|
transparency,
|
|
@@ -21407,8 +21626,8 @@ function StackCarousel({
|
|
|
21407
21626
|
setExpanded(true);
|
|
21408
21627
|
}, Math.max(0, Number.isFinite(hoverExpandDelay) ? hoverExpandDelay : 2e3));
|
|
21409
21628
|
};
|
|
21410
|
-
const
|
|
21411
|
-
const index =
|
|
21629
|
+
const normalize2 = useCallback12((value) => loop ? wrap(value, items.length) : Math.max(0, Math.min(items.length - 1, Math.trunc(value))), [loop, items.length]);
|
|
21630
|
+
const index = normalize2(Number.isFinite(activeIndex ?? internalIndex) ? activeIndex ?? internalIndex : 0);
|
|
21412
21631
|
const layers = Math.min(loop ? items.length : items.length - index, Math.max(1, Math.min(3, Math.trunc(visibleCount) || 1)));
|
|
21413
21632
|
const offset = Math.max(0, Number.isFinite(stackOffset) ? stackOffset : 12);
|
|
21414
21633
|
const rootRef = useRef18(null);
|
|
@@ -21426,14 +21645,14 @@ function StackCarousel({
|
|
|
21426
21645
|
}, [isExpanded]);
|
|
21427
21646
|
const navigate = useCallback12((next, focus = false) => {
|
|
21428
21647
|
if (items.length < 2) return;
|
|
21429
|
-
const normalized =
|
|
21648
|
+
const normalized = normalize2(next);
|
|
21430
21649
|
if (normalized === index) return;
|
|
21431
21650
|
if (focus || measureRef.current?.contains(document.activeElement)) {
|
|
21432
21651
|
rootRef.current?.focus({ preventScroll: true });
|
|
21433
21652
|
}
|
|
21434
21653
|
if (activeIndex === void 0) setInternalIndex(normalized);
|
|
21435
21654
|
onActiveIndexChange?.(normalized);
|
|
21436
|
-
}, [items.length, index, activeIndex, onActiveIndexChange,
|
|
21655
|
+
}, [items.length, index, activeIndex, onActiveIndexChange, normalize2]);
|
|
21437
21656
|
useLayoutEffect8(() => {
|
|
21438
21657
|
const old = previousIndex.current;
|
|
21439
21658
|
previousIndex.current = index;
|
|
@@ -21496,7 +21715,7 @@ function StackCarousel({
|
|
|
21496
21715
|
root.addEventListener("wheel", handleWheel, { passive: false });
|
|
21497
21716
|
return () => root.removeEventListener("wheel", handleWheel);
|
|
21498
21717
|
}, [wheel, isExpanded, items.length, index, navigate, canScrollInside]);
|
|
21499
|
-
const visible = isExpanded ? items.map((_, i) => i) : Array.from({ length: layers }, (_, rank) =>
|
|
21718
|
+
const visible = isExpanded ? items.map((_, i) => i) : Array.from({ length: layers }, (_, rank) => normalize2(index + rank));
|
|
21500
21719
|
const rendered = [...visible];
|
|
21501
21720
|
const transitionFrom = previousIndex.current !== index ? previousIndex.current : outgoing;
|
|
21502
21721
|
if (!isExpanded && transitionFrom !== null && transitionFrom < items.length && !rendered.includes(transitionFrom)) rendered.push(transitionFrom);
|
|
@@ -21604,7 +21823,7 @@ function StackCarousel({
|
|
|
21604
21823
|
Panel_default,
|
|
21605
21824
|
{
|
|
21606
21825
|
variant,
|
|
21607
|
-
tone,
|
|
21826
|
+
tone: surfaceTone,
|
|
21608
21827
|
corner,
|
|
21609
21828
|
padding,
|
|
21610
21829
|
transparency,
|
|
@@ -22388,7 +22607,7 @@ var TraceGraph = forwardRef161(function TraceGraph2({
|
|
|
22388
22607
|
flareSize,
|
|
22389
22608
|
pulseScale,
|
|
22390
22609
|
junctionGlowIntensity = 1,
|
|
22391
|
-
tone = "
|
|
22610
|
+
tone = "none",
|
|
22392
22611
|
variant = "outlined",
|
|
22393
22612
|
corner = "auto",
|
|
22394
22613
|
padding = "none",
|
|
@@ -22697,7 +22916,7 @@ var TraceGraph = forwardRef161(function TraceGraph2({
|
|
|
22697
22916
|
style: { position: "fixed", zIndex: 100, width: 300, maxWidth: "calc(100vw - 16px)", visibility: "hidden" },
|
|
22698
22917
|
role: showPopover ? "dialog" : "tooltip",
|
|
22699
22918
|
"aria-label": overlayNode.label ?? overlayNode.id,
|
|
22700
|
-
children: /* @__PURE__ */ jsxs93(Panel_default, { variant: "elevated", tone
|
|
22919
|
+
children: /* @__PURE__ */ jsxs93(Panel_default, { variant: "elevated", tone, corner, padding: "xs", scrollable: false, children: [
|
|
22701
22920
|
showPopover && /* @__PURE__ */ jsx198("button", { type: "button", className: `${buttonClass} float-right ml-2`, "aria-label": copy("close"), onClick: () => {
|
|
22702
22921
|
setDetailsOpen(false);
|
|
22703
22922
|
hostRef.current?.focus();
|
|
@@ -22713,7 +22932,7 @@ var TraceGraph = forwardRef161(function TraceGraph2({
|
|
|
22713
22932
|
{
|
|
22714
22933
|
...panelProps,
|
|
22715
22934
|
variant,
|
|
22716
|
-
tone
|
|
22935
|
+
tone,
|
|
22717
22936
|
backgroundColor: tone === "none" ? "neutral" : panelProps.backgroundColor,
|
|
22718
22937
|
style: tone === "none" && variant === "simple" ? { borderWidth: 0, boxShadow: "none", ...panelProps.style } : panelProps.style,
|
|
22719
22938
|
corner,
|
|
@@ -24192,7 +24411,7 @@ var FormSection = ({
|
|
|
24192
24411
|
className,
|
|
24193
24412
|
padding = "md",
|
|
24194
24413
|
variant = "elevated",
|
|
24195
|
-
tone = "
|
|
24414
|
+
tone = "none",
|
|
24196
24415
|
corner = "rounded-md",
|
|
24197
24416
|
vibrancy,
|
|
24198
24417
|
glassOpacity,
|
|
@@ -24835,6 +25054,8 @@ var Toolbar = ({
|
|
|
24835
25054
|
const palette = getPanelToneStyles(tone);
|
|
24836
25055
|
const variantClasses = getSurfaceTransparencyClasses((() => {
|
|
24837
25056
|
switch (variant) {
|
|
25057
|
+
case "none":
|
|
25058
|
+
return tone === "none" ? "" : palette.subtleBg;
|
|
24838
25059
|
case "outlined":
|
|
24839
25060
|
return classNames53(variantBaseStyles.outlined, palette.outlineBorder);
|
|
24840
25061
|
case "subtle":
|
|
@@ -24900,7 +25121,7 @@ var PageHeader = ({
|
|
|
24900
25121
|
children,
|
|
24901
25122
|
variant = "default",
|
|
24902
25123
|
accentColor = "blue",
|
|
24903
|
-
tone = "
|
|
25124
|
+
tone = "none",
|
|
24904
25125
|
glassOpacity,
|
|
24905
25126
|
transparency,
|
|
24906
25127
|
vibrancy,
|
|
@@ -25918,7 +26139,7 @@ var Chat2 = ({
|
|
|
25918
26139
|
renderMessage,
|
|
25919
26140
|
onEvent,
|
|
25920
26141
|
variant = "outlined",
|
|
25921
|
-
tone = "
|
|
26142
|
+
tone: surfaceTone = "none",
|
|
25922
26143
|
padding = "none",
|
|
25923
26144
|
className = "",
|
|
25924
26145
|
style,
|
|
@@ -26327,7 +26548,7 @@ var Chat2 = ({
|
|
|
26327
26548
|
{
|
|
26328
26549
|
...rest,
|
|
26329
26550
|
variant,
|
|
26330
|
-
tone,
|
|
26551
|
+
tone: surfaceTone,
|
|
26331
26552
|
padding,
|
|
26332
26553
|
className: classNames57("relative overflow-hidden", className),
|
|
26333
26554
|
style: { ...style, height },
|
|
@@ -26680,12 +26901,13 @@ var ActivityFeed = ({
|
|
|
26680
26901
|
loadMoreLabel = "Load more",
|
|
26681
26902
|
totalCount,
|
|
26682
26903
|
variant = "outlined",
|
|
26683
|
-
tone = "
|
|
26904
|
+
tone: surfaceTone = "none",
|
|
26684
26905
|
padding = "md",
|
|
26685
26906
|
corner,
|
|
26686
26907
|
className = "",
|
|
26687
26908
|
...rest
|
|
26688
26909
|
}) => {
|
|
26910
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
26689
26911
|
const [active, setActive] = useState31(defaultFilter);
|
|
26690
26912
|
const options = useMemo16(
|
|
26691
26913
|
() => [{ label: "All", value: "all" }, ...filters],
|
|
@@ -26704,7 +26926,7 @@ var ActivityFeed = ({
|
|
|
26704
26926
|
{
|
|
26705
26927
|
...rest,
|
|
26706
26928
|
variant,
|
|
26707
|
-
tone,
|
|
26929
|
+
tone: surfaceTone,
|
|
26708
26930
|
padding,
|
|
26709
26931
|
corner,
|
|
26710
26932
|
className: classNames58("w-full", className),
|
|
@@ -37813,7 +38035,7 @@ var BreakdownCard = ({
|
|
|
37813
38035
|
loading = false,
|
|
37814
38036
|
ctaVariant,
|
|
37815
38037
|
variant = "outlined",
|
|
37816
|
-
tone = "
|
|
38038
|
+
tone: surfaceTone = "none",
|
|
37817
38039
|
padding = "md",
|
|
37818
38040
|
corner,
|
|
37819
38041
|
className = "",
|
|
@@ -37825,7 +38047,7 @@ var BreakdownCard = ({
|
|
|
37825
38047
|
{
|
|
37826
38048
|
...rest,
|
|
37827
38049
|
variant,
|
|
37828
|
-
tone,
|
|
38050
|
+
tone: surfaceTone,
|
|
37829
38051
|
padding,
|
|
37830
38052
|
corner,
|
|
37831
38053
|
className: classNames59("w-full", className),
|
|
@@ -38383,7 +38605,7 @@ var InfoRow = (props) => {
|
|
|
38383
38605
|
value,
|
|
38384
38606
|
hideIfEmpty = true,
|
|
38385
38607
|
variant = "elevated",
|
|
38386
|
-
tone = "
|
|
38608
|
+
tone = "none",
|
|
38387
38609
|
corner = DEFAULT_SURFACE_CORNER,
|
|
38388
38610
|
loading = false,
|
|
38389
38611
|
error,
|
|
@@ -38424,7 +38646,7 @@ var InfoRow = (props) => {
|
|
|
38424
38646
|
{
|
|
38425
38647
|
...props,
|
|
38426
38648
|
normalised,
|
|
38427
|
-
rowTone: tone,
|
|
38649
|
+
rowTone: getSurfaceAccentColor(tone),
|
|
38428
38650
|
rootProps: rest,
|
|
38429
38651
|
className
|
|
38430
38652
|
}
|
|
@@ -38435,7 +38657,7 @@ var InfoRow = (props) => {
|
|
|
38435
38657
|
{
|
|
38436
38658
|
...rest,
|
|
38437
38659
|
variant,
|
|
38438
|
-
|
|
38660
|
+
tone,
|
|
38439
38661
|
corner,
|
|
38440
38662
|
padding: "none",
|
|
38441
38663
|
scrollable: false,
|
|
@@ -38448,7 +38670,7 @@ var InfoRow = (props) => {
|
|
|
38448
38670
|
{
|
|
38449
38671
|
...props,
|
|
38450
38672
|
normalised,
|
|
38451
|
-
rowTone: tone,
|
|
38673
|
+
rowTone: getSurfaceAccentColor(tone),
|
|
38452
38674
|
className: void 0
|
|
38453
38675
|
}
|
|
38454
38676
|
)
|
|
@@ -38757,7 +38979,7 @@ var PagedPanel = ({
|
|
|
38757
38979
|
error,
|
|
38758
38980
|
emptyState,
|
|
38759
38981
|
emptyMessage,
|
|
38760
|
-
tone = "
|
|
38982
|
+
tone: surfaceTone = "none",
|
|
38761
38983
|
size = "md",
|
|
38762
38984
|
page,
|
|
38763
38985
|
onPageChange,
|
|
@@ -38769,6 +38991,7 @@ var PagedPanel = ({
|
|
|
38769
38991
|
loadingState,
|
|
38770
38992
|
...rest
|
|
38771
38993
|
}) => {
|
|
38994
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
38772
38995
|
const t = useKitT();
|
|
38773
38996
|
const pager = usePager({ count: pages.length, page, onPageChange });
|
|
38774
38997
|
const { page: current, total } = pager;
|
|
@@ -38802,7 +39025,7 @@ var PagedPanel = ({
|
|
|
38802
39025
|
Panel_default,
|
|
38803
39026
|
{
|
|
38804
39027
|
...rest,
|
|
38805
|
-
tone,
|
|
39028
|
+
tone: surfaceTone,
|
|
38806
39029
|
padding: "none",
|
|
38807
39030
|
bodyClassName: total === 0 && !loading ? "h-full" : "",
|
|
38808
39031
|
className: classNames63("relative overflow-hidden", rest.className),
|
|
@@ -39305,7 +39528,7 @@ var DetailItemCard = ({
|
|
|
39305
39528
|
expanded,
|
|
39306
39529
|
onToggle,
|
|
39307
39530
|
variant = "plain",
|
|
39308
|
-
tone = "
|
|
39531
|
+
tone: surfaceTone = "none",
|
|
39309
39532
|
corner = DEFAULT_SURFACE_CORNER,
|
|
39310
39533
|
padding = "sm",
|
|
39311
39534
|
glassOpacity,
|
|
@@ -39315,6 +39538,7 @@ var DetailItemCard = ({
|
|
|
39315
39538
|
className,
|
|
39316
39539
|
...rest
|
|
39317
39540
|
}) => {
|
|
39541
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
39318
39542
|
const [internalExpanded, setInternalExpanded] = useState40(defaultExpanded);
|
|
39319
39543
|
const isControlled = typeof expanded === "boolean";
|
|
39320
39544
|
const isExpanded = isControlled ? expanded : internalExpanded;
|
|
@@ -39339,7 +39563,7 @@ var DetailItemCard = ({
|
|
|
39339
39563
|
Panel_default,
|
|
39340
39564
|
{
|
|
39341
39565
|
variant,
|
|
39342
|
-
tone,
|
|
39566
|
+
tone: surfaceTone,
|
|
39343
39567
|
corner,
|
|
39344
39568
|
padding,
|
|
39345
39569
|
glassOpacity,
|
|
@@ -39666,7 +39890,7 @@ function ScrollBody({
|
|
|
39666
39890
|
}
|
|
39667
39891
|
function InfiniteScrollPanel({
|
|
39668
39892
|
variant = "plain",
|
|
39669
|
-
tone = "
|
|
39893
|
+
tone: surfaceTone = "none",
|
|
39670
39894
|
corner = DEFAULT_SURFACE_CORNER,
|
|
39671
39895
|
padding = "none",
|
|
39672
39896
|
glassOpacity,
|
|
@@ -39676,6 +39900,7 @@ function InfiniteScrollPanel({
|
|
|
39676
39900
|
className,
|
|
39677
39901
|
...rest
|
|
39678
39902
|
}) {
|
|
39903
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
39679
39904
|
const body = /* @__PURE__ */ jsx251(ScrollBody, { tone, padding, ...rest });
|
|
39680
39905
|
if (variant === "plain") {
|
|
39681
39906
|
return /* @__PURE__ */ jsx251("div", { className: classNames67("h-full min-h-0", className), children: body });
|
|
@@ -39684,7 +39909,7 @@ function InfiniteScrollPanel({
|
|
|
39684
39909
|
Panel_default,
|
|
39685
39910
|
{
|
|
39686
39911
|
variant,
|
|
39687
|
-
tone,
|
|
39912
|
+
tone: surfaceTone,
|
|
39688
39913
|
corner,
|
|
39689
39914
|
glassOpacity,
|
|
39690
39915
|
transparency,
|
|
@@ -39821,7 +40046,7 @@ var CollapsibleHelpText = ({
|
|
|
39821
40046
|
icon = "Help",
|
|
39822
40047
|
children,
|
|
39823
40048
|
className,
|
|
39824
|
-
tone = "
|
|
40049
|
+
tone = "none",
|
|
39825
40050
|
variant = "card",
|
|
39826
40051
|
corner = DEFAULT_SURFACE_CORNER,
|
|
39827
40052
|
padding = "sm",
|
|
@@ -39839,7 +40064,7 @@ var CollapsibleHelpText = ({
|
|
|
39839
40064
|
const sanitized = text2?.trim() ?? "";
|
|
39840
40065
|
const needsTruncation = sanitized.length > maxLength;
|
|
39841
40066
|
const displayText = expanded || !needsTruncation ? sanitized : truncate(sanitized, maxLength);
|
|
39842
|
-
const toneTokens3 = getCollapsibleHelpToneTokens(tone);
|
|
40067
|
+
const toneTokens3 = getCollapsibleHelpToneTokens(getSurfaceAccentColor(tone));
|
|
39843
40068
|
const bare = variant === "plain";
|
|
39844
40069
|
const body = /* @__PURE__ */ jsx252(
|
|
39845
40070
|
HelpBody,
|
|
@@ -39994,6 +40219,7 @@ var HelpButton = ({
|
|
|
39994
40219
|
content,
|
|
39995
40220
|
title,
|
|
39996
40221
|
placement = "auto",
|
|
40222
|
+
tone = "none",
|
|
39997
40223
|
color: color2 = "sky",
|
|
39998
40224
|
variant = "elevated",
|
|
39999
40225
|
corner = DEFAULT_SURFACE_CORNER,
|
|
@@ -40055,7 +40281,7 @@ var HelpButton = ({
|
|
|
40055
40281
|
window.removeEventListener("resize", recompute);
|
|
40056
40282
|
};
|
|
40057
40283
|
}, [open, recompute]);
|
|
40058
|
-
const palette = getPanelToneStyles(
|
|
40284
|
+
const palette = getPanelToneStyles(tone);
|
|
40059
40285
|
const surfaceText = getSurfaceTextTokens(variant);
|
|
40060
40286
|
const isMarkdown = typeof content === "string";
|
|
40061
40287
|
return /* @__PURE__ */ jsxs140("span", { className: classNames69("inline-flex items-center", className), children: [
|
|
@@ -40094,7 +40320,7 @@ var HelpButton = ({
|
|
|
40094
40320
|
Panel_default,
|
|
40095
40321
|
{
|
|
40096
40322
|
variant,
|
|
40097
|
-
tone
|
|
40323
|
+
tone,
|
|
40098
40324
|
corner,
|
|
40099
40325
|
padding: "none",
|
|
40100
40326
|
scrollable: false,
|
|
@@ -41697,7 +41923,7 @@ var Popover = ({
|
|
|
41697
41923
|
children,
|
|
41698
41924
|
placement = "auto",
|
|
41699
41925
|
variant = "elevated",
|
|
41700
|
-
tone = "
|
|
41926
|
+
tone = "none",
|
|
41701
41927
|
corner = DEFAULT_SURFACE_CORNER,
|
|
41702
41928
|
padding = "sm",
|
|
41703
41929
|
maxWidth = 320,
|
|
@@ -42160,7 +42386,7 @@ var Popover = ({
|
|
|
42160
42386
|
"aria-hidden": "true",
|
|
42161
42387
|
className: classNames73(
|
|
42162
42388
|
"absolute block h-4 w-4 rotate-45",
|
|
42163
|
-
ARROW_SIDE_BORDERS[position.placement.side],
|
|
42389
|
+
variant !== "none" && ARROW_SIDE_BORDERS[position.placement.side],
|
|
42164
42390
|
chrome.border,
|
|
42165
42391
|
chrome.fill,
|
|
42166
42392
|
chrome.backdrop
|
|
@@ -42186,7 +42412,8 @@ var Popover = ({
|
|
|
42186
42412
|
"aria-hidden": "true",
|
|
42187
42413
|
"data-popover-bubble": true,
|
|
42188
42414
|
className: classNames73(
|
|
42189
|
-
"pointer-events-none absolute z-20 block rounded-full
|
|
42415
|
+
"pointer-events-none absolute z-20 block rounded-full",
|
|
42416
|
+
variant !== "none" && "border",
|
|
42190
42417
|
chrome.border,
|
|
42191
42418
|
chrome.fill,
|
|
42192
42419
|
chrome.backdrop
|
|
@@ -43140,7 +43367,7 @@ var AccordionBody = ({
|
|
|
43140
43367
|
const renderIcon2 = useIconRenderer();
|
|
43141
43368
|
const surface = useSurfaceText();
|
|
43142
43369
|
const trigger = getSurfaceTriggerTokens(tone);
|
|
43143
|
-
const chip = getPillColorClasses(tone, "soft");
|
|
43370
|
+
const chip = getPillColorClasses(getSurfaceAccentColor(tone), "soft");
|
|
43144
43371
|
const inset = getSurfacePaddingClass(padding);
|
|
43145
43372
|
const tokens = SIZE_TOKENS4[size] ?? SIZE_TOKENS4.md;
|
|
43146
43373
|
const headerRefs = useRef50(/* @__PURE__ */ new Map());
|
|
@@ -43152,7 +43379,7 @@ var AccordionBody = ({
|
|
|
43152
43379
|
dashed: false,
|
|
43153
43380
|
icon: "ViewRows",
|
|
43154
43381
|
title: t("kit.accordion.noItemsTitle"),
|
|
43155
|
-
tone,
|
|
43382
|
+
tone: getSurfaceAccentColor(tone),
|
|
43156
43383
|
size
|
|
43157
43384
|
}
|
|
43158
43385
|
) });
|
|
@@ -43284,7 +43511,7 @@ var AccordionBody = ({
|
|
|
43284
43511
|
item.badge ? /* @__PURE__ */ jsx261(
|
|
43285
43512
|
Pill_default,
|
|
43286
43513
|
{
|
|
43287
|
-
tone,
|
|
43514
|
+
tone: getSurfaceAccentColor(tone),
|
|
43288
43515
|
variant: "soft",
|
|
43289
43516
|
size: tokens.pill,
|
|
43290
43517
|
className: "flex-none",
|
|
@@ -43371,7 +43598,7 @@ var AccordionBody = ({
|
|
|
43371
43598
|
title: t("kit.accordion.loadingTitle"),
|
|
43372
43599
|
className: "rounded-none",
|
|
43373
43600
|
size: "md",
|
|
43374
|
-
color: tone
|
|
43601
|
+
color: getSurfaceAccentColor(tone)
|
|
43375
43602
|
}
|
|
43376
43603
|
) : null
|
|
43377
43604
|
]
|
|
@@ -44199,7 +44426,7 @@ var Modal = ({
|
|
|
44199
44426
|
container,
|
|
44200
44427
|
corner = DEFAULT_SURFACE_CORNER,
|
|
44201
44428
|
variant = "elevated",
|
|
44202
|
-
tone = "
|
|
44429
|
+
tone = "none",
|
|
44203
44430
|
glassOpacity,
|
|
44204
44431
|
transparency,
|
|
44205
44432
|
vibrancy,
|
|
@@ -45635,8 +45862,8 @@ var SideMenuCtaCard = ({
|
|
|
45635
45862
|
Panel_default,
|
|
45636
45863
|
{
|
|
45637
45864
|
className: cta.onDismiss ? "relative" : void 0,
|
|
45638
|
-
variant: glass ? "glass" : "outlined",
|
|
45639
|
-
tone,
|
|
45865
|
+
variant: cta.variant ?? (glass ? "glass" : "outlined"),
|
|
45866
|
+
tone: cta.surfaceTone ?? "none",
|
|
45640
45867
|
padding: "sm",
|
|
45641
45868
|
mediaPlacement: "top",
|
|
45642
45869
|
media: cta.media,
|
|
@@ -45661,6 +45888,7 @@ var SideMenuCtaCard = ({
|
|
|
45661
45888
|
);
|
|
45662
45889
|
};
|
|
45663
45890
|
var SideMenuDetailPanel = ({
|
|
45891
|
+
variant,
|
|
45664
45892
|
items,
|
|
45665
45893
|
tone,
|
|
45666
45894
|
menuTone,
|
|
@@ -45699,11 +45927,11 @@ var SideMenuDetailPanel = ({
|
|
|
45699
45927
|
},
|
|
45700
45928
|
item.slug
|
|
45701
45929
|
));
|
|
45702
|
-
if (glass) {
|
|
45930
|
+
if (glass || variant) {
|
|
45703
45931
|
return /* @__PURE__ */ jsx266(
|
|
45704
45932
|
Panel_default,
|
|
45705
45933
|
{
|
|
45706
|
-
variant: "glass",
|
|
45934
|
+
variant: variant ?? "glass",
|
|
45707
45935
|
tone,
|
|
45708
45936
|
corner: "rounded-sm",
|
|
45709
45937
|
padding: "none",
|
|
@@ -45746,6 +45974,7 @@ var SideMenu = ({
|
|
|
45746
45974
|
ctas,
|
|
45747
45975
|
footerDetails,
|
|
45748
45976
|
footerDetailsTone,
|
|
45977
|
+
footerDetailsVariant,
|
|
45749
45978
|
noise = false,
|
|
45750
45979
|
noiseScale,
|
|
45751
45980
|
loading = false,
|
|
@@ -46322,8 +46551,9 @@ var SideMenu = ({
|
|
|
46322
46551
|
!contentCollapsed2 && footerDetails && footerDetails.length > 0 && /* @__PURE__ */ jsx266("div", { className: "shrink-0 px-3 pb-1", children: /* @__PURE__ */ jsx266(
|
|
46323
46552
|
SideMenuDetailPanel,
|
|
46324
46553
|
{
|
|
46554
|
+
variant: footerDetailsVariant,
|
|
46325
46555
|
items: footerDetails,
|
|
46326
|
-
tone: footerDetailsTone ??
|
|
46556
|
+
tone: footerDetailsTone ?? "none",
|
|
46327
46557
|
menuTone: color2,
|
|
46328
46558
|
glass: surface.idleCopy === "glass",
|
|
46329
46559
|
idleCopy: surface.idleCopy
|
|
@@ -46905,7 +47135,7 @@ var SidePanel = ({
|
|
|
46905
47135
|
transparency,
|
|
46906
47136
|
vibrancy,
|
|
46907
47137
|
specularMode,
|
|
46908
|
-
surfaceTone = "
|
|
47138
|
+
surfaceTone = "none",
|
|
46909
47139
|
size = "md",
|
|
46910
47140
|
side = "right",
|
|
46911
47141
|
overlay = false,
|
|
@@ -46933,7 +47163,7 @@ var SidePanel = ({
|
|
|
46933
47163
|
);
|
|
46934
47164
|
const surface = getSidebarSurfaceTokens(
|
|
46935
47165
|
legacyVariant ? variant : "sidebar",
|
|
46936
|
-
surfaceTone
|
|
47166
|
+
getSurfaceAccentColor(surfaceTone)
|
|
46937
47167
|
);
|
|
46938
47168
|
const surfaceText = getSidePanelTextTokens(variant);
|
|
46939
47169
|
const insetValue = inset ?? surface.offset !== "";
|
|
@@ -47686,6 +47916,7 @@ var ROW_ICON_VARIANT = "ghost";
|
|
|
47686
47916
|
var EDITOR_BUTTON_FOR_SURFACE = {
|
|
47687
47917
|
// `plain` means "the background is unknown". Glass is the treatment built
|
|
47688
47918
|
// for exactly that: a frosted backdrop reads on a white page and on a photo.
|
|
47919
|
+
none: "ghost",
|
|
47689
47920
|
plain: "glass",
|
|
47690
47921
|
elevated: "outline",
|
|
47691
47922
|
outlined: "outline",
|
|
@@ -48090,7 +48321,7 @@ var SmartGridLayout = ({
|
|
|
48090
48321
|
tone,
|
|
48091
48322
|
editThemeColor,
|
|
48092
48323
|
variant = "plain",
|
|
48093
|
-
surfaceTone = "
|
|
48324
|
+
surfaceTone = "none",
|
|
48094
48325
|
size = "md",
|
|
48095
48326
|
controlVariant,
|
|
48096
48327
|
readOnly = false,
|
|
@@ -51079,6 +51310,7 @@ import { Fragment as Fragment40, jsx as jsx273, jsxs as jsxs157 } from "react/js
|
|
|
51079
51310
|
import { createElement } from "react";
|
|
51080
51311
|
var SPLIT_VIEW_LOADERS = ["skeleton", "spinner", "progress"];
|
|
51081
51312
|
var SEARCH_VARIANT_FOR_SURFACE = {
|
|
51313
|
+
none: "flat",
|
|
51082
51314
|
elevated: "elevated",
|
|
51083
51315
|
outlined: "flat",
|
|
51084
51316
|
subtle: "ghost",
|
|
@@ -51167,7 +51399,7 @@ var SplitView = ({
|
|
|
51167
51399
|
tone,
|
|
51168
51400
|
color: color2,
|
|
51169
51401
|
variant = "elevated",
|
|
51170
|
-
surfaceTone = "
|
|
51402
|
+
surfaceTone = "none",
|
|
51171
51403
|
searchVariant,
|
|
51172
51404
|
size = "md",
|
|
51173
51405
|
showHighlightIndicator = true,
|
|
@@ -51387,7 +51619,7 @@ var SplitView = ({
|
|
|
51387
51619
|
const border = headerProps.border ?? true;
|
|
51388
51620
|
const detailsVariant = headerDetails?.variant ?? headerDetails?.variants ?? "subtle";
|
|
51389
51621
|
const detailsDecoration = headerDetails?.decoration ?? headerDetails?.decorations ?? "none";
|
|
51390
|
-
const detailsTone = headerDetails?.tone ?? "
|
|
51622
|
+
const detailsTone = headerDetails?.tone ?? "none";
|
|
51391
51623
|
const hasCustomHeaderBody = headerDetails?.headerBody !== void 0 && headerDetails?.headerBody !== null;
|
|
51392
51624
|
const hasHeaderDetailsContent = Boolean(
|
|
51393
51625
|
hasCustomHeaderBody || headerDetails?.title || headerDetails?.subtitle || headerDetails?.description || headerDetails?.tags
|
|
@@ -52338,6 +52570,7 @@ var VariablePicker = ({
|
|
|
52338
52570
|
tone = "blue",
|
|
52339
52571
|
size = "md",
|
|
52340
52572
|
variant = "elevated",
|
|
52573
|
+
panelTone = "auto",
|
|
52341
52574
|
corner = "auto",
|
|
52342
52575
|
initialSearch = "",
|
|
52343
52576
|
title,
|
|
@@ -52413,7 +52646,7 @@ var VariablePicker = ({
|
|
|
52413
52646
|
Panel_default,
|
|
52414
52647
|
{
|
|
52415
52648
|
variant,
|
|
52416
|
-
tone: PANEL_TONE_FOR_FIELD,
|
|
52649
|
+
tone: panelTone === "auto" ? PANEL_TONE_FOR_FIELD : panelTone,
|
|
52417
52650
|
corner,
|
|
52418
52651
|
padding: "none",
|
|
52419
52652
|
scrollable: false,
|
|
@@ -52511,6 +52744,7 @@ var SmartInput = ({
|
|
|
52511
52744
|
gradientTo,
|
|
52512
52745
|
glowIntensity = DEFAULT_GLOW_INTENSITY,
|
|
52513
52746
|
panelVariant = "auto",
|
|
52747
|
+
panelTone = "auto",
|
|
52514
52748
|
panelCorner = "auto",
|
|
52515
52749
|
defaultViewMode = "token",
|
|
52516
52750
|
autocomplete = true,
|
|
@@ -52841,6 +53075,7 @@ var SmartInput = ({
|
|
|
52841
53075
|
tone,
|
|
52842
53076
|
size,
|
|
52843
53077
|
variant: resolvedPanelVariant,
|
|
53078
|
+
panelTone,
|
|
52844
53079
|
corner: panelCorner,
|
|
52845
53080
|
initialSearch: pickerFilter,
|
|
52846
53081
|
onSelect: handleSelect,
|
|
@@ -53604,7 +53839,7 @@ var StatCard = ({
|
|
|
53604
53839
|
iconTone,
|
|
53605
53840
|
trend: trendProp,
|
|
53606
53841
|
size = "md",
|
|
53607
|
-
tone,
|
|
53842
|
+
tone: surfaceTone = "none",
|
|
53608
53843
|
gradient = false,
|
|
53609
53844
|
progress: progressProp = false,
|
|
53610
53845
|
progressType = "spinner",
|
|
@@ -53645,6 +53880,7 @@ var StatCard = ({
|
|
|
53645
53880
|
children,
|
|
53646
53881
|
...rest
|
|
53647
53882
|
}) => {
|
|
53883
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
53648
53884
|
const pager = usePager({
|
|
53649
53885
|
count: pages?.length ?? 0,
|
|
53650
53886
|
page,
|
|
@@ -53713,7 +53949,7 @@ var StatCard = ({
|
|
|
53713
53949
|
Panel_default,
|
|
53714
53950
|
{
|
|
53715
53951
|
variant,
|
|
53716
|
-
tone,
|
|
53952
|
+
tone: surfaceTone,
|
|
53717
53953
|
corner,
|
|
53718
53954
|
padding,
|
|
53719
53955
|
decoration: resolvedDecoration,
|
|
@@ -55810,7 +56046,7 @@ var Stepper = ({
|
|
|
55810
56046
|
completedStepIds,
|
|
55811
56047
|
orientation = "horizontal",
|
|
55812
56048
|
variant = "elevated",
|
|
55813
|
-
tone = "
|
|
56049
|
+
tone: surfaceTone = "none",
|
|
55814
56050
|
size = "md",
|
|
55815
56051
|
nodeCorner = "full",
|
|
55816
56052
|
padding = "md",
|
|
@@ -55840,6 +56076,7 @@ var Stepper = ({
|
|
|
55840
56076
|
className,
|
|
55841
56077
|
...panelRest
|
|
55842
56078
|
}) => {
|
|
56079
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
55843
56080
|
const state = useStepper(steps, {
|
|
55844
56081
|
currentIndex,
|
|
55845
56082
|
currentStepId,
|
|
@@ -55855,7 +56092,7 @@ var Stepper = ({
|
|
|
55855
56092
|
{
|
|
55856
56093
|
className: classNames94("w-full", className),
|
|
55857
56094
|
variant,
|
|
55858
|
-
tone,
|
|
56095
|
+
tone: surfaceTone,
|
|
55859
56096
|
padding,
|
|
55860
56097
|
corner,
|
|
55861
56098
|
loaderType: loaderType === "skeleton" ? "spinner" : loaderType,
|
|
@@ -57243,7 +57480,7 @@ function TableComponent({
|
|
|
57243
57480
|
density = "default",
|
|
57244
57481
|
bordered = false,
|
|
57245
57482
|
corner,
|
|
57246
|
-
tone = "
|
|
57483
|
+
tone: surfaceTone = "none",
|
|
57247
57484
|
panelVariant = "auto",
|
|
57248
57485
|
panelTone = "auto",
|
|
57249
57486
|
panelCorner = "auto",
|
|
@@ -57308,6 +57545,7 @@ function TableComponent({
|
|
|
57308
57545
|
storage,
|
|
57309
57546
|
color: color2
|
|
57310
57547
|
}) {
|
|
57548
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
57311
57549
|
const t = useKitT();
|
|
57312
57550
|
const uid = useId39();
|
|
57313
57551
|
const getDefaultColumnVisibility = (column) => {
|
|
@@ -57337,7 +57575,7 @@ function TableComponent({
|
|
|
57337
57575
|
};
|
|
57338
57576
|
const controlColor = color2 ?? (tone === "neutral" ? "blue" : tone);
|
|
57339
57577
|
const resolvedPanelVariant = panelVariant === "auto" ? isGlassSurface(variant) ? "default" : variant : panelVariant;
|
|
57340
|
-
const resolvedPanelTone = panelTone === "auto" ?
|
|
57578
|
+
const resolvedPanelTone = panelTone === "auto" ? surfaceTone : panelTone;
|
|
57341
57579
|
const resolvedPanelCorner = panelCorner === "auto" ? corner : panelCorner;
|
|
57342
57580
|
const focusRingClass = `focus-visible:ring-${controlColor}-500 dark:focus-visible:ring-${controlColor}-400`;
|
|
57343
57581
|
const densityTokens = getTableDensityTokens(density);
|
|
@@ -57951,7 +58189,7 @@ function TableComponent({
|
|
|
57951
58189
|
Panel_default,
|
|
57952
58190
|
{
|
|
57953
58191
|
variant,
|
|
57954
|
-
tone,
|
|
58192
|
+
tone: surfaceTone,
|
|
57955
58193
|
padding: "none",
|
|
57956
58194
|
corner,
|
|
57957
58195
|
scrollable: false,
|
|
@@ -58966,7 +59204,7 @@ var AccessMatrix = ({
|
|
|
58966
59204
|
permissions,
|
|
58967
59205
|
limit = 5,
|
|
58968
59206
|
variant = "outlined",
|
|
58969
|
-
tone = "
|
|
59207
|
+
tone: surfaceTone = "none",
|
|
58970
59208
|
density,
|
|
58971
59209
|
bordered = false,
|
|
58972
59210
|
corner,
|
|
@@ -58982,6 +59220,7 @@ var AccessMatrix = ({
|
|
|
58982
59220
|
loaderProgress,
|
|
58983
59221
|
emptyState
|
|
58984
59222
|
}) => {
|
|
59223
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
58985
59224
|
const [expanded, setExpanded] = useState74(false);
|
|
58986
59225
|
const [collapsedGroups, setCollapsedGroups] = useState74(
|
|
58987
59226
|
/* @__PURE__ */ new Set()
|
|
@@ -59111,7 +59350,7 @@ var AccessMatrix = ({
|
|
|
59111
59350
|
columns,
|
|
59112
59351
|
data: rows,
|
|
59113
59352
|
variant,
|
|
59114
|
-
tone,
|
|
59353
|
+
tone: surfaceTone,
|
|
59115
59354
|
density,
|
|
59116
59355
|
bordered,
|
|
59117
59356
|
corner,
|
|
@@ -59355,7 +59594,7 @@ var KeyValueArrayField = ({
|
|
|
59355
59594
|
disabled = false,
|
|
59356
59595
|
flagDuplicateKeys = true,
|
|
59357
59596
|
variant = "outlined",
|
|
59358
|
-
tone = "
|
|
59597
|
+
tone: surfaceTone = "none",
|
|
59359
59598
|
corner = DEFAULT_SURFACE_CORNER,
|
|
59360
59599
|
padding = "sm",
|
|
59361
59600
|
glassOpacity,
|
|
@@ -59366,6 +59605,7 @@ var KeyValueArrayField = ({
|
|
|
59366
59605
|
size = "sm",
|
|
59367
59606
|
className
|
|
59368
59607
|
}) => {
|
|
59608
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
59369
59609
|
const baseId = useId40();
|
|
59370
59610
|
const labelId = `${baseId}-label`;
|
|
59371
59611
|
const errorId = `${baseId}-error`;
|
|
@@ -59462,7 +59702,7 @@ var KeyValueArrayField = ({
|
|
|
59462
59702
|
Panel_default,
|
|
59463
59703
|
{
|
|
59464
59704
|
variant,
|
|
59465
|
-
tone,
|
|
59705
|
+
tone: surfaceTone,
|
|
59466
59706
|
corner,
|
|
59467
59707
|
padding,
|
|
59468
59708
|
glassOpacity,
|
|
@@ -59567,7 +59807,7 @@ var DynamicFormField = ({
|
|
|
59567
59807
|
isVisible = true,
|
|
59568
59808
|
size = "md",
|
|
59569
59809
|
variant = "elevated",
|
|
59570
|
-
tone = "
|
|
59810
|
+
tone: surfaceTone = "none",
|
|
59571
59811
|
corner = DEFAULT_SURFACE_CORNER,
|
|
59572
59812
|
padding = "md",
|
|
59573
59813
|
inputVariant = "auto",
|
|
@@ -59582,6 +59822,7 @@ var DynamicFormField = ({
|
|
|
59582
59822
|
vibrancy,
|
|
59583
59823
|
specularMode
|
|
59584
59824
|
}) => {
|
|
59825
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
59585
59826
|
const t = useKitT();
|
|
59586
59827
|
const generatedId = useId41();
|
|
59587
59828
|
const resolvedInputVariant = inputVariant === "auto" ? INPUT_VARIANT_FOR_SURFACE[variant] : inputVariant;
|
|
@@ -59733,7 +59974,7 @@ var DynamicFormField = ({
|
|
|
59733
59974
|
{
|
|
59734
59975
|
className: classNames99("w-full", className),
|
|
59735
59976
|
variant,
|
|
59736
|
-
tone,
|
|
59977
|
+
tone: surfaceTone,
|
|
59737
59978
|
corner,
|
|
59738
59979
|
padding,
|
|
59739
59980
|
glassOpacity,
|
|
@@ -59786,6 +60027,7 @@ var NotificationModal = ({
|
|
|
59786
60027
|
onSecondaryAction,
|
|
59787
60028
|
icon,
|
|
59788
60029
|
tone,
|
|
60030
|
+
surfaceTone = "none",
|
|
59789
60031
|
size = "sm",
|
|
59790
60032
|
...rest
|
|
59791
60033
|
}) => {
|
|
@@ -59807,7 +60049,7 @@ var NotificationModal = ({
|
|
|
59807
60049
|
onClose,
|
|
59808
60050
|
title,
|
|
59809
60051
|
size,
|
|
59810
|
-
tone:
|
|
60052
|
+
tone: surfaceTone,
|
|
59811
60053
|
icon: icon ?? config.icon,
|
|
59812
60054
|
actions: /* @__PURE__ */ jsxs177(Modal_default.Actions, { children: [
|
|
59813
60055
|
secondaryActionLabel && /* @__PURE__ */ jsx296(
|
|
@@ -60594,7 +60836,7 @@ var TimelinePanel = ({
|
|
|
60594
60836
|
headerAction,
|
|
60595
60837
|
items,
|
|
60596
60838
|
variant = "simple",
|
|
60597
|
-
tone = "
|
|
60839
|
+
tone: surfaceTone = "none",
|
|
60598
60840
|
padding = "sm",
|
|
60599
60841
|
corner = "none",
|
|
60600
60842
|
lineColor,
|
|
@@ -60613,6 +60855,7 @@ var TimelinePanel = ({
|
|
|
60613
60855
|
glassOpacity,
|
|
60614
60856
|
specularMode
|
|
60615
60857
|
}) => {
|
|
60858
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
60616
60859
|
const isDark = useIsDark();
|
|
60617
60860
|
const palette = getPanelToneStyles(tone);
|
|
60618
60861
|
const itemEls = useRef68([]);
|
|
@@ -60716,7 +60959,7 @@ var TimelinePanel = ({
|
|
|
60716
60959
|
Panel_default,
|
|
60717
60960
|
{
|
|
60718
60961
|
variant,
|
|
60719
|
-
tone,
|
|
60962
|
+
tone: surfaceTone,
|
|
60720
60963
|
padding,
|
|
60721
60964
|
corner,
|
|
60722
60965
|
className,
|
|
@@ -61185,6 +61428,7 @@ var connectorVisual = (connector) => {
|
|
|
61185
61428
|
};
|
|
61186
61429
|
var GLASS_RIM2 = "stroke-white/50 dark:stroke-white/10";
|
|
61187
61430
|
var NODE_SURFACES = {
|
|
61431
|
+
none: () => ({ fill: "fill-transparent", stroke: "stroke-none", effect: "" }),
|
|
61188
61432
|
elevated: () => ({
|
|
61189
61433
|
fill: "fill-white dark:fill-neutral-900",
|
|
61190
61434
|
stroke: "stroke-black/5 dark:stroke-white/10",
|
|
@@ -64756,7 +65000,7 @@ var ConnectionFlow = React90.forwardRef(function ConnectionFlow2({
|
|
|
64756
65000
|
editMode = false,
|
|
64757
65001
|
onNodeCreate,
|
|
64758
65002
|
variant = "outlined",
|
|
64759
|
-
tone = "
|
|
65003
|
+
tone: surfaceTone = "none",
|
|
64760
65004
|
size = "md",
|
|
64761
65005
|
corner = DEFAULT_SURFACE_CORNER,
|
|
64762
65006
|
edgeStyle = "orthogonal",
|
|
@@ -64801,6 +65045,7 @@ var ConnectionFlow = React90.forwardRef(function ConnectionFlow2({
|
|
|
64801
65045
|
onZoomChange,
|
|
64802
65046
|
renderNode
|
|
64803
65047
|
}, ref) {
|
|
65048
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
64804
65049
|
const editorRef = useRef70(null);
|
|
64805
65050
|
const [editBounds, setEditBounds] = useState79(null);
|
|
64806
65051
|
const onEditBounds = useCallback45((next) => setEditBounds(
|
|
@@ -65347,7 +65592,7 @@ var ConnectionFlow = React90.forwardRef(function ConnectionFlow2({
|
|
|
65347
65592
|
{
|
|
65348
65593
|
className: classNames107("flex min-h-0 w-full min-w-0 flex-col", className),
|
|
65349
65594
|
variant,
|
|
65350
|
-
tone,
|
|
65595
|
+
tone: surfaceTone,
|
|
65351
65596
|
corner,
|
|
65352
65597
|
padding: "none",
|
|
65353
65598
|
flexBody: true,
|
|
@@ -68361,7 +68606,7 @@ var resolveLabels = (labelOverrides) => labelOverrides ? {
|
|
|
68361
68606
|
} : DEFAULT_LABELS;
|
|
68362
68607
|
var buildCardProps = ({
|
|
68363
68608
|
variant = "outlined",
|
|
68364
|
-
cardTone = "
|
|
68609
|
+
cardTone = "none",
|
|
68365
68610
|
corner = DEFAULT_SURFACE_CORNER,
|
|
68366
68611
|
glassOpacity = "light",
|
|
68367
68612
|
vibrancy,
|
|
@@ -69211,7 +69456,7 @@ var WorkflowTracker = ({
|
|
|
69211
69456
|
customStatuses,
|
|
69212
69457
|
mutedColor = "neutral",
|
|
69213
69458
|
variant = "outlined",
|
|
69214
|
-
cardTone = "
|
|
69459
|
+
cardTone = "none",
|
|
69215
69460
|
translucentSurfaces,
|
|
69216
69461
|
glassOpacity = "light",
|
|
69217
69462
|
vibrancy,
|
|
@@ -71668,6 +71913,7 @@ function nearestPreset(zoom, presets) {
|
|
|
71668
71913
|
}
|
|
71669
71914
|
var GanttToolbar = ({
|
|
71670
71915
|
variant = "elevated",
|
|
71916
|
+
tone = "none",
|
|
71671
71917
|
zoom,
|
|
71672
71918
|
presets,
|
|
71673
71919
|
onZoomTo,
|
|
@@ -71682,8 +71928,8 @@ var GanttToolbar = ({
|
|
|
71682
71928
|
};
|
|
71683
71929
|
const active = useMemo61(() => nearestPreset(zoom, presets), [zoom, presets]);
|
|
71684
71930
|
const chrome = useMemo61(
|
|
71685
|
-
() => getSurfaceVariantClasses(variant,
|
|
71686
|
-
[variant]
|
|
71931
|
+
() => getSurfaceVariantClasses(variant, tone),
|
|
71932
|
+
[variant, tone]
|
|
71687
71933
|
);
|
|
71688
71934
|
return /* @__PURE__ */ jsxs204(
|
|
71689
71935
|
"div",
|
|
@@ -72107,6 +72353,7 @@ var Gantt = ({
|
|
|
72107
72353
|
height = 520,
|
|
72108
72354
|
color: color2 = "blue",
|
|
72109
72355
|
variant = "elevated",
|
|
72356
|
+
tone = "none",
|
|
72110
72357
|
corner = "rounded-sm",
|
|
72111
72358
|
padding = "none",
|
|
72112
72359
|
vibrancy,
|
|
@@ -72617,6 +72864,7 @@ var Gantt = ({
|
|
|
72617
72864
|
{
|
|
72618
72865
|
ref: rootRef,
|
|
72619
72866
|
variant,
|
|
72867
|
+
tone,
|
|
72620
72868
|
padding,
|
|
72621
72869
|
corner,
|
|
72622
72870
|
vibrancy,
|
|
@@ -72644,7 +72892,7 @@ var Gantt = ({
|
|
|
72644
72892
|
{
|
|
72645
72893
|
className: classNames128(
|
|
72646
72894
|
"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",
|
|
72647
|
-
getSurfaceVariantClasses(variant,
|
|
72895
|
+
getSurfaceVariantClasses(variant, tone)
|
|
72648
72896
|
),
|
|
72649
72897
|
children: icon
|
|
72650
72898
|
}
|
|
@@ -72657,6 +72905,7 @@ var Gantt = ({
|
|
|
72657
72905
|
/* @__PURE__ */ jsx328("div", { className: "ml-auto shrink-0", children: /* @__PURE__ */ jsx328(
|
|
72658
72906
|
GanttToolbar,
|
|
72659
72907
|
{
|
|
72908
|
+
tone,
|
|
72660
72909
|
variant,
|
|
72661
72910
|
zoom,
|
|
72662
72911
|
presets: GANTT_ZOOM_PRESETS,
|
|
@@ -76375,7 +76624,7 @@ var Terminal = forwardRef170(
|
|
|
76375
76624
|
style,
|
|
76376
76625
|
padding = "sm",
|
|
76377
76626
|
variant = "outlined",
|
|
76378
|
-
tone = "
|
|
76627
|
+
tone = "none",
|
|
76379
76628
|
...surface
|
|
76380
76629
|
}, ref) {
|
|
76381
76630
|
return /* @__PURE__ */ jsx342(
|
|
@@ -76445,7 +76694,7 @@ var TerminalTabs = forwardRef171(
|
|
|
76445
76694
|
height = 360,
|
|
76446
76695
|
style,
|
|
76447
76696
|
variant = "outlined",
|
|
76448
|
-
tone = "
|
|
76697
|
+
tone: surfaceTone = "none",
|
|
76449
76698
|
padding = "sm",
|
|
76450
76699
|
readOnly,
|
|
76451
76700
|
scheme,
|
|
@@ -76457,6 +76706,7 @@ var TerminalTabs = forwardRef171(
|
|
|
76457
76706
|
emptyState = "No terminal sessions",
|
|
76458
76707
|
...surface
|
|
76459
76708
|
}, ref) {
|
|
76709
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
76460
76710
|
const prefix = useId48();
|
|
76461
76711
|
const [selected, setSelected] = useState98(defaultValue ?? sessions[0]?.id);
|
|
76462
76712
|
const requested = value ?? selected;
|
|
@@ -76477,7 +76727,7 @@ var TerminalTabs = forwardRef171(
|
|
|
76477
76727
|
...surface,
|
|
76478
76728
|
"data-color-scheme": scheme ?? "auto",
|
|
76479
76729
|
className: classNames142(surface.className, scheme === "dark" && "dark"),
|
|
76480
|
-
...{ variant, tone, padding },
|
|
76730
|
+
...{ variant, tone: surfaceTone, padding },
|
|
76481
76731
|
flexBody: true,
|
|
76482
76732
|
scrollable: false,
|
|
76483
76733
|
style: {
|
|
@@ -76764,7 +77014,7 @@ function MenuRow({ item, state, depth }) {
|
|
|
76764
77014
|
item.label && /* @__PURE__ */ jsx346("div", { className: "px-3 pb-1 pt-3 text-xs font-semibold text-neutral-500 dark:text-neutral-400", children: item.label }),
|
|
76765
77015
|
item.items && /* @__PURE__ */ jsx346(MenuList, { items: item.disabled ? item.items.map((child) => ({ ...child, disabled: true })) : item.items, state, depth, parentLabel: label, grouped: true })
|
|
76766
77016
|
] });
|
|
76767
|
-
const itemTone2 = item.tone ?? props.itemTone ?? props.tone ?? "
|
|
77017
|
+
const itemTone2 = getSurfaceAccentColor(item.tone ?? props.itemTone ?? props.tone ?? "none");
|
|
76768
77018
|
const itemPadding = item.padding ?? props.itemPadding;
|
|
76769
77019
|
const tokens = getSideMenuItemTokens(itemTone2);
|
|
76770
77020
|
const checkable = item.type === "checkbox" || item.type === "radio";
|
|
@@ -76857,13 +77107,14 @@ function MenuSurface({ state, children, root = false }) {
|
|
|
76857
77107
|
Panel_default,
|
|
76858
77108
|
{
|
|
76859
77109
|
variant: props.variant ?? "outlined",
|
|
76860
|
-
tone: props.tone ?? "
|
|
77110
|
+
tone: props.tone ?? "none",
|
|
76861
77111
|
corner: props.corner,
|
|
76862
77112
|
padding: "none",
|
|
76863
77113
|
glassOpacity: props.glassOpacity,
|
|
76864
77114
|
transparency: props.transparency,
|
|
76865
77115
|
vibrancy: props.vibrancy,
|
|
76866
77116
|
specularMode: props.specularMode,
|
|
77117
|
+
style: root ? props.style : void 0,
|
|
76867
77118
|
className: classNames144(
|
|
76868
77119
|
root ? props.className : void 0,
|
|
76869
77120
|
(!root || props.popup || props.trigger || props.anchorRef) && "backdrop-blur-xl"
|
|
@@ -77068,7 +77319,7 @@ function FileUpload({ embedded = false, compact: compact2 = false, value, defaul
|
|
|
77068
77319
|
const files = value ?? internal;
|
|
77069
77320
|
const locked = disabled || loading;
|
|
77070
77321
|
const labels = { ...defaultLabels, ...overrides };
|
|
77071
|
-
const tokens = getSideMenuItemTokens(surface.tone ?? "
|
|
77322
|
+
const tokens = getSideMenuItemTokens(getSurfaceAccentColor(surface.tone ?? "none"));
|
|
77072
77323
|
const change = (next) => {
|
|
77073
77324
|
if (value === void 0) setInternal(next);
|
|
77074
77325
|
onChange?.(next);
|
|
@@ -77123,7 +77374,7 @@ function FileUpload({ embedded = false, compact: compact2 = false, value, defaul
|
|
|
77123
77374
|
choose(Array.from(event.target.files ?? []));
|
|
77124
77375
|
event.target.value = "";
|
|
77125
77376
|
} }),
|
|
77126
|
-
/* @__PURE__ */ jsx348(Button_default, { size, className: compact2 ? "shrink-0" : void 0, variant: "soft", color: surface.tone ?? "
|
|
77377
|
+
/* @__PURE__ */ jsx348(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 })
|
|
77127
77378
|
]
|
|
77128
77379
|
}
|
|
77129
77380
|
),
|
|
@@ -77143,7 +77394,7 @@ function FileUpload({ embedded = false, compact: compact2 = false, value, defaul
|
|
|
77143
77394
|
] }, `${file.name}-${file.lastModified}-${index}`)) }) : !compact2 && /* @__PURE__ */ jsx348("p", { className: classNames145("mt-3 text-neutral-500", density.detail), role: "status", children: labels.empty }),
|
|
77144
77395
|
(error || rejections.length > 0) && /* @__PURE__ */ jsx348("div", { role: "alert", className: "mt-3 text-xs text-rose-700 dark:text-rose-300", children: error || /* @__PURE__ */ jsx348("ul", { children: rejections.map((rejection, i) => /* @__PURE__ */ jsx348("li", { children: rejectionMessage?.(rejection) ?? rejection.message }, i)) }) })
|
|
77145
77396
|
] });
|
|
77146
|
-
return embedded ? /* @__PURE__ */ jsx348("div", { className, children: content }) : /* @__PURE__ */ jsx348(Panel_default, { ...surface, variant: surface.variant ?? "outlined", tone: surface.tone ?? "
|
|
77397
|
+
return embedded ? /* @__PURE__ */ jsx348("div", { className, children: content }) : /* @__PURE__ */ jsx348(Panel_default, { ...surface, variant: surface.variant ?? "outlined", tone: surface.tone ?? "none", padding: surface.padding ?? "sm", className, children: content });
|
|
77147
77398
|
}
|
|
77148
77399
|
|
|
77149
77400
|
// src/components/IdentityPicker/IdentityPicker.tsx
|
|
@@ -77349,7 +77600,7 @@ function IdentityPicker({
|
|
|
77349
77600
|
const selected = value === void 0 ? internal : value;
|
|
77350
77601
|
const labels = { ...defaults, ...overrides };
|
|
77351
77602
|
const locked = disabled || loading;
|
|
77352
|
-
const tone = surface.tone ?? "
|
|
77603
|
+
const tone = getSurfaceAccentColor(surface.tone ?? "none");
|
|
77353
77604
|
const tokens = getSideMenuItemTokens(tone);
|
|
77354
77605
|
const automatic = initials(name);
|
|
77355
77606
|
const change = (next) => {
|
|
@@ -77365,7 +77616,7 @@ function IdentityPicker({
|
|
|
77365
77616
|
});
|
|
77366
77617
|
const previewClass = classNames146("flex shrink-0 items-center justify-center overflow-hidden border border-neutral-200 dark:border-neutral-600", density.preview, getSurfaceCornerClass(surface.corner ?? "rounded-md"), tokens.bg);
|
|
77367
77618
|
const preview = selected?.type === "image" ? /* @__PURE__ */ jsx349(ImagePreview, { file: selected.file, src: selected.src, alt: labels.preview, className: "h-full w-full object-contain" }) : /* @__PURE__ */ jsx349("span", { style: { fontFamily }, "aria-hidden": "true", children: selected?.type === "emoji" ? selected.emoji : selected?.type === "monogram" ? selected.text : automatic });
|
|
77368
|
-
return /* @__PURE__ */ jsxs220(Panel_default, { ...surface, variant: surface.variant ?? "outlined", tone, padding: surface.padding ?? (compact2 ? "xs" : "sm"), className, "aria-busy": loading || void 0, children: [
|
|
77619
|
+
return /* @__PURE__ */ jsxs220(Panel_default, { ...surface, variant: surface.variant ?? "outlined", tone: surface.tone ?? "none", padding: surface.padding ?? (compact2 ? "xs" : "sm"), className, "aria-busy": loading || void 0, children: [
|
|
77369
77620
|
/* @__PURE__ */ jsxs220("div", { className: classNames146("flex items-start", density.headerGap), children: [
|
|
77370
77621
|
/* @__PURE__ */ jsx349("div", { className: previewClass, role: selected?.type === "image" ? void 0 : "img", "aria-label": selected?.type === "image" ? void 0 : `${labels.preview}: ${selected?.type === "emoji" ? selected.emoji : selected?.type === "monogram" ? selected.text : automatic}`, children: preview }),
|
|
77371
77622
|
/* @__PURE__ */ jsxs220("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -77439,7 +77690,7 @@ function IdentityPicker({
|
|
|
77439
77690
|
embedded: true,
|
|
77440
77691
|
compact: compact2,
|
|
77441
77692
|
variant: surface.variant,
|
|
77442
|
-
tone,
|
|
77693
|
+
tone: surface.tone ?? "none",
|
|
77443
77694
|
corner: surface.corner,
|
|
77444
77695
|
padding: "none",
|
|
77445
77696
|
size,
|
|
@@ -77525,12 +77776,13 @@ function ActivePopover({ trigger, content, options }) {
|
|
|
77525
77776
|
onOpenChange?.(value);
|
|
77526
77777
|
}, children: content });
|
|
77527
77778
|
}
|
|
77528
|
-
function DotStepper({ steps, currentIndex, currentStepId, maxVisible = 5, size = "sm", corner = "full", tone = "
|
|
77779
|
+
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 }) {
|
|
77780
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
77529
77781
|
const plan = planDotSteps(steps, currentIndex, currentStepId, maxVisible);
|
|
77530
77782
|
const density = sizes[size];
|
|
77531
77783
|
const fill = (status) => status === "completed" ? getTrueColorDotClass(doneColor) : status === "error" ? getTrueColorDotClass(errorColor2) : status === "active" ? getTrueColorDotClass(tone) : classNames147(getTrueColorDotClass(nextColor), "opacity-20 dark:opacity-25");
|
|
77532
77784
|
const overflow = (side, count) => count > 0 && /* @__PURE__ */ jsx350(TooltipWrapper_default, { text: `${count} more steps ${side}`, children: /* @__PURE__ */ jsx350("span", { tabIndex: disabled ? -1 : 0, role: "img", "aria-label": `${count} more steps ${side}`, className: classNames147("relative inline-flex shrink-0 items-center justify-center rounded-full focus-visible:outline-2 focus-visible:outline-offset-2", density.target), children: /* @__PURE__ */ jsx350("span", { "aria-hidden": "true", className: classNames147("relative inline-flex items-center", density.stack), children: [0, 1].map((index) => /* @__PURE__ */ jsx350("span", { className: classNames147("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);
|
|
77533
|
-
return /* @__PURE__ */ jsx350(Panel_default, { ...surface, role: "group", "aria-label": label, "aria-disabled": disabled || void 0, variant, tone, corner: corner === "full" ? "none" : corner, padding: "none", className: classNames147("align-middle", disabled && "opacity-50", className), style: { width: "max-content", overflow: "visible", ...corner === "full" ? { borderRadius: 9999 } : {}, ...style }, children: /* @__PURE__ */ jsxs221("div", { className: classNames147("flex w-max items-center", density.gap, getCompactSurfacePaddingClass(padding)), children: [
|
|
77785
|
+
return /* @__PURE__ */ jsx350(Panel_default, { ...surface, role: "group", "aria-label": label, "aria-disabled": disabled || void 0, variant, tone: surfaceTone, corner: corner === "full" ? "none" : corner, padding: "none", className: classNames147("align-middle", disabled && "opacity-50", className), style: { width: "max-content", overflow: "visible", ...corner === "full" ? { borderRadius: 9999 } : {}, ...style }, children: /* @__PURE__ */ jsxs221("div", { className: classNames147("flex w-max items-center", density.gap, getCompactSurfacePaddingClass(padding)), children: [
|
|
77534
77786
|
overflow("before", plan.before),
|
|
77535
77787
|
plan.indices.map((index) => {
|
|
77536
77788
|
const step = steps[index];
|
|
@@ -77659,7 +77911,7 @@ function MemoryCard({
|
|
|
77659
77911
|
] })
|
|
77660
77912
|
] })
|
|
77661
77913
|
] });
|
|
77662
|
-
return /* @__PURE__ */ jsxs223(Panel_default, { tone: "
|
|
77914
|
+
return /* @__PURE__ */ jsxs223(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: [
|
|
77663
77915
|
onSelect ? /* @__PURE__ */ jsx352("button", { className: "kit-memory-select", type: "button", disabled, "aria-pressed": selected, onClick: () => onSelect(memory), children: body }) : /* @__PURE__ */ jsx352("div", { className: "kit-memory-select", children: body }),
|
|
77664
77916
|
/* @__PURE__ */ jsx352(MemoryActionButtons, { memory, disabled, onEdit, onPinChange, onArchive, copy })
|
|
77665
77917
|
] });
|
|
@@ -77796,7 +78048,7 @@ function MemoryLibrary({
|
|
|
77796
78048
|
function changeFilter(key, value) {
|
|
77797
78049
|
setFilters({ ...filters, [key]: value || void 0 });
|
|
77798
78050
|
}
|
|
77799
|
-
return /* @__PURE__ */ jsxs224(Panel_default, { tone: "
|
|
78051
|
+
return /* @__PURE__ */ jsxs224(Panel_default, { tone: "none", variant: "outlined", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-memory-library ${className}`, "aria-busy": loading, children: [
|
|
77800
78052
|
/* @__PURE__ */ jsxs224("div", { className: "kit-knowledge-toolbar", children: [
|
|
77801
78053
|
/* @__PURE__ */ jsxs224("label", { className: "kit-knowledge-search", children: [
|
|
77802
78054
|
/* @__PURE__ */ jsx353("span", { children: copy("search") }),
|
|
@@ -77861,7 +78113,7 @@ function MemoryDetail({
|
|
|
77861
78113
|
...surface
|
|
77862
78114
|
}) {
|
|
77863
78115
|
const copy = useKnowledgeCopy(labels);
|
|
77864
|
-
return /* @__PURE__ */ jsx354(Panel_default, { tone: "
|
|
78116
|
+
return /* @__PURE__ */ jsx354(Panel_default, { tone: "none", variant: "outlined", padding: "none", disabled, ...surface, className: `kit-knowledge kit-memory-detail ${className}`, children: !memory ? /* @__PURE__ */ jsx354("p", { className: "kit-knowledge-empty", children: copy("selectMemory") }) : /* @__PURE__ */ jsxs225("div", { className: "kit-memory-detail-body", children: [
|
|
77865
78117
|
/* @__PURE__ */ jsxs225("div", { className: "kit-memory-meta", children: [
|
|
77866
78118
|
/* @__PURE__ */ jsx354("span", { children: copy(`kinds.${memory.kind}`) }),
|
|
77867
78119
|
/* @__PURE__ */ jsx354("span", { children: copy(`statuses.${memory.status ?? "active"}`) }),
|
|
@@ -78111,7 +78363,7 @@ function KnowledgeMap({
|
|
|
78111
78363
|
const matches = useMemo72(() => scene.points.filter((point) => (!selectedTopic || point.memory.topic === selectedTopic) && `${point.memory.title} ${point.memory.topic ?? ""}`.toLocaleLowerCase().includes(query.toLocaleLowerCase())), [scene, query, selectedTopic]);
|
|
78112
78364
|
const lastPage = Math.max(0, Math.ceil(matches.length / PAGE_SIZE) - 1), currentPage = Math.min(page, lastPage);
|
|
78113
78365
|
const selectableRelationships = geometry.edges.filter((edge) => edge.source.memoryId === selection || edge.target.memoryId === selection);
|
|
78114
|
-
return /* @__PURE__ */ jsxs226(Panel_default, { tone: "
|
|
78366
|
+
return /* @__PURE__ */ jsxs226(Panel_default, { tone: "none", variant: "outlined", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-knowledge-map ${className}`, "aria-busy": loading, children: [
|
|
78115
78367
|
/* @__PURE__ */ jsxs226("div", { className: "kit-knowledge-toolbar", children: [
|
|
78116
78368
|
/* @__PURE__ */ jsx355("strong", { children: copy("map") }),
|
|
78117
78369
|
/* @__PURE__ */ jsxs226("div", { className: "kit-knowledge-view", children: [
|
|
@@ -78281,7 +78533,7 @@ function KnowledgeExplorer({
|
|
|
78281
78533
|
] });
|
|
78282
78534
|
return trace && /* @__PURE__ */ jsx356(TraceGraph, { ...trace, disabled: disabled || trace.disabled, nodes: traceNodes, selectedNodeId: traceId, onNodeSelect: (node) => selectTrace(node?.id ?? null) });
|
|
78283
78535
|
};
|
|
78284
|
-
return /* @__PURE__ */ jsxs227(Panel_default, { tone: "
|
|
78536
|
+
return /* @__PURE__ */ jsxs227(Panel_default, { tone: "none", variant: "simple", padding: "none", loading, disabled, ...surface, className: `kit-knowledge kit-knowledge-explorer ${className}`, children: [
|
|
78285
78537
|
/* @__PURE__ */ jsx356("div", { className: "kit-knowledge-mobile-nav", role: "group", "aria-label": copy("library"), children: enabled.map((region) => /* @__PURE__ */ jsx356("button", { type: "button", "aria-pressed": view === region, onClick: () => setMobileView(region), children: copy(region === "detail" ? "details" : region) }, region)) }),
|
|
78286
78538
|
/* @__PURE__ */ jsx356("div", { className: "kit-knowledge-regions", children: enabled.map((region) => /* @__PURE__ */ jsx356("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)) })
|
|
78287
78539
|
] });
|
|
@@ -78343,19 +78595,439 @@ function ContentActions({
|
|
|
78343
78595
|
}
|
|
78344
78596
|
var ContentActions_default = ContentActions;
|
|
78345
78597
|
|
|
78598
|
+
// src/components/CodeBlock.tsx
|
|
78599
|
+
import React116, { useEffect as useEffect87, useMemo as useMemo74, useRef as useRef89, useState as useState108 } from "react";
|
|
78600
|
+
import { refractor } from "refractor";
|
|
78601
|
+
import tsx from "refractor/tsx";
|
|
78602
|
+
import { jsx as jsx358, jsxs as jsxs229 } from "react/jsx-runtime";
|
|
78603
|
+
refractor.register(tsx);
|
|
78604
|
+
function tokenRuns(nodes, inherited = "") {
|
|
78605
|
+
return nodes.flatMap((node) => {
|
|
78606
|
+
if (node.type === "text") return [{ text: node.value, className: inherited }];
|
|
78607
|
+
if (node.type !== "element") return [];
|
|
78608
|
+
const classes = node.properties.className;
|
|
78609
|
+
const className = [inherited, Array.isArray(classes) ? classes.join(" ") : String(classes ?? "")].filter(Boolean).join(" ");
|
|
78610
|
+
return tokenRuns(node.children, className);
|
|
78611
|
+
});
|
|
78612
|
+
}
|
|
78613
|
+
function renderLines(runs, numbered, value) {
|
|
78614
|
+
const lines = [[]];
|
|
78615
|
+
let key = 0;
|
|
78616
|
+
for (const run of runs) {
|
|
78617
|
+
run.text.split("\n").forEach((text2, index) => {
|
|
78618
|
+
if (index) lines.push([]);
|
|
78619
|
+
if (text2) lines[lines.length - 1].push(/* @__PURE__ */ jsx358("span", { className: run.className || void 0, children: text2 }, key++));
|
|
78620
|
+
});
|
|
78621
|
+
}
|
|
78622
|
+
const digits = String(value.split("\n").length).length;
|
|
78623
|
+
return lines.map((line3, index) => /* @__PURE__ */ jsxs229(React116.Fragment, { children: [
|
|
78624
|
+
index > 0 ? "\n" : null,
|
|
78625
|
+
/* @__PURE__ */ jsxs229("span", { className: "ui-code-block-line", children: [
|
|
78626
|
+
numbered && /* @__PURE__ */ jsx358("span", { className: "ui-code-block-line-number", "aria-hidden": "true", "data-line": index + 1, style: { width: `${digits}ch` } }),
|
|
78627
|
+
/* @__PURE__ */ jsx358("span", { className: "ui-code-block-line-text", children: line3 })
|
|
78628
|
+
] })
|
|
78629
|
+
] }, index));
|
|
78630
|
+
}
|
|
78631
|
+
function CodeBlock({
|
|
78632
|
+
value,
|
|
78633
|
+
onChange,
|
|
78634
|
+
readOnly = true,
|
|
78635
|
+
language,
|
|
78636
|
+
filename,
|
|
78637
|
+
showTitle = true,
|
|
78638
|
+
showCopy = true,
|
|
78639
|
+
showLineNumbers = false,
|
|
78640
|
+
wrapLines = false,
|
|
78641
|
+
maxHeight,
|
|
78642
|
+
tone = "none",
|
|
78643
|
+
color: color2 = "blue",
|
|
78644
|
+
variant = "subtle",
|
|
78645
|
+
corner = "rounded-md",
|
|
78646
|
+
editorLabel,
|
|
78647
|
+
className,
|
|
78648
|
+
...rest
|
|
78649
|
+
}) {
|
|
78650
|
+
const t = useKitT();
|
|
78651
|
+
const [copyState, setCopyState] = useState108("idle");
|
|
78652
|
+
const timer = useRef89(void 0);
|
|
78653
|
+
const generation = useRef89(0);
|
|
78654
|
+
useEffect87(() => {
|
|
78655
|
+
generation.current++;
|
|
78656
|
+
setCopyState("idle");
|
|
78657
|
+
clearTimeout(timer.current);
|
|
78658
|
+
return () => {
|
|
78659
|
+
generation.current++;
|
|
78660
|
+
clearTimeout(timer.current);
|
|
78661
|
+
};
|
|
78662
|
+
}, [value]);
|
|
78663
|
+
const highlighted = useMemo74(() => {
|
|
78664
|
+
if (!readOnly || !language) return [{ text: value, className: "" }];
|
|
78665
|
+
try {
|
|
78666
|
+
return tokenRuns(refractor.highlight(value, language.toLowerCase()).children);
|
|
78667
|
+
} catch {
|
|
78668
|
+
return [{ text: value, className: "" }];
|
|
78669
|
+
}
|
|
78670
|
+
}, [value, language, readOnly]);
|
|
78671
|
+
const copy = async () => {
|
|
78672
|
+
const current = ++generation.current;
|
|
78673
|
+
clearTimeout(timer.current);
|
|
78674
|
+
try {
|
|
78675
|
+
await navigator.clipboard.writeText(value);
|
|
78676
|
+
if (current !== generation.current) return;
|
|
78677
|
+
setCopyState("success");
|
|
78678
|
+
} catch {
|
|
78679
|
+
if (current !== generation.current) return;
|
|
78680
|
+
setCopyState("error");
|
|
78681
|
+
}
|
|
78682
|
+
timer.current = setTimeout(() => setCopyState("idle"), 2e3);
|
|
78683
|
+
};
|
|
78684
|
+
const copyLabel = t(copyState === "success" ? "kit.codeBlock.copied" : "kit.codeBlock.copy");
|
|
78685
|
+
return /* @__PURE__ */ jsx358("div", { ...rest, className: ["ui-code-block relative w-full min-w-0", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs229(Panel_default, { className: "ui-code-block-surface", tone, variant, corner, padding: "none", bodyClassName: "min-w-0 overflow-hidden", children: [
|
|
78686
|
+
(showTitle || showCopy) && /* @__PURE__ */ jsxs229("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: [
|
|
78687
|
+
showTitle && /* @__PURE__ */ jsx358("span", { className: "truncate font-mono text-xs", children: filename || language || t("kit.codeBlock.code") }),
|
|
78688
|
+
showCopy && /* @__PURE__ */ jsx358(IconButton_default, { icon: copyState === "success" ? "Check" : "CopyClipboard", color: color2, variant: "ghost", size: "xs", srLabel: copyLabel, tooltip: copyLabel, onClick: copy })
|
|
78689
|
+
] }),
|
|
78690
|
+
/* @__PURE__ */ jsx358(
|
|
78691
|
+
ScrollArea_default,
|
|
78692
|
+
{
|
|
78693
|
+
variant: "hover",
|
|
78694
|
+
className: "ui-code-block-scroll",
|
|
78695
|
+
"data-wrap": wrapLines || void 0,
|
|
78696
|
+
style: { maxHeight },
|
|
78697
|
+
tabIndex: readOnly ? 0 : -1,
|
|
78698
|
+
role: "region",
|
|
78699
|
+
"aria-label": filename || t("kit.codeBlock.code"),
|
|
78700
|
+
children: readOnly ? /* @__PURE__ */ jsx358("pre", { className: "ui-code-block-source", style: { whiteSpace: wrapLines ? "pre-wrap" : "pre", overflowWrap: wrapLines ? "anywhere" : void 0 }, children: /* @__PURE__ */ jsx358("code", { className: language ? `language-${language}` : void 0, children: renderLines(highlighted, showLineNumbers, value) }) }) : /* @__PURE__ */ jsxs229("div", { className: "ui-code-block-editor-layout", "data-wrap": wrapLines || void 0, children: [
|
|
78701
|
+
/* @__PURE__ */ jsx358("pre", { "aria-hidden": "true", className: "ui-code-block-editor-mirror", style: { whiteSpace: wrapLines ? "pre-wrap" : "pre", overflowWrap: wrapLines ? "anywhere" : void 0 }, children: value + "\n" }),
|
|
78702
|
+
/* @__PURE__ */ jsx358("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" })
|
|
78703
|
+
] })
|
|
78704
|
+
}
|
|
78705
|
+
),
|
|
78706
|
+
/* @__PURE__ */ jsx358("span", { className: "sr-only", role: "status", children: copyState === "success" ? t("kit.codeBlock.copied") : copyState === "error" ? t("kit.codeBlock.copyFailed") : "" }),
|
|
78707
|
+
copyState === "error" && /* @__PURE__ */ jsx358("p", { className: "px-4 pb-2 text-xs", children: t("kit.codeBlock.copyFailed") })
|
|
78708
|
+
] }) });
|
|
78709
|
+
}
|
|
78710
|
+
|
|
78711
|
+
// src/components/FilterBar.tsx
|
|
78712
|
+
import { useEffect as useEffect88, useId as useId53, useLayoutEffect as useLayoutEffect36, useRef as useRef90, useState as useState109 } from "react";
|
|
78713
|
+
import classNames149 from "classnames";
|
|
78714
|
+
import { Fragment as Fragment62, jsx as jsx359, jsxs as jsxs230 } from "react/jsx-runtime";
|
|
78715
|
+
function normalize(filters, value) {
|
|
78716
|
+
return Object.assign(/* @__PURE__ */ Object.create(null), Object.fromEntries(filters.flatMap((filter) => {
|
|
78717
|
+
const selected = new Set(Object.prototype.hasOwnProperty.call(value, filter.id) ? value[filter.id] : []);
|
|
78718
|
+
const values = filter.options.filter((option) => selected.has(option.value)).map((option) => option.value);
|
|
78719
|
+
return values.length ? [[filter.id, values]] : [];
|
|
78720
|
+
})));
|
|
78721
|
+
}
|
|
78722
|
+
function FilterBar({
|
|
78723
|
+
searchProps,
|
|
78724
|
+
filters,
|
|
78725
|
+
value,
|
|
78726
|
+
defaultValue = {},
|
|
78727
|
+
onChange,
|
|
78728
|
+
filteredCount,
|
|
78729
|
+
totalCount,
|
|
78730
|
+
itemLabel,
|
|
78731
|
+
size = "md",
|
|
78732
|
+
color: color2 = "blue",
|
|
78733
|
+
showSearch = true,
|
|
78734
|
+
showFilterLabel = true,
|
|
78735
|
+
showEmptyState = true,
|
|
78736
|
+
showClearAll = true,
|
|
78737
|
+
showResultCount = true,
|
|
78738
|
+
showMenuCounts = true,
|
|
78739
|
+
variant = "outlined",
|
|
78740
|
+
tone = "neutral",
|
|
78741
|
+
corner = "rounded-sm",
|
|
78742
|
+
padding = "xs",
|
|
78743
|
+
transparency,
|
|
78744
|
+
glassOpacity = "frosted",
|
|
78745
|
+
vibrancy = "medium",
|
|
78746
|
+
buttonVariant = "outline",
|
|
78747
|
+
secondaryButtonVariant = "ghost",
|
|
78748
|
+
applyButtonVariant = "solid",
|
|
78749
|
+
buttonTone = color2,
|
|
78750
|
+
buttonSize = size,
|
|
78751
|
+
buttonCorner,
|
|
78752
|
+
buttonWeight = "normal",
|
|
78753
|
+
buttonDashed = true,
|
|
78754
|
+
menuVariant = "outlined",
|
|
78755
|
+
menuTone = "none",
|
|
78756
|
+
menuCorner,
|
|
78757
|
+
menuPadding: menuPadding2,
|
|
78758
|
+
chipVariant = "soft",
|
|
78759
|
+
chipTone = color2,
|
|
78760
|
+
spring = "snappy",
|
|
78761
|
+
disabled = false,
|
|
78762
|
+
className,
|
|
78763
|
+
"aria-label": ariaLabel
|
|
78764
|
+
}) {
|
|
78765
|
+
const t = useKitT();
|
|
78766
|
+
const buttonStyle = buttonCorner === void 0 ? void 0 : { borderRadius: getSurfaceCornerRem(buttonCorner) };
|
|
78767
|
+
const actionStyle = { color: buttonTone, size: buttonSize, weight: buttonWeight, style: buttonStyle };
|
|
78768
|
+
const surfaceClasses = getSurfaceVariantClasses(variant, tone, {
|
|
78769
|
+
transparency,
|
|
78770
|
+
liquidExtras: classNames149(getGlassVibrancyClass(vibrancy), getSurfaceGlassFillClass(tone, glassOpacity))
|
|
78771
|
+
});
|
|
78772
|
+
const [internal, setInternal] = useState109(defaultValue);
|
|
78773
|
+
const applied = normalize(filters, value ?? internal);
|
|
78774
|
+
const [open, setOpen] = useState109(false);
|
|
78775
|
+
const [category, setCategory] = useState109(null);
|
|
78776
|
+
const [draft, setDraft] = useState109([]);
|
|
78777
|
+
const anchor = useRef90(null);
|
|
78778
|
+
const searchRegion = useRef90(null);
|
|
78779
|
+
const searchId = useId53();
|
|
78780
|
+
const [expanded, setExpanded] = useState109(Boolean(searchProps.initialValue));
|
|
78781
|
+
const searchDisabled = disabled || searchProps.disabled;
|
|
78782
|
+
const active = filters.find((filter) => filter.id === category);
|
|
78783
|
+
const motion = CONTROL_SPRING_TOKENS[spring];
|
|
78784
|
+
const style = { "--fb-duration": `${motion.duration}ms`, "--fb-easing": motion.easing };
|
|
78785
|
+
const commit = (next) => {
|
|
78786
|
+
const normalized = normalize(filters, next);
|
|
78787
|
+
if (value === void 0) setInternal(normalized);
|
|
78788
|
+
onChange?.(normalized);
|
|
78789
|
+
};
|
|
78790
|
+
const close = (restore = false) => {
|
|
78791
|
+
setOpen(false);
|
|
78792
|
+
setCategory(null);
|
|
78793
|
+
setDraft([]);
|
|
78794
|
+
if (restore) anchor.current?.focus();
|
|
78795
|
+
};
|
|
78796
|
+
const edit = (filter) => {
|
|
78797
|
+
setDraft([...applied[filter.id] ?? []]);
|
|
78798
|
+
setCategory(filter.id);
|
|
78799
|
+
setOpen(true);
|
|
78800
|
+
};
|
|
78801
|
+
const previouslyExpanded = useRef90(expanded);
|
|
78802
|
+
useLayoutEffect36(() => {
|
|
78803
|
+
if (showSearch && expanded && !previouslyExpanded.current && !searchDisabled) searchRegion.current?.querySelector("input")?.focus();
|
|
78804
|
+
previouslyExpanded.current = expanded;
|
|
78805
|
+
}, [expanded, searchDisabled, showSearch]);
|
|
78806
|
+
useEffect88(() => {
|
|
78807
|
+
if (disabled || category !== null && (!active || active.disabled)) {
|
|
78808
|
+
setOpen(false);
|
|
78809
|
+
setCategory(null);
|
|
78810
|
+
setDraft([]);
|
|
78811
|
+
}
|
|
78812
|
+
}, [disabled, category, active]);
|
|
78813
|
+
const items = active ? active.options.map((option) => ({
|
|
78814
|
+
id: option.value,
|
|
78815
|
+
label: option.label,
|
|
78816
|
+
type: "checkbox",
|
|
78817
|
+
checked: draft.includes(option.value),
|
|
78818
|
+
disabled: option.disabled,
|
|
78819
|
+
badge: showMenuCounts ? option.count : void 0,
|
|
78820
|
+
onCheckedChange: (checked) => setDraft((current) => checked ? [.../* @__PURE__ */ new Set([...current, option.value])] : current.filter((entry) => entry !== option.value))
|
|
78821
|
+
})) : filters.map((filter) => ({
|
|
78822
|
+
id: filter.id,
|
|
78823
|
+
label: filter.label,
|
|
78824
|
+
badge: showMenuCounts ? filter.count ?? filter.options.length : void 0,
|
|
78825
|
+
disabled: filter.disabled,
|
|
78826
|
+
trailing: /* @__PURE__ */ jsx359(CustomIcon_default, { icon: "ChevronRight", size: "sm" }),
|
|
78827
|
+
closeOnSelect: false,
|
|
78828
|
+
command: () => edit(filter)
|
|
78829
|
+
}));
|
|
78830
|
+
const chips = filters.filter((filter) => applied[filter.id]?.length).map((filter) => ({
|
|
78831
|
+
id: filter.id,
|
|
78832
|
+
label: `${filter.label}: ${filter.options.filter((option) => applied[filter.id].includes(option.value)).map((option) => option.label).join(", ")}`,
|
|
78833
|
+
disabled: disabled || filter.disabled,
|
|
78834
|
+
edit: () => edit(filter),
|
|
78835
|
+
remove: () => {
|
|
78836
|
+
const next = { ...applied };
|
|
78837
|
+
delete next[filter.id];
|
|
78838
|
+
commit(next);
|
|
78839
|
+
anchor.current?.focus();
|
|
78840
|
+
}
|
|
78841
|
+
}));
|
|
78842
|
+
return /* @__PURE__ */ jsxs230(
|
|
78843
|
+
"div",
|
|
78844
|
+
{
|
|
78845
|
+
role: "group",
|
|
78846
|
+
"aria-label": ariaLabel ?? t("kit.filterbar.filters"),
|
|
78847
|
+
className: classNames149("kit-filter-bar flex min-w-0 flex-wrap items-center gap-2 text-sm", surfaceClasses, getSurfaceCornerClass(corner), getSurfacePaddingClass(padding), className),
|
|
78848
|
+
style,
|
|
78849
|
+
onBlurCapture: (event) => {
|
|
78850
|
+
const menu = event.target.closest("[data-menu-owner]");
|
|
78851
|
+
const next = event.relatedTarget;
|
|
78852
|
+
if (open && menu && !menu.contains(next) && !event.currentTarget.contains(next)) close();
|
|
78853
|
+
},
|
|
78854
|
+
onKeyDownCapture: (event) => {
|
|
78855
|
+
if (open && active && event.key === "Tab") event.stopPropagation();
|
|
78856
|
+
if (open && category && event.key === "ArrowLeft") {
|
|
78857
|
+
event.preventDefault();
|
|
78858
|
+
event.stopPropagation();
|
|
78859
|
+
setCategory(null);
|
|
78860
|
+
setDraft([]);
|
|
78861
|
+
}
|
|
78862
|
+
if (open && event.key === "Escape") {
|
|
78863
|
+
event.preventDefault();
|
|
78864
|
+
event.stopPropagation();
|
|
78865
|
+
close(true);
|
|
78866
|
+
}
|
|
78867
|
+
},
|
|
78868
|
+
children: [
|
|
78869
|
+
/* @__PURE__ */ jsxs230(
|
|
78870
|
+
"div",
|
|
78871
|
+
{
|
|
78872
|
+
ref: searchRegion,
|
|
78873
|
+
className: "fb-search",
|
|
78874
|
+
"data-expanded": expanded,
|
|
78875
|
+
hidden: !showSearch,
|
|
78876
|
+
inert: !showSearch,
|
|
78877
|
+
onBlur: (event) => {
|
|
78878
|
+
if (!event.currentTarget.contains(event.relatedTarget) && !event.currentTarget.querySelector("input")?.value) setExpanded(false);
|
|
78879
|
+
},
|
|
78880
|
+
children: [
|
|
78881
|
+
/* @__PURE__ */ jsx359(
|
|
78882
|
+
Button_default,
|
|
78883
|
+
{
|
|
78884
|
+
...actionStyle,
|
|
78885
|
+
variant: "icon",
|
|
78886
|
+
leadingIcon: "Search",
|
|
78887
|
+
"aria-label": t("kit.filterbar.search"),
|
|
78888
|
+
"aria-expanded": expanded,
|
|
78889
|
+
"aria-controls": searchId,
|
|
78890
|
+
disabled: searchDisabled,
|
|
78891
|
+
className: "fb-search-trigger",
|
|
78892
|
+
hidden: expanded,
|
|
78893
|
+
onClick: () => setExpanded(true)
|
|
78894
|
+
}
|
|
78895
|
+
),
|
|
78896
|
+
/* @__PURE__ */ jsx359("div", { id: searchId, className: "fb-search-input", inert: !expanded, "aria-hidden": !expanded, children: /* @__PURE__ */ jsx359(SearchBar_default, { size, color: color2, ...searchProps, disabled: searchDisabled }) })
|
|
78897
|
+
]
|
|
78898
|
+
}
|
|
78899
|
+
),
|
|
78900
|
+
showSearch && (showFilterLabel || chips.length > 0 || showEmptyState) && /* @__PURE__ */ jsx359("span", { "aria-hidden": "true", className: "h-5 border-l border-neutral-200 dark:border-neutral-700" }),
|
|
78901
|
+
showFilterLabel && /* @__PURE__ */ jsxs230("span", { className: "flex items-center gap-1.5 text-neutral-600 dark:text-neutral-300", children: [
|
|
78902
|
+
/* @__PURE__ */ jsx359("svg", { "aria-hidden": "true", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.7", children: /* @__PURE__ */ jsx359("path", { d: "M3 4h18l-7 8v8l-4-2v-6Z" }) }),
|
|
78903
|
+
t("kit.filterbar.filters")
|
|
78904
|
+
] }),
|
|
78905
|
+
/* @__PURE__ */ jsx359(FilterChips, { chips, color: chipTone, variant: chipVariant, size, buttonTone, buttonStyle, removeLabel: (label) => t("kit.filterbar.remove", { label }) }),
|
|
78906
|
+
showEmptyState && !chips.length && /* @__PURE__ */ jsx359("span", { className: "text-neutral-400", children: t("kit.filterbar.empty") }),
|
|
78907
|
+
/* @__PURE__ */ jsxs230("div", { className: "flex flex-1 flex-wrap items-center justify-end gap-2", children: [
|
|
78908
|
+
/* @__PURE__ */ jsx359(
|
|
78909
|
+
Button_default,
|
|
78910
|
+
{
|
|
78911
|
+
...actionStyle,
|
|
78912
|
+
ref: anchor,
|
|
78913
|
+
variant: buttonVariant,
|
|
78914
|
+
leadingIcon: "Add",
|
|
78915
|
+
disabled: disabled || !filters.length,
|
|
78916
|
+
className: classNames149(buttonCorner === void 0 && "rounded-full", buttonDashed && buttonVariant === "outline" && "border-dashed"),
|
|
78917
|
+
"aria-haspopup": "menu",
|
|
78918
|
+
"aria-expanded": open,
|
|
78919
|
+
onClick: () => {
|
|
78920
|
+
if (open) close();
|
|
78921
|
+
else {
|
|
78922
|
+
setCategory(null);
|
|
78923
|
+
setOpen(true);
|
|
78924
|
+
}
|
|
78925
|
+
},
|
|
78926
|
+
onKeyDown: (event) => {
|
|
78927
|
+
if (event.key === "ArrowDown") {
|
|
78928
|
+
event.preventDefault();
|
|
78929
|
+
setCategory(null);
|
|
78930
|
+
setOpen(true);
|
|
78931
|
+
}
|
|
78932
|
+
},
|
|
78933
|
+
children: t("kit.filterbar.add")
|
|
78934
|
+
}
|
|
78935
|
+
),
|
|
78936
|
+
showClearAll && chips.length > 0 && /* @__PURE__ */ jsx359(Button_default, { ...actionStyle, variant: secondaryButtonVariant, disabled, onClick: () => {
|
|
78937
|
+
commit({});
|
|
78938
|
+
anchor.current?.focus();
|
|
78939
|
+
}, children: t("kit.filterbar.clearAll") }),
|
|
78940
|
+
showResultCount && /* @__PURE__ */ jsx359("span", { className: "border-l border-neutral-200 pl-2 text-neutral-400 dark:border-neutral-700", role: "status", children: t("kit.filterbar.summary", { filtered: filteredCount, total: totalCount, items: itemLabel ?? t("kit.filterbar.items") }) })
|
|
78941
|
+
] }),
|
|
78942
|
+
/* @__PURE__ */ jsx359(
|
|
78943
|
+
Menu,
|
|
78944
|
+
{
|
|
78945
|
+
popup: true,
|
|
78946
|
+
anchorRef: anchor,
|
|
78947
|
+
open: open && !disabled,
|
|
78948
|
+
onOpenChange: (next) => {
|
|
78949
|
+
if (!next) close();
|
|
78950
|
+
},
|
|
78951
|
+
items,
|
|
78952
|
+
width: 320,
|
|
78953
|
+
size,
|
|
78954
|
+
variant: menuVariant,
|
|
78955
|
+
tone: menuTone,
|
|
78956
|
+
corner: menuCorner,
|
|
78957
|
+
padding: menuPadding2,
|
|
78958
|
+
className: "fb-menu",
|
|
78959
|
+
style,
|
|
78960
|
+
"aria-label": active?.label ?? t("kit.filterbar.filterBy"),
|
|
78961
|
+
renderItem: active ? (item) => /* @__PURE__ */ jsxs230(Fragment62, { children: [
|
|
78962
|
+
/* @__PURE__ */ jsx359("span", { "aria-hidden": "true", className: "inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border border-neutral-300 dark:border-neutral-600", children: item.checked && /* @__PURE__ */ jsx359(CustomIcon_default, { icon: "Check", size: "xs" }) }),
|
|
78963
|
+
/* @__PURE__ */ jsx359("span", { className: "min-w-0 flex-1 truncate", children: item.label }),
|
|
78964
|
+
item.badge != null && /* @__PURE__ */ jsx359("span", { className: "shrink-0 text-xs text-neutral-400", children: item.badge })
|
|
78965
|
+
] }) : void 0,
|
|
78966
|
+
header: active ? /* @__PURE__ */ jsx359(Button_default, { ...actionStyle, variant: secondaryButtonVariant, leadingIcon: "ChevronLeft", onClick: () => {
|
|
78967
|
+
setCategory(null);
|
|
78968
|
+
setDraft([]);
|
|
78969
|
+
}, "aria-label": t("kit.filterbar.back"), children: /* @__PURE__ */ jsx359("span", { className: "uppercase tracking-wide", children: active.label }) }) : /* @__PURE__ */ jsx359("span", { className: "px-3 text-xs uppercase tracking-wide text-neutral-400", children: t("kit.filterbar.filterBy") }),
|
|
78970
|
+
footer: active ? /* @__PURE__ */ jsxs230("div", { className: "flex items-center justify-between", children: [
|
|
78971
|
+
/* @__PURE__ */ jsx359(Button_default, { ...actionStyle, variant: secondaryButtonVariant, onClick: () => setDraft((current) => current.filter((entry) => active.options.some((option) => option.value === entry && option.disabled))), children: t("kit.filterbar.clear") }),
|
|
78972
|
+
/* @__PURE__ */ jsx359(Button_default, { ...actionStyle, variant: applyButtonVariant, onClick: () => {
|
|
78973
|
+
commit({ ...applied, [active.id]: draft });
|
|
78974
|
+
close(true);
|
|
78975
|
+
}, children: t("kit.filterbar.done") })
|
|
78976
|
+
] }) : void 0
|
|
78977
|
+
},
|
|
78978
|
+
category ?? "categories"
|
|
78979
|
+
)
|
|
78980
|
+
]
|
|
78981
|
+
}
|
|
78982
|
+
);
|
|
78983
|
+
}
|
|
78984
|
+
function FilterChips({ chips, color: color2, variant, size, buttonTone, buttonStyle, removeLabel }) {
|
|
78985
|
+
const [visible, setVisible] = useState109(chips);
|
|
78986
|
+
const region = useRef90(null);
|
|
78987
|
+
const positions = useRef90(/* @__PURE__ */ new Map());
|
|
78988
|
+
const signature = chips.map((chip) => chip.id).join("\0");
|
|
78989
|
+
useEffect88(() => {
|
|
78990
|
+
const timer = setTimeout(() => setVisible((current) => current.filter((chip) => signature.split("\0").includes(chip.id))), 900);
|
|
78991
|
+
return () => clearTimeout(timer);
|
|
78992
|
+
}, [signature]);
|
|
78993
|
+
useLayoutEffect36(() => {
|
|
78994
|
+
setVisible((current) => [...chips, ...current.filter((chip) => !chips.some((next) => next.id === chip.id))]);
|
|
78995
|
+
}, [signature]);
|
|
78996
|
+
useLayoutEffect36(() => {
|
|
78997
|
+
if (typeof matchMedia === "undefined" || matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
78998
|
+
const next = /* @__PURE__ */ new Map();
|
|
78999
|
+
region.current?.querySelectorAll("[data-chip]").forEach((element) => {
|
|
79000
|
+
const key = element.dataset.chip;
|
|
79001
|
+
const left = element.getBoundingClientRect().left;
|
|
79002
|
+
const previous = positions.current.get(key);
|
|
79003
|
+
if (previous !== void 0 && previous !== left) element.animate?.([{ transform: `translateX(${previous - left}px)` }, { transform: "translateX(0)" }], { duration: 320, easing: "ease-out" });
|
|
79004
|
+
next.set(key, left);
|
|
79005
|
+
});
|
|
79006
|
+
positions.current = next;
|
|
79007
|
+
});
|
|
79008
|
+
return /* @__PURE__ */ jsx359("div", { ref: region, className: "contents", children: visible.map((old) => {
|
|
79009
|
+
const chip = chips.find((current) => current.id === old.id);
|
|
79010
|
+
const entry = chip ?? old;
|
|
79011
|
+
return /* @__PURE__ */ jsx359("span", { "data-chip": entry.id, className: "fb-chip", "data-exiting": !chip, inert: !chip, "aria-hidden": !chip, children: /* @__PURE__ */ jsx359(Badge_default, { tone: color2, variant, size, ring: false, className: "max-w-full py-1", children: /* @__PURE__ */ jsxs230("span", { className: "flex min-w-0 items-center gap-1", children: [
|
|
79012
|
+
/* @__PURE__ */ jsx359("button", { type: "button", disabled: entry.disabled, className: "min-w-0 truncate rounded-full px-1 py-1 focus-visible:outline focus-visible:outline-2 disabled:opacity-50", onClick: entry.edit, children: entry.label }),
|
|
79013
|
+
/* @__PURE__ */ jsx359(Button_default, { variant: "icon", size: "xs", color: buttonTone, style: buttonStyle, leadingIcon: "Close", disabled: entry.disabled, "aria-label": removeLabel(entry.label), onClick: entry.remove })
|
|
79014
|
+
] }) }) }, entry.id);
|
|
79015
|
+
}) });
|
|
79016
|
+
}
|
|
79017
|
+
|
|
78346
79018
|
// src/contexts/BottomSheetContext.tsx
|
|
78347
79019
|
import {
|
|
78348
79020
|
createContext as createContext10,
|
|
78349
79021
|
useCallback as useCallback58,
|
|
78350
79022
|
useContext as useContext10,
|
|
78351
|
-
useEffect as
|
|
78352
|
-
useMemo as
|
|
78353
|
-
useRef as
|
|
78354
|
-
useState as
|
|
79023
|
+
useEffect as useEffect89,
|
|
79024
|
+
useMemo as useMemo75,
|
|
79025
|
+
useRef as useRef91,
|
|
79026
|
+
useState as useState110
|
|
78355
79027
|
} from "react";
|
|
78356
79028
|
import { createPortal as createPortal21 } from "react-dom";
|
|
78357
|
-
import
|
|
78358
|
-
import { jsx as
|
|
79029
|
+
import classNames150 from "classnames";
|
|
79030
|
+
import { jsx as jsx360, jsxs as jsxs231 } from "react/jsx-runtime";
|
|
78359
79031
|
var BottomSheetContext = createContext10(null);
|
|
78360
79032
|
var TRANSITION_MS2 = 260;
|
|
78361
79033
|
var renderSlot = (slot, controls) => {
|
|
@@ -78367,9 +79039,9 @@ var renderSlot = (slot, controls) => {
|
|
|
78367
79039
|
var BottomSheetProvider = ({
|
|
78368
79040
|
children
|
|
78369
79041
|
}) => {
|
|
78370
|
-
const [sheet, setSheet] =
|
|
78371
|
-
const [isVisible, setIsVisible] =
|
|
78372
|
-
const pendingCloseRef =
|
|
79042
|
+
const [sheet, setSheet] = useState110(null);
|
|
79043
|
+
const [isVisible, setIsVisible] = useState110(false);
|
|
79044
|
+
const pendingCloseRef = useRef91(null);
|
|
78373
79045
|
const dismissSheet = useCallback58(() => {
|
|
78374
79046
|
setIsVisible(false);
|
|
78375
79047
|
}, []);
|
|
@@ -78386,7 +79058,7 @@ var BottomSheetProvider = ({
|
|
|
78386
79058
|
setTimeout(animateIn, 0);
|
|
78387
79059
|
}
|
|
78388
79060
|
}, []);
|
|
78389
|
-
|
|
79061
|
+
useEffect89(() => {
|
|
78390
79062
|
if (!isVisible && sheet) {
|
|
78391
79063
|
pendingCloseRef.current = setTimeout(() => {
|
|
78392
79064
|
sheet.onClose?.();
|
|
@@ -78401,7 +79073,7 @@ var BottomSheetProvider = ({
|
|
|
78401
79073
|
}
|
|
78402
79074
|
return void 0;
|
|
78403
79075
|
}, [isVisible, sheet]);
|
|
78404
|
-
|
|
79076
|
+
useEffect89(
|
|
78405
79077
|
() => () => {
|
|
78406
79078
|
if (pendingCloseRef.current) {
|
|
78407
79079
|
clearTimeout(pendingCloseRef.current);
|
|
@@ -78409,13 +79081,13 @@ var BottomSheetProvider = ({
|
|
|
78409
79081
|
},
|
|
78410
79082
|
[]
|
|
78411
79083
|
);
|
|
78412
|
-
const controls =
|
|
79084
|
+
const controls = useMemo75(
|
|
78413
79085
|
() => ({
|
|
78414
79086
|
dismiss: dismissSheet
|
|
78415
79087
|
}),
|
|
78416
79088
|
[dismissSheet]
|
|
78417
79089
|
);
|
|
78418
|
-
const contextValue =
|
|
79090
|
+
const contextValue = useMemo75(
|
|
78419
79091
|
() => ({
|
|
78420
79092
|
presentSheet,
|
|
78421
79093
|
dismissSheet,
|
|
@@ -78425,11 +79097,11 @@ var BottomSheetProvider = ({
|
|
|
78425
79097
|
[presentSheet, dismissSheet, sheet, isVisible]
|
|
78426
79098
|
);
|
|
78427
79099
|
const overlayNode = typeof document !== "undefined" && sheet ? createPortal21(
|
|
78428
|
-
/* @__PURE__ */
|
|
78429
|
-
/* @__PURE__ */
|
|
79100
|
+
/* @__PURE__ */ jsxs231("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
|
|
79101
|
+
/* @__PURE__ */ jsx360(
|
|
78430
79102
|
"div",
|
|
78431
79103
|
{
|
|
78432
|
-
className:
|
|
79104
|
+
className: classNames150(
|
|
78433
79105
|
"absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
|
|
78434
79106
|
isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
|
|
78435
79107
|
),
|
|
@@ -78439,24 +79111,24 @@ var BottomSheetProvider = ({
|
|
|
78439
79111
|
}
|
|
78440
79112
|
}
|
|
78441
79113
|
),
|
|
78442
|
-
/* @__PURE__ */
|
|
79114
|
+
/* @__PURE__ */ jsx360("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ jsxs231(
|
|
78443
79115
|
"section",
|
|
78444
79116
|
{
|
|
78445
79117
|
role: "dialog",
|
|
78446
79118
|
"aria-modal": "true",
|
|
78447
|
-
className:
|
|
79119
|
+
className: classNames150(
|
|
78448
79120
|
"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",
|
|
78449
79121
|
sheet.className,
|
|
78450
79122
|
isVisible ? "translate-y-0" : "translate-y-full"
|
|
78451
79123
|
),
|
|
78452
79124
|
style: { minHeight: "25vh", maxHeight: "85vh" },
|
|
78453
79125
|
children: [
|
|
78454
|
-
/* @__PURE__ */
|
|
78455
|
-
/* @__PURE__ */
|
|
78456
|
-
sheet.title && /* @__PURE__ */
|
|
78457
|
-
sheet.description && /* @__PURE__ */
|
|
79126
|
+
/* @__PURE__ */ jsxs231("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
|
|
79127
|
+
/* @__PURE__ */ jsxs231("div", { className: "space-y-1", children: [
|
|
79128
|
+
sheet.title && /* @__PURE__ */ jsx360("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
|
|
79129
|
+
sheet.description && /* @__PURE__ */ jsx360("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
|
|
78458
79130
|
] }),
|
|
78459
|
-
(sheet.showCloseButton ?? true) && /* @__PURE__ */
|
|
79131
|
+
(sheet.showCloseButton ?? true) && /* @__PURE__ */ jsx360(
|
|
78460
79132
|
IconButton_default,
|
|
78461
79133
|
{
|
|
78462
79134
|
icon: "Close",
|
|
@@ -78468,15 +79140,15 @@ var BottomSheetProvider = ({
|
|
|
78468
79140
|
}
|
|
78469
79141
|
)
|
|
78470
79142
|
] }),
|
|
78471
|
-
/* @__PURE__ */
|
|
78472
|
-
sheet.actions && /* @__PURE__ */
|
|
79143
|
+
/* @__PURE__ */ jsx360("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ jsx360("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
|
|
79144
|
+
sheet.actions && /* @__PURE__ */ jsx360("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) })
|
|
78473
79145
|
]
|
|
78474
79146
|
}
|
|
78475
79147
|
) })
|
|
78476
79148
|
] }),
|
|
78477
79149
|
document.body
|
|
78478
79150
|
) : null;
|
|
78479
|
-
return /* @__PURE__ */
|
|
79151
|
+
return /* @__PURE__ */ jsxs231(BottomSheetContext.Provider, { value: contextValue, children: [
|
|
78480
79152
|
children,
|
|
78481
79153
|
overlayNode
|
|
78482
79154
|
] });
|
|
@@ -79116,8 +79788,8 @@ var SYSTEM_VARIABLES = [
|
|
|
79116
79788
|
];
|
|
79117
79789
|
|
|
79118
79790
|
// src/components/MetricBar.tsx
|
|
79119
|
-
import
|
|
79120
|
-
import { jsx as
|
|
79791
|
+
import classNames151 from "classnames";
|
|
79792
|
+
import { jsx as jsx361 } from "react/jsx-runtime";
|
|
79121
79793
|
var MetricBar = ({
|
|
79122
79794
|
label,
|
|
79123
79795
|
value,
|
|
@@ -79127,7 +79799,7 @@ var MetricBar = ({
|
|
|
79127
79799
|
size = "sm",
|
|
79128
79800
|
className,
|
|
79129
79801
|
...rest
|
|
79130
|
-
}) => /* @__PURE__ */
|
|
79802
|
+
}) => /* @__PURE__ */ jsx361(
|
|
79131
79803
|
Progress_default,
|
|
79132
79804
|
{
|
|
79133
79805
|
...rest,
|
|
@@ -79137,13 +79809,13 @@ var MetricBar = ({
|
|
|
79137
79809
|
formatValue: value !== void 0 ? () => String(value) : void 0,
|
|
79138
79810
|
size,
|
|
79139
79811
|
color: tone ?? color2 ?? "blue",
|
|
79140
|
-
className:
|
|
79812
|
+
className: classNames151("w-full", className)
|
|
79141
79813
|
}
|
|
79142
79814
|
);
|
|
79143
79815
|
MetricBar.displayName = "MetricBar";
|
|
79144
79816
|
|
|
79145
79817
|
// src/components/NetworkGraph/NetworkGraph.tsx
|
|
79146
|
-
import { useEffect as
|
|
79818
|
+
import { useEffect as useEffect91, useId as useId54, useMemo as useMemo76, useRef as useRef93, useState as useState112 } from "react";
|
|
79147
79819
|
|
|
79148
79820
|
// src/components/NetworkGraph/model.ts
|
|
79149
79821
|
var CELL = 64;
|
|
@@ -79287,16 +79959,16 @@ function findNetworkPath(edges, source, target) {
|
|
|
79287
79959
|
}
|
|
79288
79960
|
|
|
79289
79961
|
// src/components/NetworkGraph/useNetworkCanvas.ts
|
|
79290
|
-
import { useCallback as useCallback59, useEffect as
|
|
79962
|
+
import { useCallback as useCallback59, useEffect as useEffect90, useRef as useRef92, useState as useState111 } from "react";
|
|
79291
79963
|
function useNetworkCanvas(options) {
|
|
79292
|
-
const canvasRef =
|
|
79293
|
-
const view =
|
|
79294
|
-
const size =
|
|
79295
|
-
const latest =
|
|
79296
|
-
const frame =
|
|
79297
|
-
const [zoom, setZoom] =
|
|
79298
|
-
const colors3 =
|
|
79299
|
-
const textColor =
|
|
79964
|
+
const canvasRef = useRef92(null);
|
|
79965
|
+
const view = useRef92({ x: 0, y: 0, zoom: 1 });
|
|
79966
|
+
const size = useRef92({ width: 1, height: 1 });
|
|
79967
|
+
const latest = useRef92(options);
|
|
79968
|
+
const frame = useRef92(null);
|
|
79969
|
+
const [zoom, setZoom] = useState111(1);
|
|
79970
|
+
const colors3 = useRef92(/* @__PURE__ */ new Map());
|
|
79971
|
+
const textColor = useRef92("#737373");
|
|
79300
79972
|
const draw = useCallback59(() => {
|
|
79301
79973
|
const canvas = canvasRef.current;
|
|
79302
79974
|
const ctx = canvas?.getContext("2d");
|
|
@@ -79437,14 +80109,14 @@ function useNetworkCanvas(options) {
|
|
|
79437
80109
|
},
|
|
79438
80110
|
[update]
|
|
79439
80111
|
);
|
|
79440
|
-
|
|
80112
|
+
useEffect90(() => {
|
|
79441
80113
|
latest.current = options;
|
|
79442
80114
|
requestDraw();
|
|
79443
80115
|
}, [options, requestDraw]);
|
|
79444
|
-
|
|
80116
|
+
useEffect90(() => {
|
|
79445
80117
|
fit();
|
|
79446
80118
|
}, [options.model, fit]);
|
|
79447
|
-
|
|
80119
|
+
useEffect90(() => {
|
|
79448
80120
|
const canvas = canvasRef.current;
|
|
79449
80121
|
if (!canvas) return;
|
|
79450
80122
|
const measure = () => {
|
|
@@ -79497,7 +80169,7 @@ function useNetworkCanvas(options) {
|
|
|
79497
80169
|
}
|
|
79498
80170
|
|
|
79499
80171
|
// src/components/NetworkGraph/NetworkGraph.tsx
|
|
79500
|
-
import { jsx as
|
|
80172
|
+
import { jsx as jsx362, jsxs as jsxs232 } from "react/jsx-runtime";
|
|
79501
80173
|
var NO_COMMUNITIES = [];
|
|
79502
80174
|
var NO_HIGHLIGHTS = [];
|
|
79503
80175
|
function NetworkGraph({
|
|
@@ -79521,18 +80193,19 @@ function NetworkGraph({
|
|
|
79521
80193
|
ariaLabel,
|
|
79522
80194
|
emptyMessage,
|
|
79523
80195
|
onViewportChange,
|
|
79524
|
-
tone = "
|
|
80196
|
+
tone: surfaceTone = "none",
|
|
79525
80197
|
variant = "elevated",
|
|
79526
80198
|
disabled = false,
|
|
79527
80199
|
loading = false,
|
|
79528
80200
|
...panelProps
|
|
79529
80201
|
}) {
|
|
80202
|
+
const tone = getSurfaceAccentColor(surfaceTone);
|
|
79530
80203
|
const t = useKitT();
|
|
79531
|
-
const helpId =
|
|
79532
|
-
const layoutRef =
|
|
79533
|
-
const [hasLegendSpace, setHasLegendSpace] =
|
|
80204
|
+
const helpId = useId54();
|
|
80205
|
+
const layoutRef = useRef93(null);
|
|
80206
|
+
const [hasLegendSpace, setHasLegendSpace] = useState112(true);
|
|
79534
80207
|
const legendOnRight = legendPosition === "right" || legendPosition === "auto" && hasLegendSpace;
|
|
79535
|
-
|
|
80208
|
+
useEffect91(() => {
|
|
79536
80209
|
const element = layoutRef.current;
|
|
79537
80210
|
if (!element || legendPosition !== "auto") return;
|
|
79538
80211
|
const measure = () => setHasLegendSpace(element.getBoundingClientRect().width >= 600);
|
|
@@ -79541,38 +80214,38 @@ function NetworkGraph({
|
|
|
79541
80214
|
observer.observe(element);
|
|
79542
80215
|
return () => observer.disconnect();
|
|
79543
80216
|
}, [legendPosition, loading]);
|
|
79544
|
-
const model =
|
|
80217
|
+
const model = useMemo76(
|
|
79545
80218
|
() => buildNetwork(nodes, edges, communities),
|
|
79546
80219
|
[nodes, edges, communities]
|
|
79547
80220
|
);
|
|
79548
|
-
const [internalSelected, setInternalSelected] =
|
|
80221
|
+
const [internalSelected, setInternalSelected] = useState112(
|
|
79549
80222
|
defaultSelectedNodeId
|
|
79550
80223
|
);
|
|
79551
|
-
const [hidden, setHidden] =
|
|
79552
|
-
const [focused, setFocused] =
|
|
79553
|
-
const [query, setQuery] =
|
|
79554
|
-
const enabled =
|
|
80224
|
+
const [hidden, setHidden] = useState112(() => /* @__PURE__ */ new Set());
|
|
80225
|
+
const [focused, setFocused] = useState112(null);
|
|
80226
|
+
const [query, setQuery] = useState112("");
|
|
80227
|
+
const enabled = useMemo76(
|
|
79555
80228
|
() => new Set(
|
|
79556
80229
|
visibleCommunityIds ?? model.groups.filter((g) => !hidden.has(g.id)).map((g) => g.id)
|
|
79557
80230
|
),
|
|
79558
80231
|
[visibleCommunityIds, model, hidden]
|
|
79559
80232
|
);
|
|
79560
|
-
const visibleNodes =
|
|
80233
|
+
const visibleNodes = useMemo76(
|
|
79561
80234
|
() => model.nodes.filter((n) => !n.community || enabled.has(n.community)),
|
|
79562
80235
|
[model, enabled]
|
|
79563
80236
|
);
|
|
79564
|
-
const visible =
|
|
80237
|
+
const visible = useMemo76(
|
|
79565
80238
|
() => new Set(visibleNodes.map((n) => n.id)),
|
|
79566
80239
|
[visibleNodes]
|
|
79567
80240
|
);
|
|
79568
80241
|
const selection = selectedNodeId === void 0 ? internalSelected : selectedNodeId;
|
|
79569
80242
|
const selected = selection !== null && visible.has(selection) ? selection : null;
|
|
79570
80243
|
const activeFocus = focused !== null && visible.has(focused) ? focused : null;
|
|
79571
|
-
const highlighted =
|
|
80244
|
+
const highlighted = useMemo76(
|
|
79572
80245
|
() => new Set(highlightedEdgeIds),
|
|
79573
80246
|
[highlightedEdgeIds]
|
|
79574
80247
|
);
|
|
79575
|
-
const counts =
|
|
80248
|
+
const counts = useMemo76(() => {
|
|
79576
80249
|
const result = /* @__PURE__ */ new Map();
|
|
79577
80250
|
for (const n of model.nodes)
|
|
79578
80251
|
if (n.community)
|
|
@@ -79592,7 +80265,7 @@ function NetworkGraph({
|
|
|
79592
80265
|
onViewportChange
|
|
79593
80266
|
});
|
|
79594
80267
|
const locked = disabled || loading;
|
|
79595
|
-
const drag =
|
|
80268
|
+
const drag = useRef93(null);
|
|
79596
80269
|
const select = (id) => {
|
|
79597
80270
|
if (locked) return;
|
|
79598
80271
|
if (selectedNodeId === void 0) setInternalSelected(id);
|
|
@@ -79608,7 +80281,7 @@ function NetworkGraph({
|
|
|
79608
80281
|
);
|
|
79609
80282
|
onVisibleCommunitiesChange?.(ids);
|
|
79610
80283
|
};
|
|
79611
|
-
|
|
80284
|
+
useEffect91(() => {
|
|
79612
80285
|
const element = canvas.canvasRef.current;
|
|
79613
80286
|
if (!element || locked) return;
|
|
79614
80287
|
const wheel = (event) => {
|
|
@@ -79657,13 +80330,13 @@ function NetworkGraph({
|
|
|
79657
80330
|
}
|
|
79658
80331
|
};
|
|
79659
80332
|
const focusedNode = model.byId.get(activeFocus ?? selected ?? "");
|
|
79660
|
-
const matchingNodes =
|
|
80333
|
+
const matchingNodes = useMemo76(() => {
|
|
79661
80334
|
const search = query.toLocaleLowerCase();
|
|
79662
80335
|
return visibleNodes.filter((n) => (n.label ?? n.id).toLocaleLowerCase().includes(search)).slice(0, 50).map((n) => ({ value: n.id, label: n.label ?? n.id }));
|
|
79663
80336
|
}, [visibleNodes, query]);
|
|
79664
80337
|
const graphHeight = Number.isFinite(height) ? Math.max(160, height) : 480;
|
|
79665
|
-
const resolvedLegendTone = legendTone === "auto" ?
|
|
79666
|
-
const legendContent = /* @__PURE__ */
|
|
80338
|
+
const resolvedLegendTone = legendTone === "auto" ? surfaceTone : legendTone;
|
|
80339
|
+
const legendContent = /* @__PURE__ */ jsxs232(
|
|
79667
80340
|
"fieldset",
|
|
79668
80341
|
{
|
|
79669
80342
|
disabled: locked,
|
|
@@ -79672,24 +80345,24 @@ function NetworkGraph({
|
|
|
79672
80345
|
maxHeight: legendPanel ? Math.max(96, graphHeight - 64) : graphHeight
|
|
79673
80346
|
},
|
|
79674
80347
|
children: [
|
|
79675
|
-
/* @__PURE__ */
|
|
79676
|
-
/* @__PURE__ */
|
|
80348
|
+
/* @__PURE__ */ jsx362("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
|
|
80349
|
+
/* @__PURE__ */ jsx362(
|
|
79677
80350
|
Checkbox_default,
|
|
79678
80351
|
{
|
|
79679
80352
|
size: "sm",
|
|
79680
|
-
tone: resolvedLegendTone,
|
|
80353
|
+
tone: getSurfaceAccentColor(resolvedLegendTone),
|
|
79681
80354
|
label: t("kit.networkGraph.selectAll"),
|
|
79682
80355
|
checked: model.groups.every((g) => enabled.has(g.id)),
|
|
79683
80356
|
indeterminate: model.groups.some((g) => enabled.has(g.id)) && !model.groups.every((g) => enabled.has(g.id)),
|
|
79684
80357
|
onChange: (event) => filter(event.target.checked ? model.groups.map((g) => g.id) : [])
|
|
79685
80358
|
}
|
|
79686
80359
|
),
|
|
79687
|
-
model.groups.map((group) => /* @__PURE__ */
|
|
79688
|
-
/* @__PURE__ */
|
|
80360
|
+
model.groups.map((group) => /* @__PURE__ */ jsxs232("div", { className: "flex items-center justify-between gap-2", children: [
|
|
80361
|
+
/* @__PURE__ */ jsx362(
|
|
79689
80362
|
Checkbox_default,
|
|
79690
80363
|
{
|
|
79691
80364
|
size: "sm",
|
|
79692
|
-
tone: group.tone ?? resolvedLegendTone,
|
|
80365
|
+
tone: group.tone ?? getSurfaceAccentColor(resolvedLegendTone),
|
|
79693
80366
|
label: group.label,
|
|
79694
80367
|
checked: enabled.has(group.id),
|
|
79695
80368
|
onChange: (event) => filter(
|
|
@@ -79697,23 +80370,23 @@ function NetworkGraph({
|
|
|
79697
80370
|
)
|
|
79698
80371
|
}
|
|
79699
80372
|
),
|
|
79700
|
-
/* @__PURE__ */
|
|
80373
|
+
/* @__PURE__ */ jsx362("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
|
|
79701
80374
|
] }, group.id))
|
|
79702
80375
|
]
|
|
79703
80376
|
}
|
|
79704
80377
|
);
|
|
79705
|
-
return /* @__PURE__ */
|
|
80378
|
+
return /* @__PURE__ */ jsx362(
|
|
79706
80379
|
Panel_default,
|
|
79707
80380
|
{
|
|
79708
80381
|
...panelProps,
|
|
79709
|
-
tone,
|
|
80382
|
+
tone: surfaceTone,
|
|
79710
80383
|
variant,
|
|
79711
80384
|
padding: "sm",
|
|
79712
80385
|
disabled,
|
|
79713
80386
|
loading,
|
|
79714
80387
|
clickable: false,
|
|
79715
80388
|
scrollable: false,
|
|
79716
|
-
children: /* @__PURE__ */
|
|
80389
|
+
children: /* @__PURE__ */ jsxs232(
|
|
79717
80390
|
"div",
|
|
79718
80391
|
{
|
|
79719
80392
|
className: "flex min-w-0 flex-col gap-3",
|
|
@@ -79721,7 +80394,7 @@ function NetworkGraph({
|
|
|
79721
80394
|
"aria-label": ariaLabel ?? t("kit.networkGraph.name"),
|
|
79722
80395
|
"aria-disabled": locked || void 0,
|
|
79723
80396
|
children: [
|
|
79724
|
-
showControls && /* @__PURE__ */
|
|
80397
|
+
showControls && /* @__PURE__ */ jsx362("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx362("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ jsx362(
|
|
79725
80398
|
Combobox_default,
|
|
79726
80399
|
{
|
|
79727
80400
|
size: "sm",
|
|
@@ -79743,7 +80416,7 @@ function NetworkGraph({
|
|
|
79743
80416
|
}
|
|
79744
80417
|
}
|
|
79745
80418
|
) }) }),
|
|
79746
|
-
/* @__PURE__ */
|
|
80419
|
+
/* @__PURE__ */ jsxs232(
|
|
79747
80420
|
"div",
|
|
79748
80421
|
{
|
|
79749
80422
|
ref: layoutRef,
|
|
@@ -79751,13 +80424,13 @@ function NetworkGraph({
|
|
|
79751
80424
|
style: { flexDirection: legendOnRight ? "row" : "column" },
|
|
79752
80425
|
"data-legend-position": legendOnRight ? "right" : "bottom",
|
|
79753
80426
|
children: [
|
|
79754
|
-
/* @__PURE__ */
|
|
80427
|
+
/* @__PURE__ */ jsxs232(
|
|
79755
80428
|
"div",
|
|
79756
80429
|
{
|
|
79757
80430
|
className: "relative min-w-0 flex-1",
|
|
79758
80431
|
style: { height: graphHeight, minHeight: graphHeight },
|
|
79759
80432
|
children: [
|
|
79760
|
-
/* @__PURE__ */
|
|
80433
|
+
/* @__PURE__ */ jsx362(
|
|
79761
80434
|
"canvas",
|
|
79762
80435
|
{
|
|
79763
80436
|
ref: canvas.canvasRef,
|
|
@@ -79826,11 +80499,11 @@ function NetworkGraph({
|
|
|
79826
80499
|
}
|
|
79827
80500
|
}
|
|
79828
80501
|
),
|
|
79829
|
-
showControls && /* @__PURE__ */
|
|
79830
|
-
/* @__PURE__ */
|
|
80502
|
+
showControls && /* @__PURE__ */ jsxs232("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: [
|
|
80503
|
+
/* @__PURE__ */ jsx362(
|
|
79831
80504
|
IconButton_default,
|
|
79832
80505
|
{
|
|
79833
|
-
icon: /* @__PURE__ */
|
|
80506
|
+
icon: /* @__PURE__ */ jsxs232(
|
|
79834
80507
|
"svg",
|
|
79835
80508
|
{
|
|
79836
80509
|
viewBox: "0 0 24 24",
|
|
@@ -79841,10 +80514,10 @@ function NetworkGraph({
|
|
|
79841
80514
|
strokeLinejoin: "round",
|
|
79842
80515
|
"aria-hidden": "true",
|
|
79843
80516
|
children: [
|
|
79844
|
-
/* @__PURE__ */
|
|
79845
|
-
/* @__PURE__ */
|
|
79846
|
-
/* @__PURE__ */
|
|
79847
|
-
/* @__PURE__ */
|
|
80517
|
+
/* @__PURE__ */ jsx362("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
|
|
80518
|
+
/* @__PURE__ */ jsx362("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
|
|
80519
|
+
/* @__PURE__ */ jsx362("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
|
|
80520
|
+
/* @__PURE__ */ jsx362("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
|
|
79848
80521
|
]
|
|
79849
80522
|
}
|
|
79850
80523
|
),
|
|
@@ -79857,10 +80530,10 @@ function NetworkGraph({
|
|
|
79857
80530
|
onClick: canvas.fit
|
|
79858
80531
|
}
|
|
79859
80532
|
),
|
|
79860
|
-
/* @__PURE__ */
|
|
80533
|
+
/* @__PURE__ */ jsx362(
|
|
79861
80534
|
IconButton_default,
|
|
79862
80535
|
{
|
|
79863
|
-
icon: /* @__PURE__ */
|
|
80536
|
+
icon: /* @__PURE__ */ jsx362(
|
|
79864
80537
|
"svg",
|
|
79865
80538
|
{
|
|
79866
80539
|
viewBox: "0 0 24 24",
|
|
@@ -79869,7 +80542,7 @@ function NetworkGraph({
|
|
|
79869
80542
|
strokeWidth: 2,
|
|
79870
80543
|
strokeLinecap: "round",
|
|
79871
80544
|
"aria-hidden": "true",
|
|
79872
|
-
children: /* @__PURE__ */
|
|
80545
|
+
children: /* @__PURE__ */ jsx362("path", { d: "M6 12h12" })
|
|
79873
80546
|
}
|
|
79874
80547
|
),
|
|
79875
80548
|
size: "xs",
|
|
@@ -79881,7 +80554,7 @@ function NetworkGraph({
|
|
|
79881
80554
|
onClick: () => canvas.zoomBy(0.8)
|
|
79882
80555
|
}
|
|
79883
80556
|
),
|
|
79884
|
-
/* @__PURE__ */
|
|
80557
|
+
/* @__PURE__ */ jsxs232(
|
|
79885
80558
|
"span",
|
|
79886
80559
|
{
|
|
79887
80560
|
className: "min-w-[3.5ch] px-1 text-center text-[11px] tabular-nums text-neutral-500 dark:text-neutral-400",
|
|
@@ -79892,7 +80565,7 @@ function NetworkGraph({
|
|
|
79892
80565
|
]
|
|
79893
80566
|
}
|
|
79894
80567
|
),
|
|
79895
|
-
/* @__PURE__ */
|
|
80568
|
+
/* @__PURE__ */ jsx362(
|
|
79896
80569
|
IconButton_default,
|
|
79897
80570
|
{
|
|
79898
80571
|
icon: "Add",
|
|
@@ -79905,7 +80578,7 @@ function NetworkGraph({
|
|
|
79905
80578
|
onClick: () => canvas.zoomBy(1.25)
|
|
79906
80579
|
}
|
|
79907
80580
|
),
|
|
79908
|
-
/* @__PURE__ */
|
|
80581
|
+
/* @__PURE__ */ jsx362(
|
|
79909
80582
|
IconButton_default,
|
|
79910
80583
|
{
|
|
79911
80584
|
icon: "Reset",
|
|
@@ -79923,18 +80596,18 @@ function NetworkGraph({
|
|
|
79923
80596
|
}
|
|
79924
80597
|
)
|
|
79925
80598
|
] }),
|
|
79926
|
-
!visibleNodes.length && /* @__PURE__ */
|
|
80599
|
+
!visibleNodes.length && /* @__PURE__ */ jsx362("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center text-sm", children: emptyMessage ?? t("kit.networkGraph.empty") })
|
|
79927
80600
|
]
|
|
79928
80601
|
}
|
|
79929
80602
|
),
|
|
79930
|
-
showCommunities && model.groups.length > 0 && /* @__PURE__ */
|
|
80603
|
+
showCommunities && model.groups.length > 0 && /* @__PURE__ */ jsx362(
|
|
79931
80604
|
"div",
|
|
79932
80605
|
{
|
|
79933
80606
|
className: "min-w-0 shrink-0",
|
|
79934
80607
|
style: {
|
|
79935
80608
|
width: legendOnRight ? legendPanel ? 224 : 192 : "100%"
|
|
79936
80609
|
},
|
|
79937
|
-
children: legendPanel ? /* @__PURE__ */
|
|
80610
|
+
children: legendPanel ? /* @__PURE__ */ jsx362(
|
|
79938
80611
|
Panel_default,
|
|
79939
80612
|
{
|
|
79940
80613
|
variant: legendVariant === "auto" ? variant : legendVariant,
|
|
@@ -79953,8 +80626,8 @@ function NetworkGraph({
|
|
|
79953
80626
|
]
|
|
79954
80627
|
}
|
|
79955
80628
|
),
|
|
79956
|
-
/* @__PURE__ */
|
|
79957
|
-
/* @__PURE__ */
|
|
80629
|
+
/* @__PURE__ */ jsx362("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
|
|
80630
|
+
/* @__PURE__ */ jsx362(
|
|
79958
80631
|
"p",
|
|
79959
80632
|
{
|
|
79960
80633
|
role: "status",
|
|
@@ -80035,6 +80708,7 @@ export {
|
|
|
80035
80708
|
Chart,
|
|
80036
80709
|
Chat_default as Chat,
|
|
80037
80710
|
Checkbox_default as Checkbox,
|
|
80711
|
+
CodeBlock,
|
|
80038
80712
|
CollapseChevron,
|
|
80039
80713
|
CollapseToggleButton,
|
|
80040
80714
|
CollapsibleHelpText_default as CollapsibleHelpText,
|
|
@@ -80100,6 +80774,7 @@ export {
|
|
|
80100
80774
|
FR_KIT_CATALOG,
|
|
80101
80775
|
FUNNEL_MAX_STAGES,
|
|
80102
80776
|
FileUpload,
|
|
80777
|
+
FilterBar,
|
|
80103
80778
|
FormField_default as FormField,
|
|
80104
80779
|
FormLayout_default as FormLayout,
|
|
80105
80780
|
FormSection_default as FormSection,
|
|
@@ -80250,6 +80925,7 @@ export {
|
|
|
80250
80925
|
SURFACE_GLASS_RIM,
|
|
80251
80926
|
SURFACE_GUTTER_AXES,
|
|
80252
80927
|
SURFACE_PADDINGS,
|
|
80928
|
+
SURFACE_TONES,
|
|
80253
80929
|
SURFACE_TO_BUTTON_VARIANT,
|
|
80254
80930
|
SURFACE_TRANSPARENCIES,
|
|
80255
80931
|
SURFACE_VARIANTS,
|
|
@@ -80506,6 +81182,7 @@ export {
|
|
|
80506
81182
|
getStatusSpinnerToneTokens,
|
|
80507
81183
|
getStatusTokens,
|
|
80508
81184
|
getStepperTonePalette,
|
|
81185
|
+
getSurfaceAccentColor,
|
|
80509
81186
|
getSurfaceCornerClass,
|
|
80510
81187
|
getSurfaceCornerRem,
|
|
80511
81188
|
getSurfaceGutterClass,
|