@orangecheck/design 0.7.3 → 0.7.5

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.mjs CHANGED
@@ -1738,7 +1738,16 @@ function StatBlock({ label, value, sub, delta, tone = "default", className }) {
1738
1738
  const toneClass = tone === "success" ? "text-success" : tone === "warning" ? "text-warning" : tone === "destructive" ? "text-destructive" : "text-foreground";
1739
1739
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
1740
1740
  /* @__PURE__ */ jsx("span", { className: "label-mono text-[10px]", children: label }),
1741
- /* @__PURE__ */ jsx("span", { className: cn("font-display text-2xl leading-none", toneClass), children: value }),
1741
+ /* @__PURE__ */ jsx(
1742
+ "span",
1743
+ {
1744
+ className: cn(
1745
+ "font-display text-2xl font-bold tracking-tight tabular-nums",
1746
+ toneClass
1747
+ ),
1748
+ children: value
1749
+ }
1750
+ ),
1742
1751
  /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
1743
1752
  sub && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-mono text-[11px] tracking-wide lowercase", children: sub }),
1744
1753
  delta && /* @__PURE__ */ jsxs(
@@ -2065,28 +2074,46 @@ function QrCode({ value, size = 200, label, className }) {
2065
2074
  );
2066
2075
  }
2067
2076
  function HelpHint({
2068
- title,
2069
2077
  children,
2070
- side = "bottom",
2071
- label = "more information",
2078
+ title,
2079
+ side = "top",
2080
+ size = "sm",
2081
+ tone = "default",
2082
+ label = "what is this?",
2072
2083
  className
2073
2084
  }) {
2074
- return /* @__PURE__ */ jsxs(Popover, { children: [
2085
+ const iconSize = size === "xs" ? 12 : 14;
2086
+ return /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { children: [
2075
2087
  /* @__PURE__ */ jsx(
2076
- PopoverTrigger,
2088
+ PopoverPrimitive.Trigger,
2077
2089
  {
2078
2090
  "aria-label": label,
2091
+ onClick: (e) => e.stopPropagation(),
2079
2092
  className: cn(
2080
- "text-muted-foreground/60 hover:text-foreground inline-flex size-3.5 items-center justify-center align-middle transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring",
2093
+ "focus-visible:ring-primary/60 inline-flex shrink-0 items-center justify-center rounded-full transition-colors outline-none focus-visible:ring-2",
2094
+ tone === "subtle" ? "text-muted-foreground/60 hover:text-foreground/80" : "text-primary/70 hover:text-primary",
2081
2095
  className
2082
2096
  ),
2083
- children: /* @__PURE__ */ jsx(HelpCircle, { className: "size-3.5", "aria-hidden": true })
2097
+ children: /* @__PURE__ */ jsx(HelpCircle, { size: iconSize, "aria-hidden": true })
2084
2098
  }
2085
2099
  ),
2086
- /* @__PURE__ */ jsxs(PopoverContent, { side, className: "w-72 space-y-1.5", children: [
2087
- title && /* @__PURE__ */ jsx("p", { className: "label-mono text-foreground text-[10px]", children: title }),
2088
- /* @__PURE__ */ jsx("div", { className: "text-muted-foreground text-xs leading-relaxed", children })
2089
- ] })
2100
+ /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
2101
+ PopoverPrimitive.Content,
2102
+ {
2103
+ side,
2104
+ sideOffset: 6,
2105
+ collisionPadding: 12,
2106
+ className: "border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 max-w-xs rounded-md border p-3 text-xs leading-relaxed shadow-md outline-none",
2107
+ children: [
2108
+ title && /* @__PURE__ */ jsxs("div", { className: "label-mono text-primary mb-1.5", children: [
2109
+ "\xA7 ",
2110
+ title
2111
+ ] }),
2112
+ /* @__PURE__ */ jsx("div", { className: "text-foreground/90", children }),
2113
+ /* @__PURE__ */ jsx(PopoverPrimitive.Arrow, { className: "fill-popover" })
2114
+ ]
2115
+ }
2116
+ ) })
2090
2117
  ] });
2091
2118
  }
2092
2119
  var TONE_CLASS = {