xmirror-components 1.0.2 → 1.0.4
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/xmirror-components.css +1 -0
- package/build/dist/xmirror-components.js +1444 -283
- package/build/dist/xmirror-components.umd.cjs +15 -11
- package/build/es/components/AntdApp/index.d.ts +12 -0
- package/build/es/components/AntdApp/index.js +14 -0
- package/build/es/components/CheckboxValue/index.d.ts +40 -0
- package/build/es/components/CheckboxValue/index.js +33 -0
- package/build/es/components/IconButton/index.d.ts +42 -0
- package/build/es/components/IconButton/index.js +51 -0
- package/build/es/components/IconFont/index.d.ts +21 -0
- package/build/es/components/IconFont/index.js +32 -0
- package/build/es/components/SwitchValue/index.d.ts +30 -0
- package/build/es/components/SwitchValue/index.js +36 -0
- package/build/es/components/index.d.ts +5 -0
- package/build/es/components/index.js +5 -0
- package/build/es/hooks/index.d.ts +1 -0
- package/build/es/hooks/index.js +1 -0
- package/build/es/hooks/useRequest/index.d.ts +19 -0
- package/build/es/hooks/useRequest/index.js +28 -0
- package/build/lib/components/AntdApp/index.js +19 -0
- package/build/lib/components/CheckboxValue/index.js +38 -0
- package/build/lib/components/IconButton/index.js +91 -0
- package/build/lib/components/IconFont/index.js +67 -0
- package/build/lib/components/SwitchValue/index.js +41 -0
- package/build/lib/components/index.js +19 -0
- package/build/lib/{Button → hooks}/index.js +3 -2
- package/build/lib/hooks/useRequest/index.js +30 -0
- package/build/package.json +11 -4
- package/package.json +11 -4
- package/build/es/Button/button.d.ts +0 -6
- package/build/es/Button/button.js +0 -17
- package/build/es/Button/index.d.ts +0 -3
- package/build/es/Button/index.js +0 -2
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -1
- package/build/lib/Button/button.js +0 -22
- package/build/lib/index.js +0 -8
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var antd_1 = require("antd");
|
|
30
|
+
var CheckboxValue = function (_a) {
|
|
31
|
+
var checked = _a.checked, onChange = _a.onChange, _b = _a.trueValue, trueValue = _b === void 0 ? true : _b, _c = _a.falseValue, falseValue = _c === void 0 ? false : _c, _d = _a.trueLabel, trueLabel = _d === void 0 ? '' : _d, _e = _a.falseLabel, falseLabel = _e === void 0 ? '' : _e, children = _a.children, props = __rest(_a, ["checked", "onChange", "trueValue", "falseValue", "trueLabel", "falseLabel", "children"]);
|
|
32
|
+
var _checked = checked === trueValue;
|
|
33
|
+
var change = function (e) {
|
|
34
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.checked ? trueValue : falseValue, e);
|
|
35
|
+
};
|
|
36
|
+
return (react_1.default.createElement(antd_1.Checkbox, __assign({ checked: _checked, onChange: change }, props), children || (_checked ? trueLabel : falseLabel)));
|
|
37
|
+
};
|
|
38
|
+
exports.default = CheckboxValue;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
|
+
var t = {};
|
|
48
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
49
|
+
t[p] = s[p];
|
|
50
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
51
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
53
|
+
t[p[i]] = s[p[i]];
|
|
54
|
+
}
|
|
55
|
+
return t;
|
|
56
|
+
};
|
|
57
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
58
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
59
|
+
};
|
|
60
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
|
+
exports.Icon = void 0;
|
|
62
|
+
var react_1 = __importStar(require("react"));
|
|
63
|
+
var antd_1 = require("antd");
|
|
64
|
+
var lodash_es_1 = require("lodash-es");
|
|
65
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
66
|
+
var ahooks_1 = require("ahooks");
|
|
67
|
+
var IconFont_1 = __importDefault(require("@/components/IconFont"));
|
|
68
|
+
var index_module_less_1 = __importDefault(require("./index.module.less"));
|
|
69
|
+
var Icon = function (props, buttonRef) {
|
|
70
|
+
var ref = (0, react_1.useRef)(null);
|
|
71
|
+
var Icon = props.icon, _a = props.tooltipDisabled, tooltipDisabled = _a === void 0 ? false : _a, _b = props.onClick, onClick = _b === void 0 ? lodash_es_1.noop : _b, disabled = props.disabled, _c = props.size, size = _c === void 0 ? 'middle' : _c, _d = props.style, style = _d === void 0 ? {} : _d, className = props.className, _e = props.loading, loading = _e === void 0 ? false : _e, attrs = __rest(props, ["icon", "tooltipDisabled", "onClick", "disabled", "size", "style", "className", "loading"]);
|
|
72
|
+
var visible = (0, ahooks_1.useHover)(ref);
|
|
73
|
+
var createIcon = function () {
|
|
74
|
+
if ((0, lodash_es_1.isString)(Icon) && Icon.includes('icon-')) {
|
|
75
|
+
return react_1.default.createElement(IconFont_1.default, { type: Icon });
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return Icon;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
var children = (react_1.default.createElement(antd_1.Button, { onClick: onClick, size: size, disabled: disabled, style: style, ref: buttonRef, loading: loading, className: (0, classnames_1.default)([className, index_module_less_1.default.btn_icon__warp]), icon: createIcon() }));
|
|
82
|
+
if (!Icon) {
|
|
83
|
+
throw new Error('IconButton 组件必须传入 icon 属性');
|
|
84
|
+
}
|
|
85
|
+
return (react_1.default.createElement(react_1.Fragment, null,
|
|
86
|
+
tooltipDisabled && children,
|
|
87
|
+
!tooltipDisabled && (react_1.default.createElement(antd_1.Tooltip, __assign({ open: visible, trigger: 'contextMenu', destroyTooltipOnHide: true }, attrs),
|
|
88
|
+
react_1.default.createElement("span", { ref: ref, style: { display: 'inline-block' }, className: "icon-button-box" }, children)))));
|
|
89
|
+
};
|
|
90
|
+
exports.Icon = Icon;
|
|
91
|
+
exports.default = react_1.default.forwardRef(exports.Icon);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
|
+
var t = {};
|
|
48
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
49
|
+
t[p] = s[p];
|
|
50
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
51
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
53
|
+
t[p[i]] = s[p[i]];
|
|
54
|
+
}
|
|
55
|
+
return t;
|
|
56
|
+
};
|
|
57
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
+
var react_1 = __importStar(require("react"));
|
|
59
|
+
var IconFont = (0, react_1.forwardRef)(function (_a, ref) {
|
|
60
|
+
var _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.symbol, symbol = _d === void 0 ? false : _d, attrs = __rest(_a, ["type", "className", "symbol"]);
|
|
61
|
+
if (symbol) {
|
|
62
|
+
return (react_1.default.createElement("svg", __assign({ className: "iconfont-symbol ".concat(type, " ").concat(className), "aria-hidden": "true", ref: ref }, attrs),
|
|
63
|
+
react_1.default.createElement("use", { xlinkHref: "#".concat(type) })));
|
|
64
|
+
}
|
|
65
|
+
return (react_1.default.createElement("i", __assign({ className: "iconfont ".concat(type, " ").concat(className), ref: ref }, attrs)));
|
|
66
|
+
});
|
|
67
|
+
exports.default = IconFont;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var antd_1 = require("antd");
|
|
30
|
+
/**
|
|
31
|
+
* Switch 可自定义 value
|
|
32
|
+
*/
|
|
33
|
+
var Index = function (_a) {
|
|
34
|
+
var checked = _a.checked, onChange = _a.onChange, _b = _a.trueValue, trueValue = _b === void 0 ? true : _b, _c = _a.falseValue, falseValue = _c === void 0 ? false : _c, props = __rest(_a, ["checked", "onChange", "trueValue", "falseValue"]);
|
|
35
|
+
var _checked = checked === trueValue;
|
|
36
|
+
var change = function (checked, event) {
|
|
37
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(checked ? trueValue : falseValue, event);
|
|
38
|
+
};
|
|
39
|
+
return (react_1.default.createElement(antd_1.Switch, __assign({ checked: _checked, onChange: change }, props)));
|
|
40
|
+
};
|
|
41
|
+
exports.default = Index;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.modal = exports.notification = exports.message = exports.App = exports.SwitchValue = exports.IconFont = exports.IconButton = exports.CheckboxValue = void 0;
|
|
7
|
+
var CheckboxValue_1 = require("./CheckboxValue");
|
|
8
|
+
Object.defineProperty(exports, "CheckboxValue", { enumerable: true, get: function () { return __importDefault(CheckboxValue_1).default; } });
|
|
9
|
+
var IconButton_1 = require("./IconButton");
|
|
10
|
+
Object.defineProperty(exports, "IconButton", { enumerable: true, get: function () { return __importDefault(IconButton_1).default; } });
|
|
11
|
+
var IconFont_1 = require("./IconFont");
|
|
12
|
+
Object.defineProperty(exports, "IconFont", { enumerable: true, get: function () { return __importDefault(IconFont_1).default; } });
|
|
13
|
+
var SwitchValue_1 = require("./SwitchValue");
|
|
14
|
+
Object.defineProperty(exports, "SwitchValue", { enumerable: true, get: function () { return __importDefault(SwitchValue_1).default; } });
|
|
15
|
+
var AntdApp_1 = require("./AntdApp");
|
|
16
|
+
Object.defineProperty(exports, "App", { enumerable: true, get: function () { return __importDefault(AntdApp_1).default; } });
|
|
17
|
+
Object.defineProperty(exports, "message", { enumerable: true, get: function () { return AntdApp_1.message; } });
|
|
18
|
+
Object.defineProperty(exports, "notification", { enumerable: true, get: function () { return AntdApp_1.notification; } });
|
|
19
|
+
Object.defineProperty(exports, "modal", { enumerable: true, get: function () { return AntdApp_1.modal; } });
|
|
@@ -3,5 +3,6 @@ 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
|
-
|
|
7
|
-
|
|
6
|
+
exports.useRequest = void 0;
|
|
7
|
+
var useRequest_1 = require("./useRequest");
|
|
8
|
+
Object.defineProperty(exports, "useRequest", { enumerable: true, get: function () { return __importDefault(useRequest_1).default; } });
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var ahooks_1 = require("ahooks");
|
|
15
|
+
var AntdApp_1 = require("@/components/AntdApp");
|
|
16
|
+
function useWrappedRequest(service, options, plugins) {
|
|
17
|
+
var result = (0, ahooks_1.useRequest)(service, __assign(__assign({}, options), { onError: function (error, params) {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
if ((_a = options === null || options === void 0 ? void 0 : options.errorMessage) !== null && _a !== void 0 ? _a : true) {
|
|
20
|
+
AntdApp_1.message.error(error.message);
|
|
21
|
+
}
|
|
22
|
+
(_b = options === null || options === void 0 ? void 0 : options.onError) === null || _b === void 0 ? void 0 : _b.call(options, error, params);
|
|
23
|
+
} }), plugins);
|
|
24
|
+
// 处理 data 可能嵌套的情况,直接返回data,而不是返回 { code, data, success } 形式
|
|
25
|
+
var normalizedData = (result.data && typeof result.data === 'object' && 'data' in result.data
|
|
26
|
+
? result.data.data
|
|
27
|
+
: result.data);
|
|
28
|
+
return __assign(__assign({}, result), { data: normalizedData });
|
|
29
|
+
}
|
|
30
|
+
exports.default = useWrappedRequest;
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmirror-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "build/lib/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
@@ -22,23 +22,30 @@
|
|
|
22
22
|
"publish:npm": "npm publish --access public"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
+
"antd": ">=5.0.0",
|
|
25
26
|
"react": ">=16.9.0",
|
|
26
|
-
"react-dom": ">=16.9.0"
|
|
27
|
-
"antd": ">=5.0.0"
|
|
27
|
+
"react-dom": ">=16.9.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@ant-design/icons": "^5.6.1"
|
|
30
|
+
"@ant-design/icons": "^5.6.1",
|
|
31
|
+
"ahooks": "^3.8.5",
|
|
32
|
+
"lodash-es": "^4.17.21",
|
|
33
|
+
"react-intl": "^7.1.11",
|
|
34
|
+
"react-transition-group": "^4.4.5"
|
|
31
35
|
},
|
|
32
36
|
"devDependencies": {
|
|
37
|
+
"@types/lodash-es": "^4.17.12",
|
|
33
38
|
"@types/node": "^22.13.10",
|
|
34
39
|
"@types/react": "^19.0.10",
|
|
35
40
|
"@types/react-dom": "^19.0.4",
|
|
41
|
+
"@types/react-transition-group": "^4.4.12",
|
|
36
42
|
"@vitejs/plugin-react-swc": "^3.8.0",
|
|
37
43
|
"antd": "^5.24.3",
|
|
38
44
|
"eslint": "^9.21.0",
|
|
39
45
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
40
46
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
41
47
|
"globals": "^15.15.0",
|
|
48
|
+
"less": "^4.3.0",
|
|
42
49
|
"react": "^19.0.0",
|
|
43
50
|
"react-dom": "^19.0.0",
|
|
44
51
|
"typescript": "~5.7.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmirror-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "build/lib/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
@@ -22,23 +22,30 @@
|
|
|
22
22
|
"publish:npm": "npm publish --access public"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
+
"antd": ">=5.0.0",
|
|
25
26
|
"react": ">=16.9.0",
|
|
26
|
-
"react-dom": ">=16.9.0"
|
|
27
|
-
"antd": ">=5.0.0"
|
|
27
|
+
"react-dom": ">=16.9.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@ant-design/icons": "^5.6.1"
|
|
30
|
+
"@ant-design/icons": "^5.6.1",
|
|
31
|
+
"ahooks": "^3.8.5",
|
|
32
|
+
"lodash-es": "^4.17.21",
|
|
33
|
+
"react-intl": "^7.1.11",
|
|
34
|
+
"react-transition-group": "^4.4.5"
|
|
31
35
|
},
|
|
32
36
|
"devDependencies": {
|
|
37
|
+
"@types/lodash-es": "^4.17.12",
|
|
33
38
|
"@types/node": "^22.13.10",
|
|
34
39
|
"@types/react": "^19.0.10",
|
|
35
40
|
"@types/react-dom": "^19.0.4",
|
|
41
|
+
"@types/react-transition-group": "^4.4.12",
|
|
36
42
|
"@vitejs/plugin-react-swc": "^3.8.0",
|
|
37
43
|
"antd": "^5.24.3",
|
|
38
44
|
"eslint": "^9.21.0",
|
|
39
45
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
40
46
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
41
47
|
"globals": "^15.15.0",
|
|
48
|
+
"less": "^4.3.0",
|
|
42
49
|
"react": "^19.0.0",
|
|
43
50
|
"react-dom": "^19.0.0",
|
|
44
51
|
"typescript": "~5.7.2",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import { Button as AntButton } from 'antd';
|
|
14
|
-
var Button = function (props) {
|
|
15
|
-
return React.createElement(AntButton, __assign({}, props));
|
|
16
|
-
};
|
|
17
|
-
export default Button;
|
package/build/es/Button/index.js
DELETED
package/build/es/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
package/build/es/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from './Button';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
var react_1 = __importDefault(require("react"));
|
|
18
|
-
var antd_1 = require("antd");
|
|
19
|
-
var Button = function (props) {
|
|
20
|
-
return react_1.default.createElement(antd_1.Button, __assign({}, props));
|
|
21
|
-
};
|
|
22
|
-
exports.default = Button;
|
package/build/lib/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Button = void 0;
|
|
7
|
-
var Button_1 = require("./Button");
|
|
8
|
-
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(Button_1).default; } });
|