linkmore-design 1.0.9 → 1.0.12
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 +3562 -252
- 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/CkFilter/components/modal.js +1 -3
- package/es/CkFilter/style/style.css +3 -0
- package/es/CustomerService/style/style.css +3 -0
- package/es/Drawer/style/index.css +6 -0
- package/es/Dropdown/style/index.css +3 -0
- package/es/EditTable/style/style.css +3 -0
- 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/es/{input → IconSelect}/style/index.js +0 -0
- package/es/IconSelect/style/style.css +25 -0
- package/es/{input → Input}/index.js +0 -0
- package/{lib/input → es/Input}/style/index.js +0 -0
- package/{lib/input → es/Input}/style/style.css +3 -0
- package/es/InputNumber/style/index.css +3 -0
- package/es/LeftTable/style/style.css +3 -0
- 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 -0
- package/es/ProTable/style/style.css +3 -0
- 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 +36 -4
- 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/CkFilter/components/modal.js +1 -3
- package/lib/CkFilter/style/style.css +3 -0
- package/lib/CustomerService/style/style.css +3 -0
- package/lib/Drawer/style/index.css +6 -0
- package/lib/Dropdown/style/index.css +3 -0
- package/lib/EditTable/style/style.css +3 -0
- 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 → Input}/index.js +0 -0
- package/lib/Input/style/index.js +3 -0
- package/{es/input → lib/Input}/style/style.css +3 -0
- package/lib/InputNumber/style/index.css +3 -0
- package/lib/LeftTable/style/style.css +3 -0
- 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 -0
- package/lib/ProTable/style/style.css +3 -0
- 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 +36 -4
- package/lib/styles/main.css +3 -0
- package/lib/styles/resetAntd.css +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
20
|
+
var _linkmoreDesign = require("linkmore-design");
|
|
21
|
+
|
|
22
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
23
|
+
|
|
24
|
+
var _iconJson = _interopRequireDefault(require("./iconJson.json"));
|
|
25
|
+
|
|
26
|
+
var _excluded = ["item"];
|
|
27
|
+
|
|
28
|
+
// interface IconSelect {
|
|
29
|
+
// visible: boolean
|
|
30
|
+
// onClose: fn
|
|
31
|
+
// value: string
|
|
32
|
+
// onChange: fn
|
|
33
|
+
// }
|
|
34
|
+
var IconSelect = function IconSelect(_ref) {
|
|
35
|
+
var visible = _ref.visible,
|
|
36
|
+
onClose = _ref.onClose,
|
|
37
|
+
_ref$value = _ref.value,
|
|
38
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
|
39
|
+
onChange = _ref.onChange;
|
|
40
|
+
|
|
41
|
+
var _useState = (0, _react.useState)(),
|
|
42
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
43
|
+
active = _useState2[0],
|
|
44
|
+
setActive = _useState2[1];
|
|
45
|
+
|
|
46
|
+
var options = (0, _react.useMemo)(function () {
|
|
47
|
+
var result = [];
|
|
48
|
+
var originData = _iconJson.default.glyphs;
|
|
49
|
+
|
|
50
|
+
for (var i = 0, len = originData.length; i < len; i += 4) {
|
|
51
|
+
result.push(originData.slice(i, i + 4));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return result;
|
|
55
|
+
}, []);
|
|
56
|
+
|
|
57
|
+
var onSave = function onSave() {
|
|
58
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(active);
|
|
59
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var onDoubleClick = function onDoubleClick(e) {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
e.stopPropagation();
|
|
65
|
+
onSave();
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
(0, _react.useEffect)(function () {
|
|
69
|
+
if (visible) {
|
|
70
|
+
setActive(value);
|
|
71
|
+
}
|
|
72
|
+
}, [visible]);
|
|
73
|
+
var config = {
|
|
74
|
+
title: '选择图标',
|
|
75
|
+
visible: visible,
|
|
76
|
+
size: 'small',
|
|
77
|
+
onOk: onSave,
|
|
78
|
+
onCancel: onClose // footer: [
|
|
79
|
+
// <Button key="cancel" onClick={onClose} size="middle">
|
|
80
|
+
// 取消
|
|
81
|
+
// </Button>,
|
|
82
|
+
// <Button type="primary" key="back" onClick={onSave} size="middle">
|
|
83
|
+
// 确定
|
|
84
|
+
// </Button>,
|
|
85
|
+
// ],
|
|
86
|
+
|
|
87
|
+
};
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Modal, config, /*#__PURE__*/_react.default.createElement("div", {
|
|
89
|
+
className: "lm-icon_select"
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.VirtualList, {
|
|
91
|
+
options: options
|
|
92
|
+
}, function (_ref2) {
|
|
93
|
+
var item = _ref2.item,
|
|
94
|
+
resetProps = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
95
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, resetProps, {
|
|
96
|
+
className: "lm-icon_row"
|
|
97
|
+
}), item === null || item === void 0 ? void 0 : item.map(function (v) {
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
+
key: v.font_class,
|
|
100
|
+
className: "lm-icon_col_wrapper"
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
102
|
+
className: (0, _classnames.default)('lm-icon_col', "lmweb-".concat(v.font_class) === active && 'lm-icon_active'),
|
|
103
|
+
onClick: function onClick() {
|
|
104
|
+
return setActive("lmweb-".concat(v.font_class));
|
|
105
|
+
},
|
|
106
|
+
onDoubleClick: onDoubleClick
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.IconFont, {
|
|
108
|
+
type: "lmweb-".concat(v.font_class)
|
|
109
|
+
})));
|
|
110
|
+
}));
|
|
111
|
+
}))));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var _default = IconSelect;
|
|
115
|
+
exports.default = _default;
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.lm-icon_select {
|
|
2
|
+
user-select: none;
|
|
3
|
+
}
|
|
4
|
+
.lm-icon_select .lm-icon_row {
|
|
5
|
+
display: flex;
|
|
6
|
+
}
|
|
7
|
+
.lm-icon_select .lm-icon_row .lm-icon_col_wrapper {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
width: 25%;
|
|
12
|
+
}
|
|
13
|
+
.lm-icon_select .lm-icon_row .lm-icon_col {
|
|
14
|
+
font-size: 18px;
|
|
15
|
+
color: var(--color-45);
|
|
16
|
+
border: 1px dashed transparent;
|
|
17
|
+
padding: 0 8px;
|
|
18
|
+
transition: 0.3s;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
.lm-icon_select .lm-icon_row .lm-icon_col:hover,
|
|
22
|
+
.lm-icon_select .lm-icon_row .lm-icon_col.lm-icon_active {
|
|
23
|
+
color: var(--primary-color);
|
|
24
|
+
border-color: var(--primary-color);
|
|
25
|
+
}
|
|
File without changes
|
|
File without changes
|
package/es/Modal/style/index.css
CHANGED
|
@@ -71,6 +71,9 @@
|
|
|
71
71
|
padding: var(--gap);
|
|
72
72
|
line-height: 1;
|
|
73
73
|
}
|
|
74
|
+
.ant-notification-notice .ant-notification-notice-content .ant-notification-notice-message {
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
}
|
|
74
77
|
@font-face {
|
|
75
78
|
font-family: 'iconfont';
|
|
76
79
|
/* Project id 2966019 */
|
|
@@ -494,6 +497,10 @@ html {
|
|
|
494
497
|
font-weight: normal;
|
|
495
498
|
font-size: 14px;
|
|
496
499
|
color: var(--font-color);
|
|
500
|
+
font-weight: 500;
|
|
501
|
+
}
|
|
502
|
+
.lm_modal.ant-modal-wrap .ant-modal-body {
|
|
503
|
+
font-size: 12px;
|
|
497
504
|
}
|
|
498
505
|
.lm_modal.lm_modal_info .ant-modal-body {
|
|
499
506
|
padding: 24px;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "antd/es/notification/style";
|
|
2
|
+
import _notification from "antd/es/notification";
|
|
3
|
+
export default _notification; // const prefixCls = 'lm_notification'
|
|
4
|
+
// const LMNotification: React.FC<INotificationProps> = (props) => {
|
|
5
|
+
// const { children, className, ...others } = props
|
|
6
|
+
// return (
|
|
7
|
+
// <div className={classNames(className, prefixCls)} {...others}>
|
|
8
|
+
// {children}
|
|
9
|
+
// </div>
|
|
10
|
+
// )
|
|
11
|
+
// }
|
|
12
|
+
// export default LMNotification
|