@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.
- package/dist/cjs/components/Button/Button.js +2 -2
- package/dist/cjs/components/Drop/index.js +1 -1
- package/dist/cjs/components/Nav/Nav.js +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/components/Button/Button.js +2 -2
- package/dist/esm/components/Drop/index.js +1 -1
- package/dist/esm/components/Nav/Nav.js +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -35,7 +35,7 @@ const Link_1 = require("../../components/Link");
|
|
|
35
35
|
const defaultElement = 'button';
|
|
36
36
|
exports.Button = React.forwardRef((props, ref) => {
|
|
37
37
|
const config = (0, ConfigProvider_1.useConfig)();
|
|
38
|
-
const { children, ghost, htmlType = 'button', prefixCls = config.prefixCls, shape = config.buttonShape, size = config.buttonSize, type, ...restProps } = props;
|
|
38
|
+
const { component = defaultElement, children, ghost, htmlType = 'button', prefixCls = config.prefixCls, shape = config.buttonShape, size = config.buttonSize, type, ...restProps } = props;
|
|
39
39
|
const buttonRef = React.useRef(null);
|
|
40
40
|
const onClick = React.useCallback(event => {
|
|
41
41
|
if (restProps.disabled) {
|
|
@@ -54,7 +54,7 @@ exports.Button = React.forwardRef((props, ref) => {
|
|
|
54
54
|
if (restProps.href !== undefined) {
|
|
55
55
|
return (React.createElement(Component_1.Component, { ref: ref || buttonRef, component: Link_1.Link, href: restProps.href, ...restProps, className: className, onClick: onClick }, children));
|
|
56
56
|
}
|
|
57
|
-
return (React.createElement(Component_1.Component, { ref: ref || buttonRef, component:
|
|
57
|
+
return (React.createElement(Component_1.Component, { ref: ref || buttonRef, component: component, type: htmlType, ...restProps, className: className, onClick: onClick }, children));
|
|
58
58
|
});
|
|
59
59
|
if (process.env.NODE_ENV !== 'production') {
|
|
60
60
|
exports.Button.displayName = 'Button';
|
|
@@ -36,7 +36,7 @@ const utils_1 = require("../../utils");
|
|
|
36
36
|
require("./index.scss");
|
|
37
37
|
exports.Drop = React.forwardRef((props, ref) => {
|
|
38
38
|
const config = (0, ConfigProvider_1.useConfig)();
|
|
39
|
-
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_1.default, rootCls: externalRootCls, showAction, visible, onAlign, onOverlayClick, onVisibleChange, ...restProps } = props;
|
|
39
|
+
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_1.default, rootCls: externalRootCls, showAction, visible, onAlign, onOverlayClick, onVisibleChange, ...restProps } = props;
|
|
40
40
|
const triggerRef = React.useRef(null);
|
|
41
41
|
const [triggerVisible, setTriggerVisible] = React.useState(defaultVisible);
|
|
42
42
|
const mergedVisible = 'visible' in restProps ? visible : triggerVisible;
|
|
@@ -51,7 +51,7 @@ const utils_1 = require("../../utils");
|
|
|
51
51
|
const EMPTY_LIST = [];
|
|
52
52
|
exports.Nav = React.forwardRef((props, ref) => {
|
|
53
53
|
const config = (0, ConfigProvider_1.useConfig)();
|
|
54
|
-
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 = {
|
|
54
|
+
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 = {
|
|
55
55
|
horizontal: {
|
|
56
56
|
motionName: (0, utils_1.getMotionName)(prefixCls || config.prefixCls, 'slide-bottom-small'),
|
|
57
57
|
},
|