@orangecheck/design 0.7.0 → 0.7.2

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.
@@ -168,6 +168,34 @@ function StatTile({ children, ...item }) {
168
168
  children
169
169
  ] });
170
170
  }
171
+ function StatBlock({ label, value, sub, delta, tone = "default", className }) {
172
+ const toneClass = tone === "success" ? "text-success" : tone === "warning" ? "text-warning" : tone === "destructive" ? "text-destructive" : "text-foreground";
173
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
174
+ /* @__PURE__ */ jsx("span", { className: "label-mono text-[10px]", children: label }),
175
+ /* @__PURE__ */ jsx("span", { className: cn("font-display text-2xl leading-none", toneClass), children: value }),
176
+ /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
177
+ sub && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-mono text-[11px] tracking-wide lowercase", children: sub }),
178
+ delta && /* @__PURE__ */ jsxs(
179
+ "span",
180
+ {
181
+ className: cn(
182
+ "font-mono text-[11px] tracking-wide",
183
+ delta.value > 0 ? "text-success" : delta.value < 0 ? "text-destructive" : "text-muted-foreground"
184
+ ),
185
+ children: [
186
+ delta.value > 0 ? "\u25B2" : delta.value < 0 ? "\u25BC" : "\xB7",
187
+ " ",
188
+ Math.abs(delta.value).toFixed(1),
189
+ delta.suffix ?? "%"
190
+ ]
191
+ }
192
+ )
193
+ ] })
194
+ ] });
195
+ }
196
+ function StatCard({ pad = "default", className, ...stat }) {
197
+ return /* @__PURE__ */ jsx("div", { className: cn("border bg-card", pad === "sm" ? "p-3 md:p-4" : "p-5", className), children: /* @__PURE__ */ jsx(StatBlock, { ...stat }) });
198
+ }
171
199
  var FRAME = {
172
200
  info: "border-primary/30 bg-primary/5",
173
201
  warning: "border-warning/40 bg-warning/5",
@@ -1832,6 +1860,6 @@ function LayoutSubHeader({
1832
1860
  ] }) });
1833
1861
  }
1834
1862
 
1835
- export { AppShell, Callout, DataRow, DefinitionList, EcosystemSwitcher, EmptyState, FAMILY_PROPERTIES, HelpHint, LayoutSubHeader, OcAccountMenu, OcAccountMenuView, OcDashboardHub, OcDashboardShell, OcLogoDropdown, OcPrimaryNav, SITE_STATE_LABEL, SectionHeader, StatGrid, StatTile, findFamilyProperty };
1863
+ export { AppShell, Callout, DataRow, DefinitionList, EcosystemSwitcher, EmptyState, FAMILY_PROPERTIES, HelpHint, LayoutSubHeader, OcAccountMenu, OcAccountMenuView, OcDashboardHub, OcDashboardShell, OcLogoDropdown, OcPrimaryNav, SITE_STATE_LABEL, SectionHeader, StatCard, StatGrid, StatTile, findFamilyProperty };
1836
1864
  //# sourceMappingURL=components.mjs.map
1837
1865
  //# sourceMappingURL=components.mjs.map