linkmore-design 1.0.11 → 1.0.14
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.umd.js +4422 -1073
- package/dist/index.umd.min.js +6 -6
- package/es/Button/style/style.css +32 -31
- package/es/ButtonTags/style/style.css +3 -0
- package/es/Card/index.d.ts +2 -0
- package/es/Card/index.js +17 -0
- package/es/Card/style/index.css +495 -0
- package/es/Card/style/index.d.ts +1 -0
- package/es/Card/style/index.js +1 -0
- package/es/{CheckBox → Checkbox}/index.js +0 -0
- package/es/{CheckBox → Checkbox}/style/index.js +0 -0
- package/es/{CheckBox → Checkbox}/style/style.css +0 -0
- package/es/CkFilter/components/filterTypes.js +41 -31
- package/es/CkFilter/filter.js +1 -1
- package/es/CkFilter/style/style.css +5 -2
- package/es/CustomerService/style/style.css +3 -0
- package/es/Drawer/style/index.css +6 -0
- package/es/Dropdown/index.d.ts +1 -0
- package/es/Dropdown/index.js +78 -7
- package/es/Dropdown/style/index.css +3 -0
- package/es/EditTable/style/style.css +3 -0
- package/es/Filter/Popover.js +2 -2
- package/es/Filter/style/style.css +3 -0
- package/es/IconFont/index.js +1 -1
- package/es/IconSelect/iconJson.json +2935 -0
- package/es/IconSelect/index.js +115 -0
- package/{lib/CheckBox → es/IconSelect}/style/index.js +0 -0
- package/es/IconSelect/style/style.css +25 -0
- package/es/Input/style/style.css +3 -0
- package/es/InputNumber/style/index.css +3 -0
- package/es/LeftTable/index.js +5 -3
- package/es/LeftTable/style/style.css +41 -10
- package/es/Modal/index.js +7 -3
- package/es/Modal/style/index.css +7 -0
- package/es/Notification/index.d.ts +7 -0
- package/es/Notification/index.js +12 -0
- package/es/Notification/style/index.css +495 -0
- package/es/Notification/style/index.d.ts +1 -0
- package/es/Notification/style/index.js +1 -0
- package/es/Pagination/style/index.css +3 -0
- package/es/PopTable/style/style.css +3 -1
- package/es/ProTable/ImgList/body.js +5 -5
- package/es/ProTable/Table.js +5 -4
- package/es/ProTable/style/style.css +11 -2
- package/es/Select/index.d.ts +1 -1
- package/es/Select/style/index.css +3 -0
- package/es/Space/style/index.css +3 -0
- package/es/index.js +22 -6
- package/es/styles/main.css +3 -0
- package/es/styles/resetAntd.css +3 -0
- package/lib/Button/style/style.css +32 -31
- package/lib/ButtonTags/style/style.css +3 -0
- package/lib/Card/index.d.ts +2 -0
- package/lib/Card/index.js +29 -0
- package/lib/Card/style/index.css +495 -0
- package/lib/Card/style/index.d.ts +1 -0
- package/lib/Card/style/index.js +3 -0
- package/lib/{CheckBox → Checkbox}/index.js +0 -0
- package/lib/Checkbox/style/index.js +3 -0
- package/lib/{CheckBox → Checkbox}/style/style.css +0 -0
- package/lib/CkFilter/components/filterTypes.js +41 -31
- package/lib/CkFilter/filter.js +1 -1
- package/lib/CkFilter/style/style.css +5 -2
- package/lib/CustomerService/style/style.css +3 -0
- package/lib/Drawer/style/index.css +6 -0
- package/lib/Dropdown/index.d.ts +1 -0
- package/lib/Dropdown/index.js +81 -7
- package/lib/Dropdown/style/index.css +3 -0
- package/lib/EditTable/style/style.css +3 -0
- package/lib/Filter/Popover.js +2 -2
- package/lib/Filter/style/style.css +3 -0
- package/lib/IconFont/index.js +1 -1
- package/lib/IconSelect/iconJson.json +2935 -0
- package/lib/IconSelect/index.js +115 -0
- package/lib/IconSelect/style/index.js +3 -0
- package/lib/IconSelect/style/style.css +25 -0
- package/lib/Input/style/style.css +3 -0
- package/lib/InputNumber/style/index.css +3 -0
- package/lib/LeftTable/index.js +5 -3
- package/lib/LeftTable/style/style.css +41 -10
- package/lib/Modal/index.js +7 -3
- package/lib/Modal/style/index.css +7 -0
- package/lib/Notification/index.d.ts +7 -0
- package/lib/Notification/index.js +25 -0
- package/lib/Notification/style/index.css +495 -0
- package/lib/Notification/style/index.d.ts +1 -0
- package/lib/Notification/style/index.js +3 -0
- package/lib/Pagination/style/index.css +3 -0
- package/lib/PopTable/style/style.css +3 -1
- package/lib/ProTable/ImgList/body.js +5 -5
- package/lib/ProTable/Table.js +5 -4
- package/lib/ProTable/style/style.css +11 -2
- package/lib/Select/index.d.ts +1 -1
- package/lib/Select/style/index.css +3 -0
- package/lib/Space/style/index.css +3 -0
- package/lib/index.js +22 -6
- package/lib/styles/main.css +3 -0
- package/lib/styles/resetAntd.css +3 -0
- package/package.json +1 -1
package/lib/Dropdown/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { DropdownProps, Dropdown } from 'antd';
|
|
|
3
3
|
export interface IDropdownProps extends DropdownProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
style?: React.CSSProperties;
|
|
6
|
+
dropdownmatchwidth?: boolean;
|
|
6
7
|
}
|
|
7
8
|
interface LmDropdownInterface extends React.FC<IDropdownProps> {
|
|
8
9
|
Button?: typeof Dropdown.Button;
|
package/lib/Dropdown/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
3
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
6
|
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -11,7 +13,9 @@ require("antd/es/dropdown/style");
|
|
|
11
13
|
|
|
12
14
|
var _dropdown = _interopRequireDefault(require("antd/es/dropdown"));
|
|
13
15
|
|
|
14
|
-
var
|
|
16
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
19
|
|
|
16
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
21
|
|
|
@@ -34,24 +38,94 @@ var CLMDropdown = function CLMDropdown(props) {
|
|
|
34
38
|
var children = props.children,
|
|
35
39
|
className = props.className,
|
|
36
40
|
overlayClassName = props.overlayClassName,
|
|
37
|
-
|
|
41
|
+
_props$dropdownmatchw = props.dropdownmatchwidth,
|
|
42
|
+
dropdownmatchwidth = _props$dropdownmatchw === void 0 ? false : _props$dropdownmatchw,
|
|
43
|
+
others = __rest(props, ["children", "className", "overlayClassName", "dropdownmatchwidth"]);
|
|
44
|
+
|
|
45
|
+
var dropdownRef = (0, _react.useRef)(null);
|
|
46
|
+
|
|
47
|
+
var _useState = (0, _react.useState)(''),
|
|
48
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
49
|
+
minwidth = _useState2[0],
|
|
50
|
+
setMinWidth = _useState2[1];
|
|
51
|
+
|
|
52
|
+
(0, _react.useEffect)(function () {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
|
|
55
|
+
if (dropdownmatchwidth) {
|
|
56
|
+
var dropdown_dom = (_a = dropdownRef.current.getElementsByClassName("lm_dropdown")) === null || _a === void 0 ? void 0 : _a[0];
|
|
57
|
+
|
|
58
|
+
if (dropdown_dom) {
|
|
59
|
+
console.log((_b = dropdown_dom.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width);
|
|
60
|
+
setMinWidth(((_c = dropdown_dom.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width) || '');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}, []);
|
|
64
|
+
|
|
65
|
+
if (!dropdownmatchwidth) {
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
67
|
+
className: (0, _classnames.default)(className, prefixCls)
|
|
68
|
+
}, others, {
|
|
69
|
+
overlayClassName: (0, _classnames.default)(overlayClassName, 'lm_dropdown_overlay')
|
|
70
|
+
}), children);
|
|
71
|
+
}
|
|
38
72
|
|
|
39
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
73
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
+
ref: dropdownRef
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
40
76
|
className: (0, _classnames.default)(className, prefixCls)
|
|
41
77
|
}, others, {
|
|
42
|
-
overlayClassName: (0, _classnames.default)(overlayClassName, 'lm_dropdown_overlay')
|
|
43
|
-
|
|
78
|
+
overlayClassName: (0, _classnames.default)(overlayClassName, 'lm_dropdown_overlay'),
|
|
79
|
+
overlayStyle: minwidth ? Object.assign({
|
|
80
|
+
minWidth: minwidth
|
|
81
|
+
}, others.overlayStyle) : Object.assign({}, others.overlayStyle)
|
|
82
|
+
}), children));
|
|
44
83
|
};
|
|
45
84
|
|
|
46
85
|
var LMDropdown = CLMDropdown;
|
|
47
86
|
|
|
48
87
|
LMDropdown.Button = function (props) {
|
|
49
|
-
|
|
88
|
+
var _props$dropdownmatchw2 = props.dropdownmatchwidth,
|
|
89
|
+
dropdownmatchwidth = _props$dropdownmatchw2 === void 0 ? false : _props$dropdownmatchw2;
|
|
90
|
+
var dropdownRef = (0, _react.useRef)(null);
|
|
91
|
+
|
|
92
|
+
var _useState3 = (0, _react.useState)(''),
|
|
93
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
94
|
+
minwidth = _useState4[0],
|
|
95
|
+
setMinWidth = _useState4[1];
|
|
96
|
+
|
|
97
|
+
(0, _react.useEffect)(function () {
|
|
98
|
+
var _a, _b;
|
|
99
|
+
|
|
100
|
+
if (dropdownmatchwidth) {
|
|
101
|
+
var dropdown_dom = (_a = dropdownRef.current.getElementsByClassName("lm_dropdown_button")) === null || _a === void 0 ? void 0 : _a[0];
|
|
102
|
+
|
|
103
|
+
if (dropdown_dom) {
|
|
104
|
+
setMinWidth(((_b = dropdown_dom.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) || '');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, []);
|
|
108
|
+
|
|
109
|
+
if (!dropdownmatchwidth) {
|
|
110
|
+
return /*#__PURE__*/_react.default.createElement(_dropdown.default.Button, Object.assign({
|
|
111
|
+
size: 'small'
|
|
112
|
+
}, props, {
|
|
113
|
+
overlayClassName: (0, _classnames.default)(props.overlayClassName, 'lm_dropdown_overlay'),
|
|
114
|
+
className: (0, _classnames.default)(props.className, 'lm_dropdown_button')
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
+
ref: dropdownRef
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement(_dropdown.default.Button, Object.assign({
|
|
50
121
|
size: 'small'
|
|
51
122
|
}, props, {
|
|
52
123
|
overlayClassName: (0, _classnames.default)(props.overlayClassName, 'lm_dropdown_overlay'),
|
|
124
|
+
overlayStyle: minwidth ? Object.assign({
|
|
125
|
+
minWidth: minwidth
|
|
126
|
+
}, props.overlayStyle) : Object.assign({}, props.overlayStyle),
|
|
53
127
|
className: (0, _classnames.default)(props.className, 'lm_dropdown_button')
|
|
54
|
-
}));
|
|
128
|
+
})));
|
|
55
129
|
};
|
|
56
130
|
|
|
57
131
|
var _default = LMDropdown;
|
package/lib/Filter/Popover.js
CHANGED
|
@@ -23,10 +23,10 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
23
23
|
|
|
24
24
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
25
25
|
|
|
26
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
27
|
-
|
|
28
26
|
var _icons = require("@ant-design/icons");
|
|
29
27
|
|
|
28
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
29
|
+
|
|
30
30
|
var _components = require("./components");
|
|
31
31
|
|
|
32
32
|
var _popContext = _interopRequireDefault(require("./popContext"));
|
package/lib/IconFont/index.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _icons = require("@ant-design/icons");
|
|
9
9
|
|
|
10
10
|
var IconFont = (0, _icons.createFromIconfontCN)({
|
|
11
|
-
scriptUrl: '//at.alicdn.com/t/
|
|
11
|
+
scriptUrl: '//at.alicdn.com/t/font_2966019_8aij0300kjo.js' // 在 iconfont.cn 上生成
|
|
12
12
|
|
|
13
13
|
});
|
|
14
14
|
var _default = IconFont;
|