@umami/react-zen 0.167.0 → 0.168.0

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
@@ -27905,8 +27905,13 @@ function FormField({
27905
27905
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { ...props, className: (0, import_classnames6.default)(FormField_default.input, className), children: [
27906
27906
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FormController, { name, control, rules, children: ({ field }) => {
27907
27907
  return import_react157.Children.map(
27908
- typeof children === "function" ? children({ ...context }) : children,
27909
- (child) => child ? (0, import_react157.cloneElement)(child, { ...field, label: child?.props?.label || label }) : null
27908
+ typeof children === "function" ? children({ ...context, field }) : children,
27909
+ (child) => {
27910
+ if (!child) {
27911
+ return null;
27912
+ }
27913
+ return (0, import_react157.cloneElement)(child, { ...field, label: child?.props?.label || label });
27914
+ }
27910
27915
  );
27911
27916
  } }),
27912
27917
  description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: FormField_default.description, children: description }),
package/dist/index.mjs CHANGED
@@ -27788,8 +27788,13 @@ function FormField({
27788
27788
  return /* @__PURE__ */ jsxs6("div", { ...props, className: (0, import_classnames6.default)(FormField_default.input, className), children: [
27789
27789
  /* @__PURE__ */ jsx13(FormController, { name, control, rules, children: ({ field }) => {
27790
27790
  return Children.map(
27791
- typeof children === "function" ? children({ ...context }) : children,
27792
- (child) => child ? cloneElement2(child, { ...field, label: child?.props?.label || label }) : null
27791
+ typeof children === "function" ? children({ ...context, field }) : children,
27792
+ (child) => {
27793
+ if (!child) {
27794
+ return null;
27795
+ }
27796
+ return cloneElement2(child, { ...field, label: child?.props?.label || label });
27797
+ }
27793
27798
  );
27794
27799
  } }),
27795
27800
  description && /* @__PURE__ */ jsx13("div", { className: FormField_default.description, children: description }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umami/react-zen",
3
- "version": "0.167.0",
3
+ "version": "0.168.0",
4
4
  "description": "Modern, minimalist React component library",
5
5
  "author": "Umami <hello@umami.is>",
6
6
  "license": "MIT",