@broxus/react-uikit 0.13.3 → 0.13.5

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.
@@ -6,7 +6,7 @@ import { Link } from '../../components/Link';
6
6
  const defaultElement = 'button';
7
7
  export const Button = React.forwardRef((props, ref) => {
8
8
  const config = useConfig();
9
- const { children, ghost, htmlType = 'button', prefixCls = config.prefixCls, shape = config.buttonShape, size = config.buttonSize, type, ...restProps } = props;
9
+ const { component = defaultElement, children, ghost, htmlType = 'button', prefixCls = config.prefixCls, shape = config.buttonShape, size = config.buttonSize, type, ...restProps } = props;
10
10
  const buttonRef = React.useRef(null);
11
11
  const onClick = React.useCallback(event => {
12
12
  if (restProps.disabled) {
@@ -25,7 +25,7 @@ export const Button = React.forwardRef((props, ref) => {
25
25
  if (restProps.href !== undefined) {
26
26
  return (React.createElement(Component, { ref: ref || buttonRef, component: Link, href: restProps.href, ...restProps, className: className, onClick: onClick }, children));
27
27
  }
28
- return (React.createElement(Component, { ref: ref || buttonRef, component: defaultElement, type: htmlType, ...restProps, className: className, onClick: onClick }, children));
28
+ return (React.createElement(Component, { ref: ref || buttonRef, component: component, type: htmlType, ...restProps, className: className, onClick: onClick }, children));
29
29
  });
30
30
  if (process.env.NODE_ENV !== 'production') {
31
31
  Button.displayName = 'Button';
@@ -7,7 +7,7 @@ import { getMotionName, mergeDropMaskMotion } from '../../utils';
7
7
  import './index.scss';
8
8
  export const Drop = React.forwardRef((props, ref) => {
9
9
  const config = useConfig();
10
- const { action = ['hover'], align, alignPoint, arrow = false, children, defaultVisible, destroyOnHide, getPopupContainer, hideAction, maskMotion, motion, minOverlayWidthMatchTrigger, openClassName, overlay, overlayClassName, overlayStyle, prefixCls = config.prefixCls, placement = 'bottom-left', placements = Placements, rootCls: externalRootCls, showAction, visible, onAlign, onOverlayClick, onVisibleChange, ...restProps } = props;
10
+ const { action = ['hover'], align, alignPoint, arrow = false, children, defaultVisible, destroyOnHide, getPopupContainer = config.getPopupContainer, hideAction, maskMotion, motion, minOverlayWidthMatchTrigger, openClassName, overlay, overlayClassName, overlayStyle, prefixCls = config.prefixCls, placement = 'bottom-left', placements = Placements, rootCls: externalRootCls, showAction, visible, onAlign, onOverlayClick, onVisibleChange, ...restProps } = props;
11
11
  const triggerRef = React.useRef(null);
12
12
  const [triggerVisible, setTriggerVisible] = React.useState(defaultVisible);
13
13
  const mergedVisible = 'visible' in restProps ? visible : triggerVisible;
@@ -22,7 +22,7 @@ import { getCollapseMotion, getMotionName } from '../../utils';
22
22
  const EMPTY_LIST = [];
23
23
  export const Nav = React.forwardRef((props, ref) => {
24
24
  const config = useConfig();
25
- const { activeKey, builtinPlacements, children, className, defaultActiveFirst, defaultOpenKeys, defaultSelectedKeys, direction, disabled, disabledOverflow, expandIcon, forceSubNavRender, getPopupContainer, id, inlineCollapsed, itemIcon, items, mode = 'inline', modifiers, motion, multiple = false, openKeys, overflowedIndicator = '...', overflowedIndicatorPopupClassName, popupPrefixCls = `${config.prefixCls}-dropdown`, prefixCls = config.prefixCls, defaultMotions = {
25
+ const { activeKey, builtinPlacements, children, className, defaultActiveFirst, defaultOpenKeys, defaultSelectedKeys, direction, disabled, disabledOverflow, expandIcon, forceSubNavRender, getPopupContainer = config.getPopupContainer, id, inlineCollapsed, itemIcon, items, mode = 'inline', modifiers, motion, multiple = false, openKeys, overflowedIndicator = '...', overflowedIndicatorPopupClassName, popupPrefixCls = `${config.prefixCls}-dropdown`, prefixCls = config.prefixCls, defaultMotions = {
26
26
  horizontal: {
27
27
  motionName: getMotionName(prefixCls || config.prefixCls, 'slide-bottom-small'),
28
28
  },