tntd 3.0.71 → 3.0.73
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/es/button/style/mixin.less +2 -2
- package/es/checkbox/checkbox-group.js +12 -0
- package/es/checkbox/checkbox-group.js.map +1 -0
- package/es/radio/radio-group.js +12 -0
- package/es/radio/radio-group.js.map +1 -0
- package/es/steps/stepStyle/small.less +5 -0
- package/es/table/total-shower.js +16 -0
- package/es/table/total-shower.js.map +1 -0
- package/es/tntd-action/Action.js +10 -87
- package/es/utils/simple-template.js +19 -0
- package/es/utils/simple-template.js.map +1 -0
- package/lib/button/style/mixin.less +2 -2
- package/lib/checkbox/checkbox-group.d.ts +8 -0
- package/lib/checkbox/checkbox-group.d.ts.map +1 -0
- package/lib/checkbox/checkbox-group.js +16 -0
- package/lib/checkbox/checkbox-group.js.map +1 -0
- package/lib/radio/radio-group.d.ts +8 -0
- package/lib/radio/radio-group.d.ts.map +1 -0
- package/lib/radio/radio-group.js +16 -0
- package/lib/radio/radio-group.js.map +1 -0
- package/lib/steps/stepStyle/small.less +5 -0
- package/lib/table/total-shower.d.ts +9 -0
- package/lib/table/total-shower.d.ts.map +1 -0
- package/lib/table/total-shower.js +20 -0
- package/lib/table/total-shower.js.map +1 -0
- package/lib/utils/simple-template.d.ts +9 -0
- package/lib/utils/simple-template.d.ts.map +1 -0
- package/lib/utils/simple-template.js +19 -0
- package/lib/utils/simple-template.js.map +1 -0
- package/package.json +114 -113
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
&:hover,
|
|
52
52
|
&:focus {
|
|
53
|
-
.button-color(~`colorPalette('@{btn-primary-bg}',
|
|
53
|
+
.button-color(~`colorPalette('@{btn-primary-bg}', 6) `; @background; ~`colorPalette('@{btn-primary-bg}', 6) `);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
&:active,
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
|
|
257
257
|
// link button style
|
|
258
258
|
.btn-link() {
|
|
259
|
-
.button-variant-other(@link-color, transparent,
|
|
259
|
+
.button-variant-other(@link-color, transparent, @btn-default-border);
|
|
260
260
|
box-shadow: none;
|
|
261
261
|
|
|
262
262
|
&:hover,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
require("react");
|
|
8
|
+
var _checkbox = _interopRequireDefault(require("antd/es/checkbox"));
|
|
9
|
+
var _connect = require("../connect");
|
|
10
|
+
var _previewText = require("../preview-text");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
var _default = exports["default"] = (0, _connect.connectReadonlyComponent)(_checkbox["default"].Group, _previewText.PreviewText.Select);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sourceRoot":"","sources":["../../src/checkbox/checkbox-group.tsx"],"names":[],"mappings":"AAAA,OAAkC,OAAO,CAAA;AACzC,OAAO,QAAQ,MAAM,kBAAkB,CAAA;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAM7C,eAAe,wBAAwB,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA","sourcesContent":["import React, { forwardRef } from 'react'\nimport Checkbox from 'antd/es/checkbox'\nimport type { CheckboxGroupProps as AntdCheckboxGroupProps } from 'antd/es/checkbox/Group'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\n\nexport type CheckboxGroupProps = AntdCheckboxGroupProps & {\n readonly?: boolean\n}\n\nexport default connectReadonlyComponent(Checkbox.Group, PreviewText.Select)\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
require("react");
|
|
8
|
+
var _radio = _interopRequireDefault(require("antd/es/radio"));
|
|
9
|
+
var _connect = require("../connect");
|
|
10
|
+
var _previewText = _interopRequireDefault(require("../preview-text"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
var _default = exports["default"] = (0, _connect.connectReadonlyComponent)(_radio["default"].Group, _previewText["default"].Select);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/radio/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAkB,OAAO,CAAA;AAEzB,OAAO,KAAK,MAAM,eAAe,CAAA;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,WAAW,MAAM,iBAAiB,CAAA;AAMzC,eAAe,wBAAwB,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport type { RadioGroupProps as AntdRadioGroupProps } from 'antd/es/radio'\nimport Radio from 'antd/es/radio'\nimport { connectReadonlyComponent } from '../connect'\nimport PreviewText from '../preview-text'\n\nexport type RadioGroupProps = AntdRadioGroupProps & {\n readonly?: boolean\n}\n\nexport default connectReadonlyComponent(Radio.Group, PreviewText.Select)\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TotalShower = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _utils = require("../utils");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
var TotalShower = exports.TotalShower = function TotalShower(_ref) {
|
|
11
|
+
var total = _ref.total,
|
|
12
|
+
locale = _ref.locale;
|
|
13
|
+
return _react["default"].createElement(_react["default"].Fragment, null, (0, _utils.simpleTemplate)(locale.total, {
|
|
14
|
+
total: total
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"total-shower.js","sourceRoot":"","sources":["../../src/table/total-shower.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,KAAK,EACL,MAAM,GAMP,EAAE,EAAE;IACH,OAAO,0CAAG,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAI,CAAA;AACvD,CAAC,CAAA","sourcesContent":["import React from 'react'\n\nimport type { TableProps as AntdTableProps } from 'antd/es/table'\nimport { simpleTemplate } from '../utils'\n\nexport const TotalShower = ({\n total,\n locale,\n}: {\n total: number\n locale: AntdTableProps<unknown>['locale'] & {\n total?: string\n }\n}) => {\n return <>{simpleTemplate(locale.total, { total })}</>\n}\n"]}
|
package/es/tntd-action/Action.js
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) {
|
|
4
|
-
"@babel/helpers - typeof";
|
|
5
|
-
|
|
6
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
-
return typeof o;
|
|
8
|
-
} : function (o) {
|
|
9
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
-
}, _typeof(o);
|
|
11
|
-
}
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
4
|
Object.defineProperty(exports, "__esModule", {
|
|
13
5
|
value: true
|
|
14
6
|
});
|
|
@@ -19,84 +11,15 @@ var _configProvider = require("antd/es/config-provider");
|
|
|
19
11
|
var _LocaleReceiver = _interopRequireDefault(require("antd/es/locale-provider/LocaleReceiver"));
|
|
20
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
13
|
var _button = require("../button");
|
|
22
|
-
function _interopRequireDefault(e) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
32
|
-
return e ? t : r;
|
|
33
|
-
})(e);
|
|
34
|
-
}
|
|
35
|
-
function _interopRequireWildcard(e, r) {
|
|
36
|
-
if (!r && e && e.__esModule) return e;
|
|
37
|
-
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
38
|
-
"default": e
|
|
39
|
-
};
|
|
40
|
-
var t = _getRequireWildcardCache(r);
|
|
41
|
-
if (t && t.has(e)) return t.get(e);
|
|
42
|
-
var n = {
|
|
43
|
-
__proto__: null
|
|
44
|
-
},
|
|
45
|
-
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
46
|
-
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
47
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
48
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
49
|
-
}
|
|
50
|
-
return n["default"] = e, t && t.set(e, n), n;
|
|
51
|
-
}
|
|
52
|
-
function _slicedToArray(r, e) {
|
|
53
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
54
|
-
}
|
|
55
|
-
function _nonIterableRest() {
|
|
56
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
57
|
-
}
|
|
58
|
-
function _unsupportedIterableToArray(r, a) {
|
|
59
|
-
if (r) {
|
|
60
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
61
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
62
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function _arrayLikeToArray(r, a) {
|
|
66
|
-
(null == a || a > r.length) && (a = r.length);
|
|
67
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
68
|
-
return n;
|
|
69
|
-
}
|
|
70
|
-
function _iterableToArrayLimit(r, l) {
|
|
71
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
72
|
-
if (null != t) {
|
|
73
|
-
var e,
|
|
74
|
-
n,
|
|
75
|
-
i,
|
|
76
|
-
u,
|
|
77
|
-
a = [],
|
|
78
|
-
f = !0,
|
|
79
|
-
o = !1;
|
|
80
|
-
try {
|
|
81
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
82
|
-
if (Object(t) !== t) return;
|
|
83
|
-
f = !1;
|
|
84
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
85
|
-
} catch (r) {
|
|
86
|
-
o = !0, n = r;
|
|
87
|
-
} finally {
|
|
88
|
-
try {
|
|
89
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
90
|
-
} finally {
|
|
91
|
-
if (o) throw n;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return a;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function _arrayWithHoles(r) {
|
|
98
|
-
if (Array.isArray(r)) return r;
|
|
99
|
-
}
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
17
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
18
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
20
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
21
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
100
23
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
101
24
|
var t = {};
|
|
102
25
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.simpleTemplate = simpleTemplate;
|
|
7
|
+
/**
|
|
8
|
+
* 简单的模板替换
|
|
9
|
+
*
|
|
10
|
+
* @param template
|
|
11
|
+
* @param data
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
function simpleTemplate(template) {
|
|
15
|
+
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
16
|
+
return template === null || template === void 0 ? void 0 : template.replace(/\${(.*?)}/g, function (match, key) {
|
|
17
|
+
return data[key.trim()].toString();
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-template.js","sourceRoot":"","sources":["../../src/utils/simple-template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,QAAiB,EAAE,OAAwC,EAAE;IAC1F,OAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;AACrF,CAAC","sourcesContent":["/**\n * 简单的模板替换\n *\n * @param template\n * @param data\n * @returns\n */\nexport function simpleTemplate(template?: string, data: Record<string, string | number> = {}) {\n return template?.replace(/\\${(.*?)}/g, (match, key) => data[key.trim()].toString())\n}\n"]}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
&:hover,
|
|
52
52
|
&:focus {
|
|
53
|
-
.button-color(~`colorPalette('@{btn-primary-bg}',
|
|
53
|
+
.button-color(~`colorPalette('@{btn-primary-bg}', 6) `; @background; ~`colorPalette('@{btn-primary-bg}', 6) `);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
&:active,
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
|
|
257
257
|
// link button style
|
|
258
258
|
.btn-link() {
|
|
259
|
-
.button-variant-other(@link-color, transparent,
|
|
259
|
+
.button-variant-other(@link-color, transparent, @btn-default-border);
|
|
260
260
|
box-shadow: none;
|
|
261
261
|
|
|
262
262
|
&:hover,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CheckboxGroupProps as AntdCheckboxGroupProps } from 'antd/lib/checkbox/Group';
|
|
3
|
+
export declare type CheckboxGroupProps = AntdCheckboxGroupProps & {
|
|
4
|
+
readonly?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<AntdCheckboxGroupProps & React.RefAttributes<unknown>>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=checkbox-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAI1F,oBAAY,kBAAkB,GAAG,sBAAsB,GAAG;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;;AAED,wBAA2E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
require("react");
|
|
8
|
+
var _checkbox = _interopRequireDefault(require("antd/lib/checkbox"));
|
|
9
|
+
var _connect = require("../connect");
|
|
10
|
+
var _previewText = require("../preview-text");
|
|
11
|
+
function _interopRequireDefault(e) {
|
|
12
|
+
return e && e.__esModule ? e : {
|
|
13
|
+
"default": e
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
var _default = exports["default"] = (0, _connect.connectReadonlyComponent)(_checkbox["default"].Group, _previewText.PreviewText.Select);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sourceRoot":"","sources":["../../src/checkbox/checkbox-group.tsx"],"names":[],"mappings":";;;;;AAAA,iBAAyC;AACzC,gEAAuC;AAEvC,wCAAqD;AACrD,kDAA6C;AAM7C,kBAAe,IAAA,kCAAwB,EAAC,kBAAQ,CAAC,KAAK,EAAE,0BAAW,CAAC,MAAM,CAAC,CAAA","sourcesContent":["import React, { forwardRef } from 'react'\nimport Checkbox from 'antd/lib/checkbox'\nimport type { CheckboxGroupProps as AntdCheckboxGroupProps } from 'antd/lib/checkbox/Group'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\n\nexport type CheckboxGroupProps = AntdCheckboxGroupProps & {\n readonly?: boolean\n}\n\nexport default connectReadonlyComponent(Checkbox.Group, PreviewText.Select)\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { RadioGroupProps as AntdRadioGroupProps } from 'antd/lib/radio';
|
|
3
|
+
export declare type RadioGroupProps = AntdRadioGroupProps & {
|
|
4
|
+
readonly?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<AntdRadioGroupProps & React.RefAttributes<unknown>>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/radio/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAK3E,oBAAY,eAAe,GAAG,mBAAmB,GAAG;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;;AAED,wBAAwE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
require("react");
|
|
8
|
+
var _radio = _interopRequireDefault(require("antd/lib/radio"));
|
|
9
|
+
var _connect = require("../connect");
|
|
10
|
+
var _previewText = _interopRequireDefault(require("../preview-text"));
|
|
11
|
+
function _interopRequireDefault(e) {
|
|
12
|
+
return e && e.__esModule ? e : {
|
|
13
|
+
"default": e
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
var _default = exports["default"] = (0, _connect.connectReadonlyComponent)(_radio["default"].Group, _previewText["default"].Select);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/radio/radio-group.tsx"],"names":[],"mappings":";;;;;AAAA,iBAAyB;AAEzB,0DAAiC;AACjC,wCAAqD;AACrD,mEAAyC;AAMzC,kBAAe,IAAA,kCAAwB,EAAC,eAAK,CAAC,KAAK,EAAE,sBAAW,CAAC,MAAM,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport type { RadioGroupProps as AntdRadioGroupProps } from 'antd/lib/radio'\nimport Radio from 'antd/lib/radio'\nimport { connectReadonlyComponent } from '../connect'\nimport PreviewText from '../preview-text'\n\nexport type RadioGroupProps = AntdRadioGroupProps & {\n readonly?: boolean\n}\n\nexport default connectReadonlyComponent(Radio.Group, PreviewText.Select)\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TableProps as AntdTableProps } from 'antd/lib/table';
|
|
3
|
+
export declare const TotalShower: ({ total, locale, }: {
|
|
4
|
+
total: number;
|
|
5
|
+
locale: import("antd/lib/table").TableLocale & {
|
|
6
|
+
total?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=total-shower.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"total-shower.d.ts","sourceRoot":"","sources":["../../src/table/total-shower.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,eAAe,CAAA;AAGjE,eAAO,MAAM,WAAW;WAIf,MAAM;;;;uBAMd,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TotalShower = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _utils = require("../utils");
|
|
9
|
+
function _interopRequireDefault(e) {
|
|
10
|
+
return e && e.__esModule ? e : {
|
|
11
|
+
"default": e
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
var TotalShower = exports.TotalShower = function TotalShower(_ref) {
|
|
15
|
+
var total = _ref.total,
|
|
16
|
+
locale = _ref.locale;
|
|
17
|
+
return _react["default"].createElement(_react["default"].Fragment, null, (0, _utils.simpleTemplate)(locale.total, {
|
|
18
|
+
total: total
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"total-shower.js","sourceRoot":"","sources":["../../src/table/total-shower.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAGzB,oCAAyC;AAElC,MAAM,WAAW,GAAG,CAAC,EAC1B,KAAK,EACL,MAAM,GAMP,EAAE,EAAE;IACH,OAAO,8DAAG,IAAA,sBAAc,EAAC,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAI,CAAA;AACvD,CAAC,CAAA;AAVY,QAAA,WAAW,eAUvB","sourcesContent":["import React from 'react'\n\nimport type { TableProps as AntdTableProps } from 'antd/lib/table'\nimport { simpleTemplate } from '../utils'\n\nexport const TotalShower = ({\n total,\n locale,\n}: {\n total: number\n locale: AntdTableProps<unknown>['locale'] & {\n total?: string\n }\n}) => {\n return <>{simpleTemplate(locale.total, { total })}</>\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-template.d.ts","sourceRoot":"","sources":["../../src/utils/simple-template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAM,sBAE3F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.simpleTemplate = simpleTemplate;
|
|
7
|
+
/**
|
|
8
|
+
* 简单的模板替换
|
|
9
|
+
*
|
|
10
|
+
* @param template
|
|
11
|
+
* @param data
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
function simpleTemplate(template) {
|
|
15
|
+
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
16
|
+
return template === null || template === void 0 ? void 0 : template.replace(/\${(.*?)}/g, function (match, key) {
|
|
17
|
+
return data[key.trim()].toString();
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-template.js","sourceRoot":"","sources":["../../src/utils/simple-template.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,QAAiB,EAAE,OAAwC,EAAE;IAC1F,OAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;AACrF,CAAC;AAFD,wCAEC","sourcesContent":["/**\n * 简单的模板替换\n *\n * @param template\n * @param data\n * @returns\n */\nexport function simpleTemplate(template?: string, data: Record<string, string | number> = {}) {\n return template?.replace(/\\${(.*?)}/g, (match, key) => data[key.trim()].toString())\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,116 +1,117 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
"name": "tntd",
|
|
3
|
+
"version": "3.0.73",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@dnd-kit/core": "~6.1.0",
|
|
7
|
+
"@dnd-kit/modifiers": "~7.0.0",
|
|
8
|
+
"@dnd-kit/sortable": "~8.0.0",
|
|
9
|
+
"@dnd-kit/utilities": "~3.2.2",
|
|
10
|
+
"@icon-park/react": "^1.3.5",
|
|
11
|
+
"@stellaris/hooks": "~0.4.6",
|
|
12
|
+
"classnames": "^2.2.6",
|
|
13
|
+
"@tntx/logo-icon": "~1.0.4",
|
|
14
|
+
"delete-all-cookies": "~0.3.0",
|
|
15
|
+
"styled-components": "^5.3.0",
|
|
16
|
+
"rc-util": "^5.25.2",
|
|
17
|
+
"rc-motion": "^2.6.1",
|
|
18
|
+
"array-tree-filter": "^2.1.0",
|
|
19
|
+
"rc-select": "~14.2.0",
|
|
20
|
+
"rc-tree": "~5.7.0",
|
|
21
|
+
"rc-overflow": "^1.0.0",
|
|
22
|
+
"rc-trigger": "^5.0.4",
|
|
23
|
+
"rc-notification": "~3.3.1",
|
|
24
|
+
"rc-virtual-list": "~3.16.1",
|
|
25
|
+
"rc-align": "^4.0.0",
|
|
26
|
+
"react-color": "^2.17.2",
|
|
27
|
+
"lodash": "~4.17.21",
|
|
28
|
+
"color-alpha": "~1.1.3",
|
|
29
|
+
"rc-segmented": "~2.2.2",
|
|
30
|
+
"rc-field-form": "~1.34.0",
|
|
31
|
+
"scroll-into-view-if-needed": "^2.2.25",
|
|
32
|
+
"@tntd/icons": "^1.0.10",
|
|
33
|
+
"@ant-design/colors": "^3.1.0",
|
|
34
|
+
"rc-resize-observer": "~1.4.0",
|
|
35
|
+
"react-resizable": "~3.0.4",
|
|
36
|
+
"@types/react-resizable": "~3.0.8"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@react-types/shared": "^3.10.1",
|
|
40
|
+
"@types/react": "~16.14.23",
|
|
41
|
+
"@types/react-dom": "~16.9.14",
|
|
42
|
+
"@types/styled-components": "~5.1.26",
|
|
43
|
+
"@rushstack/eslint-config": "~2.5.1",
|
|
44
|
+
"@rushstack/heft": "~0.44.2",
|
|
45
|
+
"@rushstack/heft-storybook-plugin": "~0.1.91",
|
|
46
|
+
"@types/jest": "~28.1.6",
|
|
47
|
+
"@tntd/heft-rig": "0.1.0",
|
|
48
|
+
"@tntd/storybook-react-storykit": "0.0.0",
|
|
49
|
+
"antd": "^3.26.19",
|
|
50
|
+
"react": "~16.14.0",
|
|
51
|
+
"react-dom": "~16.14.0",
|
|
52
|
+
"jest": "~28.1.0",
|
|
53
|
+
"eslint-plugin-react-hooks": "~4.3.0",
|
|
54
|
+
"eslint": "~8.11.0",
|
|
55
|
+
"eslint-plugin-import": "~2.25.4",
|
|
56
|
+
"typescript": "~4.6.2",
|
|
57
|
+
"@types/lodash-es": "~4.17.6",
|
|
58
|
+
"@types/lodash": "~4.14.191",
|
|
59
|
+
"babel-plugin-lodash": "~3.3.4",
|
|
60
|
+
"@babel/cli": "~7.21.0",
|
|
61
|
+
"@babel/core": "~7.21.0",
|
|
62
|
+
"@babel/preset-env": "~7.20.2",
|
|
63
|
+
"moment": "~2.29.4"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"antd": "^3.0.0 || ^4.0.0",
|
|
67
|
+
"react": "^16.0.0 || ^17.0.0",
|
|
68
|
+
"react-dom": "^16.0.0 || ^17.0.0"
|
|
69
|
+
},
|
|
70
|
+
"svgr": {
|
|
71
|
+
"typescript": true,
|
|
72
|
+
"memo": true,
|
|
73
|
+
"dimensions": false,
|
|
74
|
+
"filenameCase": "kebab",
|
|
75
|
+
"replaceAttrValues": {
|
|
76
|
+
"#126bfb": "currentColor"
|
|
16
77
|
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"@rushstack/heft": "~0.44.2",
|
|
57
|
-
"@rushstack/heft-storybook-plugin": "~0.1.91",
|
|
58
|
-
"@types/jest": "~28.1.6",
|
|
59
|
-
"@tntd/heft-rig": "workspace:*",
|
|
60
|
-
"@tntd/storybook-react-storykit": "workspace:*",
|
|
61
|
-
"antd": "^3.26.19",
|
|
62
|
-
"react": "~16.14.0",
|
|
63
|
-
"react-dom": "~16.14.0",
|
|
64
|
-
"jest": "~28.1.0",
|
|
65
|
-
"eslint-plugin-react-hooks": "~4.3.0",
|
|
66
|
-
"eslint": "~8.11.0",
|
|
67
|
-
"eslint-plugin-import": "~2.25.4",
|
|
68
|
-
"typescript": "~4.6.2",
|
|
69
|
-
"@types/lodash-es": "~4.17.6",
|
|
70
|
-
"@types/lodash": "~4.14.191",
|
|
71
|
-
"babel-plugin-lodash": "~3.3.4",
|
|
72
|
-
"@babel/cli": "~7.21.0",
|
|
73
|
-
"@babel/core": "~7.21.0",
|
|
74
|
-
"@babel/preset-env": "~7.20.2",
|
|
75
|
-
"moment": "~2.29.4"
|
|
76
|
-
},
|
|
77
|
-
"peerDependencies": {
|
|
78
|
-
"antd": "^3.0.0 || ^4.0.0",
|
|
79
|
-
"react": "^16.0.0 || ^17.0.0",
|
|
80
|
-
"react-dom": "^16.0.0 || ^17.0.0"
|
|
81
|
-
},
|
|
82
|
-
"svgr": {
|
|
83
|
-
"typescript": true,
|
|
84
|
-
"memo": true,
|
|
85
|
-
"dimensions": false,
|
|
86
|
-
"filenameCase": "kebab",
|
|
87
|
-
"replaceAttrValues": {
|
|
88
|
-
"#126bfb": "currentColor"
|
|
89
|
-
},
|
|
90
|
-
"ref": true
|
|
91
|
-
},
|
|
92
|
-
"repository": {
|
|
93
|
-
"type": "git",
|
|
94
|
-
"url": "git@gitlab.tongdun.cn:app/tntd.git"
|
|
95
|
-
},
|
|
96
|
-
"keywords": [
|
|
97
|
-
"react",
|
|
98
|
-
"component",
|
|
99
|
-
"components",
|
|
100
|
-
"framework",
|
|
101
|
-
"frontend",
|
|
102
|
-
"react-component",
|
|
103
|
-
"react-ui",
|
|
104
|
-
"tntd"
|
|
105
|
-
],
|
|
106
|
-
"files": [
|
|
107
|
-
"lib",
|
|
108
|
-
"es",
|
|
109
|
-
"themes",
|
|
110
|
-
"LICENSE",
|
|
111
|
-
"README.md"
|
|
112
|
-
],
|
|
113
|
-
"main": "lib/index.js",
|
|
114
|
-
"module": "es/index.js",
|
|
115
|
-
"typings": "lib/index.d.ts"
|
|
78
|
+
"ref": true
|
|
79
|
+
},
|
|
80
|
+
"repository": {
|
|
81
|
+
"type": "git",
|
|
82
|
+
"url": "git@gitlab.tongdun.cn:app/tntd.git"
|
|
83
|
+
},
|
|
84
|
+
"keywords": [
|
|
85
|
+
"react",
|
|
86
|
+
"component",
|
|
87
|
+
"components",
|
|
88
|
+
"framework",
|
|
89
|
+
"frontend",
|
|
90
|
+
"react-component",
|
|
91
|
+
"react-ui",
|
|
92
|
+
"tntd"
|
|
93
|
+
],
|
|
94
|
+
"files": [
|
|
95
|
+
"lib",
|
|
96
|
+
"es",
|
|
97
|
+
"themes",
|
|
98
|
+
"LICENSE",
|
|
99
|
+
"README.md"
|
|
100
|
+
],
|
|
101
|
+
"main": "lib/index.js",
|
|
102
|
+
"module": "es/index.js",
|
|
103
|
+
"typings": "lib/index.d.ts",
|
|
104
|
+
"scripts": {
|
|
105
|
+
"start": "heft start --storybook",
|
|
106
|
+
"build": "heft build --clean && npm run build:es && npm run build:cjs && npm run post:build",
|
|
107
|
+
"build:es": "ES_MODULE=true babel es --presets @babel/preset-env --out-dir es",
|
|
108
|
+
"build:cjs": "babel es --presets @babel/preset-env --out-dir lib",
|
|
109
|
+
"post:build": "node ./scripts/postbuild.js",
|
|
110
|
+
"build:watch": "heft build --clean --watch",
|
|
111
|
+
"watch": "rush build:watch --changed-projects-only --to-except tntd",
|
|
112
|
+
"svgr": "npx svgr ./svg --out-dir ./src/svg-components",
|
|
113
|
+
"test": "heft test",
|
|
114
|
+
"test:watch": "heft test --watch --clean"
|
|
115
|
+
},
|
|
116
|
+
"readme": "# 组件介绍\ntntd是基于 TNT Design 设计体系的 React UI 组件库,主要用于研发企业级中后台产品。\n\n\n## 如何从 `tntd v1.0` 迁移到 `tntd v2.0` \n\n### 安装 `tntd` 最新版本\n\n```\nnpm install tntd\n```\n\n### 更改配置\n\n1. 添加 .babelrc 中的 import 插件配置,实现按需引入\n\n```diff title=\".babelrc\"\n+ [\n+ \"import\",\n+ {\n+ \"libraryName\": \"tntd\",\n+ libraryDirectory: 'es',\n+ },\n+ \"tntd\"\n+ ],\n```\n\n2. 更改 webpack.config.js 中的主题配置\n\n```diff title=\"webpack.config.js\"\n{\n loader: \"less-loader\",\n options: {\n javascriptEnabled: true,\n ...\n modifyVars: {\n- hack: \"true; @import \\\"~@tntd/antd-cover/tnt.less\\\";\"\n+ hack: \"true; @import \\\"~tntd/themes/default/variables.less\\\";\"\n }\n }\n}\n```\n\n3. 修改导入名称\n\nLayout, Icon, Select 等 tntd 1.0 组件和 antd 组件名称存在冲突,请按下方例子进行重命名:\n\n```diff\n- import { Layout, Icon, Select } from 'tntd'\n+ import { TntdLayout, TntdIcon, TntdSelect } from 'tntd'\n```\n\n4. 更改配置\n\n```jsx\n// 使用全新的空状态插画\nimport { renderEmpty } from 'tntd'\n// 使用内置语言包替换 antd\n// 英文语言包\nconst enUS = import 'tntd/es/locale/en_US'\n// 中文语言包\nconst zhCN = import 'tntd/es/locale/zh_CN'\n\nexport const App = () => {\n return (\n // 使用空状态插画及语言包\n <ConfigProvider locale={zhCN} renderEmpty={renderEmpty}>\n ...\n </ConfigProvider>\n )\n}\n```\n"
|
|
116
117
|
}
|