@nulogy/components 8.15.1 → 8.15.2

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/main.js CHANGED
@@ -24973,10 +24973,12 @@
24973
24973
  id: id,
24974
24974
  backgroundColor: backgroundColor,
24975
24975
  showArrow: showArrow
24976
- }, restProps), React__default["default"].Children.map(children, function (child) {
24977
- return /*#__PURE__*/React__default["default"].cloneElement(child, Object.assign({
24978
- size: componentSize
24979
- }, child.props), child.props.children);
24976
+ }, restProps), typeof children === "function" ? children : React__default["default"].Children.map(children, function (child) {
24977
+ if ( /*#__PURE__*/React__default["default"].isValidElement(child)) {
24978
+ return /*#__PURE__*/React__default["default"].cloneElement(child, Object.assign({
24979
+ size: componentSize
24980
+ }, child.props), child.props.children);
24981
+ }
24980
24982
  })));
24981
24983
  });
24982
24984
 
@@ -24950,10 +24950,12 @@ var DropdownMenu = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
24950
24950
  id: id,
24951
24951
  backgroundColor: backgroundColor,
24952
24952
  showArrow: showArrow
24953
- }, restProps), React__default.Children.map(children, function (child) {
24954
- return /*#__PURE__*/React__default.cloneElement(child, Object.assign({
24955
- size: componentSize
24956
- }, child.props), child.props.children);
24953
+ }, restProps), typeof children === "function" ? children : React__default.Children.map(children, function (child) {
24954
+ if ( /*#__PURE__*/React__default.isValidElement(child)) {
24955
+ return /*#__PURE__*/React__default.cloneElement(child, Object.assign({
24956
+ size: componentSize
24957
+ }, child.props), child.props.children);
24958
+ }
24957
24959
  })));
24958
24960
  });
24959
24961
 
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
- import { StyledProps } from "../StyledProps";
3
2
  import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
3
+ import { StyledProps } from "../StyledProps";
4
4
  type DropdownMenuProps = {
5
5
  className?: string;
6
6
  size?: ComponentSize;
7
7
  id?: string;
8
8
  disabled?: boolean;
9
- trigger?: React.ReactNode | ((...args: any[]) => any);
9
+ trigger?: () => React.FunctionComponentElement<unknown>;
10
10
  backgroundColor?: string;
11
11
  showArrow?: boolean;
12
12
  placement?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { DefaultNDSThemeType } from "../theme.type";
3
3
  type DropdownMenuContainerProps = {
4
+ id?: string;
4
5
  className?: string;
5
6
  backgroundColor?: string;
6
7
  showArrow?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "8.15.1",
3
+ "version": "8.15.2",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {