shadcn-zod-formkit 1.22.0 → 1.22.1
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
|
@@ -5564,7 +5564,7 @@ var FormFieldsGrid = ({
|
|
|
5564
5564
|
const fieldCopy = { ...field, disabled: readOnly ? true : field.disabled };
|
|
5565
5565
|
const renderUp = fieldCopy.childrenPosition !== "down" && isRenderableChild(fieldCopy.children);
|
|
5566
5566
|
const renderDown = fieldCopy.childrenPosition === "down" && isRenderableChild(fieldCopy.children);
|
|
5567
|
-
const dirClass = fieldCopy.direction === "row" ? "flex flex-col sm:flex-row sm:items-center sm:gap-4 w-full flex-wrap" : "flex flex-col gap-2 w-full";
|
|
5567
|
+
const dirClass = fieldCopy.direction === "row" ? "flex flex-col sm:flex-row sm:items-center sm:gap-x-4 gap-y-2 w-full flex-wrap" : "flex flex-col gap-2 w-full";
|
|
5568
5568
|
return /* @__PURE__ */ jsxs("div", { className: dirClass, children: [
|
|
5569
5569
|
renderUp && /* @__PURE__ */ jsx(Fragment, { children: fieldCopy.children }),
|
|
5570
5570
|
InputFactory.create(fieldCopy, form, isPending),
|
|
@@ -5573,16 +5573,16 @@ var FormFieldsGrid = ({
|
|
|
5573
5573
|
};
|
|
5574
5574
|
const renderColumn = (col) => {
|
|
5575
5575
|
if (col.length === 0) return null;
|
|
5576
|
-
const colDirection = isFieldProps(col[0]) && col[0].direction === "row" ? "flex flex-col sm:flex-row sm:items-center sm:gap-4 w-full flex-wrap" : "flex flex-col gap-2 w-full";
|
|
5576
|
+
const colDirection = isFieldProps(col[0]) && col[0].direction === "row" ? "flex flex-col sm:flex-row sm:items-center sm:gap-x-4 gap-y-2 w-full flex-wrap" : "flex flex-col gap-2 w-full";
|
|
5577
5577
|
return /* @__PURE__ */ jsx("div", { className: colDirection, children: col.map((item, idx) => {
|
|
5578
|
-
if (isFieldProps(item)) return renderField(item);
|
|
5578
|
+
if (isFieldProps(item)) return /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-[200px]", children: renderField(item) }, idx);
|
|
5579
5579
|
if (Array.isArray(item)) return renderColumn(item);
|
|
5580
5580
|
return null;
|
|
5581
5581
|
}) });
|
|
5582
5582
|
};
|
|
5583
5583
|
const renderRow = (row) => {
|
|
5584
5584
|
if (row.length === 0) return null;
|
|
5585
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
5585
|
+
return /* @__PURE__ */ jsx("div", { className: `w-full flex flex-col sm:flex-row sm:gap-x-4 gap-y-2 py-2 flex-wrap gap-2`, children: row.map((col, idx) => {
|
|
5586
5586
|
if (isFieldProps(col)) return renderColumn([col]);
|
|
5587
5587
|
if (Array.isArray(col)) return renderColumn(col);
|
|
5588
5588
|
return null;
|