@umami/react-zen 0.166.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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -3
- package/dist/index.mjs +9 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -340,7 +340,7 @@ interface ComboboxProps extends ComboBoxProps<any> {
|
|
|
340
340
|
listProps?: ListProps;
|
|
341
341
|
popoverProps?: PopoverProps;
|
|
342
342
|
}
|
|
343
|
-
declare function ComboBox({ items, className, renderEmptyState, listProps, popoverProps, ...props }: ComboboxProps): react.JSX.Element;
|
|
343
|
+
declare function ComboBox({ items, className, renderEmptyState, listProps, popoverProps, children, ...props }: ComboboxProps): react.JSX.Element;
|
|
344
344
|
|
|
345
345
|
interface CodeProps extends HTMLAttributes<HTMLElement> {
|
|
346
346
|
asChild?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -340,7 +340,7 @@ interface ComboboxProps extends ComboBoxProps<any> {
|
|
|
340
340
|
listProps?: ListProps;
|
|
341
341
|
popoverProps?: PopoverProps;
|
|
342
342
|
}
|
|
343
|
-
declare function ComboBox({ items, className, renderEmptyState, listProps, popoverProps, ...props }: ComboboxProps): react.JSX.Element;
|
|
343
|
+
declare function ComboBox({ items, className, renderEmptyState, listProps, popoverProps, children, ...props }: ComboboxProps): react.JSX.Element;
|
|
344
344
|
|
|
345
345
|
interface CodeProps extends HTMLAttributes<HTMLElement> {
|
|
346
346
|
asChild?: boolean;
|
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) =>
|
|
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 }),
|
|
@@ -32338,6 +32343,7 @@ function ComboBox2({
|
|
|
32338
32343
|
renderEmptyState,
|
|
32339
32344
|
listProps,
|
|
32340
32345
|
popoverProps,
|
|
32346
|
+
children,
|
|
32341
32347
|
...props
|
|
32342
32348
|
}) {
|
|
32343
32349
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)($d01f2c01039c0eec$export$72b9695b8216309a, { ...props, className: (0, import_classnames22.default)(ComboBox_default.combobox, className), children: [
|
|
@@ -32345,7 +32351,7 @@ function ComboBox2({
|
|
|
32345
32351
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)($3985021b0ad6602f$export$f5b8910cec6cf069, { className: ComboBox_default.input }),
|
|
32346
32352
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: ComboBox_default.button, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon2, { "aria-hidden": "true", rotate: 90, size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChevronRight, {}) }) })
|
|
32347
32353
|
] }),
|
|
32348
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)($07b14b47974efb58$export$5b6b19405a83ff9d, { ...popoverProps, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: ComboBox_default.list, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(List, { items, renderEmptyState, ...listProps, children: items?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ListItem, { textValue: item, children: item }, item)) }) }) })
|
|
32354
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)($07b14b47974efb58$export$5b6b19405a83ff9d, { ...popoverProps, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: ComboBox_default.list, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(List, { items, renderEmptyState, ...listProps, children: children || items?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ListItem, { textValue: item, children: item }, item)) }) }) })
|
|
32349
32355
|
] });
|
|
32350
32356
|
}
|
|
32351
32357
|
|
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) =>
|
|
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 }),
|
|
@@ -32221,6 +32226,7 @@ function ComboBox2({
|
|
|
32221
32226
|
renderEmptyState,
|
|
32222
32227
|
listProps,
|
|
32223
32228
|
popoverProps,
|
|
32229
|
+
children,
|
|
32224
32230
|
...props
|
|
32225
32231
|
}) {
|
|
32226
32232
|
return /* @__PURE__ */ jsxs19($d01f2c01039c0eec$export$72b9695b8216309a, { ...props, className: (0, import_classnames22.default)(ComboBox_default.combobox, className), children: [
|
|
@@ -32228,7 +32234,7 @@ function ComboBox2({
|
|
|
32228
32234
|
/* @__PURE__ */ jsx35($3985021b0ad6602f$export$f5b8910cec6cf069, { className: ComboBox_default.input }),
|
|
32229
32235
|
/* @__PURE__ */ jsx35($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: ComboBox_default.button, children: /* @__PURE__ */ jsx35(Icon2, { "aria-hidden": "true", rotate: 90, size: "sm", children: /* @__PURE__ */ jsx35(ChevronRight, {}) }) })
|
|
32230
32236
|
] }),
|
|
32231
|
-
/* @__PURE__ */ jsx35($07b14b47974efb58$export$5b6b19405a83ff9d, { ...popoverProps, children: /* @__PURE__ */ jsx35("div", { className: ComboBox_default.list, children: /* @__PURE__ */ jsx35(List, { items, renderEmptyState, ...listProps, children: items?.map((item) => /* @__PURE__ */ jsx35(ListItem, { textValue: item, children: item }, item)) }) }) })
|
|
32237
|
+
/* @__PURE__ */ jsx35($07b14b47974efb58$export$5b6b19405a83ff9d, { ...popoverProps, children: /* @__PURE__ */ jsx35("div", { className: ComboBox_default.list, children: /* @__PURE__ */ jsx35(List, { items, renderEmptyState, ...listProps, children: children || items?.map((item) => /* @__PURE__ */ jsx35(ListItem, { textValue: item, children: item }, item)) }) }) })
|
|
32232
32238
|
] });
|
|
32233
32239
|
}
|
|
32234
32240
|
|