@nutui/nutui-react 2.0.4 → 2.0.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/CHANGELOG.md +10 -0
- package/dist/esm/ConfigProvider.js +0 -1
- package/dist/esm/Popover.js +4 -3
- package/dist/esm/SearchBar/style/style.css +1 -1
- package/dist/esm/Sticky.js +1 -1
- package/dist/esm/configprovider2.js +681 -12
- package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +3 -4
- package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +3 -4
- package/dist/esm/types/src/utils/use-memo.d.ts +1 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +720 -46
- package/dist/nutui.react.umd.js +705 -31
- package/dist/packages/searchbar/searchbar.scss +0 -1
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/types/packages/configprovider/configprovider.d.ts +3 -4
- package/dist/types/utils/use-memo.d.ts +1 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# v2.0.5
|
|
2
|
+
`2023-07-19`
|
|
3
|
+
|
|
4
|
+
* :bug: fix(sticky): 组件卸载移除 tap 事件改为移除 scroll 事件 (#1235) @oasis-cloud
|
|
5
|
+
* :bug: fix: height is null (#1239) @Liuqh233
|
|
6
|
+
* :bug: fix: 修复popover滑动定位错位的问题 (#1232) @junjun666
|
|
7
|
+
* :sparkles: perf: configProvider 组件性能优化 (#1230) @大喵
|
|
8
|
+
* 🔨 chore: site 内部移除 taro components @oasis-cloud
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
# v2.0.4
|
|
2
12
|
`2023-07-14`
|
|
3
13
|
|
package/dist/esm/Popover.js
CHANGED
|
@@ -71,6 +71,7 @@ var Popover = function Popover2(props) {
|
|
|
71
71
|
}, targetSet, "touchstart", true, visible, closeOnOutsideClick);
|
|
72
72
|
var getContentWidth = function getContentWidth2() {
|
|
73
73
|
var rect = getRect(popoverRef.current);
|
|
74
|
+
var scrollDis = document.documentElement.scrollTop || window.scrollY;
|
|
74
75
|
if (targetId) {
|
|
75
76
|
setTimeout(function() {
|
|
76
77
|
rect = getRect(document.querySelector("#".concat(targetId)));
|
|
@@ -78,7 +79,7 @@ var Popover = function Popover2(props) {
|
|
|
78
79
|
width: rect.width,
|
|
79
80
|
height: rect.height,
|
|
80
81
|
left: rect.left,
|
|
81
|
-
top: rect.top,
|
|
82
|
+
top: rect.top + scrollDis,
|
|
82
83
|
right: rect.right
|
|
83
84
|
});
|
|
84
85
|
if (popoverContentRef.current) {
|
|
@@ -91,7 +92,7 @@ var Popover = function Popover2(props) {
|
|
|
91
92
|
width: rect.width,
|
|
92
93
|
height: rect.height,
|
|
93
94
|
left: rect.left,
|
|
94
|
-
top: rect.top,
|
|
95
|
+
top: rect.top + scrollDis,
|
|
95
96
|
right: rect.right
|
|
96
97
|
});
|
|
97
98
|
if (popoverContentRef.current) {
|
|
@@ -192,7 +193,7 @@ var Popover = function Popover2(props) {
|
|
|
192
193
|
"nut-popover-menu-item": true,
|
|
193
194
|
"nut-popover-menu-disabled": item.disabled
|
|
194
195
|
}, item.className),
|
|
195
|
-
key: item.key,
|
|
196
|
+
key: item.key || index,
|
|
196
197
|
onClick: function onClick3() {
|
|
197
198
|
return handleSelect(item, index);
|
|
198
199
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nut-searchbar{display:flex;align-items:center;width:var(--nutui-searchbar-width, 100%);padding:var(--nutui-searchbar-padding, 9px 10px);background:var(--nutui-searchbar-background, #fff);color:var(--nutui-gray-1, #1a1a1a);box-sizing:border-box;justify-content:center}.nut-searchbar__content{
|
|
1
|
+
.nut-searchbar{display:flex;align-items:center;width:var(--nutui-searchbar-width, 100%);padding:var(--nutui-searchbar-padding, 9px 10px);background:var(--nutui-searchbar-background, #fff);color:var(--nutui-gray-1, #1a1a1a);box-sizing:border-box;justify-content:center}.nut-searchbar__content{flex:1;display:flex;align-items:center;justify-content:center;height:var(--nutui-searchbar-input-height, 32px);background:var(--nutui-searchbar-input-background, #f7f7f7);border-radius:var(--nutui-searchbar-content-border-radius, 2px)}.nut-searchbar__icon{padding:0 5px 0 10px;display:flex;justify-content:center}.nut-searchbar__rightin{display:flex;padding:0 5px}.nut-searchbar__input-box{display:flex;align-items:center;flex:1}.nut-searchbar__input{border:0;outline:0;box-sizing:border-box;width:var(--nutui-searchbar-input-width, 100%);height:var(--nutui-searchbar-input-height, 32px);line-height:var(--nutui-searchbar-input-height, 32px);width:100%;padding:var(--nutui-searchbar-input-padding, 0 5px);border-radius:0;font-size:var(--nutui-font-size-1, 12px);color:var(--nutui-searchbar-input-text-color, var(--nutui-gray-1, #1a1a1a));caret-color:var(--nutui-searchbar-input-curror-color, var(--nutui-gray-1, #1a1a1a));background:transparent;text-align:var(--nutui-searchbar-input-text-align, left)}.nut-searchbar__round{border-radius:var(--nutui-searchbar-input-border-radius, 16px)}.nut-searchbar__disabled{cursor:not-allowed}.nut-searchbar__clear{padding:var(--nutui-searchbar-clear-icon-padding, 0 10px 0 5px)}.nut-searchbar__clear i{color:var(--nutui-gray-1, #1a1a1a)!important}.nut-searchbar .pos-right{right:40px}.nut-searchbar__left{display:flex;padding:var(--nutui-searchbar-left-padding, 0 12px 0 0);font-size:var(--nutui-searchbar-left-fontsize, 12px);color:var(--nutui-searchbar-left-color, var(--nutui-gray-1, #1a1a1a))}.nut-searchbar__right{display:flex;padding:var(--nutui-searchbar-right-padding, 0 0 0 8px);font-size:var(--nutui-searchbar-right-fontsize, 14px);color:var(--nutui-searchbar-right-color, var(--nutui-gray-1, #1a1a1a))}
|
package/dist/esm/Sticky.js
CHANGED
|
@@ -163,7 +163,7 @@ var Sticky = function Sticky2(props) {
|
|
|
163
163
|
var el = getElement();
|
|
164
164
|
el.addEventListener("scroll", handleScroll, false);
|
|
165
165
|
return function() {
|
|
166
|
-
el.removeEventListener("
|
|
166
|
+
el.removeEventListener("scroll", handleScroll);
|
|
167
167
|
};
|
|
168
168
|
}, [getElement, handleScroll]);
|
|
169
169
|
return React__default.createElement("div", _objectSpread({
|