xmirror-components 1.0.1 → 1.0.3

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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/build/LICENSE +21 -0
  3. package/build/dist/xmirror-components.css +1 -0
  4. package/build/dist/xmirror-components.js +784 -0
  5. package/build/dist/xmirror-components.umd.cjs +35 -0
  6. package/build/es/AntdApp/index.d.ts +12 -0
  7. package/build/es/AntdApp/index.js +14 -0
  8. package/build/es/Button/button.d.ts +6 -0
  9. package/build/es/Button/button.js +22 -0
  10. package/build/es/Button/index.d.ts +3 -0
  11. package/build/es/Button/index.js +7 -0
  12. package/build/es/CheckboxValue/index.d.ts +40 -0
  13. package/build/es/CheckboxValue/index.js +33 -0
  14. package/build/es/ChunkUploader/FileItem.d.ts +13 -0
  15. package/build/es/ChunkUploader/FileItem.js +472 -0
  16. package/build/es/ChunkUploader/UploaderContext.d.ts +8 -0
  17. package/build/es/ChunkUploader/UploaderContext.js +65 -0
  18. package/build/es/ChunkUploader/generateFileUniqueID.d.ts +2 -0
  19. package/build/es/ChunkUploader/generateFileUniqueID.js +140 -0
  20. package/build/es/ChunkUploader/index.d.ts +4 -0
  21. package/build/es/ChunkUploader/index.js +259 -0
  22. package/build/es/GlobalLoading/index.d.ts +11 -0
  23. package/build/es/GlobalLoading/index.js +32 -0
  24. package/build/es/IconButton/index.d.ts +42 -0
  25. package/build/es/IconButton/index.js +51 -0
  26. package/build/es/IconFont/index.d.ts +21 -0
  27. package/build/es/IconFont/index.js +32 -0
  28. package/build/es/LevelGroup/index.d.ts +10 -0
  29. package/build/es/LevelGroup/index.js +33 -0
  30. package/build/es/LevelTag/index.d.ts +21 -0
  31. package/build/es/LevelTag/index.js +84 -0
  32. package/build/es/SearchArea/Item/index.d.ts +13 -0
  33. package/build/es/SearchArea/Item/index.js +38 -0
  34. package/build/es/SearchArea/ToggleButton/index.d.ts +9 -0
  35. package/build/es/SearchArea/ToggleButton/index.js +24 -0
  36. package/build/es/SearchArea/index.d.ts +13 -0
  37. package/build/es/SearchArea/index.js +153 -0
  38. package/build/es/SwitchValue/index.d.ts +30 -0
  39. package/build/es/SwitchValue/index.js +36 -0
  40. package/build/es/Table/Footer/index.d.ts +3 -0
  41. package/build/es/Table/Footer/index.js +82 -0
  42. package/build/es/Table/PopoverSetColumns/index.d.ts +11 -0
  43. package/build/es/Table/PopoverSetColumns/index.js +164 -0
  44. package/build/es/Table/index.d.ts +4 -0
  45. package/build/es/Table/index.js +230 -0
  46. package/build/es/Uploader/index.d.ts +10 -0
  47. package/build/es/Uploader/index.js +175 -0
  48. package/build/es/index.d.ts +5 -0
  49. package/build/es/index.js +5 -0
  50. package/build/lib/AntdApp/index.js +19 -0
  51. package/build/lib/Button/button.js +22 -0
  52. package/build/lib/Button/index.js +7 -0
  53. package/build/lib/CheckboxValue/index.js +38 -0
  54. package/build/lib/IconButton/index.js +91 -0
  55. package/build/lib/IconFont/index.js +67 -0
  56. package/build/lib/SwitchValue/index.js +41 -0
  57. package/build/lib/index.d.ts +1 -0
  58. package/build/lib/index.js +19 -0
  59. package/build/package.json +64 -0
  60. package/package.json +47 -23
  61. package/dist/index.es.js +0 -470
  62. package/dist/index.umd.js +0 -31
  63. /package/{dist → build/dist}/vite.svg +0 -0
