@squadbase/vantage 0.6.2-dev1.cc66477 → 0.6.2-dev1.d594c56
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/{chunk-UNCSBSO4.js → chunk-HKSVYMYJ.js} +85 -32
- package/dist/chunk-HKSVYMYJ.js.map +1 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/table/index.js +1 -1
- package/package.json +4 -3
- package/theme.css +1 -1
- package/dist/chunk-UNCSBSO4.js.map +0 -1
|
@@ -282,7 +282,7 @@ var PageShellHeader = forwardRef(
|
|
|
282
282
|
{
|
|
283
283
|
ref,
|
|
284
284
|
"data-slot": "page-shell-header",
|
|
285
|
-
className: cn("flex flex-wrap items-start gap-x-4 gap-y-
|
|
285
|
+
className: cn("flex flex-wrap items-start gap-x-4 gap-y-4 px-6 pt-8", className),
|
|
286
286
|
...props,
|
|
287
287
|
children: [
|
|
288
288
|
children,
|
|
@@ -319,7 +319,7 @@ var PageShellTitle = forwardRef(
|
|
|
319
319
|
{
|
|
320
320
|
ref,
|
|
321
321
|
"data-slot": "page-shell-title",
|
|
322
|
-
className: cn("text-2xl font-
|
|
322
|
+
className: cn("text-2xl font-semibold tracking-tight text-foreground", className),
|
|
323
323
|
...props
|
|
324
324
|
}
|
|
325
325
|
)
|
|
@@ -630,8 +630,8 @@ var AppShell = forwardRef((props, ref) => {
|
|
|
630
630
|
AppShell.displayName = "AppShell";
|
|
631
631
|
var headingStyles = {
|
|
632
632
|
h1: "text-3xl font-bold tracking-tight",
|
|
633
|
-
h2: "text-
|
|
634
|
-
h3: "text-
|
|
633
|
+
h2: "text-base font-semibold tracking-tight",
|
|
634
|
+
h3: "text-base font-semibold",
|
|
635
635
|
h4: "text-lg font-semibold"
|
|
636
636
|
};
|
|
637
637
|
var SectionHeader = forwardRef(
|
|
@@ -716,7 +716,7 @@ var DashboardCardTitle = forwardRef(
|
|
|
716
716
|
{
|
|
717
717
|
ref,
|
|
718
718
|
"data-slot": "dashboard-card-title",
|
|
719
|
-
className: cn("text-sm leading-
|
|
719
|
+
className: cn("text-sm leading-snug font-semibold tracking-tight", className),
|
|
720
720
|
...props
|
|
721
721
|
}
|
|
722
722
|
)
|
|
@@ -727,7 +727,7 @@ var DashboardCardDescription = forwardRef(({ className, ...props }, ref) => /* @
|
|
|
727
727
|
{
|
|
728
728
|
ref,
|
|
729
729
|
"data-slot": "dashboard-card-description",
|
|
730
|
-
className: cn("text-xs text-muted-foreground", className),
|
|
730
|
+
className: cn("text-xs leading-normal text-muted-foreground", className),
|
|
731
731
|
...props
|
|
732
732
|
}
|
|
733
733
|
));
|
|
@@ -848,6 +848,7 @@ function readChartTokens(el) {
|
|
|
848
848
|
}
|
|
849
849
|
return {
|
|
850
850
|
series,
|
|
851
|
+
...styles.fontFamily ? { fontFamily: styles.fontFamily } : {},
|
|
851
852
|
foreground: read("--foreground"),
|
|
852
853
|
mutedForeground: read("--muted-foreground"),
|
|
853
854
|
border: read("--border"),
|
|
@@ -858,7 +859,7 @@ function readChartTokens(el) {
|
|
|
858
859
|
function sameChartTokens(a, b) {
|
|
859
860
|
if (a === b) return true;
|
|
860
861
|
if (!a || !b) return false;
|
|
861
|
-
return a.series.length === b.series.length && a.series.every((color, i) => color === b.series[i]) && a.foreground === b.foreground && a.mutedForeground === b.mutedForeground && a.border === b.border && a.popover === b.popover && a.popoverForeground === b.popoverForeground;
|
|
862
|
+
return a.series.length === b.series.length && a.series.every((color, i) => color === b.series[i]) && a.fontFamily === b.fontFamily && a.foreground === b.foreground && a.mutedForeground === b.mutedForeground && a.border === b.border && a.popover === b.popover && a.popoverForeground === b.popoverForeground;
|
|
862
863
|
}
|
|
863
864
|
function watchChartTokens(onChange) {
|
|
864
865
|
if (typeof document === "undefined") return () => {
|
|
@@ -918,7 +919,7 @@ function buildChartTheme(tokens) {
|
|
|
918
919
|
// Let the page background show through: charts sit on cards, not on a canvas.
|
|
919
920
|
backgroundColor: "transparent",
|
|
920
921
|
...tokens.series.length > 0 ? { color: tokens.series } : {},
|
|
921
|
-
textStyle: { color: text },
|
|
922
|
+
textStyle: { color: text, ...tokens.fontFamily ? { fontFamily: tokens.fontFamily } : {} },
|
|
922
923
|
title: { textStyle: { color: text }, subtextStyle: { color: muted } },
|
|
923
924
|
legend: { textStyle: { color: muted } },
|
|
924
925
|
categoryAxis: axisTheme(tokens, false),
|
|
@@ -934,7 +935,11 @@ function buildChartTheme(tokens) {
|
|
|
934
935
|
padding: [8, 12],
|
|
935
936
|
// Rounded card with a soft shadow; in dark mode the shadow barely shows, so the border carries the edge.
|
|
936
937
|
extraCssText: "border-radius:8px;box-shadow:var(--shadow-card, 0 4px 12px rgb(0 0 0 / 0.08));",
|
|
937
|
-
textStyle: {
|
|
938
|
+
textStyle: {
|
|
939
|
+
color: tokens.popoverForeground ?? void 0,
|
|
940
|
+
fontSize: 12,
|
|
941
|
+
...tokens.fontFamily ? { fontFamily: tokens.fontFamily } : {}
|
|
942
|
+
},
|
|
938
943
|
axisPointer: { lineStyle: { color: line }, crossStyle: { color: line } }
|
|
939
944
|
}
|
|
940
945
|
};
|
|
@@ -1047,8 +1052,8 @@ var ChartFrame = forwardRef(function ChartFrame2({
|
|
|
1047
1052
|
const state = isLoading ? "loading" : isEmpty ? "empty" : "ready";
|
|
1048
1053
|
return /* @__PURE__ */ jsxs("figure", { "data-slot": "chart-frame", className: cn("m-0 flex w-full min-w-0 flex-col gap-3", className), ...props, children: [
|
|
1049
1054
|
(title || summary) && /* @__PURE__ */ jsxs("figcaption", { "data-slot": "chart-frame-header", className: "flex flex-col gap-1", children: [
|
|
1050
|
-
title && /* @__PURE__ */ jsx("h3", { id: titleId, "data-slot": "chart-frame-title", className: "text-sm leading-
|
|
1051
|
-
summary && /* @__PURE__ */ jsx("p", { id: summaryId, "data-slot": "chart-frame-summary", className: "text-sm text-muted-foreground", children: summary })
|
|
1055
|
+
title && /* @__PURE__ */ jsx("h3", { id: titleId, "data-slot": "chart-frame-title", className: "text-sm leading-snug font-semibold", children: title }),
|
|
1056
|
+
summary && /* @__PURE__ */ jsx("p", { id: summaryId, "data-slot": "chart-frame-summary", className: "text-sm leading-relaxed text-muted-foreground", children: summary })
|
|
1052
1057
|
] }),
|
|
1053
1058
|
/* @__PURE__ */ jsx(
|
|
1054
1059
|
"div",
|
|
@@ -1237,6 +1242,16 @@ function echartSetOptionOpts(prev, next) {
|
|
|
1237
1242
|
for (const key of [...Object.keys(prev), ...Object.keys(next)]) if (COMPONENT_MAIN_TYPES.has(key)) types.add(key);
|
|
1238
1243
|
return { notMerge: false, replaceMerge: [...types], lazyUpdate: true };
|
|
1239
1244
|
}
|
|
1245
|
+
function withGraphicFont(option, fontFamily) {
|
|
1246
|
+
const graphic = option.graphic;
|
|
1247
|
+
if (!fontFamily || !Array.isArray(graphic)) return option;
|
|
1248
|
+
return {
|
|
1249
|
+
...option,
|
|
1250
|
+
graphic: graphic.map(
|
|
1251
|
+
(g) => g && g.type === "text" && g.style && !g.style.fontFamily ? { ...g, style: { ...g.style, fontFamily } } : g
|
|
1252
|
+
)
|
|
1253
|
+
};
|
|
1254
|
+
}
|
|
1240
1255
|
function withMotionPreference(option, reducedMotion) {
|
|
1241
1256
|
return { ...option, animation: reducedMotion ? false : option.animation ?? true };
|
|
1242
1257
|
}
|
|
@@ -1277,13 +1292,23 @@ var EChart = forwardRef(function EChart2({
|
|
|
1277
1292
|
useEffect(() => {
|
|
1278
1293
|
if (theme !== void 0) return;
|
|
1279
1294
|
const sync = () => {
|
|
1280
|
-
const
|
|
1295
|
+
const base = readChartTokens();
|
|
1296
|
+
const font = containerRef.current ? getComputedStyle(containerRef.current).fontFamily : "";
|
|
1297
|
+
const next = base && font ? { ...base, fontFamily: font } : base;
|
|
1281
1298
|
if (sameChartTokens(tokensRef.current, next)) return;
|
|
1282
1299
|
tokensRef.current = next;
|
|
1283
1300
|
setTokens(next);
|
|
1284
1301
|
};
|
|
1285
1302
|
sync();
|
|
1286
|
-
|
|
1303
|
+
const stop = watchChartTokens(sync);
|
|
1304
|
+
const ancestors = new MutationObserver(sync);
|
|
1305
|
+
for (let node = containerRef.current?.parentElement; node; node = node.parentElement) {
|
|
1306
|
+
ancestors.observe(node, { attributes: true, attributeFilter: ["class", "style"] });
|
|
1307
|
+
}
|
|
1308
|
+
return () => {
|
|
1309
|
+
stop();
|
|
1310
|
+
ancestors.disconnect();
|
|
1311
|
+
};
|
|
1287
1312
|
}, [theme]);
|
|
1288
1313
|
const autoTheme = useMemo(() => tokens ? buildChartTheme(tokens) : void 0, [tokens]);
|
|
1289
1314
|
const resolvedTheme = theme ?? autoTheme;
|
|
@@ -1314,10 +1339,10 @@ var EChart = forwardRef(function EChart2({
|
|
|
1314
1339
|
useEffect(() => {
|
|
1315
1340
|
if (!instance) return;
|
|
1316
1341
|
if (containerRef.current) containerRef.current.dataset.rendering = "";
|
|
1317
|
-
const next = withMotionPreference(option, reducedMotion);
|
|
1342
|
+
const next = withGraphicFont(withMotionPreference(option, reducedMotion), theme === void 0 ? tokens?.fontFamily : void 0);
|
|
1318
1343
|
instance.setOption(next, echartSetOptionOpts(appliedRef.current, next));
|
|
1319
1344
|
appliedRef.current = next;
|
|
1320
|
-
}, [instance, option, reducedMotion]);
|
|
1345
|
+
}, [instance, option, reducedMotion, theme, tokens?.fontFamily]);
|
|
1321
1346
|
useEffect(() => {
|
|
1322
1347
|
if (!instance) return;
|
|
1323
1348
|
if (loading) instance.showLoading();
|
|
@@ -1939,6 +1964,8 @@ function timeFormat(locale, options) {
|
|
|
1939
1964
|
}
|
|
1940
1965
|
var toDate = (t) => new Date(t.year, t.month - 1, t.day);
|
|
1941
1966
|
var TIME_AXIS_MAX_LABELS = 6;
|
|
1967
|
+
var NARROW_PLOT_WIDTH = 400;
|
|
1968
|
+
var NARROW_TIME_AXIS_MAX_LABELS = 4;
|
|
1942
1969
|
var TIME_AXIS_STEPS = {
|
|
1943
1970
|
year: [1, 2, 5, 10, 20, 50, 100],
|
|
1944
1971
|
month: [1, 2, 3, 4, 6, 12, 24, 36, 60, 120],
|
|
@@ -2175,7 +2202,8 @@ var LEGEND_LINE_HEIGHT = 24;
|
|
|
2175
2202
|
var LEGEND_LINE_BUDGET = 320;
|
|
2176
2203
|
function legendLines(items, plotWidth, reserve = 0) {
|
|
2177
2204
|
const width = items.reduce((sum, name) => sum + [...name].length * 12 + 8 + 5 + 16, 0);
|
|
2178
|
-
const
|
|
2205
|
+
const narrow = plotWidth !== void 0 && plotWidth < NARROW_PLOT_WIDTH;
|
|
2206
|
+
const budget = Math.max(80, (plotWidth ? narrow ? plotWidth : Math.min(LEGEND_LINE_BUDGET, plotWidth) : LEGEND_LINE_BUDGET) - (narrow ? 0 : reserve));
|
|
2179
2207
|
return Math.min(3, Math.max(1, Math.ceil(width / budget)));
|
|
2180
2208
|
}
|
|
2181
2209
|
var ACTIONS_RESERVE = 80;
|
|
@@ -2331,7 +2359,13 @@ function buildCartesianOption(cfg) {
|
|
|
2331
2359
|
const last = labels.length - 1;
|
|
2332
2360
|
const timeStep = startEndOnly ? null : timeAxisLabelStep(
|
|
2333
2361
|
rawIndex,
|
|
2334
|
-
plotWidth ? Math.max(
|
|
2362
|
+
plotWidth ? Math.max(
|
|
2363
|
+
2,
|
|
2364
|
+
Math.min(
|
|
2365
|
+
plotWidth < NARROW_PLOT_WIDTH ? NARROW_TIME_AXIS_MAX_LABELS : TIME_AXIS_MAX_LABELS,
|
|
2366
|
+
Math.floor(plotWidth / TIME_LABEL_WIDTH)
|
|
2367
|
+
)
|
|
2368
|
+
) : void 0
|
|
2335
2369
|
);
|
|
2336
2370
|
const plainStep = (() => {
|
|
2337
2371
|
if (kind !== "line" || startEndOnly || timeStep !== null || !plotWidth || labels.length < 3) return 1;
|
|
@@ -2351,7 +2385,8 @@ function buildCartesianOption(cfg) {
|
|
|
2351
2385
|
const shareHighlight = percent && kind === "area";
|
|
2352
2386
|
const picked = highlight !== "auto" || mainIdx.length === 0 || percent && !shareHighlight ? [] : shareHighlight ? categories.length <= 2 ? pickShareHighlightPoints(values[0] ?? []) : [] : stackTotals ? pickHighlightPoints(stackTotals) : mainIdx.length <= 2 ? pickHighlightPoints(values[highlightSeries] ?? []) : [];
|
|
2353
2387
|
const pointGap = plotWidth && labels.length > 1 ? plotWidth / (kind === "bar" ? labels.length : labels.length - 1) : null;
|
|
2354
|
-
const
|
|
2388
|
+
const latestOnly = cfg.highlight === void 0 && !shareHighlight && picked.length === 2;
|
|
2389
|
+
const highlightPoints = latestOnly ? [picked[1]] : picked.length === 2 && pointGap !== null && Math.abs(picked[1].index - picked[0].index) * pointGap < HIGHLIGHT_LABEL_WIDTH ? [picked[1]] : picked;
|
|
2355
2390
|
const boundaryIndex = kind !== "bar" && !percent && cfg.forecast && cfg.forecast.data.length > 0 ? lastActual : -1;
|
|
2356
2391
|
const edgeAlign = (i) => horizontalBars || labels.length < 2 ? void 0 : i === boundaryIndex && i !== last ? { align: "right", offset: [-6, 0] } : i === last ? { align: "right", ...kind === "bar" ? { offset: [8, 0] } : {} } : i === 0 ? { align: "left", ...kind === "bar" ? { offset: [-8, 0] } : {} } : void 0;
|
|
2357
2392
|
const perBarTarget = kind === "bar" && Boolean(targetKey);
|
|
@@ -2500,6 +2535,8 @@ function buildCartesianOption(cfg) {
|
|
|
2500
2535
|
// 100% stacked: the top band's upper edge is the 100% line, not a value — drawn, it reads as「this band = 100%」.
|
|
2501
2536
|
lineStyle: percent && c === categories.length - 1 ? { width: 0, color, opacity: 0 } : { width: 2, color, opacity: dimSeries ? DIMMED : 1 },
|
|
2502
2537
|
itemStyle: { color, opacity: dimSeries ? DIMMED : 1 },
|
|
2538
|
+
// Hovering a series fades the others (not for a stack, where the bands read together).
|
|
2539
|
+
emphasis: stacked ? void 0 : { focus: "series" },
|
|
2503
2540
|
areaStyle: areaStyle && dimSeries ? { ...areaStyle, opacity: DIMMED * 0.3 } : areaStyle,
|
|
2504
2541
|
markPoint: markPointFor(c, color),
|
|
2505
2542
|
markLine: void 0,
|
|
@@ -2892,7 +2929,8 @@ function buildCartesianOption(cfg) {
|
|
|
2892
2929
|
legend: {
|
|
2893
2930
|
show: showLegend,
|
|
2894
2931
|
top: 0,
|
|
2895
|
-
|
|
2932
|
+
// Narrow: left-aligned and wrapping above the plot, so nothing is cut off at the right edge.
|
|
2933
|
+
...plotWidth !== void 0 && plotWidth < NARROW_PLOT_WIDTH ? { left: 0, right: 0 } : { right: reserveActions ? ACTIONS_RESERVE : 0 },
|
|
2896
2934
|
// Plain wraps onto a second line at narrow widths instead of hiding items behind arrows.
|
|
2897
2935
|
type: "plain",
|
|
2898
2936
|
icon: "circle",
|
|
@@ -2942,7 +2980,11 @@ function buildCartesianOption(cfg) {
|
|
|
2942
2980
|
};
|
|
2943
2981
|
};
|
|
2944
2982
|
const shares = percent ? cartesianSeriesValues(i <= lastActual ? [row] : [], categories, "percent") : null;
|
|
2945
|
-
|
|
2983
|
+
const legendRank = (p) => {
|
|
2984
|
+
const at = categories.indexOf(p.seriesName ?? "");
|
|
2985
|
+
return at === -1 ? categories.length : at;
|
|
2986
|
+
};
|
|
2987
|
+
for (const p of [...list].sort((a, b) => legendRank(a) - legendRank(b))) {
|
|
2946
2988
|
const color = typeof p.color === "string" ? p.color : "currentColor";
|
|
2947
2989
|
if (p.seriesId === FORECAST_SERIES_ID) {
|
|
2948
2990
|
if (i > lastActual) rows.push({ name: p.seriesName ?? forecastLabel, color, value: forecastValues[i] ?? null });
|
|
@@ -7443,6 +7485,9 @@ var SPARKLINE_MIN_POINTS = 6;
|
|
|
7443
7485
|
var SPARKLINE_HEIGHT = 32;
|
|
7444
7486
|
var DELTA_PLACEMENT = "col-start-1 row-span-1 row-start-3 justify-self-start @[288px]/card:col-start-2 @[288px]/card:row-span-2 @[288px]/card:row-start-1 @[288px]/card:justify-self-end";
|
|
7445
7487
|
var HEADER_CLASS = "@container/card pb-(--card-spacing)";
|
|
7488
|
+
var LONG_VALUE_CHARS = 10;
|
|
7489
|
+
var DELTA_UNDER_PLACEMENT = "col-start-1 row-span-1 row-start-3 justify-self-start";
|
|
7490
|
+
var KPI_FOOTER_CLASS = "flex-col items-start gap-2 rounded-none border-t-0 bg-transparent pt-0 text-sm";
|
|
7446
7491
|
var PLACEHOLDER = /\{(\w+)\}/g;
|
|
7447
7492
|
var isJapanese2 = (locale) => locale.toLowerCase().startsWith("ja");
|
|
7448
7493
|
var isMissing = (v) => v === null || v === void 0 || v === "";
|
|
@@ -7479,6 +7524,9 @@ function warnShallowSummary(template) {
|
|
|
7479
7524
|
`[KpiCard] summary="${template}" only repeats the delta badge and the previous actual. Say one fact beyond the comparison \u2014 composition, target, record or rate (e.g. "{label}\u306F\u76EE\u6A19\u306E {achievement} \u307E\u3067\u6765\u3066\u3044\u307E\u3059\u3002").`
|
|
7480
7525
|
);
|
|
7481
7526
|
}
|
|
7527
|
+
function digitGroups(text) {
|
|
7528
|
+
return text.match(/[^,,]*[,,]|[^,,]+$/g) ?? [text];
|
|
7529
|
+
}
|
|
7482
7530
|
function KpiCard({
|
|
7483
7531
|
label: label2,
|
|
7484
7532
|
value,
|
|
@@ -7565,7 +7613,7 @@ function KpiCard({
|
|
|
7565
7613
|
/* @__PURE__ */ jsx(Skeleton, { "aria-hidden": "true", className: "h-5 w-3/5" })
|
|
7566
7614
|
] }) : null
|
|
7567
7615
|
] }),
|
|
7568
|
-
(summary || record || hasTarget && !targetBar || sourceParts.length > 0 || hasUpdated || showSparkline) && /* @__PURE__ */ jsxs(CardFooter, { className:
|
|
7616
|
+
(summary || record || hasTarget && !targetBar || sourceParts.length > 0 || hasUpdated || showSparkline) && /* @__PURE__ */ jsxs(CardFooter, { className: KPI_FOOTER_CLASS, children: [
|
|
7569
7617
|
summary && /* @__PURE__ */ jsx(Skeleton, { "aria-hidden": "true", className: "h-5 w-4/5" }),
|
|
7570
7618
|
record && /* @__PURE__ */ jsx(Skeleton, { "aria-hidden": "true", className: "h-5 w-28 rounded-4xl" }),
|
|
7571
7619
|
hasTarget && !targetBar && /* @__PURE__ */ jsx(Skeleton, { "aria-hidden": "true", className: "h-5 w-3/5" }),
|
|
@@ -7646,27 +7694,32 @@ function KpiCard({
|
|
|
7646
7694
|
},
|
|
7647
7695
|
i
|
|
7648
7696
|
));
|
|
7697
|
+
const valueText = fmt(value);
|
|
7698
|
+
const longValue = valueText.length > LONG_VALUE_CHARS;
|
|
7649
7699
|
return /* @__PURE__ */ jsxs(Card, { "data-slot": "kpi-card", size, className: cardClass, ...props, children: [
|
|
7650
7700
|
/* @__PURE__ */ jsxs(CardHeader, { className: HEADER_CLASS, children: [
|
|
7651
|
-
/* @__PURE__ */ jsx(CardDescription, { "data-slot": "kpi-card-label", title: label2, className: "col-start-1 min-w-0 truncate text-[13px] font-medium text-muted-foreground", children: label2 }),
|
|
7701
|
+
/* @__PURE__ */ jsx(CardDescription, { "data-slot": "kpi-card-label", title: label2, className: "col-start-1 min-w-0 truncate text-[13px] leading-snug font-medium text-muted-foreground", children: label2 }),
|
|
7652
7702
|
/* @__PURE__ */ jsxs(
|
|
7653
7703
|
CardTitle,
|
|
7654
7704
|
{
|
|
7655
7705
|
"data-slot": "kpi-card-value",
|
|
7656
|
-
title:
|
|
7706
|
+
title: valueText,
|
|
7657
7707
|
className: cn(
|
|
7658
|
-
"col-start-1 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 font-semibold tracking-tight tabular-nums",
|
|
7708
|
+
"col-start-1 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 leading-none font-semibold tracking-tight tabular-nums",
|
|
7659
7709
|
// Fixed size: the step follows the card width only, never the length of the value.
|
|
7660
7710
|
valueSize
|
|
7661
7711
|
),
|
|
7662
7712
|
children: [
|
|
7663
|
-
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children:
|
|
7713
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "kpi-card-value-text", className: longValue ? "min-w-0 break-words" : "whitespace-nowrap", children: longValue ? digitGroups(valueText).map((group, i) => /* @__PURE__ */ jsxs("span", { className: "whitespace-nowrap", children: [
|
|
7714
|
+
group,
|
|
7715
|
+
/* @__PURE__ */ jsx("wbr", {})
|
|
7716
|
+
] }, i)) : valueText }),
|
|
7664
7717
|
isProvisional && /* @__PURE__ */ jsx(Badge, { "data-slot": "kpi-card-provisional", variant: "outline", className: "align-middle", children: provisionalLabel }),
|
|
7665
7718
|
sample && /* @__PURE__ */ jsx(SampleBadge, { label: sample.label })
|
|
7666
7719
|
]
|
|
7667
7720
|
}
|
|
7668
7721
|
),
|
|
7669
|
-
comparison && (stacked ? /* @__PURE__ */ jsx("div", { "data-slot": "kpi-card-comparisons", className: "flex flex-wrap items-center gap-1", children: deltas }) : /* @__PURE__ */ jsx(CardAction, { className: DELTA_PLACEMENT, children: deltas })),
|
|
7722
|
+
comparison && (stacked ? /* @__PURE__ */ jsx("div", { "data-slot": "kpi-card-comparisons", className: "flex flex-wrap items-center gap-1", children: deltas }) : /* @__PURE__ */ jsx(CardAction, { className: longValue ? DELTA_UNDER_PLACEMENT : DELTA_PLACEMENT, children: deltas })),
|
|
7670
7723
|
hasPrevious && comparison && /* @__PURE__ */ jsx("div", { "data-slot": "kpi-card-previous", className: "col-span-full text-sm text-muted-foreground tabular-nums", children: result?.previous != null ? `${baseline} ${fmt(result.previous)}` : `${baseline}\u306E\u5B9F\u7E3E\u306A\u3057` }),
|
|
7671
7724
|
bar && progress && /* @__PURE__ */ jsxs("div", { "data-slot": "kpi-card-target-progress", className: "col-span-full mt-1 flex min-w-0 flex-col gap-1.5", children: [
|
|
7672
7725
|
/* @__PURE__ */ jsxs(
|
|
@@ -7719,8 +7772,8 @@ function KpiCard({
|
|
|
7719
7772
|
)
|
|
7720
7773
|
] })
|
|
7721
7774
|
] }),
|
|
7722
|
-
hasFooter && /* @__PURE__ */ jsxs(CardFooter, { className:
|
|
7723
|
-
summaryText && /* @__PURE__ */ jsx("p", { "data-slot": "kpi-card-summary", title: summaryText, className: "line-clamp-2
|
|
7775
|
+
hasFooter && /* @__PURE__ */ jsxs(CardFooter, { className: KPI_FOOTER_CLASS, children: [
|
|
7776
|
+
summaryText && /* @__PURE__ */ jsx("p", { "data-slot": "kpi-card-summary", title: summaryText, className: "line-clamp-2 text-sm leading-relaxed text-muted-foreground tabular-nums", children: summaryText }),
|
|
7724
7777
|
record && /* @__PURE__ */ jsx(Badge, { "data-slot": "kpi-card-record", variant: "outline", children: record.label }),
|
|
7725
7778
|
targetText && /* @__PURE__ */ jsx("p", { "data-slot": "kpi-card-target", className: "text-muted-foreground tabular-nums", children: targetText }),
|
|
7726
7779
|
sourceParts.length > 0 && /* @__PURE__ */ jsx(
|
|
@@ -7728,11 +7781,11 @@ function KpiCard({
|
|
|
7728
7781
|
{
|
|
7729
7782
|
"data-slot": "kpi-card-source",
|
|
7730
7783
|
title: sourceParts.join("\u30FB"),
|
|
7731
|
-
className: "line-clamp-2 w-full text-xs text-muted-foreground tabular-nums",
|
|
7784
|
+
className: "line-clamp-2 w-full text-xs leading-normal text-muted-foreground tabular-nums",
|
|
7732
7785
|
children: sourceParts.join("\u30FB")
|
|
7733
7786
|
}
|
|
7734
7787
|
),
|
|
7735
|
-
hasUpdated && /* @__PURE__ */ jsx("p", { "data-slot": "kpi-card-updated", className: "text-xs text-muted-foreground", children: updatedAtText(updatedAt, updatedAtDisplay, locale, now, timeZone) }),
|
|
7788
|
+
hasUpdated && /* @__PURE__ */ jsx("p", { "data-slot": "kpi-card-updated", className: "text-xs leading-normal text-muted-foreground", children: updatedAtText(updatedAt, updatedAtDisplay, locale, now, timeZone) }),
|
|
7736
7789
|
showSparkline && // mt-auto: the footers of a row are as tall as the tallest, so the sparklines share one bottom edge.
|
|
7737
7790
|
/* @__PURE__ */ jsx("div", { "data-slot": "kpi-card-history", className: "mt-auto w-full pt-2 text-chart-1", children: /* @__PURE__ */ jsx(
|
|
7738
7791
|
Sparkline,
|
|
@@ -7862,5 +7915,5 @@ var Placeholder = forwardRef(function Placeholder2({ className, ...props }, ref)
|
|
|
7862
7915
|
Placeholder.displayName = "Placeholder";
|
|
7863
7916
|
|
|
7864
7917
|
export { AppShell, AreaChart, BarChart2 as BarChart, BarList, COMPARISON_LABELS, CategoryBar, ChartFrame, DEFAULT_LOCALE, DEFAULT_SAMPLE_LABEL, DELTA_NOT_COMPARABLE, DashboardCard, DashboardCardAction, DashboardCardContent, DashboardCardDescription, DashboardCardFooter, DashboardCardHeader, DashboardCardPreset, DashboardCardSkeleton, DashboardCardTitle, DataTable, DataTableColumnVisibility, DataTableContent, DataTableExport, DataTablePagination, DataTablePreset, DataTableToolbar, DateRangePicker, Delta, DonutChart, EChart, EMPTY_VALUE, FilterBar, FilterBarActiveChips, FilterBarClearButton, FilterBarMultiSelect, FilterBarPreset, FilterBarSelect, FunnelSteps, Heatmap, KpiCard, Legend, LineChart2 as LineChart, MINUS_SIGN, MetricUnit, MetricValue, MultiSelect, PageShell, PageShellActions, PageShellContent, PageShellDescription, PageShellHeader, PageShellHeaderEnd, PageShellHeading, PageShellMeta, PageShellSummary, PageShellSummaryCard, PageShellTitle, Placeholder, ProgressCircle, RECORD_MIN_POINTS, SampleBadge, SampleClaim, SampleData, ScatterChart, SearchableSelect, SectionHeader, SegmentedControl, Sparkline, StatusBadge, Tracker, TrendIndicator, UpdatedAt, WaterfallChart, comparisonBaseline, comparisonLabel, computeComparison, computeTargetProgress, defaultChangeDisplay, defaultPresets, deltaVariants, detectRecord, fillKpiTemplate, flattenOptions, formatChange, formatChangeAmount, formatDate, formatDateRange, formatDatesInText, formatDelta, formatKind, formatPoints, formatRelativeTime, formatValue, funnelStepsVariants, inferPeriodGrain, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, tableToCsv, toCsv, toValueFormatter, toneForValue, useDataTable, useResolvedChartColors, useSampleMark };
|
|
7865
|
-
//# sourceMappingURL=chunk-
|
|
7866
|
-
//# sourceMappingURL=chunk-
|
|
7918
|
+
//# sourceMappingURL=chunk-HKSVYMYJ.js.map
|
|
7919
|
+
//# sourceMappingURL=chunk-HKSVYMYJ.js.map
|