@xfe-repo/mini-components 0.0.4 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -15
- package/dist/index.mjs +6 -6
- package/package.json +10 -8
package/dist/index.js
CHANGED
|
@@ -27,26 +27,30 @@ function _object_spread(target) {
|
|
|
27
27
|
}
|
|
28
28
|
return target;
|
|
29
29
|
}
|
|
30
|
+
function _type_of(obj) {
|
|
31
|
+
"@swc/helpers - typeof";
|
|
32
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
33
|
+
}
|
|
30
34
|
var __create = Object.create;
|
|
31
35
|
var __defProp = Object.defineProperty;
|
|
32
36
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
33
37
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
34
38
|
var __getProtoOf = Object.getPrototypeOf;
|
|
35
39
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
36
|
-
var __export = function(target, all) {
|
|
40
|
+
var __export = function __export(target, all) {
|
|
37
41
|
for(var name in all)__defProp(target, name, {
|
|
38
42
|
get: all[name],
|
|
39
43
|
enumerable: true
|
|
40
44
|
});
|
|
41
45
|
};
|
|
42
|
-
var __copyProps = function(to, from, except, desc) {
|
|
43
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
46
|
+
var __copyProps = function __copyProps(to, from, except, desc) {
|
|
47
|
+
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
44
48
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
45
49
|
try {
|
|
46
50
|
var _loop = function() {
|
|
47
51
|
var key = _step.value;
|
|
48
52
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
49
|
-
get: function() {
|
|
53
|
+
get: function get() {
|
|
50
54
|
return from[key];
|
|
51
55
|
},
|
|
52
56
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -70,7 +74,7 @@ var __copyProps = function(to, from, except, desc) {
|
|
|
70
74
|
}
|
|
71
75
|
return to;
|
|
72
76
|
};
|
|
73
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
77
|
+
var __toESM = function __toESM(mod, isNodeMode, target) {
|
|
74
78
|
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
75
79
|
// file that has been converted to a CommonJS file using a Babel-
|
|
76
80
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -80,19 +84,19 @@ var __toESM = function(mod, isNodeMode, target) {
|
|
|
80
84
|
enumerable: true
|
|
81
85
|
}) : target, mod);
|
|
82
86
|
};
|
|
83
|
-
var __toCommonJS = function(mod) {
|
|
87
|
+
var __toCommonJS = function __toCommonJS(mod) {
|
|
84
88
|
return __copyProps(__defProp({}, "__esModule", {
|
|
85
89
|
value: true
|
|
86
90
|
}), mod);
|
|
87
91
|
};
|
|
88
92
|
// src/index.ts
|
|
89
|
-
var
|
|
90
|
-
__export(
|
|
91
|
-
Loading: function() {
|
|
93
|
+
var index_exports = {};
|
|
94
|
+
__export(index_exports, {
|
|
95
|
+
Loading: function Loading() {
|
|
92
96
|
return Loading_default;
|
|
93
97
|
}
|
|
94
98
|
});
|
|
95
|
-
module.exports = __toCommonJS(
|
|
99
|
+
module.exports = __toCommonJS(index_exports);
|
|
96
100
|
// src/Loading/index.tsx
|
|
97
101
|
var import_react4 = require("react");
|
|
98
102
|
// src/Loading/LoadingCircle.tsx
|
|
@@ -100,8 +104,8 @@ var import_react = require("react");
|
|
|
100
104
|
var import_classnames = __toESM(require("classnames"));
|
|
101
105
|
var import_components = require("@tarojs/components");
|
|
102
106
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
103
|
-
var LoadingCircle = function(props) {
|
|
104
|
-
var className = props.className, _props_tips = props.tips, tips = _props_tips === void 0 ? "
|
|
107
|
+
var LoadingCircle = function LoadingCircle(props) {
|
|
108
|
+
var className = props.className, _props_tips = props.tips, tips = _props_tips === void 0 ? "\u52A0\u8F7D\u4E2D" : _props_tips, onClick = props.onClick;
|
|
105
109
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.View, {
|
|
106
110
|
className: (0, import_classnames.default)("circle_loading", !!className && className),
|
|
107
111
|
onClick: onClick,
|
|
@@ -129,7 +133,7 @@ var import_react2 = require("react");
|
|
|
129
133
|
var import_classnames2 = __toESM(require("classnames"));
|
|
130
134
|
var import_components2 = require("@tarojs/components");
|
|
131
135
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
132
|
-
var LoadingRect = function(props) {
|
|
136
|
+
var LoadingRect = function LoadingRect(props) {
|
|
133
137
|
var className = props.className, _props_rectCount = props.rectCount, rectCount = _props_rectCount === void 0 ? 5 : _props_rectCount, tips = props.tips, onClick = props.onClick;
|
|
134
138
|
var max = rectCount <= 10 ? rectCount : 10;
|
|
135
139
|
var rectNodes = [];
|
|
@@ -155,9 +159,9 @@ var LoadingRect = function(props) {
|
|
|
155
159
|
var LoadingRect_default = (0, import_react2.memo)(LoadingRect);
|
|
156
160
|
// src/Loading/LoadingList.tsx
|
|
157
161
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
158
|
-
var LoadingList = function(props) {
|
|
162
|
+
var LoadingList = function LoadingList(props) {
|
|
159
163
|
var className = props.className, hasMore = props.hasMore, _props_loading = props.loading, loading = _props_loading === void 0 ? true : _props_loading, hide = props.hide, onClick = props.onClick;
|
|
160
|
-
var _props_noMoreText = props.noMoreText, noMoreText = _props_noMoreText === void 0 ? "
|
|
164
|
+
var _props_noMoreText = props.noMoreText, noMoreText = _props_noMoreText === void 0 ? "\u6CA1\u6709\u66F4\u591A\u4E86" : _props_noMoreText, _props_loadingText = props.loadingText, loadingText = _props_loadingText === void 0 ? "\u52A0\u8F7D\u4E2D" : _props_loadingText, _props_loadMoreText = props.loadMoreText, loadMoreText = _props_loadMoreText === void 0 ? "\u52A0\u8F7D\u66F4\u591A" : _props_loadMoreText;
|
|
161
165
|
if (hide) return null;
|
|
162
166
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_components3.View, {
|
|
163
167
|
className: (0, import_classnames3.default)("list_loading", !!className && className),
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// src/Loading/index.tsx
|
|
2
1
|
function _define_property(obj, key, value) {
|
|
3
2
|
if (key in obj) {
|
|
4
3
|
Object.defineProperty(obj, key, {
|
|
@@ -27,14 +26,15 @@ function _object_spread(target) {
|
|
|
27
26
|
}
|
|
28
27
|
return target;
|
|
29
28
|
}
|
|
29
|
+
// src/Loading/index.tsx
|
|
30
30
|
import { memo as memo4 } from "react";
|
|
31
31
|
// src/Loading/LoadingCircle.tsx
|
|
32
32
|
import { memo } from "react";
|
|
33
33
|
import classnames from "classnames";
|
|
34
34
|
import { View, Text, Image } from "@tarojs/components";
|
|
35
35
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
-
var LoadingCircle = function(props) {
|
|
37
|
-
var className = props.className, _props_tips = props.tips, tips = _props_tips === void 0 ? "
|
|
36
|
+
var LoadingCircle = function LoadingCircle(props) {
|
|
37
|
+
var className = props.className, _props_tips = props.tips, tips = _props_tips === void 0 ? "\u52A0\u8F7D\u4E2D" : _props_tips, onClick = props.onClick;
|
|
38
38
|
return /* @__PURE__ */ jsxs(View, {
|
|
39
39
|
className: classnames("circle_loading", !!className && className),
|
|
40
40
|
onClick: onClick,
|
|
@@ -62,7 +62,7 @@ import { memo as memo2 } from "react";
|
|
|
62
62
|
import classnames2 from "classnames";
|
|
63
63
|
import { View as View2, Text as Text2 } from "@tarojs/components";
|
|
64
64
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
65
|
-
var LoadingRect = function(props) {
|
|
65
|
+
var LoadingRect = function LoadingRect(props) {
|
|
66
66
|
var className = props.className, _props_rectCount = props.rectCount, rectCount = _props_rectCount === void 0 ? 5 : _props_rectCount, tips = props.tips, onClick = props.onClick;
|
|
67
67
|
var max = rectCount <= 10 ? rectCount : 10;
|
|
68
68
|
var rectNodes = [];
|
|
@@ -88,9 +88,9 @@ var LoadingRect = function(props) {
|
|
|
88
88
|
var LoadingRect_default = memo2(LoadingRect);
|
|
89
89
|
// src/Loading/LoadingList.tsx
|
|
90
90
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
91
|
-
var LoadingList = function(props) {
|
|
91
|
+
var LoadingList = function LoadingList(props) {
|
|
92
92
|
var className = props.className, hasMore = props.hasMore, _props_loading = props.loading, loading = _props_loading === void 0 ? true : _props_loading, hide = props.hide, onClick = props.onClick;
|
|
93
|
-
var _props_noMoreText = props.noMoreText, noMoreText = _props_noMoreText === void 0 ? "
|
|
93
|
+
var _props_noMoreText = props.noMoreText, noMoreText = _props_noMoreText === void 0 ? "\u6CA1\u6709\u66F4\u591A\u4E86" : _props_noMoreText, _props_loadingText = props.loadingText, loadingText = _props_loadingText === void 0 ? "\u52A0\u8F7D\u4E2D" : _props_loadingText, _props_loadMoreText = props.loadMoreText, loadMoreText = _props_loadMoreText === void 0 ? "\u52A0\u8F7D\u66F4\u591A" : _props_loadMoreText;
|
|
94
94
|
if (hide) return null;
|
|
95
95
|
return /* @__PURE__ */ jsxs3(View3, {
|
|
96
96
|
className: classnames3("list_loading", !!className && className),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xfe-repo/mini-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,22 +14,24 @@
|
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"default": "./dist/index.js"
|
|
16
16
|
}
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
|
+
"./dist/index.css": "./dist/index.css"
|
|
18
19
|
},
|
|
19
20
|
"files": [
|
|
20
21
|
"dist"
|
|
21
22
|
],
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
24
|
+
"@tarojs/components": "4.0.8",
|
|
25
|
+
"classnames": "^2.5.1"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@swc/core": "^1.3.100",
|
|
28
|
-
"@types/node": "^20.
|
|
29
|
+
"@types/node": "^20.17.0",
|
|
29
30
|
"@types/react": "^18",
|
|
30
31
|
"esbuild-plugin-less": "^1.3.9",
|
|
31
|
-
"
|
|
32
|
-
"@xfe-repo/
|
|
32
|
+
"eslint": "8.57.1",
|
|
33
|
+
"@xfe-repo/eslint-config": "1.5.0",
|
|
34
|
+
"@xfe-repo/typescript-config": "1.5.0"
|
|
33
35
|
},
|
|
34
36
|
"publishConfig": {
|
|
35
37
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +39,7 @@
|
|
|
37
39
|
"scripts": {
|
|
38
40
|
"build": "tsup",
|
|
39
41
|
"dev": "tsup --watch",
|
|
40
|
-
"lint": "eslint \"src/**/*.ts*\"",
|
|
42
|
+
"lint": "eslint \"src/**/*.ts*\" --fix",
|
|
41
43
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
42
44
|
}
|
|
43
45
|
}
|