@orangecheck/app-design 0.5.5 → 0.5.6

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
@@ -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
- control,
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
  ] });