@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.js CHANGED
@@ -1773,7 +1773,16 @@ function StatBlock({ label, value, sub, delta, tone = "default", className }) {
1773
1773
  const toneClass = tone === "success" ? "text-success" : tone === "warning" ? "text-warning" : tone === "destructive" ? "text-destructive" : "text-foreground";
1774
1774
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
1775
1775
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "label-mono text-[10px]", children: label }),
1776
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-display text-2xl leading-none", toneClass), children: value }),
1776
+ /* @__PURE__ */ jsxRuntime.jsx(
1777
+ "span",
1778
+ {
1779
+ className: cn(
1780
+ "font-display text-2xl font-bold tracking-tight tabular-nums",
1781
+ toneClass
1782
+ ),
1783
+ children: value
1784
+ }
1785
+ ),
1777
1786
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
1778
1787
  sub && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-mono text-[11px] tracking-wide lowercase", children: sub }),
1779
1788
  delta && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2100,28 +2109,46 @@ function QrCode({ value, size = 200, label, className }) {
2100
2109
  );
2101
2110
  }
2102
2111
  function HelpHint({
2103
- title,
2104
2112
  children,
2105
- side = "bottom",
2106
- label = "more information",
2113
+ title,
2114
+ side = "top",
2115
+ size = "sm",
2116
+ tone = "default",
2117
+ label = "what is this?",
2107
2118
  className
2108
2119
  }) {
2109
- return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
2120
+ const iconSize = size === "xs" ? 12 : 14;
2121
+ return /* @__PURE__ */ jsxRuntime.jsxs(PopoverPrimitive__namespace.Root, { children: [
2110
2122
  /* @__PURE__ */ jsxRuntime.jsx(
2111
- PopoverTrigger,
2123
+ PopoverPrimitive__namespace.Trigger,
2112
2124
  {
2113
2125
  "aria-label": label,
2126
+ onClick: (e) => e.stopPropagation(),
2114
2127
  className: cn(
2115
- "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",
2128
+ "focus-visible:ring-primary/60 inline-flex shrink-0 items-center justify-center rounded-full transition-colors outline-none focus-visible:ring-2",
2129
+ tone === "subtle" ? "text-muted-foreground/60 hover:text-foreground/80" : "text-primary/70 hover:text-primary",
2116
2130
  className
2117
2131
  ),
2118
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HelpCircle, { className: "size-3.5", "aria-hidden": true })
2132
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HelpCircle, { size: iconSize, "aria-hidden": true })
2119
2133
  }
2120
2134
  ),
2121
- /* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { side, className: "w-72 space-y-1.5", children: [
2122
- title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "label-mono text-foreground text-[10px]", children: title }),
2123
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-xs leading-relaxed", children })
2124
- ] })
2135
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
2136
+ PopoverPrimitive__namespace.Content,
2137
+ {
2138
+ side,
2139
+ sideOffset: 6,
2140
+ collisionPadding: 12,
2141
+ 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",
2142
+ children: [
2143
+ title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "label-mono text-primary mb-1.5", children: [
2144
+ "\xA7 ",
2145
+ title
2146
+ ] }),
2147
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground/90", children }),
2148
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Arrow, { className: "fill-popover" })
2149
+ ]
2150
+ }
2151
+ ) })
2125
2152
  ] });
2126
2153
  }
2127
2154
  var TONE_CLASS = {