@orangecheck/design 0.7.4 → 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
@@ -2074,28 +2074,46 @@ function QrCode({ value, size = 200, label, className }) {
2074
2074
  );
2075
2075
  }
2076
2076
  function HelpHint({
2077
- title,
2078
2077
  children,
2079
- side = "bottom",
2080
- label = "more information",
2078
+ title,
2079
+ side = "top",
2080
+ size = "sm",
2081
+ tone = "default",
2082
+ label = "what is this?",
2081
2083
  className
2082
2084
  }) {
2083
- return /* @__PURE__ */ jsxs(Popover, { children: [
2085
+ const iconSize = size === "xs" ? 12 : 14;
2086
+ return /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { children: [
2084
2087
  /* @__PURE__ */ jsx(
2085
- PopoverTrigger,
2088
+ PopoverPrimitive.Trigger,
2086
2089
  {
2087
2090
  "aria-label": label,
2091
+ onClick: (e) => e.stopPropagation(),
2088
2092
  className: cn(
2089
- "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",
2090
2095
  className
2091
2096
  ),
2092
- children: /* @__PURE__ */ jsx(HelpCircle, { className: "size-3.5", "aria-hidden": true })
2097
+ children: /* @__PURE__ */ jsx(HelpCircle, { size: iconSize, "aria-hidden": true })
2093
2098
  }
2094
2099
  ),
2095
- /* @__PURE__ */ jsxs(PopoverContent, { side, className: "w-72 space-y-1.5", children: [
2096
- title && /* @__PURE__ */ jsx("p", { className: "label-mono text-foreground text-[10px]", children: title }),
2097
- /* @__PURE__ */ jsx("div", { className: "text-muted-foreground text-xs leading-relaxed", children })
2098
- ] })
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
+ ) })
2099
2117
  ] });
2100
2118
  }
2101
2119
  var TONE_CLASS = {