@lumx/react 3.12.1-alpha.0 → 3.12.1-alpha.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/index.js CHANGED
@@ -7461,15 +7461,12 @@ const useOverflowTooltipLabel = () => {
7461
7461
  function wrapChildrenIconWithSpaces(children) {
7462
7462
  if (children === null || children === undefined) return undefined;
7463
7463
  return Children.toArray(children).flatMap(child => {
7464
- if (! /*#__PURE__*/React__default.isValidElement(child)) {
7465
- return child;
7466
- }
7467
- if (child.type === React__default.Fragment) {
7468
- return wrapChildrenIconWithSpaces(child.props.children);
7469
- }
7470
7464
  if (isComponentType(Icon)(child)) {
7471
7465
  return [' ', child, ' '];
7472
7466
  }
7467
+ if (/*#__PURE__*/React__default.isValidElement(child) && child.props && typeof child.props === 'object' && 'children' in child.props) {
7468
+ return /*#__PURE__*/React__default.cloneElement(child, undefined, wrapChildrenIconWithSpaces(child.props.children));
7469
+ }
7473
7470
  return child;
7474
7471
  });
7475
7472
  }
@@ -9137,7 +9134,9 @@ const Link = forwardRef((props, ref) => {
9137
9134
  }), wrapChildrenIconWithSpaces(/*#__PURE__*/React__default.createElement(React__default.Fragment, null, leftIcon && /*#__PURE__*/React__default.createElement(Icon, {
9138
9135
  icon: leftIcon,
9139
9136
  className: `${CLASSNAME$K}__left-icon`
9140
- }), children, rightIcon && /*#__PURE__*/React__default.createElement(Icon, {
9137
+ }), children && /*#__PURE__*/React__default.createElement("span", {
9138
+ className: `${CLASSNAME$K}__content`
9139
+ }, children), rightIcon && /*#__PURE__*/React__default.createElement(Icon, {
9141
9140
  icon: rightIcon,
9142
9141
  className: `${CLASSNAME$K}__right-icon`
9143
9142
  }))));