@dtjoy/dt-design 1.0.2 → 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.
- package/esm/blockHeader/index.js +4 -4
- package/esm/blockHeader/style/index.less +1 -1
- package/esm/collapsible/index.js +1 -1
- package/esm/flex/index.js +1 -1
- package/esm/flex/utils.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/overflowList/index.d.ts +39 -0
- package/esm/overflowList/index.js +165 -0
- package/esm/overflowList/style/index.d.ts +2 -0
- package/esm/overflowList/style/index.js +2 -0
- package/esm/overflowList/style/index.less +9 -0
- package/esm/resizeObserver/index.d.ts +45 -0
- package/esm/resizeObserver/index.js +175 -0
- package/esm/splitter/SplitBar.js +1 -1
- package/esm/splitter/Splitter.js +3 -21
- package/esm/statusTag/index.js +9 -9
- package/lib/blockHeader/index.js +5 -5
- package/lib/blockHeader/style/index.less +1 -1
- package/lib/collapsible/index.js +3 -3
- package/lib/flex/index.js +2 -2
- package/lib/flex/utils.js +3 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +8 -1
- package/lib/overflowList/index.d.ts +39 -0
- package/lib/overflowList/index.js +143 -0
- package/lib/overflowList/style/index.d.ts +2 -0
- package/lib/overflowList/style/index.js +4 -0
- package/lib/overflowList/style/index.less +9 -0
- package/lib/resizeObserver/index.d.ts +45 -0
- package/lib/resizeObserver/index.js +136 -0
- package/lib/splitter/SplitBar.js +3 -3
- package/lib/splitter/Splitter.js +4 -20
- package/lib/statusTag/index.js +9 -9
- package/package.json +133 -142
package/lib/statusTag/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.STATUS_TAG_TYPES = exports.PRESET_COLOR_TYPES = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var
|
|
8
|
+
var _icons = require("@ant-design/icons");
|
|
9
9
|
var _antd = require("antd");
|
|
10
10
|
var _configProvider = require("antd/es/config-provider");
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -17,19 +17,19 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
17
17
|
const PRESET_COLOR_TYPES = exports.PRESET_COLOR_TYPES = Object.freeze(['blue', 'yellow', 'green', 'gray', 'red', 'purple', 'cyan', 'pink']);
|
|
18
18
|
const STATUS_TAG_TYPES = exports.STATUS_TAG_TYPES = Object.freeze(['default', 'outline', 'fill']);
|
|
19
19
|
const DEFAULT_OPACITY = 0.15;
|
|
20
|
-
/**
|
|
21
|
-
* 校验是否为预设颜色
|
|
22
|
-
* @param color 待校验颜色值
|
|
20
|
+
/**
|
|
21
|
+
* 校验是否为预设颜色
|
|
22
|
+
* @param color 待校验颜色值
|
|
23
23
|
*/
|
|
24
24
|
function isPresetColor(color) {
|
|
25
25
|
if (!color || typeof color !== 'string') return false;
|
|
26
26
|
return PRESET_COLOR_TYPES.includes(color);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* 计算颜色的透明版本
|
|
31
|
-
* @param color 原始颜色(支持hex/rgb/rgba)
|
|
32
|
-
* @param opacity 透明度(默认0.15)
|
|
29
|
+
/**
|
|
30
|
+
* 计算颜色的透明版本
|
|
31
|
+
* @param color 原始颜色(支持hex/rgb/rgba)
|
|
32
|
+
* @param opacity 透明度(默认0.15)
|
|
33
33
|
*/
|
|
34
34
|
function calculateTransparentColor(color, opacity = DEFAULT_OPACITY) {
|
|
35
35
|
if (!color) return 'rgba(0, 0, 0, 0.15)';
|
|
@@ -96,7 +96,7 @@ const StatusTag = /*#__PURE__*/_react.default.memo(props => {
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
}, [color, icon, prefixCls]);
|
|
99
|
-
const loadingIndicator = (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(
|
|
99
|
+
const loadingIndicator = (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_icons.LoadingOutlined, {
|
|
100
100
|
className: `${prefixCls}__icon ${prefixCls}__icon--loading`
|
|
101
101
|
}), [prefixCls]);
|
|
102
102
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, restProps, {
|
package/package.json
CHANGED
|
@@ -1,148 +1,139 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
2
|
+
"name": "@dtjoy/dt-design",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "react-component",
|
|
5
|
+
"repository": "https://github.com/ZhaoFxxkSky/dt-design",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"module": "esm/index.js",
|
|
8
|
+
"types": "esm/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "npm run dev",
|
|
11
|
+
"dev": "dumi dev",
|
|
12
|
+
"build": "father build",
|
|
13
|
+
"build:watch": "father dev",
|
|
14
|
+
"test": "jest",
|
|
15
|
+
"docs:build": "dumi build",
|
|
16
|
+
"prepare": "husky install && dumi setup",
|
|
17
|
+
"doctor": "father doctor",
|
|
18
|
+
"lint": "npm run lint:es && npm run lint:css",
|
|
19
|
+
"lint:es-fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" \".dumi/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
20
|
+
"lint:css-fix": "stylelint \"src/**/*.{css,less,scss}\" \".dumi/**/*.{css,less,scss}\" --fix",
|
|
21
|
+
"lint:css": "stylelint \"src/**/*.{css,less,scss}\" \".dumi/**/*.{css,less,scss}\"",
|
|
22
|
+
"lint:es": "eslint \"src/**/*.{js,jsx,ts,tsx}\" \".dumi/**/*.{js,jsx,ts,tsx}\"",
|
|
23
|
+
"prepublishOnly": "npm run build",
|
|
24
|
+
"deploy": "npm run docs:build && gh-pages -d docs-dist",
|
|
25
|
+
"release": "./scripts/release.sh"
|
|
26
|
+
},
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "夕颜",
|
|
29
|
+
"email": "wx-zhaog@dtjoy.com",
|
|
30
|
+
"url": "https://github.com/ZhaoFxxkSky/dt-design"
|
|
31
|
+
},
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"files": [
|
|
34
|
+
"lib",
|
|
35
|
+
"esm"
|
|
36
|
+
],
|
|
37
|
+
"sideEffects": [
|
|
38
|
+
"esm/**/style/*",
|
|
39
|
+
"lib/**/style/*",
|
|
40
|
+
"**/style/*"
|
|
41
|
+
],
|
|
42
|
+
"keywords": [
|
|
43
|
+
"react",
|
|
44
|
+
"react-component",
|
|
45
|
+
"ui-library",
|
|
46
|
+
"typescript",
|
|
47
|
+
"ant-design"
|
|
48
|
+
],
|
|
49
|
+
"commitlint": {
|
|
50
|
+
"extends": [
|
|
51
|
+
"@commitlint/config-conventional"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"lint-staged": {
|
|
55
|
+
"*.{md,json}": [
|
|
56
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
36
57
|
],
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"lib/**/style/*",
|
|
40
|
-
"*.less",
|
|
41
|
-
"**/style/*"
|
|
58
|
+
"*.{css,scss}": [
|
|
59
|
+
"stylelint --fix"
|
|
42
60
|
],
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"ui-library",
|
|
47
|
-
"typescript",
|
|
48
|
-
"ant-design"
|
|
61
|
+
"*.{js,jsx}": [
|
|
62
|
+
"eslint --fix",
|
|
63
|
+
"prettier --write"
|
|
49
64
|
],
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"dependencies": {
|
|
120
|
-
"@dtinsight/dt-utils": "^1.3.1",
|
|
121
|
-
"@dtinsight/react-icons": "^1.0.0",
|
|
122
|
-
"@handsontable/react": "2.1.0",
|
|
123
|
-
"antd": "4.24.16",
|
|
124
|
-
"classnames": "^2.2.6",
|
|
125
|
-
"handsontable": "6.2.2",
|
|
126
|
-
"highlight.js": "^10.5.0",
|
|
127
|
-
"immer": "~10.1.1",
|
|
128
|
-
"lodash-es": "^4.17.21",
|
|
129
|
-
"rc-drawer": "~5.1.0",
|
|
130
|
-
"rc-resize-observer": "^1.4.3",
|
|
131
|
-
"rc-virtual-list": "^3.4.13",
|
|
132
|
-
"react-draggable": "~4.4.6",
|
|
133
|
-
"react-markdown": "~8.0.6",
|
|
134
|
-
"react-resizable": "^3.0.5",
|
|
135
|
-
"react-syntax-highlighter": "~15.5.0",
|
|
136
|
-
"remark-gfm": "~3.0.1",
|
|
137
|
-
"shortid": "^2.2.16",
|
|
138
|
-
"showdown": "^1.9.0"
|
|
139
|
-
},
|
|
140
|
-
"config": {
|
|
141
|
-
"commitizen": {
|
|
142
|
-
"path": "./node_modules/cz-conventional-changelog"
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
"resolutions": {
|
|
146
|
-
"rc-motion": "2.6.2"
|
|
65
|
+
"*.{ts,tsx}": [
|
|
66
|
+
"eslint --fix",
|
|
67
|
+
"prettier --parser=typescript --write"
|
|
68
|
+
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"react": ">=16.9.0",
|
|
76
|
+
"react-dom": ">=16.9.0",
|
|
77
|
+
"antd": "^4.x"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@commitlint/cli": "^17.1.2",
|
|
81
|
+
"@commitlint/config-conventional": "^17.1.0",
|
|
82
|
+
"@faker-js/faker": "^7.6.0",
|
|
83
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
84
|
+
"@testing-library/react": "^13.4.0",
|
|
85
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
86
|
+
"@testing-library/user-event": "^14.4.3",
|
|
87
|
+
"@types/jest": "^29.2.3",
|
|
88
|
+
"@types/lodash-es": "^4.17.12",
|
|
89
|
+
"@types/node": "^24.3.1",
|
|
90
|
+
"@types/react": "^18.0.0",
|
|
91
|
+
"@types/react-resizable": "^3.0.8",
|
|
92
|
+
"@types/react-syntax-highlighter": "~15.5.13",
|
|
93
|
+
"@types/shortid": "^0.0.31",
|
|
94
|
+
"@types/showdown": "^1.9.0",
|
|
95
|
+
"@types/testing-library__jest-dom": "^5.14.5",
|
|
96
|
+
"ant-design-testing": "^1.1.0",
|
|
97
|
+
"babel-plugin-import": "^1.13.8",
|
|
98
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
99
|
+
"dumi": "^2.2.12",
|
|
100
|
+
"eslint": "^8.23.0",
|
|
101
|
+
"father": "~4.1.0",
|
|
102
|
+
"gh-pages": "^4.0.0",
|
|
103
|
+
"husky": "^8.0.1",
|
|
104
|
+
"jest": "^29.3.1",
|
|
105
|
+
"jest-environment-jsdom": "^29.3.1",
|
|
106
|
+
"ko-lint-config": "2.2.21",
|
|
107
|
+
"lint-staged": "^13.0.3",
|
|
108
|
+
"prettier": "^2.7.1",
|
|
109
|
+
"rc-motion": "2.6.2",
|
|
110
|
+
"react": "^18.0.0",
|
|
111
|
+
"react-dom": "^18.0.0",
|
|
112
|
+
"react-test-renderer": "^18.2.0",
|
|
113
|
+
"resize-observer-polyfill": "^1.5.1",
|
|
114
|
+
"standard-version": "^9.5.0",
|
|
115
|
+
"stylelint": "^14.9.1",
|
|
116
|
+
"ts-jest": "^29.0.3",
|
|
117
|
+
"typescript": "~4.5.2"
|
|
118
|
+
},
|
|
119
|
+
"dependencies": {
|
|
120
|
+
"@ant-design/icons": "^4.8.3",
|
|
121
|
+
"@dtinsight/dt-utils": "^1.3.1",
|
|
122
|
+
"rc-util": "^5.44.4",
|
|
123
|
+
"classnames": "^2.2.6",
|
|
124
|
+
"immer": "~10.1.1",
|
|
125
|
+
"lodash-es": "^4.17.21",
|
|
126
|
+
"rc-drawer": "~5.1.0",
|
|
127
|
+
"rc-resize-observer": "^1.4.3",
|
|
128
|
+
"rc-virtual-list": "^3.4.13"
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
"config": {
|
|
132
|
+
"commitizen": {
|
|
133
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
147
134
|
}
|
|
135
|
+
},
|
|
136
|
+
"resolutions": {
|
|
137
|
+
"rc-motion": "2.6.2"
|
|
138
|
+
}
|
|
148
139
|
}
|