@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 +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- 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.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
|
-
|
|
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
|
] });
|