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.
Files changed (99) hide show
  1. package/dist/index.umd.js +4422 -1073
  2. package/dist/index.umd.min.js +6 -6
  3. package/es/Button/style/style.css +32 -31
  4. package/es/ButtonTags/style/style.css +3 -0
  5. package/es/Card/index.d.ts +2 -0
  6. package/es/Card/index.js +17 -0
  7. package/es/Card/style/index.css +495 -0
  8. package/es/Card/style/index.d.ts +1 -0
  9. package/es/Card/style/index.js +1 -0
  10. package/es/{CheckBox → Checkbox}/index.js +0 -0
  11. package/es/{CheckBox → Checkbox}/style/index.js +0 -0
  12. package/es/{CheckBox → Checkbox}/style/style.css +0 -0
  13. package/es/CkFilter/components/filterTypes.js +41 -31
  14. package/es/CkFilter/filter.js +1 -1
  15. package/es/CkFilter/style/style.css +5 -2
  16. package/es/CustomerService/style/style.css +3 -0
  17. package/es/Drawer/style/index.css +6 -0
  18. package/es/Dropdown/index.d.ts +1 -0
  19. package/es/Dropdown/index.js +78 -7
  20. package/es/Dropdown/style/index.css +3 -0
  21. package/es/EditTable/style/style.css +3 -0
  22. package/es/Filter/Popover.js +2 -2
  23. package/es/Filter/style/style.css +3 -0
  24. package/es/IconFont/index.js +1 -1
  25. package/es/IconSelect/iconJson.json +2935 -0
  26. package/es/IconSelect/index.js +115 -0
  27. package/{lib/CheckBox → es/IconSelect}/style/index.js +0 -0
  28. package/es/IconSelect/style/style.css +25 -0
  29. package/es/Input/style/style.css +3 -0
  30. package/es/InputNumber/style/index.css +3 -0
  31. package/es/LeftTable/index.js +5 -3
  32. package/es/LeftTable/style/style.css +41 -10
  33. package/es/Modal/index.js +7 -3
  34. package/es/Modal/style/index.css +7 -0
  35. package/es/Notification/index.d.ts +7 -0
  36. package/es/Notification/index.js +12 -0
  37. package/es/Notification/style/index.css +495 -0
  38. package/es/Notification/style/index.d.ts +1 -0
  39. package/es/Notification/style/index.js +1 -0
  40. package/es/Pagination/style/index.css +3 -0
  41. package/es/PopTable/style/style.css +3 -1
  42. package/es/ProTable/ImgList/body.js +5 -5
  43. package/es/ProTable/Table.js +5 -4
  44. package/es/ProTable/style/style.css +11 -2
  45. package/es/Select/index.d.ts +1 -1
  46. package/es/Select/style/index.css +3 -0
  47. package/es/Space/style/index.css +3 -0
  48. package/es/index.js +22 -6
  49. package/es/styles/main.css +3 -0
  50. package/es/styles/resetAntd.css +3 -0
  51. package/lib/Button/style/style.css +32 -31
  52. package/lib/ButtonTags/style/style.css +3 -0
  53. package/lib/Card/index.d.ts +2 -0
  54. package/lib/Card/index.js +29 -0
  55. package/lib/Card/style/index.css +495 -0
  56. package/lib/Card/style/index.d.ts +1 -0
  57. package/lib/Card/style/index.js +3 -0
  58. package/lib/{CheckBox → Checkbox}/index.js +0 -0
  59. package/lib/Checkbox/style/index.js +3 -0
  60. package/lib/{CheckBox → Checkbox}/style/style.css +0 -0
  61. package/lib/CkFilter/components/filterTypes.js +41 -31
  62. package/lib/CkFilter/filter.js +1 -1
  63. package/lib/CkFilter/style/style.css +5 -2
  64. package/lib/CustomerService/style/style.css +3 -0
  65. package/lib/Drawer/style/index.css +6 -0
  66. package/lib/Dropdown/index.d.ts +1 -0
  67. package/lib/Dropdown/index.js +81 -7
  68. package/lib/Dropdown/style/index.css +3 -0
  69. package/lib/EditTable/style/style.css +3 -0
  70. package/lib/Filter/Popover.js +2 -2
  71. package/lib/Filter/style/style.css +3 -0
  72. package/lib/IconFont/index.js +1 -1
  73. package/lib/IconSelect/iconJson.json +2935 -0
  74. package/lib/IconSelect/index.js +115 -0
  75. package/lib/IconSelect/style/index.js +3 -0
  76. package/lib/IconSelect/style/style.css +25 -0
  77. package/lib/Input/style/style.css +3 -0
  78. package/lib/InputNumber/style/index.css +3 -0
  79. package/lib/LeftTable/index.js +5 -3
  80. package/lib/LeftTable/style/style.css +41 -10
  81. package/lib/Modal/index.js +7 -3
  82. package/lib/Modal/style/index.css +7 -0
  83. package/lib/Notification/index.d.ts +7 -0
  84. package/lib/Notification/index.js +25 -0
  85. package/lib/Notification/style/index.css +495 -0
  86. package/lib/Notification/style/index.d.ts +1 -0
  87. package/lib/Notification/style/index.js +3 -0
  88. package/lib/Pagination/style/index.css +3 -0
  89. package/lib/PopTable/style/style.css +3 -1
  90. package/lib/ProTable/ImgList/body.js +5 -5
  91. package/lib/ProTable/Table.js +5 -4
  92. package/lib/ProTable/style/style.css +11 -2
  93. package/lib/Select/index.d.ts +1 -1
  94. package/lib/Select/style/index.css +3 -0
  95. package/lib/Space/style/index.css +3 -0
  96. package/lib/index.js +22 -6
  97. package/lib/styles/main.css +3 -0
  98. package/lib/styles/resetAntd.css +3 -0
  99. package/package.json +1 -1
@@ -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;
@@ -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 _react = _interopRequireDefault(require("react"));
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
- others = __rest(props, ["children", "className", "overlayClassName"]);
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(_dropdown.default, Object.assign({
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
- }), children);
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
- return /*#__PURE__*/_react.default.createElement(_dropdown.default.Button, Object.assign({
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;
@@ -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 */
@@ -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 */
@@ -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"));
@@ -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 */
@@ -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/font_2966019_r2sjvddyblq.js' // 在 iconfont.cn 上生成
11
+ scriptUrl: '//at.alicdn.com/t/font_2966019_8aij0300kjo.js' // 在 iconfont.cn 上生成
12
12
 
13
13
  });
14
14
  var _default = IconFont;