@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/components.js +3 -2
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +3 -2
- package/dist/components.mjs.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +2 -1
- package/dist/primitives.d.ts +2 -1
- package/dist/primitives.js +5 -2
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +5 -2
- package/dist/primitives.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -402,7 +402,7 @@ var Label = react.forwardRef(function Label2({ className, ...props }, ref) {
|
|
|
402
402
|
}
|
|
403
403
|
);
|
|
404
404
|
});
|
|
405
|
-
function Field({ label, hint, optional, error, children, className, hideLabel }) {
|
|
405
|
+
function Field({ label, hint, optional, error, children, className, hideLabel, action }) {
|
|
406
406
|
const id = react.useId();
|
|
407
407
|
const hintId = hint ? `${id}-hint` : void 0;
|
|
408
408
|
const errorId = error ? `${id}-error` : void 0;
|
|
@@ -417,7 +417,10 @@ function Field({ label, hint, optional, error, children, className, hideLabel })
|
|
|
417
417
|
label,
|
|
418
418
|
optional ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.8125rem] font-normal text-muted-foreground", children: "Optional" }) : null
|
|
419
419
|
] }),
|
|
420
|
-
|
|
420
|
+
action ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start", children: [
|
|
421
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1 [&>*]:w-full", children: control }),
|
|
422
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: action })
|
|
423
|
+
] }) : control,
|
|
421
424
|
hint ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null,
|
|
422
425
|
error ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: errorId, role: "alert", className: "text-[0.8125rem] leading-snug text-destructive", children: error }) : null
|
|
423
426
|
] });
|
|
@@ -2207,10 +2210,11 @@ function UsdApprox({
|
|
|
2207
2210
|
}) {
|
|
2208
2211
|
if (sats == null || usdPerBtc == null || !Number.isFinite(sats) || !Number.isFinite(usdPerBtc)) return null;
|
|
2209
2212
|
const usd = sats / 1e8 * usdPerBtc;
|
|
2210
|
-
const text = new Intl.NumberFormat("en-US", {
|
|
2213
|
+
const text = usd > 0 && usd < 5e-3 ? "< $0.01" : new Intl.NumberFormat("en-US", {
|
|
2211
2214
|
style: "currency",
|
|
2212
2215
|
currency: "USD",
|
|
2213
|
-
|
|
2216
|
+
minimumFractionDigits: 2,
|
|
2217
|
+
maximumFractionDigits: 2
|
|
2214
2218
|
}).format(usd);
|
|
2215
2219
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("oca-tabular text-muted-foreground", className), children: [
|
|
2216
2220
|
"\u2248 ",
|