@broxus/react-uikit 0.14.1 → 0.15.1
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/Accordion/Accordion.js +1 -2
- package/dist/cjs/components/Accordion/Item.js +1 -2
- package/dist/cjs/components/Align/Align.js +1 -2
- package/dist/cjs/components/Align/Left.js +1 -2
- package/dist/cjs/components/Align/Right.js +1 -2
- package/dist/cjs/components/Article/Article.js +1 -2
- package/dist/cjs/components/Article/Meta.js +1 -2
- package/dist/cjs/components/Article/Title.js +1 -2
- package/dist/cjs/components/Badge/index.js +1 -2
- package/dist/cjs/components/Breadcrumb/Breadcrumb.js +1 -2
- package/dist/cjs/components/Breadcrumb/Item.js +1 -2
- package/dist/cjs/components/Button/Group.js +1 -2
- package/dist/cjs/components/Button/index.scss +42 -0
- package/dist/cjs/components/Card/Badge.js +1 -2
- package/dist/cjs/components/Card/Body.js +1 -2
- package/dist/cjs/components/Card/Card.d.ts +1 -1
- package/dist/cjs/components/Card/Card.js +1 -2
- package/dist/cjs/components/Card/Footer.js +1 -2
- package/dist/cjs/components/Card/Header.js +1 -2
- package/dist/cjs/components/Card/Media.js +1 -2
- package/dist/cjs/components/Card/Title.js +1 -2
- package/dist/cjs/components/Card/index.scss +4 -0
- package/dist/cjs/components/Close/index.js +1 -2
- package/dist/cjs/components/ConfigProvider/index.d.ts +1 -1
- package/dist/cjs/components/ConfigProvider/index.js +3 -3
- package/dist/cjs/components/Container/index.d.ts +1 -1
- package/dist/cjs/components/Control/Checkbox/CheckboxGroupContext.js +2 -2
- package/dist/cjs/components/Control/Checkbox/index.d.ts +2 -2
- package/dist/cjs/components/Control/Input/useInput.js +2 -3
- package/dist/cjs/components/Control/Radio/RadioGroupContext.js +2 -2
- package/dist/cjs/components/Control/Radio/index.d.ts +2 -2
- package/dist/cjs/components/Control/Radio/index.scss +1 -1
- package/dist/cjs/components/Cover/index.js +1 -2
- package/dist/cjs/components/DescriptionList/Description.js +1 -2
- package/dist/cjs/components/DescriptionList/DescriptionList.js +1 -2
- package/dist/cjs/components/DescriptionList/Term.js +1 -2
- package/dist/cjs/components/Divider/index.js +1 -2
- package/dist/cjs/components/Divider/index.scss +1 -1
- package/dist/cjs/components/Dotnav/Dotnav.js +1 -2
- package/dist/cjs/components/Dotnav/Item.js +1 -2
- package/dist/cjs/components/Dropdown/index.scss +1 -0
- package/dist/cjs/components/Flex/Flex.js +1 -2
- package/dist/cjs/components/Flex/Item.js +1 -2
- package/dist/cjs/components/Form/Controls.js +1 -2
- package/dist/cjs/components/Form/ControlsText.js +1 -2
- package/dist/cjs/components/Form/Fieldset.js +1 -2
- package/dist/cjs/components/Form/Form.js +1 -2
- package/dist/cjs/components/Form/Label.js +1 -2
- package/dist/cjs/components/Form/Legend.js +1 -2
- package/dist/cjs/components/Grid/index.js +1 -2
- package/dist/cjs/components/Heading/index.js +1 -2
- package/dist/cjs/components/Icon/Button.js +1 -2
- package/dist/cjs/components/Icon/Icon.js +1 -2
- package/dist/cjs/components/Icon/Link.js +1 -2
- package/dist/cjs/components/Icon/get-size.js +1 -2
- package/dist/cjs/components/Iconnav/Iconnav.js +1 -2
- package/dist/cjs/components/Iconnav/Item.js +1 -2
- package/dist/cjs/components/Inverse/index.d.ts +21 -0
- package/dist/cjs/components/Inverse/index.js +78 -0
- package/dist/cjs/components/Label/index.js +1 -2
- package/dist/cjs/components/List/Item.js +1 -2
- package/dist/cjs/components/List/List.js +1 -2
- package/dist/cjs/components/Modal/Modal.js +1 -2
- package/dist/cjs/components/Nav/Divider.js +1 -2
- package/dist/cjs/components/Nav/Group/InternalNavItemGroup.js +1 -2
- package/dist/cjs/components/Nav/Header.js +1 -2
- package/dist/cjs/components/Nav/Item/InternalNavItem.js +1 -2
- package/dist/cjs/components/Nav/Sub/InlineSubNavList.js +1 -2
- package/dist/cjs/components/Nav/Sub/PopupTrigger.js +1 -2
- package/dist/cjs/components/Nav/Sub/index.js +1 -2
- package/dist/cjs/components/Nav/context/IdContext.js +3 -3
- package/dist/cjs/components/Nav/context/NavContext.js +2 -2
- package/dist/cjs/components/Nav/context/PathContext.js +3 -3
- package/dist/cjs/components/Nav/hooks/useAccessibility.js +1 -2
- package/dist/cjs/components/Nav/hooks/useActive.js +1 -2
- package/dist/cjs/components/Nav/hooks/useDirectionStyle.js +1 -2
- package/dist/cjs/components/Nav/hooks/useKeyRecords.js +2 -2
- package/dist/cjs/components/Nav/hooks/useMemoCallback.js +1 -2
- package/dist/cjs/components/Nav/hooks/useUUID.js +1 -2
- package/dist/cjs/components/Nav/utils/alignUtil.js +2 -3
- package/dist/cjs/components/Nav/utils/motionUtil.js +1 -2
- package/dist/cjs/components/Nav/utils/nodeUtil.js +2 -3
- package/dist/cjs/components/Nav/utils/timeUtil.js +1 -2
- package/dist/cjs/components/Nav/utils/warnUtil.js +1 -2
- package/dist/cjs/components/Navbar/Center.js +1 -2
- package/dist/cjs/components/Navbar/Container.js +1 -2
- package/dist/cjs/components/Navbar/Item.js +1 -2
- package/dist/cjs/components/Navbar/Left.js +1 -2
- package/dist/cjs/components/Navbar/Nav.js +1 -2
- package/dist/cjs/components/Navbar/Navbar.js +1 -2
- package/dist/cjs/components/Navbar/Right.js +1 -2
- package/dist/cjs/components/Navbar/Toggle.js +1 -2
- package/dist/cjs/components/Navbar/index.scss +1 -0
- package/dist/cjs/components/Overlay/index.d.ts +13 -0
- package/dist/cjs/components/Overlay/index.js +58 -0
- package/dist/cjs/components/Overlay/index.scss +105 -0
- package/dist/cjs/components/Progress/index.js +1 -2
- package/dist/cjs/components/Section/index.js +1 -2
- package/dist/cjs/components/Section/index.scss +29 -0
- package/dist/cjs/components/Spinner/index.js +1 -2
- package/dist/cjs/components/Subnav/Item.js +1 -2
- package/dist/cjs/components/Subnav/Subnav.js +1 -2
- package/dist/cjs/components/Tabs/hooks/useAnimateConfig.js +1 -2
- package/dist/cjs/components/Tabs/index.js +1 -2
- package/dist/cjs/components/Text/index.d.ts +1 -0
- package/dist/cjs/components/Text/index.js +2 -2
- package/dist/cjs/components/Text/index.scss +2 -0
- package/dist/cjs/components/Tile/index.js +1 -2
- package/dist/cjs/components/Tile/index.scss +31 -0
- package/dist/cjs/components/Width/Width.js +1 -2
- package/dist/cjs/components/Width/utils.js +2 -3
- package/dist/cjs/hooks/useContext.js +1 -2
- package/dist/cjs/hooks/useForceUpdate.js +1 -2
- package/dist/cjs/hooks/useMounted.js +1 -2
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/styles/_import.scss +1 -1
- package/dist/cjs/styles/inverse.scss +8 -0
- package/dist/cjs/styles/mixins.scss +7 -2
- package/dist/cjs/styles/overlay.scss +1 -105
- package/dist/cjs/styles/variables.scss +5 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/utils/get-breakpoints-config-classes.js +1 -2
- package/dist/cjs/utils/modal.js +2 -3
- package/dist/cjs/utils/motion.js +3 -4
- package/dist/esm/components/Button/index.scss +42 -0
- package/dist/esm/components/Card/Card.d.ts +1 -1
- package/dist/esm/components/Card/index.scss +4 -0
- package/dist/esm/components/ConfigProvider/index.d.ts +1 -1
- package/dist/esm/components/Container/index.d.ts +1 -1
- package/dist/esm/components/Control/Checkbox/index.d.ts +2 -2
- package/dist/esm/components/Control/Radio/index.d.ts +2 -2
- package/dist/esm/components/Control/Radio/index.scss +1 -1
- package/dist/esm/components/Divider/index.scss +1 -1
- package/dist/esm/components/Dropdown/index.scss +1 -0
- package/dist/esm/components/Inverse/index.d.ts +21 -0
- package/dist/esm/components/Inverse/index.js +51 -0
- package/dist/esm/components/Navbar/index.scss +1 -0
- package/dist/esm/components/Overlay/index.d.ts +13 -0
- package/dist/esm/components/Overlay/index.js +29 -0
- package/dist/esm/components/Overlay/index.scss +105 -0
- package/dist/esm/components/Section/index.scss +29 -0
- package/dist/esm/components/Text/index.d.ts +1 -0
- package/dist/esm/components/Text/index.js +1 -0
- package/dist/esm/components/Text/index.scss +2 -0
- package/dist/esm/components/Tile/index.scss +31 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/styles/_import.scss +1 -1
- package/dist/esm/styles/inverse.scss +8 -0
- package/dist/esm/styles/mixins.scss +7 -2
- package/dist/esm/styles/overlay.scss +1 -105
- package/dist/esm/styles/variables.scss +5 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -24,7 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
return result;
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.
|
|
27
|
+
exports.IdContext = void 0;
|
|
28
|
+
exports.getNavId = getNavId;
|
|
29
|
+
exports.useNavId = useNavId;
|
|
28
30
|
const React = __importStar(require("react"));
|
|
29
31
|
exports.IdContext = React.createContext(undefined);
|
|
30
32
|
function getNavId(uuid, eventKey) {
|
|
@@ -33,7 +35,6 @@ function getNavId(uuid, eventKey) {
|
|
|
33
35
|
}
|
|
34
36
|
return `${uuid}-${eventKey}`;
|
|
35
37
|
}
|
|
36
|
-
exports.getNavId = getNavId;
|
|
37
38
|
function useNavId(eventKey) {
|
|
38
39
|
const id = React.useContext(exports.IdContext);
|
|
39
40
|
if (eventKey === undefined || id == null) {
|
|
@@ -41,7 +42,6 @@ function useNavId(eventKey) {
|
|
|
41
42
|
}
|
|
42
43
|
return getNavId(id, eventKey);
|
|
43
44
|
}
|
|
44
|
-
exports.useNavId = useNavId;
|
|
45
45
|
if (process.env.NODE_ENV !== 'production') {
|
|
46
46
|
exports.IdContext.displayName = 'IdContext';
|
|
47
47
|
}
|
|
@@ -27,7 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.
|
|
30
|
+
exports.NavContext = void 0;
|
|
31
|
+
exports.NavContextProvider = NavContextProvider;
|
|
31
32
|
const useMemo_1 = __importDefault(require("rc-util/lib/hooks/useMemo"));
|
|
32
33
|
const React = __importStar(require("react"));
|
|
33
34
|
const shallowequal_1 = __importDefault(require("shallowequal"));
|
|
@@ -61,7 +62,6 @@ function NavContextProvider(props) {
|
|
|
61
62
|
[context, restProps], (prev, next) => !locked && (prev[0] !== next[0] || !(0, shallowequal_1.default)(prev[1], next[1])));
|
|
62
63
|
return React.createElement(exports.NavContext.Provider, { value: inheritableContext }, children);
|
|
63
64
|
}
|
|
64
|
-
exports.NavContextProvider = NavContextProvider;
|
|
65
65
|
if (process.env.NODE_ENV !== 'production') {
|
|
66
66
|
exports.NavContext.displayName = 'NavContext';
|
|
67
67
|
}
|
|
@@ -24,20 +24,20 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
return result;
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.PathUserContext = exports.
|
|
27
|
+
exports.PathUserContext = exports.PathTrackerContext = exports.PathRegisterContext = void 0;
|
|
28
|
+
exports.useMeasure = useMeasure;
|
|
29
|
+
exports.useFullPath = useFullPath;
|
|
28
30
|
const React = __importStar(require("react"));
|
|
29
31
|
const EmptyList = [];
|
|
30
32
|
exports.PathRegisterContext = React.createContext(null);
|
|
31
33
|
function useMeasure() {
|
|
32
34
|
return React.useContext(exports.PathRegisterContext);
|
|
33
35
|
}
|
|
34
|
-
exports.useMeasure = useMeasure;
|
|
35
36
|
exports.PathTrackerContext = React.createContext(EmptyList);
|
|
36
37
|
function useFullPath(eventKey) {
|
|
37
38
|
const parentKeyPath = React.useContext(exports.PathTrackerContext);
|
|
38
39
|
return React.useMemo(() => (eventKey !== undefined ? [...parentKeyPath, eventKey] : parentKeyPath), [parentKeyPath, eventKey]);
|
|
39
40
|
}
|
|
40
|
-
exports.useFullPath = useFullPath;
|
|
41
41
|
exports.PathUserContext = React.createContext(null);
|
|
42
42
|
if (process.env.NODE_ENV !== 'production') {
|
|
43
43
|
exports.PathRegisterContext.displayName = 'PathRegisterContext';
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.useAccessibility =
|
|
29
|
+
exports.useAccessibility = useAccessibility;
|
|
30
30
|
const focus_1 = require("rc-util/lib/Dom/focus");
|
|
31
31
|
const KeyCode_1 = __importDefault(require("rc-util/lib/KeyCode"));
|
|
32
32
|
const raf_1 = __importDefault(require("rc-util/lib/raf"));
|
|
@@ -295,4 +295,3 @@ function useAccessibility(mode, activeKey, isRtl, id, containerRef, getKeys, get
|
|
|
295
295
|
originOnKeyDown?.(event);
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
|
-
exports.useAccessibility = useAccessibility;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.useActive =
|
|
26
|
+
exports.useActive = useActive;
|
|
27
27
|
const React = __importStar(require("react"));
|
|
28
28
|
const NavContext_1 = require("../../../components/Nav/context/NavContext");
|
|
29
29
|
function useActive(eventKey, disabled, onMouseEnter, onMouseLeave) {
|
|
@@ -55,4 +55,3 @@ function useActive(eventKey, disabled, onMouseEnter, onMouseLeave) {
|
|
|
55
55
|
}
|
|
56
56
|
return ret;
|
|
57
57
|
}
|
|
58
|
-
exports.useActive = useActive;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.useDirectionStyle =
|
|
26
|
+
exports.useDirectionStyle = useDirectionStyle;
|
|
27
27
|
const React = __importStar(require("react"));
|
|
28
28
|
const NavContext_1 = require("../../../components/Nav/context/NavContext");
|
|
29
29
|
function useDirectionStyle(level) {
|
|
@@ -34,4 +34,3 @@ function useDirectionStyle(level) {
|
|
|
34
34
|
const len = level;
|
|
35
35
|
return rtl ? { paddingRight: len * (inlineIndent ?? 0) } : { paddingLeft: len * (inlineIndent ?? 0) };
|
|
36
36
|
}
|
|
37
|
-
exports.useDirectionStyle = useDirectionStyle;
|
|
@@ -26,7 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.OVERFLOW_KEY = void 0;
|
|
30
|
+
exports.useKeyRecords = useKeyRecords;
|
|
30
31
|
const warning_1 = __importDefault(require("rc-util/lib/warning"));
|
|
31
32
|
const React = __importStar(require("react"));
|
|
32
33
|
const timeUtil_1 = require("../../../components/Nav/utils/timeUtil");
|
|
@@ -114,4 +115,3 @@ function useKeyRecords() {
|
|
|
114
115
|
unregisterPath,
|
|
115
116
|
};
|
|
116
117
|
}
|
|
117
|
-
exports.useKeyRecords = useKeyRecords;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.useMemoCallback =
|
|
26
|
+
exports.useMemoCallback = useMemoCallback;
|
|
27
27
|
const React = __importStar(require("react"));
|
|
28
28
|
/**
|
|
29
29
|
* Cache callback function that always return same ref instead.
|
|
@@ -36,4 +36,3 @@ function useMemoCallback(func) {
|
|
|
36
36
|
const callback = React.useCallback(((...args) => funRef.current?.(...args)), []);
|
|
37
37
|
return typeof func === 'function' ? callback : undefined;
|
|
38
38
|
}
|
|
39
|
-
exports.useMemoCallback = useMemoCallback;
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.useUUID =
|
|
29
|
+
exports.useUUID = useUUID;
|
|
30
30
|
const useMergedState_1 = __importDefault(require("rc-util/lib/hooks/useMergedState"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const uniquePrefix = Math.random().toFixed(5).toString().slice(2);
|
|
@@ -44,4 +44,3 @@ function useUUID(id) {
|
|
|
44
44
|
}, [setUUID]);
|
|
45
45
|
return uuid;
|
|
46
46
|
}
|
|
47
|
-
exports.useUUID = useUUID;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getAlignFromPlacement = getAlignFromPlacement;
|
|
4
|
+
exports.getAlignPopupClassName = getAlignPopupClassName;
|
|
4
5
|
function isPointsEq(a1, a2, isAlignPoint) {
|
|
5
6
|
if (isAlignPoint) {
|
|
6
7
|
return a1[0] === a2[0];
|
|
@@ -14,7 +15,6 @@ function getAlignFromPlacement(builtinPlacements, placementStr, align) {
|
|
|
14
15
|
...align,
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
exports.getAlignFromPlacement = getAlignFromPlacement;
|
|
18
18
|
function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {
|
|
19
19
|
const { points } = align;
|
|
20
20
|
const placements = Object.keys(builtinPlacements);
|
|
@@ -27,4 +27,3 @@ function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoin
|
|
|
27
27
|
}
|
|
28
28
|
return '';
|
|
29
29
|
}
|
|
30
|
-
exports.getAlignPopupClassName = getAlignPopupClassName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getMotion =
|
|
3
|
+
exports.getMotion = getMotion;
|
|
4
4
|
function getMotion(mode, motion, defaultMotions) {
|
|
5
5
|
if (motion) {
|
|
6
6
|
return motion;
|
|
@@ -10,4 +10,3 @@ function getMotion(mode, motion, defaultMotions) {
|
|
|
10
10
|
}
|
|
11
11
|
return undefined;
|
|
12
12
|
}
|
|
13
|
-
exports.getMotion = getMotion;
|
|
@@ -26,7 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.parseChildren = parseChildren;
|
|
30
|
+
exports.parseItems = parseItems;
|
|
30
31
|
const toArray_1 = __importDefault(require("rc-util/lib/Children/toArray"));
|
|
31
32
|
const React = __importStar(require("react"));
|
|
32
33
|
const Divider_1 = require("../../../components/Nav/Divider");
|
|
@@ -54,7 +55,6 @@ function parseChildren(children, keyPath) {
|
|
|
54
55
|
return child;
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
|
-
exports.parseChildren = parseChildren;
|
|
58
58
|
function convertItemsToNodes(list) {
|
|
59
59
|
return (list || [])
|
|
60
60
|
.map((opt, index) => {
|
|
@@ -87,4 +87,3 @@ function parseItems(children, items, keyPath) {
|
|
|
87
87
|
}
|
|
88
88
|
return parseChildren(childNodes, keyPath);
|
|
89
89
|
}
|
|
90
|
-
exports.parseItems = parseItems;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.warnItemProp =
|
|
6
|
+
exports.warnItemProp = warnItemProp;
|
|
7
7
|
const warning_1 = __importDefault(require("rc-util/lib/warning"));
|
|
8
8
|
/**
|
|
9
9
|
* `onClick` event return `info.item` which point to react node directly.
|
|
@@ -18,4 +18,3 @@ function warnItemProp({ item, ...restInfo }) {
|
|
|
18
18
|
});
|
|
19
19
|
return restInfo;
|
|
20
20
|
}
|
|
21
|
-
exports.warnItemProp = warnItemProp;
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Center =
|
|
29
|
+
exports.Center = Center;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
@@ -38,7 +38,6 @@ function Center(props) {
|
|
|
38
38
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar-center'), [config, prefixCls]);
|
|
39
39
|
return React.createElement(Component_1.Component, { className: (0, classnames_1.default)(rootCls, className), component: defaultElement, ...restProps });
|
|
40
40
|
}
|
|
41
|
-
exports.Center = Center;
|
|
42
41
|
if (process.env.NODE_ENV !== 'production') {
|
|
43
42
|
Center.displayName = 'Navbar.Center';
|
|
44
43
|
}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Container =
|
|
29
|
+
exports.Container = Container;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
@@ -40,7 +40,6 @@ function Container(props) {
|
|
|
40
40
|
[`${rootCls}-transparent`]: transparent,
|
|
41
41
|
}, className), component: defaultElement, ...restProps }));
|
|
42
42
|
}
|
|
43
|
-
exports.Container = Container;
|
|
44
43
|
if (process.env.NODE_ENV !== 'production') {
|
|
45
44
|
Container.displayName = 'Navbar.Container';
|
|
46
45
|
}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Item =
|
|
29
|
+
exports.Item = Item;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
@@ -38,7 +38,6 @@ function Item(props) {
|
|
|
38
38
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar-item'), [config, prefixCls]);
|
|
39
39
|
return React.createElement(Component_1.Component, { className: (0, classnames_1.default)(rootCls, className), component: defaultElement, ...restProps });
|
|
40
40
|
}
|
|
41
|
-
exports.Item = Item;
|
|
42
41
|
if (process.env.NODE_ENV !== 'production') {
|
|
43
42
|
Item.displayName = 'Navbar.Item';
|
|
44
43
|
}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Left =
|
|
29
|
+
exports.Left = Left;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
@@ -38,7 +38,6 @@ function Left(props) {
|
|
|
38
38
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar-left'), [config, prefixCls]);
|
|
39
39
|
return React.createElement(Component_1.Component, { className: (0, classnames_1.default)(rootCls, className), component: defaultElement, ...restProps });
|
|
40
40
|
}
|
|
41
|
-
exports.Left = Left;
|
|
42
41
|
if (process.env.NODE_ENV !== 'production') {
|
|
43
42
|
Left.displayName = 'Navbar.Left';
|
|
44
43
|
}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Nav =
|
|
29
|
+
exports.Nav = Nav;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
@@ -37,7 +37,6 @@ function Nav(props) {
|
|
|
37
37
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar'), [config, prefixCls]);
|
|
38
38
|
return (React.createElement(Nav_1.Nav, { className: (0, classnames_1.default)(`${rootCls}-nav`, className), popupPrefixCls: `${rootCls}-dropdown`, mode: "horizontal", ...restProps }));
|
|
39
39
|
}
|
|
40
|
-
exports.Nav = Nav;
|
|
41
40
|
if (process.env.NODE_ENV !== 'production') {
|
|
42
41
|
Nav.displayName = 'Navbar.Nav';
|
|
43
42
|
}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Navbar =
|
|
29
|
+
exports.Navbar = Navbar;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
@@ -39,4 +39,3 @@ function Navbar(props) {
|
|
|
39
39
|
[`${rootCls}-transparent`]: transparent,
|
|
40
40
|
}, className), ...restProps }));
|
|
41
41
|
}
|
|
42
|
-
exports.Navbar = Navbar;
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Right =
|
|
29
|
+
exports.Right = Right;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
@@ -38,7 +38,6 @@ function Right(props) {
|
|
|
38
38
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'navbar'), [config, prefixCls]);
|
|
39
39
|
return React.createElement(Component_1.Component, { className: (0, classnames_1.default)(`${rootCls}-right`, className), component: defaultElement, ...restProps });
|
|
40
40
|
}
|
|
41
|
-
exports.Right = Right;
|
|
42
41
|
if (process.env.NODE_ENV !== 'production') {
|
|
43
42
|
Right.displayName = 'Navbar.Right';
|
|
44
43
|
}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Toggle =
|
|
29
|
+
exports.Toggle = Toggle;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
@@ -40,7 +40,6 @@ function Toggle(props) {
|
|
|
40
40
|
[`${rootCls}-icon`]: icon,
|
|
41
41
|
}, className), component: defaultElement, ...restProps }));
|
|
42
42
|
}
|
|
43
|
-
exports.Toggle = Toggle;
|
|
44
43
|
if (process.env.NODE_ENV !== 'production') {
|
|
45
44
|
Toggle.displayName = 'Navbar.Toggle';
|
|
46
45
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type PolymorphicProps } from '../../components/Component';
|
|
3
|
+
import './index.scss';
|
|
4
|
+
export interface OverlayOwnProps {
|
|
5
|
+
icon?: boolean;
|
|
6
|
+
overlay?: React.ReactNode;
|
|
7
|
+
position?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center' | 'cover';
|
|
8
|
+
type?: 'default' | 'primary';
|
|
9
|
+
}
|
|
10
|
+
export type OverlayProps<E extends React.ElementType = React.ElementType> = OverlayOwnProps & PolymorphicProps<E> & PolymorphicProps<E, OverlayOwnProps>;
|
|
11
|
+
declare const defaultElement = "div";
|
|
12
|
+
export declare function Overlay<E extends React.ElementType = typeof defaultElement>(props: React.PropsWithChildren<OverlayProps<E>>): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Overlay = Overlay;
|
|
30
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
|
+
const Component_1 = require("../../components/Component");
|
|
33
|
+
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
34
|
+
require("./index.scss");
|
|
35
|
+
const defaultElement = 'div';
|
|
36
|
+
const positions = [
|
|
37
|
+
'top',
|
|
38
|
+
'bottom',
|
|
39
|
+
'left',
|
|
40
|
+
'right',
|
|
41
|
+
'top-left',
|
|
42
|
+
'top-right',
|
|
43
|
+
'bottom-left',
|
|
44
|
+
'bottom-right',
|
|
45
|
+
'center',
|
|
46
|
+
'cover',
|
|
47
|
+
];
|
|
48
|
+
function Overlay(props) {
|
|
49
|
+
const config = (0, ConfigProvider_1.useConfig)();
|
|
50
|
+
const { className, icon, position = 'bottom', prefixCls = config.prefixCls, type = 'default', ...restProps } = props;
|
|
51
|
+
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'overlay'), [config, prefixCls]);
|
|
52
|
+
const positionRootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'position'), [config, prefixCls]);
|
|
53
|
+
return (React.createElement(Component_1.Component, { className: (0, classnames_1.default)(rootCls, {
|
|
54
|
+
[`${rootCls}-${type}`]: type && ['default', 'primary'].includes(type),
|
|
55
|
+
[`${rootCls}-icon`]: icon,
|
|
56
|
+
[`${positionRootCls}-${position}`]: position && positions.includes(position),
|
|
57
|
+
}, className), component: defaultElement, ...restProps }));
|
|
58
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// Name: Overlay
|
|
2
|
+
// Description: Component to create content areas overlaying an image
|
|
3
|
+
//
|
|
4
|
+
// Component: `uk-overlay`
|
|
5
|
+
//
|
|
6
|
+
// Adopted: `uk-overlay-icon`
|
|
7
|
+
//
|
|
8
|
+
// Modifier: `uk-overlay-default`
|
|
9
|
+
// `uk-overlay-primary`
|
|
10
|
+
//
|
|
11
|
+
// ========================================================================
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// Variables
|
|
15
|
+
// ========================================================================
|
|
16
|
+
|
|
17
|
+
@import '../../styles/variables.scss';
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/* ========================================================================
|
|
21
|
+
Component: Overlay
|
|
22
|
+
========================================================================== */
|
|
23
|
+
|
|
24
|
+
.uk-overlay {
|
|
25
|
+
padding: var(--overlay-padding-vertical) var(--overlay-padding-horizontal);
|
|
26
|
+
@if mixin-exists(hook-overlay) {
|
|
27
|
+
@include hook-overlay;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Remove margin from the last-child
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
.uk-overlay > :last-child {
|
|
36
|
+
margin-bottom: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/* Icon
|
|
41
|
+
========================================================================== */
|
|
42
|
+
|
|
43
|
+
.uk-overlay-icon {
|
|
44
|
+
@if mixin-exists(hook-overlay-icon) {
|
|
45
|
+
@include hook-overlay-icon;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/* Style modifiers
|
|
51
|
+
========================================================================== */
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* Default
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
.uk-overlay-default {
|
|
58
|
+
background: var(--overlay-default-background);
|
|
59
|
+
@if mixin-exists(hook-overlay-default) {
|
|
60
|
+
@include hook-overlay-default;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/*
|
|
65
|
+
* Primary
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
.uk-overlay-primary {
|
|
69
|
+
background: var(--overlay-primary-background);
|
|
70
|
+
@if mixin-exists(hook-overlay-primary) {
|
|
71
|
+
@include hook-overlay-primary;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Color Mode
|
|
76
|
+
@if $overlay-primary-color-mode == light {
|
|
77
|
+
.uk-overlay-primary {
|
|
78
|
+
@extend .uk-light !optional;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@if $overlay-primary-color-mode == dark {
|
|
83
|
+
.uk-overlay-primary {
|
|
84
|
+
@extend .uk-dark !optional;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
// Hooks
|
|
90
|
+
// ========================================================================
|
|
91
|
+
|
|
92
|
+
@if mixin-exists(hook-overlay-misc) {
|
|
93
|
+
@include hook-overlay-misc;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
// Vars
|
|
98
|
+
// ========================================================================
|
|
99
|
+
|
|
100
|
+
:root {
|
|
101
|
+
--overlay-padding-horizontal: var(--global-gutter);
|
|
102
|
+
--overlay-padding-vertical: var(--global-gutter);
|
|
103
|
+
--overlay-default-background: #{$overlay-default-background};
|
|
104
|
+
--overlay-primary-background: #{$overlay-primary-background};
|
|
105
|
+
}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Progress =
|
|
29
|
+
exports.Progress = Progress;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const ConfigProvider_1 = require("../../components/ConfigProvider");
|
|
@@ -37,4 +37,3 @@ function Progress(props) {
|
|
|
37
37
|
const rootCls = React.useMemo(() => config.getRootPrefixCls(prefixCls || config.prefixCls, 'progress'), [config, prefixCls]);
|
|
38
38
|
return React.createElement("progress", { className: (0, classnames_1.default)(rootCls, className), ...restProps });
|
|
39
39
|
}
|
|
40
|
-
exports.Progress = Progress;
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Section =
|
|
29
|
+
exports.Section = Section;
|
|
30
30
|
const classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
const React = __importStar(require("react"));
|
|
32
32
|
const Component_1 = require("../../components/Component");
|
|
@@ -43,4 +43,3 @@ function Section(props) {
|
|
|
43
43
|
[`${prefixCls || config.prefixCls}-preserve-color`]: preserveColor,
|
|
44
44
|
}, className), component: defaultElement, ...restProps }));
|
|
45
45
|
}
|
|
46
|
-
exports.Section = Section;
|