@broxus/react-uikit 0.20.1 → 0.21.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/cjs/components/Alert/index.js +3 -3
- package/dist/cjs/components/Align/Align.js +1 -1
- package/dist/cjs/components/Button/Button.js +2 -2
- package/dist/cjs/components/Card/Badge.js +2 -2
- package/dist/cjs/components/Card/Card.js +2 -2
- package/dist/cjs/components/Card/index.d.ts +1 -1
- package/dist/cjs/components/Component/index.d.ts +4 -4
- package/dist/cjs/components/ConfigProvider/index.d.ts +38 -38
- package/dist/cjs/components/Container/index.js +1 -1
- package/dist/cjs/components/Control/Checkbox/Checkbox.d.ts +1 -1
- package/dist/cjs/components/Control/Checkbox/Checkbox.js +5 -6
- package/dist/cjs/components/Control/Checkbox/Group.d.ts +4 -4
- package/dist/cjs/components/Control/Checkbox/Group.js +1 -1
- package/dist/cjs/components/Control/Input/Input.js +1 -1
- package/dist/cjs/components/Control/Input/Number/index.js +3 -3
- package/dist/cjs/components/Control/Input/Password/index.js +3 -3
- package/dist/cjs/components/Control/Input/types.d.ts +1 -1
- package/dist/cjs/components/Control/Input/useInput.js +0 -1
- package/dist/cjs/components/Control/Radio/Group.js +3 -4
- package/dist/cjs/components/Control/Radio/Radio.d.ts +3 -3
- package/dist/cjs/components/Control/Radio/Radio.js +6 -6
- package/dist/cjs/components/Control/TextArea/index.js +1 -2
- package/dist/cjs/components/Cover/index.js +5 -7
- package/dist/cjs/components/DatePicker/generatePicker.d.ts +5 -5
- package/dist/cjs/components/DatePicker/generatePicker.js +1 -1
- package/dist/cjs/components/DatePicker/generatePurePicker.js +3 -3
- package/dist/cjs/components/DatePicker/generateSinglePicker.js +2 -3
- package/dist/cjs/components/DatePicker/types.d.ts +2 -2
- package/dist/cjs/components/Drawer/index.js +3 -3
- package/dist/cjs/components/Drop/index.js +2 -2
- package/dist/cjs/components/Flex/Flex.js +7 -7
- package/dist/cjs/components/Grid/index.js +2 -2
- package/dist/cjs/components/Heading/index.js +1 -1
- package/dist/cjs/components/Icon/Icon.js +1 -1
- package/dist/cjs/components/Inverse/index.js +2 -2
- package/dist/cjs/components/Modal/index.js +2 -2
- package/dist/cjs/components/Nav/Group/InternalNavItemGroup.d.ts +1 -1
- package/dist/cjs/components/Nav/Header.d.ts +1 -1
- package/dist/cjs/components/Nav/Item/InternalNavItem.js +2 -3
- package/dist/cjs/components/Nav/Nav.d.ts +17 -17
- package/dist/cjs/components/Nav/Nav.js +9 -9
- package/dist/cjs/components/Nav/Sub/InlineSubNavList.d.ts +2 -2
- package/dist/cjs/components/Nav/Sub/InlineSubNavList.js +2 -2
- package/dist/cjs/components/Nav/Sub/PopupTrigger.d.ts +1 -1
- package/dist/cjs/components/Nav/Sub/PopupTrigger.js +1 -1
- package/dist/cjs/components/Nav/Sub/SubNavList.js +3 -3
- package/dist/cjs/components/Nav/Sub/index.d.ts +3 -3
- package/dist/cjs/components/Nav/Sub/index.js +3 -3
- package/dist/cjs/components/Nav/context/NavContext.d.ts +1 -1
- package/dist/cjs/components/Nav/context/NavContext.js +2 -2
- package/dist/cjs/components/Nav/hooks/useAccessibility.js +4 -4
- package/dist/cjs/components/Nav/hooks/useDirectionStyle.js +1 -1
- package/dist/cjs/components/Nav/hooks/useKeyRecords.d.ts +4 -4
- package/dist/cjs/components/Nav/hooks/useMemoCallback.js +0 -1
- package/dist/cjs/components/Nav/types.d.ts +10 -10
- package/dist/cjs/components/Nav/utils/alignUtil.js +1 -1
- package/dist/cjs/components/Nav/utils/nodeUtil.js +1 -1
- package/dist/cjs/components/Navbar/Nav.js +1 -1
- package/dist/cjs/components/Overlay/index.js +1 -1
- package/dist/cjs/components/Section/index.js +2 -2
- package/dist/cjs/components/Segmented/index.d.ts +1 -1
- package/dist/cjs/components/Segmented/index.js +1 -1
- package/dist/cjs/components/Spinner/index.js +1 -1
- package/dist/cjs/components/Switch/index.js +2 -2
- package/dist/cjs/components/Tabs/index.js +2 -4
- package/dist/cjs/components/Text/index.js +20 -2
- package/dist/cjs/components/Tile/index.js +2 -2
- package/dist/cjs/components/Width/Width.js +1 -1
- package/dist/cjs/components/Width/index.d.ts +1 -1
- package/dist/cjs/components/Width/index.js +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/esm/components/Alert/index.js +3 -3
- package/dist/esm/components/Align/Align.js +1 -1
- package/dist/esm/components/Button/Button.js +2 -2
- package/dist/esm/components/Card/Badge.js +2 -2
- package/dist/esm/components/Card/Card.js +2 -2
- package/dist/esm/components/Card/index.d.ts +1 -1
- package/dist/esm/components/Component/index.d.ts +4 -4
- package/dist/esm/components/ConfigProvider/index.d.ts +38 -38
- package/dist/esm/components/Container/index.js +1 -1
- package/dist/esm/components/Control/Checkbox/Checkbox.d.ts +1 -1
- package/dist/esm/components/Control/Checkbox/Checkbox.js +5 -6
- package/dist/esm/components/Control/Checkbox/Group.d.ts +4 -4
- package/dist/esm/components/Control/Checkbox/Group.js +1 -1
- package/dist/esm/components/Control/Input/Input.js +1 -1
- package/dist/esm/components/Control/Input/Number/index.js +3 -3
- package/dist/esm/components/Control/Input/Password/index.js +3 -3
- package/dist/esm/components/Control/Input/types.d.ts +1 -1
- package/dist/esm/components/Control/Input/useInput.js +0 -1
- package/dist/esm/components/Control/Radio/Group.js +3 -4
- package/dist/esm/components/Control/Radio/Radio.d.ts +3 -3
- package/dist/esm/components/Control/Radio/Radio.js +6 -6
- package/dist/esm/components/Control/TextArea/index.js +1 -2
- package/dist/esm/components/Cover/index.js +6 -8
- package/dist/esm/components/DatePicker/generatePicker.d.ts +5 -5
- package/dist/esm/components/DatePicker/generatePicker.js +1 -1
- package/dist/esm/components/DatePicker/generatePurePicker.js +3 -3
- package/dist/esm/components/DatePicker/generateSinglePicker.js +2 -3
- package/dist/esm/components/DatePicker/types.d.ts +2 -2
- package/dist/esm/components/Drawer/index.js +3 -3
- package/dist/esm/components/Drop/index.js +2 -2
- package/dist/esm/components/Flex/Flex.js +7 -7
- package/dist/esm/components/Grid/index.js +2 -2
- package/dist/esm/components/Heading/index.js +1 -1
- package/dist/esm/components/Icon/Icon.js +1 -1
- package/dist/esm/components/Inverse/index.js +2 -2
- package/dist/esm/components/Modal/index.js +2 -2
- package/dist/esm/components/Nav/Group/InternalNavItemGroup.d.ts +1 -1
- package/dist/esm/components/Nav/Header.d.ts +1 -1
- package/dist/esm/components/Nav/Item/InternalNavItem.js +2 -3
- package/dist/esm/components/Nav/Nav.d.ts +17 -17
- package/dist/esm/components/Nav/Nav.js +10 -10
- package/dist/esm/components/Nav/Sub/InlineSubNavList.d.ts +2 -2
- package/dist/esm/components/Nav/Sub/InlineSubNavList.js +2 -2
- package/dist/esm/components/Nav/Sub/PopupTrigger.d.ts +1 -1
- package/dist/esm/components/Nav/Sub/PopupTrigger.js +1 -1
- package/dist/esm/components/Nav/Sub/SubNavList.js +3 -3
- package/dist/esm/components/Nav/Sub/index.d.ts +3 -3
- package/dist/esm/components/Nav/Sub/index.js +3 -3
- package/dist/esm/components/Nav/context/NavContext.d.ts +1 -1
- package/dist/esm/components/Nav/context/NavContext.js +2 -2
- package/dist/esm/components/Nav/hooks/useAccessibility.js +4 -4
- package/dist/esm/components/Nav/hooks/useDirectionStyle.js +1 -1
- package/dist/esm/components/Nav/hooks/useKeyRecords.d.ts +4 -4
- package/dist/esm/components/Nav/hooks/useMemoCallback.js +0 -1
- package/dist/esm/components/Nav/types.d.ts +10 -10
- package/dist/esm/components/Nav/utils/alignUtil.js +1 -1
- package/dist/esm/components/Nav/utils/nodeUtil.js +1 -1
- package/dist/esm/components/Navbar/Nav.js +1 -1
- package/dist/esm/components/Overlay/index.js +1 -1
- package/dist/esm/components/Section/index.js +2 -2
- package/dist/esm/components/Segmented/index.d.ts +1 -1
- package/dist/esm/components/Segmented/index.js +1 -1
- package/dist/esm/components/Spinner/index.js +1 -1
- package/dist/esm/components/Switch/index.js +2 -2
- package/dist/esm/components/Tabs/index.js +2 -4
- package/dist/esm/components/Text/index.js +20 -2
- package/dist/esm/components/Tile/index.js +2 -2
- package/dist/esm/components/Width/Width.js +1 -1
- package/dist/esm/components/Width/index.d.ts +1 -1
- package/dist/esm/components/Width/index.js +1 -1
- package/dist/esm/index.js +1 -0
- package/package.json +23 -25
- package/styles/text.scss +66 -0
|
@@ -5,7 +5,7 @@ import isEqual from 'rc-util/lib/isEqual';
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import * as ReactDOM from 'react-dom';
|
|
7
7
|
import { useConfig } from '../../components/ConfigProvider';
|
|
8
|
-
import {
|
|
8
|
+
import { getNavId, IdContext } from '../../components/Nav/context/IdContext';
|
|
9
9
|
import { NavContextProvider } from '../../components/Nav/context/NavContext';
|
|
10
10
|
import { PathRegisterContext, PathUserContext } from '../../components/Nav/context/PathContext';
|
|
11
11
|
import { PrivateContext } from '../../components/Nav/context/PrivateContext';
|
|
@@ -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,
|
|
25
|
+
const { _internalRenderMenuItem, _internalRenderSubMenuItem, activeKey, builtinPlacements, children, className, defaultActiveFirst, prefixCls = config.prefixCls, defaultMotions = {
|
|
26
26
|
horizontal: {
|
|
27
27
|
motionName: getMotionName(prefixCls || config.prefixCls, 'slide-bottom-small'),
|
|
28
28
|
},
|
|
@@ -31,7 +31,7 @@ export const Nav = React.forwardRef((props, ref) => {
|
|
|
31
31
|
leavedClassName: `${prefixCls || config.prefixCls}-hidden`,
|
|
32
32
|
motionName: getMotionName(prefixCls || config.prefixCls, 'zoom'),
|
|
33
33
|
},
|
|
34
|
-
}, selectable = false, selectedKeys, style, subNavCloseDelay = 0.1, subNavOpenDelay = 0.1, tabIndex = 0, triggerSubNavAction = 'hover', onClick, onDeselect, onKeyDown, onOpenChange, onSelect,
|
|
34
|
+
}, 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`, selectable = false, selectedKeys, style, subNavCloseDelay = 0.1, subNavOpenDelay = 0.1, tabIndex = 0, triggerSubNavAction = 'hover', onClick, onDeselect, onKeyDown, onOpenChange, onSelect, ...restProps } = props;
|
|
35
35
|
const childList = React.useMemo(() => parseItems(children, items, EMPTY_LIST), [children, items]);
|
|
36
36
|
const mounted = useMounted();
|
|
37
37
|
const containerRef = React.useRef(null);
|
|
@@ -109,7 +109,7 @@ export const Nav = React.forwardRef((props, ref) => {
|
|
|
109
109
|
};
|
|
110
110
|
}, []);
|
|
111
111
|
// ========================= Path =========================
|
|
112
|
-
const {
|
|
112
|
+
const { getKeyPath, getKeys, getSubPathKeys, isSubPathKey, refreshOverflowKeys, registerPath, unregisterPath, } = useKeyRecords();
|
|
113
113
|
const registerPathContext = React.useMemo(() => ({ registerPath, unregisterPath }), [registerPath, unregisterPath]);
|
|
114
114
|
const pathUserContext = React.useMemo(() => ({ isSubPathKey }), [isSubPathKey]);
|
|
115
115
|
React.useEffect(() => {
|
|
@@ -118,7 +118,6 @@ export const Nav = React.forwardRef((props, ref) => {
|
|
|
118
118
|
: childList.slice(lastVisibleIndex + 1).map(child => child.key));
|
|
119
119
|
}, [lastVisibleIndex, allVisible, refreshOverflowKeys, childList]);
|
|
120
120
|
// ======================== Active ========================
|
|
121
|
-
// eslint-disable-next-line function-paren-newline
|
|
122
121
|
const [mergedActiveKey, setMergedActiveKey] = useMergedState(activeKey || ((defaultActiveFirst && childList[0]?.key)), { value: activeKey });
|
|
123
122
|
const onActive = useMemoCallback((key) => {
|
|
124
123
|
setMergedActiveKey(key);
|
|
@@ -128,7 +127,8 @@ export const Nav = React.forwardRef((props, ref) => {
|
|
|
128
127
|
});
|
|
129
128
|
React.useImperativeHandle(ref, () => ({
|
|
130
129
|
focus: options => {
|
|
131
|
-
const shouldFocusKey = mergedActiveKey
|
|
130
|
+
const shouldFocusKey = mergedActiveKey
|
|
131
|
+
?? childList.find(node => !node.props.disabled)?.key;
|
|
132
132
|
if (shouldFocusKey) {
|
|
133
133
|
containerRef.current
|
|
134
134
|
?.querySelector(`li[data-nav-id='${getNavId(uuid, shouldFocusKey)}']`)
|
|
@@ -231,7 +231,7 @@ export const Nav = React.forwardRef((props, ref) => {
|
|
|
231
231
|
// Always wrap provider to avoid sub node re-mount
|
|
232
232
|
React.createElement(NavContextProvider, { key: child.key, overflowDisabled: index > lastVisibleIndex }, child)));
|
|
233
233
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'nav'), [config, prefixCls]);
|
|
234
|
-
const container = (React.createElement(Overflow, { className: classNames({
|
|
234
|
+
const container = (React.createElement(Overflow, { ref: containerRef, className: classNames({
|
|
235
235
|
[rootCls]: mergedMode !== 'horizontal',
|
|
236
236
|
}, (Array.isArray(modifiers) ? modifiers : [modifiers])
|
|
237
237
|
.filter(e => e)
|
|
@@ -240,12 +240,12 @@ export const Nav = React.forwardRef((props, ref) => {
|
|
|
240
240
|
[`${rootCls}-rtl`]: rootCls && isRtl,
|
|
241
241
|
}, className), component: "ul", data: wrappedChildList, "data-menu-list": true, dir: direction, id: id, itemComponent: Item, maxCount: (mergedMode !== 'horizontal' || disabledOverflow)
|
|
242
242
|
? Overflow.INVALIDATE
|
|
243
|
-
: Overflow.RESPONSIVE,
|
|
243
|
+
: Overflow.RESPONSIVE, prefixCls: rootCls, renderRawItem: node => node, renderRawRest: omitItems => {
|
|
244
244
|
// We use origin list since wrapped list use context to prevent open
|
|
245
245
|
const len = omitItems.length;
|
|
246
246
|
const originOmitItems = len ? childList.slice(-len) : null;
|
|
247
247
|
return (React.createElement(Sub, { disabled: allVisible, eventKey: OVERFLOW_KEY, internalPopupClose: len === 0, popupClassName: overflowedIndicatorPopupClassName, title: overflowedIndicator }, originOmitItems));
|
|
248
|
-
},
|
|
248
|
+
}, role: "menu", ssr: "full", style: style, tabIndex: tabIndex, onKeyDown: onInternalKeyDown, onVisibleChange: newLastIndex => {
|
|
249
249
|
setLastVisibleIndex(newLastIndex);
|
|
250
250
|
}, ...restProps }));
|
|
251
251
|
// >>>>> Render
|
|
@@ -253,6 +253,6 @@ export const Nav = React.forwardRef((props, ref) => {
|
|
|
253
253
|
React.createElement(IdContext.Provider, { value: uuid },
|
|
254
254
|
React.createElement(NavContextProvider, { activeKey: mergedActiveKey, builtinPlacements: builtinPlacements, defaultMotions: mounted ? defaultMotions : undefined, disabled: disabled, expandIcon: expandIcon, forceSubNavRender: forceSubNavRender, getPopupContainer: getInternalPopupContainer, itemIcon: itemIcon, mode: mergedMode, motion: mounted ? motion : undefined, openKeys: mergedOpenKeys, popupPrefixCls: popupPrefixCls, prefixCls: rootCls, rtl: isRtl, selectedKeys: mergedSelectKeys, subNavCloseDelay: subNavCloseDelay, subNavOpenDelay: subNavOpenDelay, triggerSubNavAction: triggerSubNavAction, onActive: onActive, onInactive: onInactive, onItemClick: onInternalClick, onOpenChange: onInternalOpenChange },
|
|
255
255
|
React.createElement(PathUserContext.Provider, { value: pathUserContext }, container),
|
|
256
|
-
React.createElement("div", { style: { display: 'none' }
|
|
256
|
+
React.createElement("div", { "aria-hidden": true, style: { display: 'none' } },
|
|
257
257
|
React.createElement(PathRegisterContext.Provider, { value: registerPathContext }, childList))))));
|
|
258
258
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface InlineSubNavListProps {
|
|
3
|
+
children: React.ReactNode;
|
|
3
4
|
id?: string;
|
|
4
|
-
open: boolean;
|
|
5
5
|
keyPath: string[];
|
|
6
|
-
|
|
6
|
+
open: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare function InlineSubNavList({ children, id, keyPath, open }: InlineSubNavListProps): React.JSX.Element | null;
|
|
9
9
|
export declare namespace InlineSubNavList {
|
|
@@ -7,7 +7,7 @@ import { getMotion } from '../../../components/Nav/utils/motionUtil';
|
|
|
7
7
|
export function InlineSubNavList({ children, id, keyPath, open }) {
|
|
8
8
|
const config = useConfig();
|
|
9
9
|
const fixedMode = 'inline';
|
|
10
|
-
const {
|
|
10
|
+
const { defaultMotions, forceSubNavRender, mode, motion, prefixCls, } = React.useContext(NavContext);
|
|
11
11
|
// Always use the latest mode check
|
|
12
12
|
const sameModeRef = React.useRef(false);
|
|
13
13
|
sameModeRef.current = mode === fixedMode;
|
|
@@ -39,7 +39,7 @@ export function InlineSubNavList({ children, id, keyPath, open }) {
|
|
|
39
39
|
if (destroy) {
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
|
-
return (React.createElement(NavContextProvider, {
|
|
42
|
+
return (React.createElement(NavContextProvider, { locked: !sameModeRef.current, mode: fixedMode, prefixCls: prefixCls },
|
|
43
43
|
React.createElement(CSSMotion, { visible: mergedOpen, ...mergedMotion, forceRender: forceSubNavRender, leavedClassName: `${config.prefixCls}-hidden`, removeOnLeave: false }, ({ className: motionClassName, style: motionStyle }) => (React.createElement(SubNavList, { className: motionClassName, id: id, style: motionStyle }, children)))));
|
|
44
44
|
}
|
|
45
45
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -11,7 +11,7 @@ export interface PopupTriggerProps {
|
|
|
11
11
|
visible: boolean;
|
|
12
12
|
onVisibleChange: (visible: boolean) => void;
|
|
13
13
|
}
|
|
14
|
-
export declare function PopupTrigger({
|
|
14
|
+
export declare function PopupTrigger({ children, disabled, mode, popup, popupClassName, popupOffset, prefixCls, visible, onVisibleChange, }: PopupTriggerProps): React.JSX.Element;
|
|
15
15
|
export declare namespace PopupTrigger {
|
|
16
16
|
var displayName: string;
|
|
17
17
|
}
|
|
@@ -13,7 +13,7 @@ const popupPlacementMap = {
|
|
|
13
13
|
'vertical-left': 'right-top',
|
|
14
14
|
'vertical-right': 'left-top',
|
|
15
15
|
};
|
|
16
|
-
export function PopupTrigger({
|
|
16
|
+
export function PopupTrigger({ children, disabled, mode, popup, popupClassName, popupOffset, prefixCls, visible, onVisibleChange, }) {
|
|
17
17
|
const config = useConfig();
|
|
18
18
|
const { builtinPlacements, defaultMotions, forceSubNavRender, getPopupContainer, motion, rtl, subNavCloseDelay = 300, subNavOpenDelay, triggerSubNavAction = 'hover', } = React.useContext(NavContext);
|
|
19
19
|
const [innerVisible, setInnerVisible] = React.useState(false);
|
|
@@ -4,10 +4,10 @@ import { NavContext } from '../../../components/Nav/context/NavContext';
|
|
|
4
4
|
export const SubNavList = React.forwardRef(({ children, className, ...restProps }, ref) => {
|
|
5
5
|
const { mode, prefixCls, rtl } = React.useContext(NavContext);
|
|
6
6
|
return (React.createElement("ul", { className: classNames({
|
|
7
|
-
[prefixCls]: mode !== 'inline',
|
|
8
|
-
[`${prefixCls}-sub`]: mode === 'inline',
|
|
9
7
|
[`${prefixCls}-sub-rtl`]: rtl && mode === 'inline',
|
|
10
|
-
|
|
8
|
+
[`${prefixCls}-sub`]: mode === 'inline',
|
|
9
|
+
[prefixCls]: mode !== 'inline',
|
|
10
|
+
}, className), ...restProps, ref: ref, "data-nav-list": "" }, children));
|
|
11
11
|
});
|
|
12
12
|
if (process.env.NODE_ENV !== 'production') {
|
|
13
13
|
SubNavList.displayName = 'Nav.SubNavList';
|
|
@@ -2,11 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import { type SubNavType } from '../../../components/Nav/types';
|
|
3
3
|
export interface SubNavProps extends Omit<SubNavType, 'children' | 'key' | 'label'> {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
title?: React.ReactNode;
|
|
6
|
-
/** @private Used for rest popup. Do not use in your prod */
|
|
7
|
-
internalPopupClose?: boolean;
|
|
8
5
|
/** @private Internal filled key. Do not set it directly */
|
|
9
6
|
eventKey?: string;
|
|
7
|
+
/** @private Used for rest popup. Do not use in your prod */
|
|
8
|
+
internalPopupClose?: boolean;
|
|
9
|
+
title?: React.ReactNode;
|
|
10
10
|
/** @private Do not use. Private warning empty usage */
|
|
11
11
|
warnKey?: boolean;
|
|
12
12
|
}
|
|
@@ -116,7 +116,7 @@ function InternalSubNav(props) {
|
|
|
116
116
|
// =============================== Render ===============================
|
|
117
117
|
const popupId = domDataId ? `${domDataId}-dropdown` : undefined;
|
|
118
118
|
// Title
|
|
119
|
-
let titleNode = (React.createElement("a", {
|
|
119
|
+
let titleNode = (React.createElement("a", { ref: elementRef, "aria-controls": popupId, "aria-disabled": disabled, "aria-expanded": open, "aria-haspopup": true, "data-nav-id": overflowDisabled && domDataId ? null : domDataId, role: disabled ? undefined : 'menuitem', style: { ...directionStyle }, tabIndex: disabled ? undefined : -1, title: typeof title === 'string' ? title : undefined, onClick: onInternalTitleClick, onFocus: onInternalFocus, ...activeProps },
|
|
120
120
|
React.createElement(React.Fragment, { key: "children" },
|
|
121
121
|
title,
|
|
122
122
|
typeof mergedExpandIcon === 'function' ? mergedExpandIcon({
|
|
@@ -141,7 +141,7 @@ function InternalSubNav(props) {
|
|
|
141
141
|
, {
|
|
142
142
|
// Special handle of horizontal mode
|
|
143
143
|
mode: triggerMode === 'horizontal' ? 'vertical' : triggerMode },
|
|
144
|
-
React.createElement(SubNavList, { className: `${popupPrefixCls}-nav`, id: popupId
|
|
144
|
+
React.createElement(SubNavList, { ref: popupRef, className: `${popupPrefixCls}-nav`, id: popupId }, children))), popupClassName: popupClassName, popupOffset: popupOffset, prefixCls: popupPrefixCls, visible: !internalPopupClose && open && mode !== 'inline', onVisibleChange: onPopupVisibleChange }, titleNode));
|
|
145
145
|
}
|
|
146
146
|
// List node
|
|
147
147
|
let listNode = (React.createElement(Overflow.Item, { className: classNames('uk-parent', className, {
|
|
@@ -151,7 +151,7 @@ function InternalSubNav(props) {
|
|
|
151
151
|
'uk-open': open,
|
|
152
152
|
}), role: "none", ...restProps, component: "li", style: style, onMouseEnter: onInternalMouseEnter, onMouseLeave: onInternalMouseLeave },
|
|
153
153
|
titleNode,
|
|
154
|
-
!overflowDisabled && (React.createElement(InlineSubNavList, { id: popupId,
|
|
154
|
+
!overflowDisabled && (React.createElement(InlineSubNavList, { id: popupId, keyPath: connectedPath, open: open }, children))));
|
|
155
155
|
if (_internalRenderSubMenuItem) {
|
|
156
156
|
listNode = _internalRenderSubMenuItem(listNode, props, {
|
|
157
157
|
active: !!mergedActive,
|
|
@@ -21,8 +21,8 @@ export interface NavContextProps {
|
|
|
21
21
|
prefixCls: string;
|
|
22
22
|
rtl?: boolean;
|
|
23
23
|
selectedKeys: string[];
|
|
24
|
-
subNavOpenDelay: number;
|
|
25
24
|
subNavCloseDelay: number;
|
|
25
|
+
subNavOpenDelay: number;
|
|
26
26
|
triggerSubNavAction?: TriggerSubNavAction;
|
|
27
27
|
onActive: (key: string) => void;
|
|
28
28
|
onInactive: (key: string) => void;
|
|
@@ -10,10 +10,10 @@ export const NavContext = React.createContext({
|
|
|
10
10
|
function mergeProps(origin, target) {
|
|
11
11
|
const clone = { ...origin };
|
|
12
12
|
Object.keys(target).forEach(key => {
|
|
13
|
-
// @ts-ignore
|
|
13
|
+
// @ts-ignore bla bla ts
|
|
14
14
|
const value = target[key];
|
|
15
15
|
if (value !== undefined) {
|
|
16
|
-
// @ts-ignore
|
|
16
|
+
// @ts-ignore bla bla ts
|
|
17
17
|
clone[key] = value;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -4,7 +4,7 @@ import raf from '@rc-component/util/lib/raf';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { getNavId } from '../../../components/Nav/context/IdContext';
|
|
6
6
|
// destruct to reduce minify size
|
|
7
|
-
const {
|
|
7
|
+
const { DOWN, ENTER, ESC, LEFT, RIGHT, UP } = KeyCode;
|
|
8
8
|
const ArrowKeys = [UP, DOWN, LEFT, RIGHT];
|
|
9
9
|
function getOffset(mode, isRootLevel, isRtl, which) {
|
|
10
10
|
const prev = 'prev';
|
|
@@ -140,7 +140,7 @@ export function useAccessibility(mode, activeKey, isRtl, id, containerRef, getKe
|
|
|
140
140
|
const { which } = event;
|
|
141
141
|
if ([...ArrowKeys, ENTER, ESC].includes(which)) {
|
|
142
142
|
// Convert key to elements
|
|
143
|
-
let
|
|
143
|
+
let element2key = new Map(), elements = new Set(), key2element = new Map();
|
|
144
144
|
// >>> Wrap as function since we use raf for some case
|
|
145
145
|
const refreshElements = () => {
|
|
146
146
|
elements = new Set();
|
|
@@ -211,9 +211,9 @@ export function useAccessibility(mode, activeKey, isRtl, id, containerRef, getKe
|
|
|
211
211
|
}
|
|
212
212
|
// Get next focus element
|
|
213
213
|
const targetElement = getNextFocusElement(parentQueryContainer,
|
|
214
|
-
// @ts-ignore
|
|
214
|
+
// @ts-ignore bla bla ts
|
|
215
215
|
elements,
|
|
216
|
-
// @ts-ignore
|
|
216
|
+
// @ts-ignore bla bla ts
|
|
217
217
|
focusMenuElement, offsetObj.offset);
|
|
218
218
|
if (targetElement == null) {
|
|
219
219
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { NavContext } from '../../../components/Nav/context/NavContext';
|
|
3
3
|
export function useDirectionStyle(level) {
|
|
4
|
-
const { mode, rtl
|
|
4
|
+
const { inlineIndent, mode, rtl } = React.useContext(NavContext);
|
|
5
5
|
if (mode !== 'inline') {
|
|
6
6
|
return null;
|
|
7
7
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const OVERFLOW_KEY = "rc-menu-more";
|
|
2
2
|
type KeyRecords = {
|
|
3
|
-
registerPath: (key: string, keyPath: string[]) => void;
|
|
4
|
-
unregisterPath: (key: string, keyPath: string[]) => void;
|
|
5
|
-
refreshOverflowKeys: (keys: string[]) => void;
|
|
6
|
-
isSubPathKey: (pathKeys: string[], eventKey: string) => boolean;
|
|
7
3
|
getKeyPath: (eventKey: string, includeOverflow?: boolean | undefined) => string[];
|
|
8
4
|
getKeys: () => string[];
|
|
9
5
|
getSubPathKeys: (key: string) => Set<string>;
|
|
6
|
+
isSubPathKey: (pathKeys: string[], eventKey: string) => boolean;
|
|
7
|
+
refreshOverflowKeys: (keys: string[]) => void;
|
|
8
|
+
registerPath: (key: string, keyPath: string[]) => void;
|
|
9
|
+
unregisterPath: (key: string, keyPath: string[]) => void;
|
|
10
10
|
};
|
|
11
11
|
export declare function useKeyRecords(): KeyRecords;
|
|
12
12
|
export {};
|
|
@@ -6,7 +6,6 @@ import * as React from 'react';
|
|
|
6
6
|
export function useMemoCallback(func) {
|
|
7
7
|
const funRef = React.useRef(func);
|
|
8
8
|
funRef.current = func;
|
|
9
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10
9
|
const callback = React.useCallback(((...args) => funRef.current?.(...args)), []);
|
|
11
10
|
return typeof func === 'function' ? callback : undefined;
|
|
12
11
|
}
|
|
@@ -13,35 +13,35 @@ interface ItemSharedProps {
|
|
|
13
13
|
style?: React.CSSProperties;
|
|
14
14
|
}
|
|
15
15
|
export interface SubNavType extends ItemSharedProps {
|
|
16
|
-
label?: React.ReactNode;
|
|
17
16
|
children: ItemType[];
|
|
18
17
|
disabled?: boolean;
|
|
19
|
-
key: string;
|
|
20
|
-
rootClassName?: string;
|
|
21
|
-
itemIcon?: RenderIconType;
|
|
22
18
|
expandIcon?: RenderIconType;
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
itemIcon?: RenderIconType;
|
|
20
|
+
key: string;
|
|
21
|
+
label?: React.ReactNode;
|
|
25
22
|
popupClassName?: string;
|
|
26
23
|
popupOffset?: number[];
|
|
24
|
+
rootClassName?: string;
|
|
27
25
|
onClick?: NavClickEventHandler;
|
|
26
|
+
onMouseEnter?: NavHoverEventHandler;
|
|
27
|
+
onMouseLeave?: NavHoverEventHandler;
|
|
28
28
|
onTitleClick?: (info: NavTitleInfo) => void;
|
|
29
29
|
onTitleMouseEnter?: NavHoverEventHandler;
|
|
30
30
|
onTitleMouseLeave?: NavHoverEventHandler;
|
|
31
31
|
}
|
|
32
32
|
export interface NavItemType extends ItemSharedProps {
|
|
33
|
-
label?: React.ReactNode;
|
|
34
33
|
disabled?: boolean;
|
|
35
34
|
itemIcon?: RenderIconType;
|
|
36
35
|
key: React.Key;
|
|
36
|
+
label?: React.ReactNode;
|
|
37
|
+
onClick?: NavClickEventHandler;
|
|
37
38
|
onMouseEnter?: NavHoverEventHandler;
|
|
38
39
|
onMouseLeave?: NavHoverEventHandler;
|
|
39
|
-
onClick?: NavClickEventHandler;
|
|
40
40
|
}
|
|
41
41
|
export interface NavItemGroupType extends ItemSharedProps {
|
|
42
|
-
type: 'group';
|
|
43
|
-
label?: React.ReactNode;
|
|
44
42
|
children?: ItemType[];
|
|
43
|
+
label?: React.ReactNode;
|
|
44
|
+
type: 'group';
|
|
45
45
|
}
|
|
46
46
|
export interface NavDividerType extends ItemSharedProps {
|
|
47
47
|
type: 'divider';
|
|
@@ -16,7 +16,7 @@ export function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAl
|
|
|
16
16
|
const placements = Object.keys(builtinPlacements);
|
|
17
17
|
for (let i = 0; i < placements.length; i += 1) {
|
|
18
18
|
const placement = placements[i];
|
|
19
|
-
// @ts-ignore
|
|
19
|
+
// @ts-ignore bla bla ts
|
|
20
20
|
if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {
|
|
21
21
|
return `${prefixCls}-${placement}`;
|
|
22
22
|
}
|
|
@@ -29,7 +29,7 @@ function convertItemsToNodes(list) {
|
|
|
29
29
|
return (list || [])
|
|
30
30
|
.map((opt, index) => {
|
|
31
31
|
if (opt && typeof opt === 'object') {
|
|
32
|
-
const {
|
|
32
|
+
const { children, key, label, type, ...restProps } = opt;
|
|
33
33
|
const mergedKey = key ?? `tmp-${index}`;
|
|
34
34
|
// MenuItemGroup & SubMenuItem
|
|
35
35
|
if (children || type === 'group') {
|
|
@@ -6,7 +6,7 @@ export function Nav(props) {
|
|
|
6
6
|
const config = useConfig();
|
|
7
7
|
const { className, prefixCls = config.prefixCls, ...restProps } = props;
|
|
8
8
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar'), [config, prefixCls]);
|
|
9
|
-
return (React.createElement(BaseNav, { className: classNames(`${rootCls}-nav`, className), popupPrefixCls: `${rootCls}-dropdown`,
|
|
9
|
+
return (React.createElement(BaseNav, { className: classNames(`${rootCls}-nav`, className), mode: "horizontal", popupPrefixCls: `${rootCls}-dropdown`, ...restProps }));
|
|
10
10
|
}
|
|
11
11
|
if (process.env.NODE_ENV !== 'production') {
|
|
12
12
|
Nav.displayName = 'Navbar.Nav';
|
|
@@ -21,8 +21,8 @@ export function Overlay(props) {
|
|
|
21
21
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'overlay'), [config, prefixCls]);
|
|
22
22
|
const positionRootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'position'), [config, prefixCls]);
|
|
23
23
|
return (React.createElement(Component, { className: classNames(rootCls, {
|
|
24
|
+
[`${positionRootCls}-${position}`]: position && positions.includes(position),
|
|
24
25
|
[`${rootCls}-${type}`]: type && ['default', 'primary'].includes(type),
|
|
25
26
|
[`${rootCls}-icon`]: icon,
|
|
26
|
-
[`${positionRootCls}-${position}`]: position && positions.includes(position),
|
|
27
27
|
}, className), component: defaultElement, ...restProps }));
|
|
28
28
|
}
|
|
@@ -8,8 +8,8 @@ export function Section(props) {
|
|
|
8
8
|
const { className, kind, prefixCls = config.prefixCls, preserveColor, size, ...restProps } = props;
|
|
9
9
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'section'), [config, prefixCls]);
|
|
10
10
|
return (React.createElement(Component, { className: classNames(rootCls, {
|
|
11
|
-
[`${rootCls}-${size}`]: size && ['xsmall', 'small', 'large', 'xlarge'].includes(size),
|
|
12
|
-
[`${rootCls}-${kind}`]: kind && ['default', 'muted', 'primary', 'secondary', 'tertiary'].includes(kind),
|
|
13
11
|
[`${prefixCls || config.prefixCls}-preserve-color`]: preserveColor,
|
|
12
|
+
[`${rootCls}-${kind}`]: kind && ['default', 'muted', 'primary', 'secondary', 'tertiary'].includes(kind),
|
|
13
|
+
[`${rootCls}-${size}`]: size && ['xsmall', 'small', 'large', 'xlarge'].includes(size),
|
|
14
14
|
}, className), component: defaultElement, ...restProps }));
|
|
15
15
|
}
|
|
@@ -6,8 +6,8 @@ interface SegmentedLabeledOptionWithoutIcon<ValueType = RcSegmentedValue> extend
|
|
|
6
6
|
label: RcSegmentedLabeledOption['label'];
|
|
7
7
|
}
|
|
8
8
|
interface SegmentedLabeledOptionWithIcon<ValueType = RcSegmentedValue> extends Omit<RcSegmentedLabeledOption<ValueType>, 'label'> {
|
|
9
|
-
label?: RcSegmentedLabeledOption['label'];
|
|
10
9
|
icon: React.ReactNode;
|
|
10
|
+
label?: RcSegmentedLabeledOption['label'];
|
|
11
11
|
}
|
|
12
12
|
export type SegmentedLabeledOption<ValueType = RcSegmentedValue> = SegmentedLabeledOptionWithIcon<ValueType> | SegmentedLabeledOptionWithoutIcon<ValueType>;
|
|
13
13
|
export type SegmentedOptions<T = SegmentedRawOption> = (T | SegmentedLabeledOption<T>)[];
|
|
@@ -10,7 +10,7 @@ export function Segmented(props) {
|
|
|
10
10
|
const { className, options = [], prefixCls = config.prefixCls, size, vertical, ...restProps } = props;
|
|
11
11
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'segmented'), [config, prefixCls]);
|
|
12
12
|
const mergedOptions = React.useMemo(() => options.map(option => {
|
|
13
|
-
// @ts-ignore
|
|
13
|
+
// @ts-ignore bla bla ts
|
|
14
14
|
if (isSegmentedLabeledOptionWithIcon(option)) {
|
|
15
15
|
const { icon, label, ...restOpts } = option;
|
|
16
16
|
return {
|
|
@@ -7,5 +7,5 @@ export function Spinner(props) {
|
|
|
7
7
|
const { className, prefixCls = config.prefixCls, ratio, ...restProps } = props;
|
|
8
8
|
return (React.createElement("div", { className: classNames([`${prefixCls || config.prefixCls}-spinner`, `${prefixCls || config.prefixCls}-icon`], className), role: "status", ...restProps },
|
|
9
9
|
React.createElement("svg", { ...defaultSvgProps, ...getSize(20, 20, ratio), viewBox: "0 0 30 30" },
|
|
10
|
-
React.createElement("circle", {
|
|
10
|
+
React.createElement("circle", { cx: 15, cy: 15, fill: "none", r: 13, stroke: "currentColor", style: { strokeWidth: `${(2 / (ratio ?? 1)).toFixed(6)}px` } }))));
|
|
11
11
|
}
|
|
@@ -10,8 +10,8 @@ export const Switch = React.forwardRef((props, ref) => {
|
|
|
10
10
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'switch'), [config, prefixCls]);
|
|
11
11
|
const mergedLoadingIcon = React.useMemo(() => (React.createElement("div", { className: `${rootCls}-handle` }, loading && (loadingIcon ?? React.createElement(Spinner, { className: `${rootCls}-loading-icon` })))), [loading, loadingIcon, rootCls]);
|
|
12
12
|
return (React.createElement(RcSwitch, { ref: ref, className: classNames({
|
|
13
|
-
[`${rootCls}-small`]: size === 'small',
|
|
14
13
|
[`${rootCls}-loading`]: loading,
|
|
15
14
|
[`${rootCls}-rtl`]: direction === 'rtl',
|
|
16
|
-
|
|
15
|
+
[`${rootCls}-small`]: size === 'small',
|
|
16
|
+
}, className), loadingIcon: mergedLoadingIcon, prefixCls: rootCls, ...restProps }));
|
|
17
17
|
});
|
|
@@ -14,9 +14,7 @@ export function Tabs(props) {
|
|
|
14
14
|
addIcon: addIcon || React.createElement(Icon, { icon: "add" }),
|
|
15
15
|
removeIcon: React.createElement(Icon, { icon: "close" }),
|
|
16
16
|
showAdd: hideAdd !== true,
|
|
17
|
-
|
|
18
|
-
onEdit: (editType, { key, event }) => {
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
|
+
onEdit: (editType, { event, key }) => {
|
|
20
18
|
onEdit?.(editType === 'add' ? event : key, editType);
|
|
21
19
|
},
|
|
22
20
|
}
|
|
@@ -24,8 +22,8 @@ export function Tabs(props) {
|
|
|
24
22
|
return (React.createElement(RcTabs, { animated: useAnimateConfig(rootCls, animated), direction: direction, items: items, ...restProps, className: classNames({
|
|
25
23
|
[`${rootCls}-${size}`]: size,
|
|
26
24
|
[`${rootCls}-card`]: ['card', 'editable-card'].includes(type),
|
|
27
|
-
[`${rootCls}-editable-card`]: type === 'editable-card',
|
|
28
25
|
[`${rootCls}-centered`]: centered,
|
|
26
|
+
[`${rootCls}-editable-card`]: type === 'editable-card',
|
|
29
27
|
}, className), editable: editable, more: {
|
|
30
28
|
icon: React.createElement(Icon, { icon: "more_horizontal" }),
|
|
31
29
|
transitionName: getMotionName(prefixCls || config.prefixCls, 'slide-bottom-small'),
|
|
@@ -16,12 +16,30 @@ export function Text(props) {
|
|
|
16
16
|
: getBreakpointsConfigClasses(prefixCls || config.prefixCls, 'column-1', column)), [column, config.prefixCls, prefixCls]);
|
|
17
17
|
return (React.createElement(Component, { className: classNames(columnClassName, alignClassName, {
|
|
18
18
|
[`${prefixCls || config.prefixCls}-dropcap`]: dropcap,
|
|
19
|
-
[`${rootCls}-${color}`]: color && [
|
|
19
|
+
[`${rootCls}-${color}`]: color && [
|
|
20
|
+
'muted',
|
|
21
|
+
'emphasis',
|
|
22
|
+
'primary',
|
|
23
|
+
'secondary',
|
|
24
|
+
'tertiary',
|
|
25
|
+
'success',
|
|
26
|
+
'warning',
|
|
27
|
+
'danger',
|
|
28
|
+
].includes(color),
|
|
20
29
|
[`${rootCls}-${kind}`]: kind && ['meta', 'lead', 'base'].includes(kind),
|
|
21
30
|
[`${rootCls}-${size}`]: size && ['xsmall', 'small', 'large'].includes(size),
|
|
22
31
|
[`${rootCls}-${transform}`]: transform && ['capitalize', 'uppercase', 'lowercase'].includes(transform),
|
|
23
32
|
[`${rootCls}-${verticalAlign}`]: verticalAlign && ['top', 'middle', 'bottom', 'baseline'].includes(verticalAlign),
|
|
24
|
-
[`${rootCls}-${weight}`]: weight && [
|
|
33
|
+
[`${rootCls}-${weight}`]: weight && [
|
|
34
|
+
'thin',
|
|
35
|
+
'light',
|
|
36
|
+
'normal',
|
|
37
|
+
'medium',
|
|
38
|
+
'semibold',
|
|
39
|
+
'bold',
|
|
40
|
+
'lighter',
|
|
41
|
+
'bolder',
|
|
42
|
+
].includes(weight),
|
|
25
43
|
[`${rootCls}-${wrap}`]: wrap && ['truncate', 'break', 'nowrap'].includes(wrap),
|
|
26
44
|
[`${rootCls}-decoration-none`]: decoration === 'none',
|
|
27
45
|
[`${rootCls}-italic`]: italic,
|
|
@@ -8,8 +8,8 @@ export function Tile(props) {
|
|
|
8
8
|
const { className, kind, prefixCls = config.prefixCls, preserveColor, size, ...restProps } = props;
|
|
9
9
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'tile'), [config, prefixCls]);
|
|
10
10
|
return (React.createElement(Component, { className: classNames(rootCls, {
|
|
11
|
-
[`${rootCls}-${size}`]: size && ['xsmall', 'small', 'large', 'xlarge'].includes(size),
|
|
12
|
-
[`${rootCls}-${kind}`]: kind && ['default', 'muted', 'primary', 'secondary', 'tertiary'].includes(kind),
|
|
13
11
|
[`${prefixCls || config.prefixCls}-preserve-color`]: preserveColor,
|
|
12
|
+
[`${rootCls}-${kind}`]: kind && ['default', 'muted', 'primary', 'secondary', 'tertiary'].includes(kind),
|
|
13
|
+
[`${rootCls}-${size}`]: size && ['xsmall', 'small', 'large', 'xlarge'].includes(size),
|
|
14
14
|
}, className), component: defaultElement, ...restProps }));
|
|
15
15
|
}
|
|
@@ -6,6 +6,6 @@ import { getWidthClassname } from '../../components/Width/utils';
|
|
|
6
6
|
const defaultElement = 'div';
|
|
7
7
|
export function Width(props) {
|
|
8
8
|
const config = useConfig();
|
|
9
|
-
const { className, prefixCls = config.prefixCls,
|
|
9
|
+
const { className, l, m, prefixCls = config.prefixCls, s, size, xl, ...restProps } = props;
|
|
10
10
|
return (React.createElement(Component, { className: classNames(getWidthClassname(size, prefixCls || config.prefixCls), getWidthClassname({ l, m, s, xl }, prefixCls || config.prefixCls), className), component: defaultElement, ...restProps }));
|
|
11
11
|
}
|
package/dist/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broxus/react-uikit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "React-based UIkit library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -30,9 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|
|
33
|
-
"styles"
|
|
34
|
-
"LICENSE",
|
|
35
|
-
"README.md"
|
|
33
|
+
"styles"
|
|
36
34
|
],
|
|
37
35
|
"main": "./dist/cjs/index.js",
|
|
38
36
|
"module": "./dist/esm/index.js",
|
|
@@ -58,39 +56,39 @@
|
|
|
58
56
|
"prepare": "npx yarn cleanup && npx yarn build"
|
|
59
57
|
},
|
|
60
58
|
"dependencies": {
|
|
61
|
-
"@broxus/js-utils": "^1.5.
|
|
62
|
-
"@rc-component/collapse": "^1.1.
|
|
63
|
-
"@rc-component/dialog": "^1.
|
|
64
|
-
"@rc-component/drawer": "
|
|
59
|
+
"@broxus/js-utils": "^1.5.1",
|
|
60
|
+
"@rc-component/collapse": "^1.1.1",
|
|
61
|
+
"@rc-component/dialog": "^1.5.0",
|
|
62
|
+
"@rc-component/drawer": "1.1.0",
|
|
65
63
|
"@rc-component/dropdown": "^1.0.0",
|
|
66
|
-
"@rc-component/input": "^1.1.
|
|
67
|
-
"@rc-component/input-number": "^1.
|
|
64
|
+
"@rc-component/input": "^1.1.1",
|
|
65
|
+
"@rc-component/input-number": "^1.3.0",
|
|
68
66
|
"@rc-component/motion": "^1.1.4",
|
|
69
|
-
"@rc-component/picker": "^1.
|
|
67
|
+
"@rc-component/picker": "^1.6.0",
|
|
70
68
|
"@rc-component/resize-observer": "^1.0.0",
|
|
71
|
-
"@rc-component/segmented": "^1.2.
|
|
72
|
-
"@rc-component/select": "^1.1.
|
|
73
|
-
"@rc-component/switch": "^1.0.
|
|
74
|
-
"@rc-component/tabs": "^1.
|
|
75
|
-
"@rc-component/textarea": "^1.1.
|
|
76
|
-
"@rc-component/trigger": "^3.
|
|
77
|
-
"@rc-component/util": "^1.
|
|
69
|
+
"@rc-component/segmented": "^1.2.2",
|
|
70
|
+
"@rc-component/select": "^1.1.5",
|
|
71
|
+
"@rc-component/switch": "^1.0.2",
|
|
72
|
+
"@rc-component/tabs": "^1.6.0",
|
|
73
|
+
"@rc-component/textarea": "^1.1.1",
|
|
74
|
+
"@rc-component/trigger": "^3.6.15",
|
|
75
|
+
"@rc-component/util": "^1.3.0",
|
|
78
76
|
"classnames": "^2.5.1",
|
|
79
77
|
"rc-motion": "npm:@rc-component/motion@^1.1.4",
|
|
80
78
|
"rc-overflow": "^1.4.1",
|
|
81
79
|
"rc-resize-observer": "npm:@rc-component/resize-observer@^1.0.0",
|
|
82
|
-
"rc-slider": "^11.1.
|
|
83
|
-
"rc-util": "npm:@rc-component/util@^1.
|
|
80
|
+
"rc-slider": "^11.1.9",
|
|
81
|
+
"rc-util": "npm:@rc-component/util@^1.3.0",
|
|
84
82
|
"shallowequal": "^1.1.0",
|
|
85
|
-
"uikit": "^3.
|
|
86
|
-
},
|
|
87
|
-
"optionalDependencies": {
|
|
88
|
-
"luxon": "^3.7.0"
|
|
83
|
+
"uikit": "^3.24.2"
|
|
89
84
|
},
|
|
90
85
|
"peerDependencies": {
|
|
91
86
|
"luxon": "^3.7.0",
|
|
92
87
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
93
88
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
94
89
|
},
|
|
95
|
-
"
|
|
90
|
+
"resolutions": {
|
|
91
|
+
"@rc-component/input": "^1.1.1"
|
|
92
|
+
},
|
|
93
|
+
"gitHead": "fa7a48a57ed1ad72d4d2dea298cf15a00cf56753"
|
|
96
94
|
}
|