@orangecheck/app-design 0.5.5 → 0.5.7

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
@@ -368,7 +368,7 @@ var Label = forwardRef(function Label2({ className, ...props }, ref) {
368
368
  }
369
369
  );
370
370
  });
371
- function Field({ label, hint, optional, error, children, className, hideLabel }) {
371
+ function Field({ label, hint, optional, error, children, className, hideLabel, action }) {
372
372
  const id = useId();
373
373
  const hintId = hint ? `${id}-hint` : void 0;
374
374
  const errorId = error ? `${id}-error` : void 0;
@@ -383,7 +383,10 @@ function Field({ label, hint, optional, error, children, className, hideLabel })
383
383
  label,
384
384
  optional ? /* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] font-normal text-muted-foreground", children: "Optional" }) : null
385
385
  ] }),
386
- control,
386
+ action ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start", children: [
387
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 [&>*]:w-full", children: control }),
388
+ /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
389
+ ] }) : control,
387
390
  hint ? /* @__PURE__ */ jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null,
388
391
  error ? /* @__PURE__ */ jsx("p", { id: errorId, role: "alert", className: "text-[0.8125rem] leading-snug text-destructive", children: error }) : null
389
392
  ] });
@@ -2173,10 +2176,11 @@ function UsdApprox({
2173
2176
  }) {
2174
2177
  if (sats == null || usdPerBtc == null || !Number.isFinite(sats) || !Number.isFinite(usdPerBtc)) return null;
2175
2178
  const usd = sats / 1e8 * usdPerBtc;
2176
- const text = new Intl.NumberFormat("en-US", {
2179
+ const text = usd > 0 && usd < 5e-3 ? "< $0.01" : new Intl.NumberFormat("en-US", {
2177
2180
  style: "currency",
2178
2181
  currency: "USD",
2179
- maximumFractionDigits: usd < 1 ? 4 : 2
2182
+ minimumFractionDigits: 2,
2183
+ maximumFractionDigits: 2
2180
2184
  }).format(usd);
2181
2185
  return /* @__PURE__ */ jsxs("span", { className: cn("oca-tabular text-muted-foreground", className), children: [
2182
2186
  "\u2248 ",