@@ -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 @@
1
+ export { }
@@ -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; } });
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "xmirror-components",
3
+ "version": "1.0.3",
4
+ "type": "module",
5
+ "main": "build/lib/index.js",
6
+ "module": "build/es/index.js",
7
+ "types": "build/lib/index.d.ts",
8
+ "files": [
9
+ "build"
10
+ ],
11
+ "scripts": {
12
+ "dev": "vite",
13
+ "build": "npm run build:types && npm run build:es && npm run build:lib && npm run build:dist && npm run build:copy-files",
14
+ "build:copy-files": "cp package.json LICENSE build/",
15
+ "build:types": "tsc -p tsconfig.build.json",
16
+ "build:es": "tsc -p tsconfig.build.json --outDir build/es --module ESNext",
17
+ "build:lib": "tsc -p tsconfig.build.json --outDir build/lib --module CommonJS",
18
+ "build:dist": "vite build",
19
+ "lint": "eslint .",
20
+ "preview": "vite preview",
21
+ "prepublishOnly": "npm run build",
22
+ "publish:npm": "npm publish --access public"
23
+ },
24
+ "peerDependencies": {
25
+ "antd": ">=5.0.0",
26
+ "react": ">=16.9.0",
27
+ "react-dom": ">=16.9.0"
28
+ },
29
+ "dependencies": {
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"
35
+ },
36
+ "devDependencies": {
37
+ "@types/lodash-es": "^4.17.12",
38
+ "@types/node": "^22.13.10",
39
+ "@types/react": "^19.0.10",
40
+ "@types/react-dom": "^19.0.4",
41
+ "@types/react-transition-group": "^4.4.12",
42
+ "@vitejs/plugin-react-swc": "^3.8.0",
43
+ "antd": "^5.24.3",
44
+ "eslint": "^9.21.0",
45
+ "eslint-plugin-react-hooks": "^5.1.0",
46
+ "eslint-plugin-react-refresh": "^0.4.19",
47
+ "globals": "^15.15.0",
48
+ "less": "^4.3.0",
49
+ "react": "^19.0.0",
50
+ "react-dom": "^19.0.0",
51
+ "typescript": "~5.7.2",
52
+ "typescript-eslint": "^8.24.1",
53
+ "vite": "^6.2.0",
54
+ "vite-plugin-dts": "^4.5.3"
55
+ },
56
+ "keywords": [
57
+ "react",
58
+ "antd",
59
+ "components",
60
+ "ui"
61
+ ],
62
+ "author": "",
63
+ "license": "MIT"
64
+ }
package/package.json CHANGED
@@ -1,40 +1,64 @@
1
1
  {
2
2
  "name": "xmirror-components",
3
- "version": "1.0.1",
4
- "license": "MIT",
3
+ "version": "1.0.3",
5
4
  "type": "module",
6
- "main": "dist/index.js",
7
- "module": "dist/index.esm.js",
8
- "types": "dist/index.d.ts",
9
- "description": "A component library based on ant-design secondary development",
5
+ "main": "build/lib/index.js",
6
+ "module": "build/es/index.js",
7
+ "types": "build/lib/index.d.ts",
10
8
  "files": [
11
- "dist"
9
+ "build"
12
10
  ],
13
11
  "scripts": {
14
12
  "dev": "vite",
13
+ "build": "npm run build:types && npm run build:es && npm run build:lib && npm run build:dist && npm run build:copy-files",
14
+ "build:copy-files": "cp package.json LICENSE build/",
15
15
  "build:types": "tsc -p tsconfig.build.json",
16
- "build": "npm run build:types && vite build --mode lib",
16
+ "build:es": "tsc -p tsconfig.build.json --outDir build/es --module ESNext",
17
+ "build:lib": "tsc -p tsconfig.build.json --outDir build/lib --module CommonJS",
18
+ "build:dist": "vite build",
19
+ "lint": "eslint .",
17
20
  "preview": "vite preview",
18
21
  "prepublishOnly": "npm run build",
19
- "lint": "eslint 'src/**/*.{ts,tsx,js,jsx}'",
20
- "lint:fix": "eslint 'src/**/*.{ts,tsx,js,jsx}' --fix"
22
+ "publish:npm": "npm publish --access public"
21
23
  },
22
24
  "peerDependencies": {
23
- "antd": "^5.24.2",
24
- "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
25
- "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
25
+ "antd": ">=5.0.0",
26
+ "react": ">=16.9.0",
27
+ "react-dom": ">=16.9.0"
28
+ },
29
+ "dependencies": {
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"
26
35
  },
27
36
  "devDependencies": {
28
- "@types/node": "^22.13.9",
29
- "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
30
- "@types/react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
31
- "@typescript-eslint/parser": "^8.26.0",
37
+ "@types/lodash-es": "^4.17.12",
38
+ "@types/node": "^22.13.10",
39
+ "@types/react": "^19.0.10",
40
+ "@types/react-dom": "^19.0.4",
41
+ "@types/react-transition-group": "^4.4.12",
32
42
  "@vitejs/plugin-react-swc": "^3.8.0",
43
+ "antd": "^5.24.3",
33
44
  "eslint": "^9.21.0",
34
- "@typescript-eslint/eslint-plugin": "^8.26.0",
35
- "globals": "^16.0.0",
36
- "neostandard": "^0.12.1",
37
- "typescript": "*",
38
- "vite": "^6.2.0"
39
- }
45
+ "eslint-plugin-react-hooks": "^5.1.0",
46
+ "eslint-plugin-react-refresh": "^0.4.19",
47
+ "globals": "^15.15.0",
48
+ "less": "^4.3.0",
49
+ "react": "^19.0.0",
50
+ "react-dom": "^19.0.0",
51
+ "typescript": "~5.7.2",
52
+ "typescript-eslint": "^8.24.1",
53
+ "vite": "^6.2.0",
54
+ "vite-plugin-dts": "^4.5.3"
55
+ },
56
+ "keywords": [
57
+ "react",
58
+ "antd",
59
+ "components",
60
+ "ui"
61
+ ],
62
+ "author": "",
63
+ "license": "MIT"
40
64
  }