uiw 4.21.2 → 4.21.5
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/uiw.css +3 -2
- package/dist/uiw.js +91 -39
- package/dist/uiw.min.css +1 -1
- package/dist/uiw.min.js +1 -1
- package/package.json +60 -60
package/dist/uiw.css
CHANGED
|
@@ -3893,7 +3893,7 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
3893
3893
|
box-sizing: border-box;
|
|
3894
3894
|
background: #fff;
|
|
3895
3895
|
margin: 0 !important;
|
|
3896
|
-
padding: 1px
|
|
3896
|
+
padding: 1px 1px;
|
|
3897
3897
|
vertical-align: middle;
|
|
3898
3898
|
line-height: 30px;
|
|
3899
3899
|
align-items: center;
|
|
@@ -3941,12 +3941,13 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
3941
3941
|
align-items: center;
|
|
3942
3942
|
flex-flow: wrap;
|
|
3943
3943
|
width: 100%;
|
|
3944
|
+
padding: 0 9px;
|
|
3944
3945
|
}
|
|
3945
3946
|
.w-search-select-search-false {
|
|
3946
3947
|
cursor: pointer;
|
|
3947
3948
|
}
|
|
3948
3949
|
.w-search-select-multiple-colse {
|
|
3949
|
-
|
|
3950
|
+
right: 3px;
|
|
3950
3951
|
font-size: 15px;
|
|
3951
3952
|
}
|
|
3952
3953
|
.w-search-select-singe-colse {
|
package/dist/uiw.js
CHANGED
|
@@ -328,6 +328,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
328
328
|
"Circle": () => (/* reexport */ Circle),
|
|
329
329
|
"Col": () => (/* reexport */ Col),
|
|
330
330
|
"Collapse": () => (/* reexport */ react_collapse_esm),
|
|
331
|
+
"ContextMenu": () => (/* reexport */ ContextMenu),
|
|
331
332
|
"CopyToClipboard": () => (/* reexport */ CopyToClipboard),
|
|
332
333
|
"DateInput": () => (/* reexport */ DateInput),
|
|
333
334
|
"DateInputRange": () => (/* reexport */ DateInputRange),
|
|
@@ -390,6 +391,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
390
391
|
"Tabs": () => (/* reexport */ Tabs),
|
|
391
392
|
"Tag": () => (/* reexport */ react_tag_esm),
|
|
392
393
|
"Textarea": () => (/* reexport */ react_textarea_esm),
|
|
394
|
+
"ThemeContext": () => (/* reexport */ ThemeContext),
|
|
393
395
|
"TimePicker": () => (/* reexport */ TimePicker),
|
|
394
396
|
"TimePickerTime": () => (/* reexport */ TimePickerTime),
|
|
395
397
|
"Tooltip": () => (/* reexport */ react_tooltip_esm),
|
|
@@ -4593,7 +4595,22 @@ var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
|
|
|
4593
4595
|
className: [prefixCls ? prefixCls + "-overlay" : null].filter(Boolean).join(' ').trim()
|
|
4594
4596
|
};
|
|
4595
4597
|
var popupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
|
|
4598
|
+
var refNode = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef();
|
|
4599
|
+
var currentHeight = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(0);
|
|
4600
|
+
var elementSource = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef();
|
|
4596
4601
|
var [isOpen, setIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!!overlayProps.isOpen);
|
|
4602
|
+
var {
|
|
4603
|
+
height,
|
|
4604
|
+
setContextHeight,
|
|
4605
|
+
ele
|
|
4606
|
+
} = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
|
|
4607
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(() => {
|
|
4608
|
+
if (refNode.current && refNode.current.style && ele === elementSource.current) {
|
|
4609
|
+
var _currentHeight = refNode.current.style.height;
|
|
4610
|
+
if (height + 'px' === _currentHeight) return;
|
|
4611
|
+
refNode.current.style.height = Number(_currentHeight.substr(0, _currentHeight.length - 2)) + height + 'px';
|
|
4612
|
+
}
|
|
4613
|
+
}, [height]);
|
|
4597
4614
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
|
|
4598
4615
|
if (collapse) setIsOpen(false);
|
|
4599
4616
|
}, [collapse]);
|
|
@@ -4617,11 +4634,20 @@ var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
|
|
|
4617
4634
|
|
|
4618
4635
|
function onExiting(node) {
|
|
4619
4636
|
node.style.height = '0px';
|
|
4637
|
+
setContextHeight({
|
|
4638
|
+
height: -currentHeight.current,
|
|
4639
|
+
ele: elementSource.current
|
|
4640
|
+
});
|
|
4620
4641
|
}
|
|
4621
4642
|
|
|
4622
4643
|
function onEnter(node) {
|
|
4623
4644
|
node.style.height = '1px';
|
|
4624
4645
|
setIsOpen(true);
|
|
4646
|
+
currentHeight.current = popupRef.current.overlayDom.current.getBoundingClientRect().height;
|
|
4647
|
+
setContextHeight({
|
|
4648
|
+
height: currentHeight.current,
|
|
4649
|
+
ele: elementSource.current
|
|
4650
|
+
});
|
|
4625
4651
|
}
|
|
4626
4652
|
|
|
4627
4653
|
function onEntering(node) {
|
|
@@ -4629,11 +4655,9 @@ var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
|
|
|
4629
4655
|
}
|
|
4630
4656
|
|
|
4631
4657
|
function onEntered(node) {
|
|
4632
|
-
node.style.height = 'initial';
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
node.style.height = popupRef.current.overlayDom.current.getBoundingClientRect().height + 'px';
|
|
4636
|
-
}
|
|
4658
|
+
// node.style.height = 'initial';
|
|
4659
|
+
node.style.height = currentHeight.current + 'px';
|
|
4660
|
+
refNode.current = node;
|
|
4637
4661
|
}
|
|
4638
4662
|
|
|
4639
4663
|
if (!collapse) {
|
|
@@ -4658,35 +4682,45 @@ var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
|
|
|
4658
4682
|
menuProps.onClick = onClick;
|
|
4659
4683
|
}
|
|
4660
4684
|
|
|
4661
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
ref:
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
} : {}
|
|
4677
|
-
})),
|
|
4678
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem, _extends({}, other, {
|
|
4679
|
-
ref: null,
|
|
4685
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
4686
|
+
onClick: e => {
|
|
4687
|
+
if (collapse) {
|
|
4688
|
+
e.stopPropagation();
|
|
4689
|
+
return;
|
|
4690
|
+
}
|
|
4691
|
+
|
|
4692
|
+
elementSource.current = e.target;
|
|
4693
|
+
},
|
|
4694
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
4695
|
+
"data-menu": "subitem",
|
|
4696
|
+
ref: ref,
|
|
4697
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_overlay_trigger_esm, _extends({
|
|
4698
|
+
placement: "rightTop",
|
|
4699
|
+
autoAdjustOverflow: true,
|
|
4680
4700
|
disabled: disabled,
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4701
|
+
isOpen: isOpen,
|
|
4702
|
+
usePortal: false,
|
|
4703
|
+
isOutside: true
|
|
4704
|
+
}, overlayTriggerProps, overlayProps, {
|
|
4705
|
+
ref: popupRef,
|
|
4706
|
+
overlay: /*#__PURE__*/(0,jsx_runtime.jsx)(Menu, _extends({}, menuProps, {
|
|
4707
|
+
style: !collapse ? {
|
|
4708
|
+
paddingLeft: inlineIndent
|
|
4709
|
+
} : {}
|
|
4710
|
+
})),
|
|
4711
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem, _extends({}, other, {
|
|
4712
|
+
ref: null,
|
|
4713
|
+
disabled: disabled,
|
|
4714
|
+
isSubMenuItem: true,
|
|
4715
|
+
addonAfter: /*#__PURE__*/(0,jsx_runtime.jsx)(IconView, {
|
|
4716
|
+
collapse: collapse,
|
|
4717
|
+
prefixCls: prefixCls,
|
|
4718
|
+
isOpen: isOpen
|
|
4719
|
+
}),
|
|
4720
|
+
className: [prefixCls ? prefixCls + "-title" : null, !collapse ? prefixCls + "-collapse-title" : null, className].filter(Boolean).join(' ').trim()
|
|
4721
|
+
}))
|
|
4688
4722
|
}))
|
|
4689
|
-
})
|
|
4723
|
+
})
|
|
4690
4724
|
});
|
|
4691
4725
|
});
|
|
4692
4726
|
SubMenu.displayName = 'uiw.SubMenu';
|
|
@@ -4704,6 +4738,7 @@ var Menu_excluded = ["prefixCls", "className", "children", "bordered", "theme",
|
|
|
4704
4738
|
|
|
4705
4739
|
|
|
4706
4740
|
|
|
4741
|
+
var ThemeContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({});
|
|
4707
4742
|
var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
|
|
4708
4743
|
var {
|
|
4709
4744
|
prefixCls = 'w-menu',
|
|
@@ -4735,11 +4770,26 @@ var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
4735
4770
|
})
|
|
4736
4771
|
}));
|
|
4737
4772
|
});
|
|
4773
|
+
var ContextMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
|
|
4774
|
+
var [contextHeight, setContextHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState({
|
|
4775
|
+
height: 0,
|
|
4776
|
+
ele: null
|
|
4777
|
+
});
|
|
4778
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(ThemeContext.Provider, {
|
|
4779
|
+
value: _extends({}, contextHeight, {
|
|
4780
|
+
setContextHeight
|
|
4781
|
+
}),
|
|
4782
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Menu, _extends({}, props, {
|
|
4783
|
+
ref: ref
|
|
4784
|
+
}))
|
|
4785
|
+
});
|
|
4786
|
+
});
|
|
4738
4787
|
Menu.displayName = 'uiw.Menu';
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4788
|
+
ContextMenu.displayName = 'uiw.Menu';
|
|
4789
|
+
ContextMenu.Item = MenuItem;
|
|
4790
|
+
ContextMenu.SubMenu = SubMenu;
|
|
4791
|
+
ContextMenu.Divider = MenuDivider;
|
|
4792
|
+
/* harmony default export */ const esm_Menu = (ContextMenu);
|
|
4743
4793
|
|
|
4744
4794
|
;// CONCATENATED MODULE: ../react-menu/esm/index.js
|
|
4745
4795
|
|
|
@@ -5195,8 +5245,11 @@ var RadioButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
|
|
|
5195
5245
|
|
|
5196
5246
|
function handleChange(e) {
|
|
5197
5247
|
e.persist();
|
|
5198
|
-
|
|
5199
|
-
|
|
5248
|
+
|
|
5249
|
+
if (!checked) {
|
|
5250
|
+
setChecked(!checked);
|
|
5251
|
+
onChange && onChange(value);
|
|
5252
|
+
}
|
|
5200
5253
|
}
|
|
5201
5254
|
|
|
5202
5255
|
var label = children || value;
|
|
@@ -8799,7 +8852,6 @@ function SearchSelect(props) {
|
|
|
8799
8852
|
className: [prefixCls + "-inner", prefixCls + "-search-" + showSearch, prefixCls + "-" + size].filter(Boolean).join(' ').trim(),
|
|
8800
8853
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
8801
8854
|
className: prefixCls + "-tag-content",
|
|
8802
|
-
style: {},
|
|
8803
8855
|
children: [isMultiple && selectedValue.slice(0, maxTagCount).map((item, index) => {
|
|
8804
8856
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, _extends({
|
|
8805
8857
|
style: _extends({
|