@para-ui/core 3.0.0 → 3.0.2
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/AutoBox/index.js +180 -68
- package/AutoBox/protal.d.ts +17 -0
- package/AutoTips/index.js +4 -3
- package/Breadcrumbs/index.js +10 -7
- package/Button/index.d.ts +8 -0
- package/Button/index.js +77 -37
- package/ButtonGroup/index.js +3 -2
- package/Carousel/index.js +7 -5
- package/Cascader/index.d.ts +3 -1
- package/Cascader/index.js +13 -5
- package/Checkbox/index.js +27 -8
- package/CheckboxGroup/index.d.ts +2 -5
- package/CheckboxGroup/index.js +13 -10
- package/Collapse/index.js +11 -10
- package/CollapseBox/index.js +7 -6
- package/ComboSelect/index.js +266 -93
- package/ComboSelect/interface.d.ts +12 -9
- package/ComboSelect/lang/en_US.d.ts +1 -0
- package/ComboSelect/lang/index.d.ts +2 -0
- package/ComboSelect/lang/zh_CN.d.ts +1 -0
- package/Container/index.js +27 -31
- package/DatePicker/index.js +12 -17
- package/DatePicker/util.d.ts +0 -1
- package/Desktop/index.js +6 -5
- package/Drawer/index.js +10 -9
- package/Dropdown/index.js +59 -6
- package/Empty/index.js +7 -6
- package/Form/index.js +6 -5
- package/FormItem/compoments/formFile/index.d.ts +16 -16
- package/FormItem/index.d.ts +19 -19
- package/FormItem/index.js +3 -2
- package/FunctionModal/index.js +3 -2
- package/GlobalContext/componentsProps.d.ts +2 -0
- package/GlobalContext/constant.d.ts +8 -0
- package/Help/index.js +3 -2
- package/HelperText/index.d.ts +9 -5
- package/HelperText/index.js +9 -4
- package/InputLang/index.d.ts +2 -5
- package/InputLang/index.js +13 -7
- package/InputNumber/index.d.ts +2 -5
- package/InputNumber/index.js +15 -12
- package/Label/index.d.ts +2 -0
- package/Label/index.js +12 -8
- package/Loading/index.js +5 -4
- package/Menu/index.js +18 -17
- package/Message/index.js +5 -4
- package/Modal/index.js +28 -26
- package/MultiBox/index.d.ts +2 -5
- package/MultiBox/index.js +13 -6
- package/Notification/index.js +3 -2
- package/OperateBtn/index.js +15 -12
- package/PageHeader/index.js +22 -23
- package/Pagination/index.js +10 -4
- package/ParauiProvider/index.js +1 -1
- package/PopConfirm/index.d.ts +2 -0
- package/PopConfirm/index.js +3 -2
- package/Popover/index.js +7 -4
- package/Progress/index.d.ts +2 -0
- package/Progress/index.js +13 -9
- package/Querying/index.js +6 -5
- package/README.md +32 -1
- package/Radio/index.js +22 -8
- package/RadioGroup/index.d.ts +2 -5
- package/RadioGroup/index.js +10 -7
- package/Search/index.js +13 -8
- package/Select/index.d.ts +4 -5
- package/Select/index.js +27 -22
- package/SelectInput/index.js +3 -2
- package/Selector/index.d.ts +3 -19
- package/Selector/index.js +2102 -213
- package/Selector/interface.d.ts +365 -0
- package/Selector/lang/en_US.d.ts +9 -0
- package/Selector/lang/index.d.ts +17 -0
- package/Selector/lang/zh_CN.d.ts +9 -0
- package/Selector/selectorData/index.d.ts +10 -0
- package/Selector/selectorMain/index.d.ts +2 -9
- package/Selector/selectorNode/index.d.ts +10 -0
- package/Selector/util.d.ts +15 -0
- package/SelectorPicker/index.d.ts +46 -0
- package/SelectorPicker/index.js +319 -0
- package/SingleBox/index.d.ts +2 -5
- package/SingleBox/index.js +11 -6
- package/Slider/index.d.ts +4 -4
- package/Slider/index.js +9 -4
- package/Split/index.js +8 -7
- package/Stepper/index.js +7 -3
- package/Switch/index.js +10 -12
- package/Table/index.js +542 -313
- package/Table/interface.d.ts +43 -1
- package/Table/tableElement/index.d.ts +2 -2
- package/Table/util.d.ts +13 -1
- package/Tabs/index.js +7 -6
- package/Tag/index.js +12 -14
- package/TextField/index.d.ts +4 -5
- package/TextField/index.js +23 -20
- package/TimePicker/index.js +1 -0
- package/Timeline/index.js +13 -12
- package/Title/index.d.ts +30 -0
- package/Title/index.js +49 -0
- package/ToggleButton/index.js +13 -13
- package/Tooltip/index.js +51 -11
- package/Tooltip/interface.d.ts +2 -0
- package/Transfer/index.d.ts +6 -2
- package/Transfer/index.js +8 -4
- package/Tree/index.js +3 -2
- package/Tree/interface.d.ts +0 -2
- package/Tree/utils/tools.d.ts +0 -1
- package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
- package/Upload/ImgCrop/constants.d.ts +1 -1
- package/Upload/ImgCrop/interface.d.ts +5 -0
- package/Upload/index.js +56 -45
- package/_verture/constant-bf34e6fa.js +11 -0
- package/_verture/{index-3d26f6a5.js → index-cc4c83b8.js} +63 -31
- package/_verture/{index-ce3860a0.js → index-cf5bf211.js} +30 -21
- package/_verture/{modalContext-fc19f4ae.js → modalContext-95c3fc87.js} +0 -0
- package/index.d.ts +4 -0
- package/index.js +10 -6
- package/package.json +8 -5
- package/Selector/branchNode/index.d.ts +0 -32
- package/Selector/leafNode/index.d.ts +0 -34
- package/Selector/selectorRight/index.d.ts +0 -16
- package/Selector/selectorTop/index.d.ts +0 -16
package/AutoBox/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
|
|
2
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { useState, useRef, useEffect,
|
|
2
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useRef, useEffect, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
import { Popover } from '../Popover/index.js';
|
|
5
|
-
import
|
|
5
|
+
import { createPortal } from 'react-dom';
|
|
6
6
|
import { UUID } from '@paraview/lib';
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
8
|
+
import More from '@para-ui/icons/More';
|
|
7
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
10
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
9
11
|
import '../Tooltip/index.js';
|
|
@@ -11,7 +13,117 @@ import 'rc-tooltip';
|
|
|
11
13
|
import 'rc-tooltip/lib/placements';
|
|
12
14
|
import 'clsx';
|
|
13
15
|
|
|
14
|
-
var
|
|
16
|
+
var Protal = function Protal(props) {
|
|
17
|
+
var children = props.children,
|
|
18
|
+
className = props.className,
|
|
19
|
+
anchorEl = props.anchorEl,
|
|
20
|
+
onClose = props.onClose;
|
|
21
|
+
|
|
22
|
+
var _useState = useState({}),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
styleCom = _useState2[0],
|
|
25
|
+
setStyleCom = _useState2[1];
|
|
26
|
+
|
|
27
|
+
var constData = useRef({
|
|
28
|
+
uuid: $prefixCls + '-protal-box-content-' + UUID()
|
|
29
|
+
});
|
|
30
|
+
var domRef = useRef();
|
|
31
|
+
var contentRef = useRef();
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
handStyle();
|
|
34
|
+
window.addEventListener('click', clickFunc);
|
|
35
|
+
return function () {
|
|
36
|
+
domRef && domRef.current && domRef.current.remove();
|
|
37
|
+
window.removeEventListener('click', clickFunc);
|
|
38
|
+
};
|
|
39
|
+
}, []);
|
|
40
|
+
/**
|
|
41
|
+
* 查找元素
|
|
42
|
+
* @param el 当前元素
|
|
43
|
+
* @param selector 查找元素class
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
var closest = function closest(el, selector) {
|
|
47
|
+
var matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
|
|
48
|
+
|
|
49
|
+
while (el) {
|
|
50
|
+
if (matchesSelector.call(el, selector)) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
el = el.parentElement;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return el;
|
|
58
|
+
};
|
|
59
|
+
/** 全局监听点击事件 */
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
var clickFunc = function clickFunc(e) {
|
|
63
|
+
if (!constData.current) return;
|
|
64
|
+
var bol = closest(e.target, '.' + constData.current.uuid); // 是否存在下拉当中
|
|
65
|
+
|
|
66
|
+
if (!bol) onClose && onClose();
|
|
67
|
+
};
|
|
68
|
+
/** 处理内容的定位样式 */
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
var handStyle = function handStyle() {
|
|
72
|
+
if (!anchorEl || !contentRef.current) return;
|
|
73
|
+
var posDomRect = anchorEl.getBoundingClientRect();
|
|
74
|
+
var contentDomRect = contentRef.current.getBoundingClientRect();
|
|
75
|
+
var json = {
|
|
76
|
+
opacity: 1,
|
|
77
|
+
left: posDomRect.left,
|
|
78
|
+
top: posDomRect.top + posDomRect.height
|
|
79
|
+
};
|
|
80
|
+
var winHeight = window.innerHeight;
|
|
81
|
+
var winWidth = window.innerWidth;
|
|
82
|
+
|
|
83
|
+
if (json.left + contentDomRect.width > winWidth) {
|
|
84
|
+
json.left = winWidth - contentDomRect.width - 8;
|
|
85
|
+
if (json.left < 0) json.left = 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (json.top + contentDomRect.height > winHeight) {
|
|
89
|
+
json.top = winHeight - contentDomRect.height - 8;
|
|
90
|
+
if (json.top < 0) json.top = 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
setStyleCom(json);
|
|
94
|
+
};
|
|
95
|
+
/** 处理className */
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
var handClass = function handClass() {
|
|
99
|
+
var str = $prefixCls + '-protal-box';
|
|
100
|
+
if (className) str += ' ' + className;
|
|
101
|
+
return str;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
var handContent = function handContent() {
|
|
105
|
+
return jsxs("div", Object.assign({
|
|
106
|
+
className: handClass(),
|
|
107
|
+
ref: domRef
|
|
108
|
+
}, {
|
|
109
|
+
children: [jsx("div", {
|
|
110
|
+
className: "protal-mask"
|
|
111
|
+
}), jsx("div", Object.assign({
|
|
112
|
+
className: 'protal-content ' + constData.current.uuid,
|
|
113
|
+
style: styleCom,
|
|
114
|
+
ref: contentRef
|
|
115
|
+
}, {
|
|
116
|
+
children: children
|
|
117
|
+
}))]
|
|
118
|
+
}));
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
return jsx(Fragment, {
|
|
122
|
+
children: /*#__PURE__*/createPortal(handContent(), document.getElementsByTagName('body')[0])
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-auto-box {\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n}\n.paraui-v3-auto-box > .auto-box-more {\n display: inline-block;\n height: 100%;\n cursor: pointer;\n}\n\n.paraui-v3-auto-box-popover .auto-box-popover-content {\n display: flex;\n flex-direction: column;\n}\n\n.paraui-v3-protal-box {\n position: fixed;\n z-index: 1500;\n inset: 0px;\n}\n.paraui-v3-protal-box .protal-mask {\n z-index: -1;\n position: fixed;\n inset: 0px;\n background-color: transparent;\n}\n.paraui-v3-protal-box .protal-content {\n border-radius: 4px;\n box-shadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.4);\n background-color: white;\n outline: 0;\n position: absolute;\n max-width: calc(100% - 32px);\n min-width: 16px;\n max-height: calc(100% - 32px);\n min-height: 16px;\n overflow-x: hidden;\n overflow-y: auto;\n opacity: 0;\n transform: none;\n transition: opacity 243ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 162ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}";
|
|
15
127
|
styleInject(css_248z);
|
|
16
128
|
|
|
17
129
|
var AutoBox = function AutoBox(props) {
|
|
@@ -45,15 +157,9 @@ var AutoBox = function AutoBox(props) {
|
|
|
45
157
|
setOpenMoreCom = _useState6[1]; // 显示更多
|
|
46
158
|
|
|
47
159
|
|
|
48
|
-
var _useState7 = useState(
|
|
49
|
-
_useState8 = _slicedToArray(_useState7,
|
|
50
|
-
|
|
51
|
-
setAnchorElCom = _useState8[1]; // 更多定位元素
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var _useState9 = useState({}),
|
|
55
|
-
_useState10 = _slicedToArray(_useState9, 1),
|
|
56
|
-
timer = _useState10[0];
|
|
160
|
+
var _useState7 = useState({}),
|
|
161
|
+
_useState8 = _slicedToArray(_useState7, 1),
|
|
162
|
+
timer = _useState8[0];
|
|
57
163
|
|
|
58
164
|
var posDom = useRef(); // 监听打开更多
|
|
59
165
|
|
|
@@ -61,11 +167,7 @@ var AutoBox = function AutoBox(props) {
|
|
|
61
167
|
if (props.openMore !== undefined) {
|
|
62
168
|
setOpenMoreCom(props.openMore);
|
|
63
169
|
}
|
|
64
|
-
}, [props.openMore]);
|
|
65
|
-
|
|
66
|
-
useEffect(function () {
|
|
67
|
-
if (anchorEl) setAnchorElCom(anchorEl);
|
|
68
|
-
}, [anchorEl]);
|
|
170
|
+
}, [props.openMore]);
|
|
69
171
|
useEffect(function () {
|
|
70
172
|
if (props.showNum !== undefined) return;
|
|
71
173
|
changeSize();
|
|
@@ -87,17 +189,17 @@ var AutoBox = function AutoBox(props) {
|
|
|
87
189
|
} else {
|
|
88
190
|
onShowMore && onShowMore(false);
|
|
89
191
|
}
|
|
90
|
-
}, [list, morePos, onShowMore]);
|
|
192
|
+
}, [list, morePos, onShowMore]);
|
|
193
|
+
|
|
194
|
+
var onVisibleChange = function onVisibleChange(bol) {
|
|
195
|
+
if (bol) return setOpenMoreCom(true);
|
|
196
|
+
closeMore();
|
|
197
|
+
}; // 关闭显示更多
|
|
198
|
+
|
|
91
199
|
|
|
92
200
|
var closeMore = function closeMore() {
|
|
93
201
|
setOpenMoreCom(false);
|
|
94
202
|
onCloseMore && onCloseMore();
|
|
95
|
-
}; // 点击显示更多
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var clickMore = function clickMore(e) {
|
|
99
|
-
setOpenMoreCom(true);
|
|
100
|
-
setAnchorElCom(posDom.current);
|
|
101
203
|
}; // 关闭显示更多
|
|
102
204
|
|
|
103
205
|
|
|
@@ -135,7 +237,7 @@ var AutoBox = function AutoBox(props) {
|
|
|
135
237
|
|
|
136
238
|
|
|
137
239
|
var handClass = function handClass() {
|
|
138
|
-
var str = '
|
|
240
|
+
var str = $prefixCls + '-auto-box';
|
|
139
241
|
if (classOne) str += ' ' + classOne;
|
|
140
242
|
if (className) str += ' ' + className;
|
|
141
243
|
return str;
|
|
@@ -143,60 +245,70 @@ var AutoBox = function AutoBox(props) {
|
|
|
143
245
|
|
|
144
246
|
|
|
145
247
|
var handClassPopover = function handClassPopover() {
|
|
146
|
-
var str = '
|
|
248
|
+
var str = $prefixCls + '-auto-box-popover';
|
|
147
249
|
if (popoverClassName) str += ' ' + popoverClassName;
|
|
148
250
|
return str;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
open: openMoreCom,
|
|
156
|
-
anchorEl: anchorElCom,
|
|
157
|
-
onClose: closeMore,
|
|
158
|
-
anchorOrigin: {
|
|
159
|
-
vertical: 'bottom',
|
|
160
|
-
horizontal: 'left'
|
|
161
|
-
},
|
|
162
|
-
transformOrigin: {
|
|
163
|
-
vertical: 'top',
|
|
164
|
-
horizontal: 'left'
|
|
165
|
-
},
|
|
166
|
-
className: handClassPopover()
|
|
251
|
+
}; // 处理更多内容
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
var handMoreDom = function handMoreDom() {
|
|
255
|
+
return jsx("div", Object.assign({
|
|
256
|
+
className: "auto-box-popover-content"
|
|
167
257
|
}, {
|
|
168
|
-
children:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
children: item
|
|
175
|
-
}, index);
|
|
176
|
-
})
|
|
177
|
-
}))
|
|
258
|
+
children: list && list.map(function (item, index) {
|
|
259
|
+
if (morePos !== null && morePos > index) return null;
|
|
260
|
+
return jsx(Fragment$1, {
|
|
261
|
+
children: item
|
|
262
|
+
}, index);
|
|
263
|
+
})
|
|
178
264
|
}));
|
|
179
|
-
}
|
|
265
|
+
};
|
|
266
|
+
/** 处理更多按钮 */
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
var handMoreBtn = function handMoreBtn() {
|
|
270
|
+
if (morePos !== null && list.length > morePos && !hideMore) {
|
|
271
|
+
return jsx(Popover, Object.assign({
|
|
272
|
+
open: openMoreCom,
|
|
273
|
+
content: handMoreDom(),
|
|
274
|
+
overlayClassName: handClassPopover(),
|
|
275
|
+
placement: "bottomLeft",
|
|
276
|
+
onVisibleChange: onVisibleChange
|
|
277
|
+
}, {
|
|
278
|
+
children: jsx("div", Object.assign({
|
|
279
|
+
className: "auto-box-more",
|
|
280
|
+
ref: posDom
|
|
281
|
+
}, {
|
|
282
|
+
children: moreCustomize ? moreCustomize : jsx(More, {})
|
|
283
|
+
}))
|
|
284
|
+
}));
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
/** 自定义更多按钮 */
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
var handCustomDialog = function handCustomDialog() {
|
|
291
|
+
if (anchorEl && openMoreCom) {
|
|
292
|
+
return jsx(Protal, Object.assign({
|
|
293
|
+
className: handClassPopover(),
|
|
294
|
+
anchorEl: anchorEl,
|
|
295
|
+
onClose: closeMore
|
|
296
|
+
}, {
|
|
297
|
+
children: handMoreDom()
|
|
298
|
+
}));
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
|
|
180
302
|
return jsxs("div", Object.assign({
|
|
181
303
|
className: handClass(),
|
|
182
304
|
style: style
|
|
183
305
|
}, {
|
|
184
306
|
children: [list.map(function (item, index) {
|
|
185
307
|
if (morePos !== null && morePos <= index) return null;
|
|
186
|
-
return jsx(Fragment, {
|
|
308
|
+
return jsx(Fragment$1, {
|
|
187
309
|
children: item
|
|
188
310
|
}, index);
|
|
189
|
-
}),
|
|
190
|
-
if (morePos !== null && list.length > morePos && !hideMore) {
|
|
191
|
-
return jsx("div", Object.assign({
|
|
192
|
-
className: "auto-box-more",
|
|
193
|
-
ref: posDom,
|
|
194
|
-
onClick: clickMore
|
|
195
|
-
}, {
|
|
196
|
-
children: moreCustomize ? moreCustomize : jsx(More, {})
|
|
197
|
-
}));
|
|
198
|
-
}
|
|
199
|
-
}(), MoreMemo]
|
|
311
|
+
}), handMoreBtn(), handCustomDialog()]
|
|
200
312
|
}));
|
|
201
313
|
};
|
|
202
314
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2022/8/10 10:32 AM
|
|
4
|
+
* @description 全局弹窗-自定义用的
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
export interface ProtalBoxProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
/** 定位元素 */
|
|
10
|
+
anchorEl?: any;
|
|
11
|
+
/** 关闭事件 */
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
[name: string]: any;
|
|
15
|
+
}
|
|
16
|
+
export declare const Protal: FunctionComponent<ProtalBoxProps>;
|
|
17
|
+
export default Protal;
|
package/AutoTips/index.js
CHANGED
|
@@ -2,13 +2,14 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useEffect } from 'react';
|
|
4
4
|
import { Tooltip } from '../Tooltip/index.js';
|
|
5
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
5
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
6
7
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
7
8
|
import 'rc-tooltip';
|
|
8
9
|
import 'rc-tooltip/lib/placements';
|
|
9
10
|
import 'clsx';
|
|
10
11
|
|
|
11
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-auto-tips {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-auto-tips > .auto-tips-content {\n display: inline;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.paraui-auto-tips-tooltip > div {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
|
|
12
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-auto-tips {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-auto-tips > .auto-tips-content {\n display: inline;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.paraui-v3-auto-tips-tooltip > div {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
|
|
12
13
|
styleInject(css_248z);
|
|
13
14
|
|
|
14
15
|
var AutoTips = function AutoTips(props) {
|
|
@@ -53,7 +54,7 @@ var AutoTips = function AutoTips(props) {
|
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
var handClass = function handClass() {
|
|
56
|
-
var str = '
|
|
57
|
+
var str = $prefixCls + '-auto-tips';
|
|
57
58
|
if (className) str += ' ' + className;
|
|
58
59
|
return str;
|
|
59
60
|
};
|
|
@@ -70,7 +71,7 @@ var AutoTips = function AutoTips(props) {
|
|
|
70
71
|
placement: placement,
|
|
71
72
|
interactive: interactive,
|
|
72
73
|
boundariesElement: 'viewport',
|
|
73
|
-
className: '
|
|
74
|
+
className: $prefixCls + '-auto-tips-tooltip'
|
|
74
75
|
}, {
|
|
75
76
|
children: jsx("div", Object.assign({
|
|
76
77
|
className: "auto-tips-content"
|
package/Breadcrumbs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { Popover } from '../Popover/index.js';
|
|
|
6
6
|
import AutoTips from '../AutoTips/index.js';
|
|
7
7
|
import More from '@para-ui/icons/More';
|
|
8
8
|
import { UUID } from '@paraview/lib';
|
|
9
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
9
10
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
11
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
11
12
|
import '../Tooltip/index.js';
|
|
@@ -13,7 +14,7 @@ import 'rc-tooltip';
|
|
|
13
14
|
import 'rc-tooltip/lib/placements';
|
|
14
15
|
import 'clsx';
|
|
15
16
|
|
|
16
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n * @author linhd\n * @date 2021年10月25日 14:58:12\n * @description 面包屑\n */\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-breadcrumbs {\n display: inline-block;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 0;\n height: 17px;\n}\n.paraui-breadcrumbs.paraui-breadcrumbs-shrink {\n white-space: nowrap;\n}\n.paraui-breadcrumbs > div {\n display: inline-block;\n line-height: 17px;\n vertical-align: middle;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-breadcrumbs > div svg {\n font-size: 14px;\n vertical-align: middle;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-breadcrumbs > div span {\n display: inline-block;\n line-height: 0;\n vertical-align: middle;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-breadcrumbs > div .
|
|
17
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n * @author linhd\n * @date 2021年10月25日 14:58:12\n * @description 面包屑\n */\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-breadcrumbs {\n display: inline-block;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 0;\n height: 17px;\n}\n.paraui-v3-breadcrumbs.paraui-v3-breadcrumbs-shrink {\n white-space: nowrap;\n}\n.paraui-v3-breadcrumbs > div {\n display: inline-block;\n line-height: 17px;\n vertical-align: middle;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-breadcrumbs > div svg {\n font-size: 14px;\n vertical-align: middle;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-breadcrumbs > div span {\n display: inline-block;\n line-height: 0;\n vertical-align: middle;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-breadcrumbs > div .breadcrumbs-auto-tips {\n line-height: 0;\n}\n.paraui-v3-breadcrumbs > div .breadcrumbs-auto-tips .auto-tips-content {\n line-height: 17px;\n}\n.paraui-v3-breadcrumbs > div .breadcrumbs-auto-tips span {\n line-height: 17px;\n}\n.paraui-v3-breadcrumbs > .breadcrumbs-separator {\n user-select: none;\n margin: 0 8px;\n}\n.paraui-v3-breadcrumbs > .breadcrumbs-item-click {\n cursor: pointer;\n}\n.paraui-v3-breadcrumbs > .breadcrumbs-item-click:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-breadcrumbs > .breadcrumbs-item-click:hover svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-breadcrumbs > .breadcrumbs-item-click:hover span {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-breadcrumbs > .breadcrumbs-item-disabled {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-breadcrumbs > .more-breadcrumbs {\n cursor: pointer;\n}\n.paraui-v3-breadcrumbs > .current-breadcrumbs {\n color: rgba(46, 55, 67, 0.7);\n font-weight: 700;\n}\n\n.paraui-v3-breadcrumbs-popover > .component-popover-content > .component-popover-inner {\n display: flex;\n align-items: center;\n height: 36px;\n line-height: 0;\n padding: 0 12px;\n}";
|
|
17
18
|
styleInject(css_248z);
|
|
18
19
|
|
|
19
20
|
var Breadcrumbs = function Breadcrumbs(props) {
|
|
@@ -29,7 +30,7 @@ var Breadcrumbs = function Breadcrumbs(props) {
|
|
|
29
30
|
onClickItem = props.onClickItem,
|
|
30
31
|
style = props.style;
|
|
31
32
|
|
|
32
|
-
var _useState = useState('breadcrumbs-' + UUID()),
|
|
33
|
+
var _useState = useState($prefixCls + '-breadcrumbs-' + UUID()),
|
|
33
34
|
_useState2 = _slicedToArray(_useState, 1),
|
|
34
35
|
classStr = _useState2[0];
|
|
35
36
|
|
|
@@ -113,7 +114,7 @@ var Breadcrumbs = function Breadcrumbs(props) {
|
|
|
113
114
|
|
|
114
115
|
|
|
115
116
|
var popoverHandClass = function popoverHandClass() {
|
|
116
|
-
var str = '
|
|
117
|
+
var str = $prefixCls + '-breadcrumbs-popover';
|
|
117
118
|
if (popoverClassName) str += ' ' + popoverClassName;
|
|
118
119
|
return str;
|
|
119
120
|
}; // 关闭弹出菜单
|
|
@@ -125,8 +126,8 @@ var Breadcrumbs = function Breadcrumbs(props) {
|
|
|
125
126
|
|
|
126
127
|
|
|
127
128
|
var handClass = function handClass() {
|
|
128
|
-
var str = '
|
|
129
|
-
if (isShrink) str +=
|
|
129
|
+
var str = $prefixCls + '-breadcrumbs ' + classStr;
|
|
130
|
+
if (isShrink) str += " ".concat($prefixCls, "-breadcrumbs-shrink");
|
|
130
131
|
if (className) str += ' ' + className;
|
|
131
132
|
return str;
|
|
132
133
|
};
|
|
@@ -198,9 +199,11 @@ var Breadcrumbs = function Breadcrumbs(props) {
|
|
|
198
199
|
onClick: handleClick(item),
|
|
199
200
|
className: handClassItem(item, index, listCom)
|
|
200
201
|
}, {
|
|
201
|
-
children: jsx(AutoTips, {
|
|
202
|
+
children: jsx(AutoTips, Object.assign({
|
|
203
|
+
className: 'breadcrumbs-auto-tips'
|
|
204
|
+
}, {
|
|
202
205
|
children: item.label
|
|
203
|
-
})
|
|
206
|
+
}))
|
|
204
207
|
})), showSeparator && jsx("div", Object.assign({
|
|
205
208
|
className: "breadcrumbs-separator"
|
|
206
209
|
}, {
|
package/Button/index.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<any> {
|
|
|
35
35
|
endIcon?: React.ReactNode;
|
|
36
36
|
/** 前置图标 */
|
|
37
37
|
startIcon?: React.ReactNode;
|
|
38
|
+
/** 点击跳转的地址,指定此属性 button 的行为和 a 链接一致 */
|
|
39
|
+
href?: string;
|
|
40
|
+
/** target */
|
|
41
|
+
target?: string;
|
|
38
42
|
[name: string]: any;
|
|
39
43
|
}
|
|
40
44
|
export interface IconButtonProps extends React.ButtonHTMLAttributes<any> {
|
|
@@ -59,6 +63,10 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<any> {
|
|
|
59
63
|
disabled?: boolean;
|
|
60
64
|
/** content */
|
|
61
65
|
children?: React.ReactNode;
|
|
66
|
+
/** 点击跳转的地址,指定此属性 button 的行为和 a 链接一致 */
|
|
67
|
+
href?: string;
|
|
68
|
+
/** target */
|
|
69
|
+
target?: string;
|
|
62
70
|
[name: string]: any;
|
|
63
71
|
}
|
|
64
72
|
declare const InternalButton: FunctionComponent<ButtonProps>;
|