@texturehq/edges 2.5.2 → 2.5.3
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/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -2
- package/dist/index.d.ts +45 -2
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/styles.css +7 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5536,6 +5536,12 @@ type KpiFormatter = ComponentFormatter;
|
|
|
5536
5536
|
* trend={dataPoints}
|
|
5537
5537
|
* />
|
|
5538
5538
|
* ```
|
|
5539
|
+
*
|
|
5540
|
+
* The "tile" opt-ins (`unit`, `sub`, `dashed`, `labelVariant="mono-caps"`,
|
|
5541
|
+
* `sparkVariant="area"`, `tileValueSize`) let the `entity.now` and `metrics.kpi`
|
|
5542
|
+
* blocks draw their KPI cell from this one primitive instead of hand-rolling it.
|
|
5543
|
+
* Every one is optional and defaults to the legacy presentation, so existing
|
|
5544
|
+
* callers (Boards, standalone Kpi) are unaffected until they opt in.
|
|
5539
5545
|
*/
|
|
5540
5546
|
type KpiStatus = "neutral" | "success" | "warning" | "error" | "info";
|
|
5541
5547
|
type KpiSize = "sm" | "md" | "lg";
|
|
@@ -5566,7 +5572,7 @@ interface KpiProps {
|
|
|
5566
5572
|
};
|
|
5567
5573
|
/** Help text or tooltip content */
|
|
5568
5574
|
helpText?: React__default.ReactNode;
|
|
5569
|
-
/** Size variant */
|
|
5575
|
+
/** Size variant — controls label/value type roles and internal gap. */
|
|
5570
5576
|
size?: KpiSize;
|
|
5571
5577
|
/** Layout orientation */
|
|
5572
5578
|
orientation?: KpiOrientation;
|
|
@@ -5588,8 +5594,45 @@ interface KpiProps {
|
|
|
5588
5594
|
renderDelta?: (delta?: number) => React__default.ReactNode;
|
|
5589
5595
|
/** Custom trend renderer */
|
|
5590
5596
|
renderTrend?: (points?: TrendPoint[]) => React__default.ReactNode;
|
|
5597
|
+
/**
|
|
5598
|
+
* Secondary unit suffix rendered inline after the value in a smaller,
|
|
5599
|
+
* secondary tone (e.g. "kW", "%", "MW"). Display-only.
|
|
5600
|
+
*/
|
|
5601
|
+
unit?: string;
|
|
5602
|
+
/**
|
|
5603
|
+
* Secondary line under the value (e.g. "as of 2h ago", "of 400 A"). Static,
|
|
5604
|
+
* already localised by the caller. Kept even when `dashed`.
|
|
5605
|
+
*/
|
|
5606
|
+
sub?: React__default.ReactNode;
|
|
5607
|
+
/**
|
|
5608
|
+
* Offline contract: the value is dashed to "—" and de-emphasised (the entity
|
|
5609
|
+
* is offline and this is a live metric). The cell keeps its slot so a grid
|
|
5610
|
+
* stays identical online/offline; the sparkline is suppressed and `sub` is
|
|
5611
|
+
* kept. Distinct from `empty` (which is "no metric at all").
|
|
5612
|
+
*/
|
|
5613
|
+
dashed?: boolean;
|
|
5614
|
+
/**
|
|
5615
|
+
* Label presentation. `"mono-caps"` renders the design's Geist-Mono 10px
|
|
5616
|
+
* uppercase caption so blocks don't hand-pass `labelClassName`.
|
|
5617
|
+
*/
|
|
5618
|
+
labelVariant?: "default" | "mono-caps";
|
|
5619
|
+
/**
|
|
5620
|
+
* Sparkline style. `"line"` (default, back-compat) is the thin border-muted
|
|
5621
|
+
* polyline; `"area"` is the smooth Catmull-Rom curve with a gradient area
|
|
5622
|
+
* fill (the shared tile sparkline). The caller decides whether a series is
|
|
5623
|
+
* worth drawing; this only draws for ≥ 2 points and no-ops otherwise.
|
|
5624
|
+
*/
|
|
5625
|
+
sparkVariant?: "line" | "area";
|
|
5626
|
+
/** Text-color utility class for the `"area"` sparkline (drives currentColor). */
|
|
5627
|
+
sparkTone?: string;
|
|
5628
|
+
/**
|
|
5629
|
+
* Opt-in "tile" value presentation: brand-font display value at a fixed size.
|
|
5630
|
+
* `"md"` = 24px (entity/device tiles), `"lg"` = 34px (Boards summary). When
|
|
5631
|
+
* unset the value uses the `size`-driven display type role (legacy behavior).
|
|
5632
|
+
*/
|
|
5633
|
+
tileValueSize?: "md" | "lg";
|
|
5591
5634
|
}
|
|
5592
|
-
declare function Kpi({ label, value, formatter, delta, deltaPeriodLabel, deltaIntent, trend, status, helpText, size, orientation, isLoading, empty, error, onClick, className, labelClassName, renderValue, renderDelta, renderTrend, }: KpiProps): react_jsx_runtime.JSX.Element;
|
|
5635
|
+
declare function Kpi({ label, value, formatter, delta, deltaPeriodLabel, deltaIntent, trend, status, helpText, size, orientation, isLoading, empty, error, onClick, className, labelClassName, renderValue, renderDelta, renderTrend, unit, sub, dashed, labelVariant, sparkVariant, sparkTone, tileValueSize, }: KpiProps): react_jsx_runtime.JSX.Element;
|
|
5593
5636
|
|
|
5594
5637
|
/**
|
|
5595
5638
|
* KpiGroup Component — Layout container for multiple KPIs
|
package/dist/index.d.ts
CHANGED
|
@@ -5536,6 +5536,12 @@ type KpiFormatter = ComponentFormatter;
|
|
|
5536
5536
|
* trend={dataPoints}
|
|
5537
5537
|
* />
|
|
5538
5538
|
* ```
|
|
5539
|
+
*
|
|
5540
|
+
* The "tile" opt-ins (`unit`, `sub`, `dashed`, `labelVariant="mono-caps"`,
|
|
5541
|
+
* `sparkVariant="area"`, `tileValueSize`) let the `entity.now` and `metrics.kpi`
|
|
5542
|
+
* blocks draw their KPI cell from this one primitive instead of hand-rolling it.
|
|
5543
|
+
* Every one is optional and defaults to the legacy presentation, so existing
|
|
5544
|
+
* callers (Boards, standalone Kpi) are unaffected until they opt in.
|
|
5539
5545
|
*/
|
|
5540
5546
|
type KpiStatus = "neutral" | "success" | "warning" | "error" | "info";
|
|
5541
5547
|
type KpiSize = "sm" | "md" | "lg";
|
|
@@ -5566,7 +5572,7 @@ interface KpiProps {
|
|
|
5566
5572
|
};
|
|
5567
5573
|
/** Help text or tooltip content */
|
|
5568
5574
|
helpText?: React__default.ReactNode;
|
|
5569
|
-
/** Size variant */
|
|
5575
|
+
/** Size variant — controls label/value type roles and internal gap. */
|
|
5570
5576
|
size?: KpiSize;
|
|
5571
5577
|
/** Layout orientation */
|
|
5572
5578
|
orientation?: KpiOrientation;
|
|
@@ -5588,8 +5594,45 @@ interface KpiProps {
|
|
|
5588
5594
|
renderDelta?: (delta?: number) => React__default.ReactNode;
|
|
5589
5595
|
/** Custom trend renderer */
|
|
5590
5596
|
renderTrend?: (points?: TrendPoint[]) => React__default.ReactNode;
|
|
5597
|
+
/**
|
|
5598
|
+
* Secondary unit suffix rendered inline after the value in a smaller,
|
|
5599
|
+
* secondary tone (e.g. "kW", "%", "MW"). Display-only.
|
|
5600
|
+
*/
|
|
5601
|
+
unit?: string;
|
|
5602
|
+
/**
|
|
5603
|
+
* Secondary line under the value (e.g. "as of 2h ago", "of 400 A"). Static,
|
|
5604
|
+
* already localised by the caller. Kept even when `dashed`.
|
|
5605
|
+
*/
|
|
5606
|
+
sub?: React__default.ReactNode;
|
|
5607
|
+
/**
|
|
5608
|
+
* Offline contract: the value is dashed to "—" and de-emphasised (the entity
|
|
5609
|
+
* is offline and this is a live metric). The cell keeps its slot so a grid
|
|
5610
|
+
* stays identical online/offline; the sparkline is suppressed and `sub` is
|
|
5611
|
+
* kept. Distinct from `empty` (which is "no metric at all").
|
|
5612
|
+
*/
|
|
5613
|
+
dashed?: boolean;
|
|
5614
|
+
/**
|
|
5615
|
+
* Label presentation. `"mono-caps"` renders the design's Geist-Mono 10px
|
|
5616
|
+
* uppercase caption so blocks don't hand-pass `labelClassName`.
|
|
5617
|
+
*/
|
|
5618
|
+
labelVariant?: "default" | "mono-caps";
|
|
5619
|
+
/**
|
|
5620
|
+
* Sparkline style. `"line"` (default, back-compat) is the thin border-muted
|
|
5621
|
+
* polyline; `"area"` is the smooth Catmull-Rom curve with a gradient area
|
|
5622
|
+
* fill (the shared tile sparkline). The caller decides whether a series is
|
|
5623
|
+
* worth drawing; this only draws for ≥ 2 points and no-ops otherwise.
|
|
5624
|
+
*/
|
|
5625
|
+
sparkVariant?: "line" | "area";
|
|
5626
|
+
/** Text-color utility class for the `"area"` sparkline (drives currentColor). */
|
|
5627
|
+
sparkTone?: string;
|
|
5628
|
+
/**
|
|
5629
|
+
* Opt-in "tile" value presentation: brand-font display value at a fixed size.
|
|
5630
|
+
* `"md"` = 24px (entity/device tiles), `"lg"` = 34px (Boards summary). When
|
|
5631
|
+
* unset the value uses the `size`-driven display type role (legacy behavior).
|
|
5632
|
+
*/
|
|
5633
|
+
tileValueSize?: "md" | "lg";
|
|
5591
5634
|
}
|
|
5592
|
-
declare function Kpi({ label, value, formatter, delta, deltaPeriodLabel, deltaIntent, trend, status, helpText, size, orientation, isLoading, empty, error, onClick, className, labelClassName, renderValue, renderDelta, renderTrend, }: KpiProps): react_jsx_runtime.JSX.Element;
|
|
5635
|
+
declare function Kpi({ label, value, formatter, delta, deltaPeriodLabel, deltaIntent, trend, status, helpText, size, orientation, isLoading, empty, error, onClick, className, labelClassName, renderValue, renderDelta, renderTrend, unit, sub, dashed, labelVariant, sparkVariant, sparkTone, tileValueSize, }: KpiProps): react_jsx_runtime.JSX.Element;
|
|
5593
5636
|
|
|
5594
5637
|
/**
|
|
5595
5638
|
* KpiGroup Component — Layout container for multiple KPIs
|