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.cjs
CHANGED
|
@@ -5602,7 +5602,7 @@ var FormFieldsGrid = ({
|
|
|
5602
5602
|
const fieldCopy = { ...field, disabled: readOnly ? true : field.disabled };
|
|
5603
5603
|
const renderUp = fieldCopy.childrenPosition !== "down" && isRenderableChild(fieldCopy.children);
|
|
5604
5604
|
const renderDown = fieldCopy.childrenPosition === "down" && isRenderableChild(fieldCopy.children);
|
|
5605
|
-
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";
|
|
5605
|
+
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";
|
|
5606
5606
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: dirClass, children: [
|
|
5607
5607
|
renderUp && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fieldCopy.children }),
|
|
5608
5608
|
InputFactory.create(fieldCopy, form, isPending),
|
|
@@ -5611,16 +5611,16 @@ var FormFieldsGrid = ({
|
|
|
5611
5611
|
};
|
|
5612
5612
|
const renderColumn = (col) => {
|
|
5613
5613
|
if (col.length === 0) return null;
|
|
5614
|
-
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";
|
|
5614
|
+
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";
|
|
5615
5615
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: colDirection, children: col.map((item, idx) => {
|
|
5616
|
-
if (isFieldProps(item)) return renderField(item);
|
|
5616
|
+
if (isFieldProps(item)) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-[200px]", children: renderField(item) }, idx);
|
|
5617
5617
|
if (Array.isArray(item)) return renderColumn(item);
|
|
5618
5618
|
return null;
|
|
5619
5619
|
}) });
|
|
5620
5620
|
};
|
|
5621
5621
|
const renderRow = (row) => {
|
|
5622
5622
|
if (row.length === 0) return null;
|
|
5623
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5623
|
+
return /* @__PURE__ */ jsxRuntime.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) => {
|
|
5624
5624
|
if (isFieldProps(col)) return renderColumn([col]);
|
|
5625
5625
|
if (Array.isArray(col)) return renderColumn(col);
|
|
5626
5626
|
return null;
|