@nutui/nutui-react-taro 2.6.12 → 2.6.13
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/esm/Address/style/style.css +1 -1
- package/dist/esm/Calendar.js +1 -1
- package/dist/esm/CalendarItem.js +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Drag.js +1 -1
- package/dist/esm/Form.js +1 -1
- package/dist/esm/FormItem.js +1 -1
- package/dist/esm/ImagePreview.js +1 -1
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/{calendar.taro-DN6uEJw-.js → calendar.taro-Bf5owfGd.js} +1 -1
- package/dist/esm/{calendaritem.taro-CiGznRkW.js → calendaritem.taro-PLHReAvU.js} +2 -0
- package/dist/esm/{drag.taro-CI7ZFwaM.js → drag.taro-B_TO4Nnu.js} +8 -2
- package/dist/esm/{formitem.taro-BsnxUebv.js → formitem.taro-tLWeQ0P5.js} +0 -1
- package/dist/esm/{imagepreview.taro-BLXFYocO.js → imagepreview.taro-DtgQJEQ_.js} +12 -5
- package/dist/esm/nutui-react.es.js +5 -5
- 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 +33 -10
- package/dist/nutui.react.umd.js +33 -10
- package/dist/packages/tabs/tabs.scss +1 -0
- package/dist/style.css +1 -1
- package/dist/types/packages/drag/drag.d.ts +6 -0
- package/dist/types/packages/drag/drag.taro.d.ts +16 -0
- package/package.json +1 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tarojs/taro"), require("@tarojs/components"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tarojs/taro", "@tarojs/components", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.Taro, global2.components, global2.ReactDOM));
|
|
3
3
|
})(this, function(exports2, React, Taro, components, ReactDOM) {
|
|
4
4
|
"use strict";/*!
|
|
5
|
-
* @nutui/nutui-react-taro v2.6.
|
|
5
|
+
* @nutui/nutui-react-taro v2.6.13 Fri Jul 12 2024 13:57:50 GMT+0800 (China Standard Time)
|
|
6
6
|
* (c) 2023 @jdf2e.
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
@@ -6791,6 +6791,7 @@
|
|
|
6791
6791
|
const scrollTop2 = e2.target.scrollTop;
|
|
6792
6792
|
Taro.getEnv() === "WEB" && setScrollTop(scrollTop2);
|
|
6793
6793
|
let current = Math.floor(scrollTop2 / avgHeight);
|
|
6794
|
+
if (current < 0) return;
|
|
6794
6795
|
if (!monthsData[current + 1]) return;
|
|
6795
6796
|
const nextTop = monthsData[current + 1].scrollTop;
|
|
6796
6797
|
const nextHeight = monthsData[current + 1].cssHeight;
|
|
@@ -9830,7 +9831,6 @@
|
|
|
9830
9831
|
item.entity.onStoreChange("update");
|
|
9831
9832
|
}
|
|
9832
9833
|
});
|
|
9833
|
-
this.validateFields();
|
|
9834
9834
|
};
|
|
9835
9835
|
this.setCallback = (callback) => {
|
|
9836
9836
|
this.callbacks = {
|
|
@@ -13526,7 +13526,18 @@
|
|
|
13526
13526
|
className: "myDrag"
|
|
13527
13527
|
};
|
|
13528
13528
|
const Drag = (props) => {
|
|
13529
|
-
const {
|
|
13529
|
+
const {
|
|
13530
|
+
attract,
|
|
13531
|
+
direction,
|
|
13532
|
+
boundary,
|
|
13533
|
+
onDrag,
|
|
13534
|
+
onDragStart,
|
|
13535
|
+
onDragEnd,
|
|
13536
|
+
children,
|
|
13537
|
+
className,
|
|
13538
|
+
style,
|
|
13539
|
+
...reset
|
|
13540
|
+
} = {
|
|
13530
13541
|
...defaultProps$F,
|
|
13531
13542
|
...props
|
|
13532
13543
|
};
|
|
@@ -13561,7 +13572,7 @@
|
|
|
13561
13572
|
}
|
|
13562
13573
|
};
|
|
13563
13574
|
const touchStart = (e2) => {
|
|
13564
|
-
|
|
13575
|
+
onDragStart == null ? void 0 : onDragStart();
|
|
13565
13576
|
const touches = e2.touches[0];
|
|
13566
13577
|
axisCache.current = { x: touches.clientX, y: touches.clientY };
|
|
13567
13578
|
transformCache.current = { x: translateX.current, y: translateY.current };
|
|
@@ -13573,6 +13584,9 @@
|
|
|
13573
13584
|
const y = touch.clientY - axisCache.current.y;
|
|
13574
13585
|
translateX.current = x + transformCache.current.x;
|
|
13575
13586
|
translateY.current = y + transformCache.current.y;
|
|
13587
|
+
onDrag == null ? void 0 : onDrag({
|
|
13588
|
+
offset: [translateX.current, translateY.current]
|
|
13589
|
+
});
|
|
13576
13590
|
if (translateX.current < boundaryState.left) {
|
|
13577
13591
|
translateX.current = boundaryState.left;
|
|
13578
13592
|
} else if (translateX.current > boundaryState.right) {
|
|
@@ -13588,6 +13602,9 @@
|
|
|
13588
13602
|
}
|
|
13589
13603
|
};
|
|
13590
13604
|
const touchEnd = (e2) => {
|
|
13605
|
+
onDragEnd == null ? void 0 : onDragEnd({
|
|
13606
|
+
offset: [translateX.current, translateY.current]
|
|
13607
|
+
});
|
|
13591
13608
|
if (direction !== "y" && attract && dragRef.current) {
|
|
13592
13609
|
if (translateX.current < middleLine.current) {
|
|
13593
13610
|
translateX.current = boundaryState.left;
|
|
@@ -17005,7 +17022,6 @@
|
|
|
17005
17022
|
className: classNames(classPrefix2, className),
|
|
17006
17023
|
style,
|
|
17007
17024
|
ref,
|
|
17008
|
-
onClick: closeOnImg,
|
|
17009
17025
|
onTouchStart
|
|
17010
17026
|
},
|
|
17011
17027
|
/* @__PURE__ */ React.createElement(
|
|
@@ -17037,6 +17053,7 @@
|
|
|
17037
17053
|
components.Video,
|
|
17038
17054
|
{
|
|
17039
17055
|
src: item.source.src,
|
|
17056
|
+
onClick: closeOnImg,
|
|
17040
17057
|
controls: item.options.controls,
|
|
17041
17058
|
autoplay: false,
|
|
17042
17059
|
loop: false,
|
|
@@ -17052,14 +17069,20 @@
|
|
|
17052
17069
|
key: index,
|
|
17053
17070
|
className: "nut-imagepreview-swiper-item"
|
|
17054
17071
|
},
|
|
17055
|
-
|
|
17056
|
-
|
|
17072
|
+
"(",
|
|
17073
|
+
/* @__PURE__ */ React.createElement(
|
|
17074
|
+
components.Image,
|
|
17057
17075
|
{
|
|
17058
17076
|
src: item.src,
|
|
17059
|
-
mode: "
|
|
17060
|
-
|
|
17077
|
+
mode: "widthFix",
|
|
17078
|
+
onClick: closeOnImg,
|
|
17079
|
+
style: { width: "100%" },
|
|
17080
|
+
...Taro.getEnv() !== "WEB" && {
|
|
17081
|
+
showMenuByLongpress
|
|
17082
|
+
}
|
|
17061
17083
|
}
|
|
17062
|
-
)
|
|
17084
|
+
),
|
|
17085
|
+
")"
|
|
17063
17086
|
);
|
|
17064
17087
|
}) : []
|
|
17065
17088
|
)
|