xmirror-components 1.0.22 → 1.0.24
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/build/dist/index.cjs +20 -20
- package/build/dist/index.mjs +1849 -1949
- package/build/es/components/GlobalLoading/index.js +2 -2
- package/build/es/components/IconButton/index.d.ts +23 -9
- package/build/es/components/IconButton/index.js +17 -16
- package/build/lib/components/GlobalLoading/index.js +2 -2
- package/build/lib/components/IconButton/index.d.ts +23 -9
- package/build/lib/components/IconButton/index.js +19 -51
- package/build/lib/index.d.ts +26 -10
- package/build/package.json +1 -2
- package/build/types/components/IconButton/index.d.ts +23 -9
- package/package.json +1 -2
|
@@ -18,8 +18,8 @@ var Dot = styled.div(function (_a) {
|
|
|
18
18
|
position: 'absolute',
|
|
19
19
|
margin: 'auto',
|
|
20
20
|
borderRadius: '50%',
|
|
21
|
-
|
|
22
|
-
backgroundImage: ' linear-gradient(var(--color-primary) 10%, var(--color-primary-hover) 100%)',
|
|
21
|
+
backgroundImage: ' linear-gradient(#0060a7 10%, #1d77b3 100%)',
|
|
22
|
+
// backgroundImage: ' linear-gradient(var(--color-primary) 10%, var(--color-primary-hover) 100%)',
|
|
23
23
|
transform: 'rotate(0deg) translateX(35px) rotate(0deg)',
|
|
24
24
|
width: size,
|
|
25
25
|
height: size,
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
-
import React
|
|
2
|
-
interface
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ButtonTooltipProps {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* 气泡内容
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
title?: React.ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* 是否禁用 tooltip
|
|
9
9
|
*/
|
|
10
10
|
tooltipDisabled?: boolean;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* 禁用原因
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
disabledReason?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* 是否隐藏按钮
|
|
17
|
+
*/
|
|
18
|
+
hide?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* 是否禁用
|
|
17
21
|
*/
|
|
18
22
|
disabled?: boolean;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
26
|
+
/**
|
|
27
|
+
* 图标
|
|
28
|
+
*/
|
|
29
|
+
icon?: React.ReactNode | string;
|
|
30
|
+
/**
|
|
31
|
+
* 点击事件
|
|
32
|
+
*/
|
|
33
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
19
34
|
/**
|
|
20
35
|
* 大小
|
|
21
36
|
*/
|
|
@@ -37,6 +52,5 @@ interface IconButtonProps {
|
|
|
37
52
|
*/
|
|
38
53
|
[key: string]: any;
|
|
39
54
|
}
|
|
40
|
-
export declare const
|
|
41
|
-
|
|
42
|
-
export default _default;
|
|
55
|
+
export declare const IconButton: (props: IconButtonProps) => React.JSX.Element;
|
|
56
|
+
export default IconButton;
|
|
@@ -24,35 +24,36 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
-
import React
|
|
27
|
+
import React from 'react';
|
|
28
28
|
import { Tooltip, Button } from 'antd';
|
|
29
29
|
import { noop, isString } from 'lodash-es';
|
|
30
|
-
// import classNames from 'classnames'
|
|
31
|
-
import { useHover } from 'ahooks';
|
|
32
30
|
import IconFont from '../IconFont';
|
|
33
|
-
// import styles from './index.module.less'
|
|
34
31
|
import styled from '@emotion/styled';
|
|
35
32
|
var StyledButton = styled(Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-right: 5px;\n font-size: 16px;\n color: var(--color-primary);\n background-color: transparent;\n border: none;\n box-shadow: initial;\n transition: background-color 0.2s;\n\n &[disabled], &[aria-disabled='true'] {\n color: #9da2a6 !important;\n cursor: not-allowed;\n background-color: transparent;\n }\n\n &:hover, &:active, &:focus {\n background: #F4F0F5;\n }\n\n span {\n font-size: 16px;\n }\n"], ["\n margin-right: 5px;\n font-size: 16px;\n color: var(--color-primary);\n background-color: transparent;\n border: none;\n box-shadow: initial;\n transition: background-color 0.2s;\n\n &[disabled], &[aria-disabled='true'] {\n color: #9da2a6 !important;\n cursor: not-allowed;\n background-color: transparent;\n }\n\n &:hover, &:active, &:focus {\n background: #F4F0F5;\n }\n\n span {\n font-size: 16px;\n }\n"])));
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
var ButtonTooltip = function (_a) {
|
|
34
|
+
var children = _a.children, tooltipDisabled = _a.tooltipDisabled, disabled = _a.disabled, disabledReason = _a.disabledReason, title = _a.title, attrs = __rest(_a, ["children", "tooltipDisabled", "disabled", "disabledReason", "title"]);
|
|
35
|
+
if (tooltipDisabled) {
|
|
36
|
+
return children;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return (React.createElement(Tooltip, __assign({ title: disabled ? disabledReason || title : title }, attrs), children));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export var IconButton = function (props) {
|
|
43
|
+
var Icon = props.icon, _a = props.tooltipDisabled, tooltipDisabled = _a === void 0 ? false : _a, title = props.title, _b = props.hide, hide = _b === void 0 ? false : _b, disabledReason = props.disabledReason, _c = props.onClick, onClick = _c === void 0 ? noop : _c, disabled = props.disabled, _d = props.size, size = _d === void 0 ? 'small' : _d, _e = props.style, style = _e === void 0 ? {} : _e, className = props.className, _f = props.loading, loading = _f === void 0 ? false : _f, attrs = __rest(props, ["icon", "tooltipDisabled", "title", "hide", "disabledReason", "onClick", "disabled", "size", "style", "className", "loading"]);
|
|
40
44
|
var createIcon = function () {
|
|
41
|
-
if (isString(Icon)
|
|
45
|
+
if (isString(Icon)) {
|
|
42
46
|
return React.createElement(IconFont, { type: Icon });
|
|
43
47
|
}
|
|
44
48
|
else {
|
|
45
49
|
return Icon;
|
|
46
50
|
}
|
|
47
51
|
};
|
|
48
|
-
var children = (React.createElement(StyledButton, { onClick: onClick, size: size, disabled: disabled, style: style, ref: buttonRef, loading: loading, className: className, icon: createIcon() }));
|
|
49
52
|
if (!Icon) {
|
|
50
|
-
|
|
53
|
+
console.warn('Icon props not found');
|
|
51
54
|
}
|
|
52
|
-
return (React.createElement(
|
|
53
|
-
|
|
54
|
-
!tooltipDisabled && (React.createElement(Tooltip, __assign({ open: visible, trigger: 'contextMenu', destroyTooltipOnHide: true }, attrs),
|
|
55
|
-
React.createElement("span", { ref: ref, style: { display: 'inline-block' }, className: "icon-button-box" }, children)))));
|
|
55
|
+
return (React.createElement(ButtonTooltip, __assign({ tooltipDisabled: tooltipDisabled, hide: hide, disabled: disabled, disabledReason: disabledReason, title: title }, attrs),
|
|
56
|
+
React.createElement(StyledButton, { icon: createIcon(), size: size, className: className, disabled: disabled, style: style, loading: loading, onClick: onClick })));
|
|
56
57
|
};
|
|
57
|
-
export default
|
|
58
|
+
export default IconButton;
|
|
58
59
|
var templateObject_1;
|
|
@@ -58,8 +58,8 @@ var Dot = styled_1.default.div(function (_a) {
|
|
|
58
58
|
position: 'absolute',
|
|
59
59
|
margin: 'auto',
|
|
60
60
|
borderRadius: '50%',
|
|
61
|
-
|
|
62
|
-
backgroundImage: ' linear-gradient(var(--color-primary) 10%, var(--color-primary-hover) 100%)',
|
|
61
|
+
backgroundImage: ' linear-gradient(#0060a7 10%, #1d77b3 100%)',
|
|
62
|
+
// backgroundImage: ' linear-gradient(var(--color-primary) 10%, var(--color-primary-hover) 100%)',
|
|
63
63
|
transform: 'rotate(0deg) translateX(35px) rotate(0deg)',
|
|
64
64
|
width: size,
|
|
65
65
|
height: size,
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
-
import React
|
|
2
|
-
interface
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ButtonTooltipProps {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* 气泡内容
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
title?: React.ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* 是否禁用 tooltip
|
|
9
9
|
*/
|
|
10
10
|
tooltipDisabled?: boolean;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* 禁用原因
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
disabledReason?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* 是否隐藏按钮
|
|
17
|
+
*/
|
|
18
|
+
hide?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* 是否禁用
|
|
17
21
|
*/
|
|
18
22
|
disabled?: boolean;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
26
|
+
/**
|
|
27
|
+
* 图标
|
|
28
|
+
*/
|
|
29
|
+
icon?: React.ReactNode | string;
|
|
30
|
+
/**
|
|
31
|
+
* 点击事件
|
|
32
|
+
*/
|
|
33
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
19
34
|
/**
|
|
20
35
|
* 大小
|
|
21
36
|
*/
|
|
@@ -37,6 +52,5 @@ interface IconButtonProps {
|
|
|
37
52
|
*/
|
|
38
53
|
[key: string]: any;
|
|
39
54
|
}
|
|
40
|
-
export declare const
|
|
41
|
-
|
|
42
|
-
export default _default;
|
|
55
|
+
export declare const IconButton: (props: IconButtonProps) => React.JSX.Element;
|
|
56
|
+
export default IconButton;
|
|
@@ -14,39 +14,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
14
14
|
};
|
|
15
15
|
return __assign.apply(this, arguments);
|
|
16
16
|
};
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
-
var ownKeys = function(o) {
|
|
35
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
-
var ar = [];
|
|
37
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
-
return ar;
|
|
39
|
-
};
|
|
40
|
-
return ownKeys(o);
|
|
41
|
-
};
|
|
42
|
-
return function (mod) {
|
|
43
|
-
if (mod && mod.__esModule) return mod;
|
|
44
|
-
var result = {};
|
|
45
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
-
__setModuleDefault(result, mod);
|
|
47
|
-
return result;
|
|
48
|
-
};
|
|
49
|
-
})();
|
|
50
17
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
51
18
|
var t = {};
|
|
52
19
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -62,37 +29,38 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
62
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
30
|
};
|
|
64
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
-
exports.
|
|
66
|
-
var react_1 =
|
|
32
|
+
exports.IconButton = void 0;
|
|
33
|
+
var react_1 = __importDefault(require("react"));
|
|
67
34
|
var antd_1 = require("antd");
|
|
68
35
|
var lodash_es_1 = require("lodash-es");
|
|
69
|
-
// import classNames from 'classnames'
|
|
70
|
-
var ahooks_1 = require("ahooks");
|
|
71
36
|
var IconFont_1 = __importDefault(require("../IconFont"));
|
|
72
|
-
// import styles from './index.module.less'
|
|
73
37
|
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
74
38
|
var StyledButton = (0, styled_1.default)(antd_1.Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-right: 5px;\n font-size: 16px;\n color: var(--color-primary);\n background-color: transparent;\n border: none;\n box-shadow: initial;\n transition: background-color 0.2s;\n\n &[disabled], &[aria-disabled='true'] {\n color: #9da2a6 !important;\n cursor: not-allowed;\n background-color: transparent;\n }\n\n &:hover, &:active, &:focus {\n background: #F4F0F5;\n }\n\n span {\n font-size: 16px;\n }\n"], ["\n margin-right: 5px;\n font-size: 16px;\n color: var(--color-primary);\n background-color: transparent;\n border: none;\n box-shadow: initial;\n transition: background-color 0.2s;\n\n &[disabled], &[aria-disabled='true'] {\n color: #9da2a6 !important;\n cursor: not-allowed;\n background-color: transparent;\n }\n\n &:hover, &:active, &:focus {\n background: #F4F0F5;\n }\n\n span {\n font-size: 16px;\n }\n"])));
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
39
|
+
var ButtonTooltip = function (_a) {
|
|
40
|
+
var children = _a.children, tooltipDisabled = _a.tooltipDisabled, disabled = _a.disabled, disabledReason = _a.disabledReason, title = _a.title, attrs = __rest(_a, ["children", "tooltipDisabled", "disabled", "disabledReason", "title"]);
|
|
41
|
+
if (tooltipDisabled) {
|
|
42
|
+
return children;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
return (react_1.default.createElement(antd_1.Tooltip, __assign({ title: disabled ? disabledReason || title : title }, attrs), children));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var IconButton = function (props) {
|
|
49
|
+
var Icon = props.icon, _a = props.tooltipDisabled, tooltipDisabled = _a === void 0 ? false : _a, title = props.title, _b = props.hide, hide = _b === void 0 ? false : _b, disabledReason = props.disabledReason, _c = props.onClick, onClick = _c === void 0 ? lodash_es_1.noop : _c, disabled = props.disabled, _d = props.size, size = _d === void 0 ? 'small' : _d, _e = props.style, style = _e === void 0 ? {} : _e, className = props.className, _f = props.loading, loading = _f === void 0 ? false : _f, attrs = __rest(props, ["icon", "tooltipDisabled", "title", "hide", "disabledReason", "onClick", "disabled", "size", "style", "className", "loading"]);
|
|
79
50
|
var createIcon = function () {
|
|
80
|
-
if ((0, lodash_es_1.isString)(Icon)
|
|
51
|
+
if ((0, lodash_es_1.isString)(Icon)) {
|
|
81
52
|
return react_1.default.createElement(IconFont_1.default, { type: Icon });
|
|
82
53
|
}
|
|
83
54
|
else {
|
|
84
55
|
return Icon;
|
|
85
56
|
}
|
|
86
57
|
};
|
|
87
|
-
var children = (react_1.default.createElement(StyledButton, { onClick: onClick, size: size, disabled: disabled, style: style, ref: buttonRef, loading: loading, className: className, icon: createIcon() }));
|
|
88
58
|
if (!Icon) {
|
|
89
|
-
|
|
59
|
+
console.warn('Icon props not found');
|
|
90
60
|
}
|
|
91
|
-
return (react_1.default.createElement(
|
|
92
|
-
|
|
93
|
-
!tooltipDisabled && (react_1.default.createElement(antd_1.Tooltip, __assign({ open: visible, trigger: 'contextMenu', destroyTooltipOnHide: true }, attrs),
|
|
94
|
-
react_1.default.createElement("span", { ref: ref, style: { display: 'inline-block' }, className: "icon-button-box" }, children)))));
|
|
61
|
+
return (react_1.default.createElement(ButtonTooltip, __assign({ tooltipDisabled: tooltipDisabled, hide: hide, disabled: disabled, disabledReason: disabledReason, title: title }, attrs),
|
|
62
|
+
react_1.default.createElement(StyledButton, { icon: createIcon(), size: size, className: className, disabled: disabled, style: style, loading: loading, onClick: onClick })));
|
|
95
63
|
};
|
|
96
|
-
exports.
|
|
97
|
-
exports.default =
|
|
64
|
+
exports.IconButton = IconButton;
|
|
65
|
+
exports.default = exports.IconButton;
|
|
98
66
|
var templateObject_1;
|
package/build/lib/index.d.ts
CHANGED
|
@@ -13,6 +13,30 @@ import { SwitchProps } from 'antd/es/switch';
|
|
|
13
13
|
|
|
14
14
|
export declare function App({ children, ...props }: AppProps): React_2.JSX.Element;
|
|
15
15
|
|
|
16
|
+
declare interface ButtonTooltipProps {
|
|
17
|
+
/**
|
|
18
|
+
* 气泡内容
|
|
19
|
+
*/
|
|
20
|
+
title?: React_2.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* 是否禁用 tooltip
|
|
23
|
+
*/
|
|
24
|
+
tooltipDisabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 禁用原因
|
|
27
|
+
*/
|
|
28
|
+
disabledReason?: React_2.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* 是否隐藏按钮
|
|
31
|
+
*/
|
|
32
|
+
hide?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 是否禁用
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
children?: React_2.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
|
|
16
40
|
export declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) => React_2.JSX.Element;
|
|
17
41
|
|
|
18
42
|
/**
|
|
@@ -53,25 +77,17 @@ declare interface CheckboxValueProps<T = any, F = any> extends Omit<React_2.Comp
|
|
|
53
77
|
|
|
54
78
|
export declare function GlobalLoading(): React_2.JSX.Element;
|
|
55
79
|
|
|
56
|
-
export declare const IconButton:
|
|
80
|
+
export declare const IconButton: (props: IconButtonProps) => React_2.JSX.Element;
|
|
57
81
|
|
|
58
|
-
declare interface IconButtonProps {
|
|
82
|
+
declare interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
59
83
|
/**
|
|
60
84
|
* 图标
|
|
61
85
|
*/
|
|
62
86
|
icon?: React_2.ReactNode | string;
|
|
63
|
-
/**
|
|
64
|
-
* 是否禁用 tooltip
|
|
65
|
-
*/
|
|
66
|
-
tooltipDisabled?: boolean;
|
|
67
87
|
/**
|
|
68
88
|
* 点击事件
|
|
69
89
|
*/
|
|
70
90
|
onClick?: (e: React_2.MouseEvent<HTMLElement>) => void;
|
|
71
|
-
/**
|
|
72
|
-
* 是否禁用
|
|
73
|
-
*/
|
|
74
|
-
disabled?: boolean;
|
|
75
91
|
/**
|
|
76
92
|
* 大小
|
|
77
93
|
*/
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmirror-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "build/lib/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"less": "^4.3.0",
|
|
51
51
|
"react": "^19.0.0",
|
|
52
52
|
"react-dom": "^19.0.0",
|
|
53
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
54
53
|
"typescript": "~5.7.2",
|
|
55
54
|
"typescript-eslint": "^8.24.1",
|
|
56
55
|
"vite": "^6.2.0",
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
-
import React
|
|
2
|
-
interface
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ButtonTooltipProps {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* 气泡内容
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
title?: React.ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* 是否禁用 tooltip
|
|
9
9
|
*/
|
|
10
10
|
tooltipDisabled?: boolean;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* 禁用原因
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
disabledReason?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* 是否隐藏按钮
|
|
17
|
+
*/
|
|
18
|
+
hide?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* 是否禁用
|
|
17
21
|
*/
|
|
18
22
|
disabled?: boolean;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
26
|
+
/**
|
|
27
|
+
* 图标
|
|
28
|
+
*/
|
|
29
|
+
icon?: React.ReactNode | string;
|
|
30
|
+
/**
|
|
31
|
+
* 点击事件
|
|
32
|
+
*/
|
|
33
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
19
34
|
/**
|
|
20
35
|
* 大小
|
|
21
36
|
*/
|
|
@@ -37,6 +52,5 @@ interface IconButtonProps {
|
|
|
37
52
|
*/
|
|
38
53
|
[key: string]: any;
|
|
39
54
|
}
|
|
40
|
-
export declare const
|
|
41
|
-
|
|
42
|
-
export default _default;
|
|
55
|
+
export declare const IconButton: (props: IconButtonProps) => React.JSX.Element;
|
|
56
|
+
export default IconButton;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmirror-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "build/lib/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"less": "^4.3.0",
|
|
51
51
|
"react": "^19.0.0",
|
|
52
52
|
"react-dom": "^19.0.0",
|
|
53
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
54
53
|
"typescript": "~5.7.2",
|
|
55
54
|
"typescript-eslint": "^8.24.1",
|
|
56
55
|
"vite": "^6.2.0",
|