@nutui/nutui-react 2.6.13 → 2.6.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.
- package/CHANGELOG.md +24 -0
- package/dist/esm/Empty/style/style.css +1 -1
- package/dist/esm/Swiper.js +11 -6
- package/dist/esm/cascader2.js +2 -2
- package/dist/esm/formitem2.js +3 -2
- package/dist/esm/menuitem2.js +2 -2
- 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 +18 -13
- package/dist/nutui.react.umd.js +18 -13
- package/dist/packages/empty/empty.scss +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/variables-jmapp.scss +1 -0
- package/dist/styles/variables.scss +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/form/types.d.ts +1 -0
- package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +2 -1
- package/package.json +1 -1
- package/dist/types/packages/form/usewatch.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# v2.6.14
|
|
2
|
+
`2024-07-19`
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
* :sparkles: feat(menuitem): 新增css类名,增强自定义样式能力 (#2443) @Alex-huxiyang
|
|
6
|
+
* :sparkles: feat(empty): add css variable nutui-empty-background-color (#2451) @Alex-huxiyang
|
|
7
|
+
* :sparkles: feat(infiniteLoading): 继承 scrollView 的 props 类型 (#2441) @oasis-cloud
|
|
8
|
+
* :bug: fix(cascader): 初始化设置value未成功选中 (#2435) @Alex-huxiyang
|
|
9
|
+
* :bug: fix(swiper): display abnormal when dir = 'rtl' (#2454) @Alex-huxiyang
|
|
10
|
+
* :bug: fix(form): 兼容校验时机 (#2437) @Alex-huxiyang
|
|
11
|
+
* :bug: fix(form): 在FromInstance增加validateFields方法的定义 (#2450) @jinjl
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# v2.6.13
|
|
15
|
+
`2024-07-12`
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
* :sparkles: feat: tabs滚动条兼容火狐浏览器 (#2431) @JoanneXu6677
|
|
19
|
+
* :sparkles: feat(drag): add the ability to support onDrag, onDragStart, onDragEnd callbacks (#2418) @Alex-huxiyang
|
|
20
|
+
* :bug: fix(formItem): validateTrigger无法正确触发校验 (#2433) @Alex-huxiyang
|
|
21
|
+
* :bug: fix: 日历组件滚动到顶部时 出现空白问题 (#2409) @522109452
|
|
22
|
+
* :bug: fix(imagepreview): 无法在预期情景正确关闭图片的异常 (#2421) @Alex-huxiyang
|
|
23
|
+
|
|
24
|
+
|
|
1
25
|
# v2.6.12
|
|
2
26
|
`2024-07-05`
|
|
3
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.nut-empty{box-sizing:border-box;display:flex;align-items:center;flex-direction:column;justify-content:center;padding:var(--nutui-empty-padding, 32px 40px);background-color:var(--nutui-
|
|
1
|
+
.nut-empty{box-sizing:border-box;display:flex;align-items:center;flex-direction:column;justify-content:center;padding:var(--nutui-empty-padding, 32px 40px);background-color:var(--nutui-empty-background-color, #fff)}.nut-empty-image{width:var(--nutui-empty-image-size, 160px);height:var(--nutui-empty-image-size, 160px)}.nut-empty-image .img{width:100%;height:100%}.nut-empty-image img,.nut-empty-image image{width:100%;height:100%}.nut-empty-title{margin-top:var(--nutui-empty-title-margin-top, 0px);margin-bottom:var(--nutui-empty-title-margin-bottom, 8px);color:var(--nutui-gray-7, #1a1a1a);font-size:var(--nutui-font-size-3, 14px);line-height:var(--nutui-empty-title-line-height, var(--nutui-font-size-3, 14px))}.nut-empty-description{margin-top:var(--nutui-empty-description-margin-top, 0px);color:var(--nutui-gray-5, #8c8c8c);font-size:var(--nutui-font-size-2, 12px);line-height:var(--nutui-empty-description-line-height, 1.2)}.nut-empty-small .nut-empty-image{width:var(--nutui-empty-image-small-size, 120px);height:var(--nutui-empty-image-small-size, 120px)}.nut-empty-actions{display:flex;margin-top:16px}.nut-empty-actions .nut-button.nut-empty-actions-left,.nut-empty-actions .nut-button.nut-empty-actions-right{height:28px;padding:0 12px;font-weight:400}.nut-empty-actions .nut-button.nut-empty-actions-left{margin-right:16px}[dir=rtl] .nut-empty-actions .nut-button.nut-empty-actions-left,.nut-rtl .nut-empty-actions .nut-button.nut-empty-actions-left{margin-right:0;margin-left:16px}
|
package/dist/esm/Swiper.js
CHANGED
|
@@ -3,6 +3,7 @@ import { useDrag } from "@use-gesture/react";
|
|
|
3
3
|
import { animated, useSpring } from "@react-spring/web";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import Indicator__default from "./Indicator.js";
|
|
6
|
+
import { useRtl } from "./ConfigProvider.js";
|
|
6
7
|
import SwiperItem__default from "./SwiperItem.js";
|
|
7
8
|
const getRefValue = (ref) => {
|
|
8
9
|
return ref.current;
|
|
@@ -30,11 +31,13 @@ const getPerSlidePosition$1 = (index, position, loop, count) => {
|
|
|
30
31
|
const defaultEffect = (args) => {
|
|
31
32
|
return React__default.Children.map(args.children, (child, index) => {
|
|
32
33
|
const { isVertical, getSpringsAxis, loop, count } = args;
|
|
34
|
+
const rtl = useRtl();
|
|
35
|
+
const position = rtl ? "right" : "left";
|
|
33
36
|
return React__default.createElement(animated.div, { className: "nut-swiper-slide", style: {
|
|
34
|
-
[isVertical ? "y" : "x"]: getSpringsAxis().to((
|
|
35
|
-
return getPerSlidePosition$1(index,
|
|
37
|
+
[isVertical ? "y" : "x"]: getSpringsAxis().to((position2) => {
|
|
38
|
+
return getPerSlidePosition$1(index, position2, loop, count);
|
|
36
39
|
}),
|
|
37
|
-
[isVertical ? "top" :
|
|
40
|
+
[isVertical ? "top" : position]: `-${index * 100}%`
|
|
38
41
|
} }, child);
|
|
39
42
|
});
|
|
40
43
|
};
|
|
@@ -51,12 +54,14 @@ const getPerSlidePosition = (index, position, loop, count) => {
|
|
|
51
54
|
};
|
|
52
55
|
const focusEffect = (args) => {
|
|
53
56
|
return React__default.Children.map(args.children, (child, index) => {
|
|
57
|
+
const rtl = useRtl();
|
|
58
|
+
const position = rtl ? "right" : "left";
|
|
54
59
|
const { isVertical, springs, transforms, loop, count, swiperDirection, dragging, current, effect } = args;
|
|
55
60
|
return React__default.createElement(animated.div, { className: "nut-swiper-slide", style: {
|
|
56
|
-
[isVertical ? "y" : "x"]: springs[isVertical ? "y" : "x"].to((
|
|
57
|
-
return getPerSlidePosition(index,
|
|
61
|
+
[isVertical ? "y" : "x"]: springs[isVertical ? "y" : "x"].to((position2) => {
|
|
62
|
+
return getPerSlidePosition(index, position2, loop, count);
|
|
58
63
|
}),
|
|
59
|
-
[isVertical ? "top" :
|
|
64
|
+
[isVertical ? "top" : position]: `-${index * 100}%`,
|
|
60
65
|
scale: springs.s.to((ss) => {
|
|
61
66
|
const scales = getRefValue(transforms);
|
|
62
67
|
if (!scales)
|
package/dist/esm/cascader2.js
CHANGED
|
@@ -208,7 +208,7 @@ const InternalCascader = (props, ref) => {
|
|
|
208
208
|
});
|
|
209
209
|
const syncValue = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
210
210
|
const currentValue = innerValue;
|
|
211
|
-
if (currentValue === void 0 || currentValue
|
|
211
|
+
if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
214
|
if (currentValue.length === 0) {
|
|
@@ -236,7 +236,7 @@ const InternalCascader = (props, ref) => {
|
|
|
236
236
|
state.initLoading = false;
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
if (needToSync.length && currentValue
|
|
239
|
+
if (needToSync.length && [defaultValue, value].includes(currentValue)) {
|
|
240
240
|
const pathNodes = state.tree.getPathNodesByValue(needToSync);
|
|
241
241
|
pathNodes.forEach((node, index) => {
|
|
242
242
|
state.tabsCursor = index;
|
package/dist/esm/formitem2.js
CHANGED
|
@@ -42,7 +42,7 @@ class FormStore {
|
|
|
42
42
|
this.store = values;
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
this.setFieldsValue = (newStore) => {
|
|
45
|
+
this.setFieldsValue = (newStore, needValidate = true) => {
|
|
46
46
|
this.store = Object.assign(Object.assign({}, this.store), newStore);
|
|
47
47
|
this.fieldEntities.forEach((entity) => {
|
|
48
48
|
const { name } = entity.props;
|
|
@@ -61,6 +61,7 @@ class FormStore {
|
|
|
61
61
|
item.entity.onStoreChange("update");
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
+
needValidate && this.validateFields();
|
|
64
65
|
};
|
|
65
66
|
this.setCallback = (callback) => {
|
|
66
67
|
this.callbacks = Object.assign(Object.assign({}, this.callbacks), callback);
|
|
@@ -209,7 +210,7 @@ class FormItem extends React__default.Component {
|
|
|
209
210
|
if (this.props.getValueFromEvent) {
|
|
210
211
|
next = this.props.getValueFromEvent(...args);
|
|
211
212
|
}
|
|
212
|
-
setFieldsValue({ [name]: next });
|
|
213
|
+
setFieldsValue({ [name]: next }, false);
|
|
213
214
|
} });
|
|
214
215
|
const { validateTrigger } = this.props;
|
|
215
216
|
let validateTriggers = [this.props.trigger || "onChange"];
|
package/dist/esm/menuitem2.js
CHANGED
|
@@ -133,8 +133,8 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
133
133
|
}, onClick: () => {
|
|
134
134
|
handleClick(item);
|
|
135
135
|
} },
|
|
136
|
-
item.value === innerValue ? React__default.createElement("i",
|
|
137
|
-
React__default.createElement("div", { className: getIconCName(item.value, value)
|
|
136
|
+
item.value === innerValue ? React__default.createElement("i", { className: "nut-menu-container-item-icon" }, icon || React__default.createElement(Check, { color: activeColor, className: getIconCName(item.value, value) })) : null,
|
|
137
|
+
React__default.createElement("div", { className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`, style: {
|
|
138
138
|
color: `${item.value === innerValue ? activeColor : ""}`
|
|
139
139
|
} }, item.text)
|
|
140
140
|
);
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v2.6.
|
|
2
|
+
* @nutui/nutui-react v2.6.14 Fri Jul 19 2024 16:21:28 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -9627,7 +9627,7 @@ const InternalCascader = (props, ref) => {
|
|
|
9627
9627
|
};
|
|
9628
9628
|
const syncValue = async () => {
|
|
9629
9629
|
const currentValue = innerValue;
|
|
9630
|
-
if (currentValue === void 0 || currentValue
|
|
9630
|
+
if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
|
|
9631
9631
|
return;
|
|
9632
9632
|
}
|
|
9633
9633
|
if (currentValue.length === 0) {
|
|
@@ -9659,7 +9659,7 @@ const InternalCascader = (props, ref) => {
|
|
|
9659
9659
|
state.initLoading = false;
|
|
9660
9660
|
}
|
|
9661
9661
|
}
|
|
9662
|
-
if (needToSync.length && currentValue
|
|
9662
|
+
if (needToSync.length && [defaultValue, value].includes(currentValue)) {
|
|
9663
9663
|
const pathNodes = state.tree.getPathNodesByValue(needToSync);
|
|
9664
9664
|
pathNodes.forEach((node, index) => {
|
|
9665
9665
|
state.tabsCursor = index;
|
|
@@ -13682,7 +13682,7 @@ class FormStore {
|
|
|
13682
13682
|
this.store = values;
|
|
13683
13683
|
}
|
|
13684
13684
|
};
|
|
13685
|
-
this.setFieldsValue = (newStore) => {
|
|
13685
|
+
this.setFieldsValue = (newStore, needValidate = true) => {
|
|
13686
13686
|
this.store = {
|
|
13687
13687
|
...this.store,
|
|
13688
13688
|
...newStore
|
|
@@ -13704,6 +13704,7 @@ class FormStore {
|
|
|
13704
13704
|
item.entity.onStoreChange("update");
|
|
13705
13705
|
}
|
|
13706
13706
|
});
|
|
13707
|
+
needValidate && this.validateFields();
|
|
13707
13708
|
};
|
|
13708
13709
|
this.setCallback = (callback) => {
|
|
13709
13710
|
this.callbacks = {
|
|
@@ -13948,7 +13949,7 @@ const _FormItem = class _FormItem extends React__default.Component {
|
|
|
13948
13949
|
if (this.props.getValueFromEvent) {
|
|
13949
13950
|
next = this.props.getValueFromEvent(...args);
|
|
13950
13951
|
}
|
|
13951
|
-
setFieldsValue({ [name]: next });
|
|
13952
|
+
setFieldsValue({ [name]: next }, false);
|
|
13952
13953
|
}
|
|
13953
13954
|
};
|
|
13954
13955
|
const { validateTrigger } = this.props;
|
|
@@ -14708,7 +14709,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
14708
14709
|
handleClick2(item);
|
|
14709
14710
|
}
|
|
14710
14711
|
},
|
|
14711
|
-
item.value === innerValue ? /* @__PURE__ */ React__default.createElement("i",
|
|
14712
|
+
item.value === innerValue ? /* @__PURE__ */ React__default.createElement("i", { className: "nut-menu-container-item-icon" }, icon || /* @__PURE__ */ React__default.createElement(
|
|
14712
14713
|
o$5,
|
|
14713
14714
|
{
|
|
14714
14715
|
color: activeColor,
|
|
@@ -14718,7 +14719,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
14718
14719
|
/* @__PURE__ */ React__default.createElement(
|
|
14719
14720
|
"div",
|
|
14720
14721
|
{
|
|
14721
|
-
className: getIconCName(item.value, value)
|
|
14722
|
+
className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
|
|
14722
14723
|
style: {
|
|
14723
14724
|
color: `${item.value === innerValue ? activeColor : ""}`
|
|
14724
14725
|
}
|
|
@@ -20589,15 +20590,17 @@ const getPerSlidePosition$1 = (index, position, loop2, count) => {
|
|
|
20589
20590
|
const defaultEffect = (args) => {
|
|
20590
20591
|
return React__default.Children.map(args.children, (child, index) => {
|
|
20591
20592
|
const { isVertical, getSpringsAxis, loop: loop2, count } = args;
|
|
20593
|
+
const rtl = useRtl();
|
|
20594
|
+
const position = rtl ? "right" : "left";
|
|
20592
20595
|
return /* @__PURE__ */ React__default.createElement(
|
|
20593
20596
|
animated.div,
|
|
20594
20597
|
{
|
|
20595
20598
|
className: "nut-swiper-slide",
|
|
20596
20599
|
style: {
|
|
20597
|
-
[isVertical ? "y" : "x"]: getSpringsAxis().to((
|
|
20598
|
-
return getPerSlidePosition$1(index,
|
|
20600
|
+
[isVertical ? "y" : "x"]: getSpringsAxis().to((position2) => {
|
|
20601
|
+
return getPerSlidePosition$1(index, position2, loop2, count);
|
|
20599
20602
|
}),
|
|
20600
|
-
[isVertical ? "top" :
|
|
20603
|
+
[isVertical ? "top" : position]: `-${index * 100}%`
|
|
20601
20604
|
}
|
|
20602
20605
|
},
|
|
20603
20606
|
child
|
|
@@ -20617,6 +20620,8 @@ const getPerSlidePosition = (index, position, loop2, count) => {
|
|
|
20617
20620
|
};
|
|
20618
20621
|
const focusEffect = (args) => {
|
|
20619
20622
|
return React__default.Children.map(args.children, (child, index) => {
|
|
20623
|
+
const rtl = useRtl();
|
|
20624
|
+
const position = rtl ? "right" : "left";
|
|
20620
20625
|
const {
|
|
20621
20626
|
isVertical,
|
|
20622
20627
|
springs,
|
|
@@ -20634,11 +20639,11 @@ const focusEffect = (args) => {
|
|
|
20634
20639
|
className: "nut-swiper-slide",
|
|
20635
20640
|
style: {
|
|
20636
20641
|
[isVertical ? "y" : "x"]: springs[isVertical ? "y" : "x"].to(
|
|
20637
|
-
(
|
|
20638
|
-
return getPerSlidePosition(index,
|
|
20642
|
+
(position2) => {
|
|
20643
|
+
return getPerSlidePosition(index, position2, loop2, count);
|
|
20639
20644
|
}
|
|
20640
20645
|
),
|
|
20641
|
-
[isVertical ? "top" :
|
|
20646
|
+
[isVertical ? "top" : position]: `-${index * 100}%`,
|
|
20642
20647
|
scale: springs.s.to((ss) => {
|
|
20643
20648
|
const scales = getRefValue(transforms);
|
|
20644
20649
|
if (!scales) return 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("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.nutui = {}, global2.React, global2.ReactDOM));
|
|
3
3
|
})(this, function(exports2, React, ReactDOM) {
|
|
4
4
|
"use strict";/*!
|
|
5
|
-
* @nutui/nutui-react v2.6.
|
|
5
|
+
* @nutui/nutui-react v2.6.14 Fri Jul 19 2024 16:21:28 GMT+0800 (China Standard Time)
|
|
6
6
|
* (c) 2023 @jdf2e.
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
@@ -9645,7 +9645,7 @@
|
|
|
9645
9645
|
};
|
|
9646
9646
|
const syncValue = async () => {
|
|
9647
9647
|
const currentValue = innerValue;
|
|
9648
|
-
if (currentValue === void 0 || currentValue
|
|
9648
|
+
if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
|
|
9649
9649
|
return;
|
|
9650
9650
|
}
|
|
9651
9651
|
if (currentValue.length === 0) {
|
|
@@ -9677,7 +9677,7 @@
|
|
|
9677
9677
|
state.initLoading = false;
|
|
9678
9678
|
}
|
|
9679
9679
|
}
|
|
9680
|
-
if (needToSync.length && currentValue
|
|
9680
|
+
if (needToSync.length && [defaultValue, value].includes(currentValue)) {
|
|
9681
9681
|
const pathNodes = state.tree.getPathNodesByValue(needToSync);
|
|
9682
9682
|
pathNodes.forEach((node, index) => {
|
|
9683
9683
|
state.tabsCursor = index;
|
|
@@ -13700,7 +13700,7 @@
|
|
|
13700
13700
|
this.store = values;
|
|
13701
13701
|
}
|
|
13702
13702
|
};
|
|
13703
|
-
this.setFieldsValue = (newStore) => {
|
|
13703
|
+
this.setFieldsValue = (newStore, needValidate = true) => {
|
|
13704
13704
|
this.store = {
|
|
13705
13705
|
...this.store,
|
|
13706
13706
|
...newStore
|
|
@@ -13722,6 +13722,7 @@
|
|
|
13722
13722
|
item.entity.onStoreChange("update");
|
|
13723
13723
|
}
|
|
13724
13724
|
});
|
|
13725
|
+
needValidate && this.validateFields();
|
|
13725
13726
|
};
|
|
13726
13727
|
this.setCallback = (callback) => {
|
|
13727
13728
|
this.callbacks = {
|
|
@@ -13966,7 +13967,7 @@
|
|
|
13966
13967
|
if (this.props.getValueFromEvent) {
|
|
13967
13968
|
next = this.props.getValueFromEvent(...args);
|
|
13968
13969
|
}
|
|
13969
|
-
setFieldsValue({ [name]: next });
|
|
13970
|
+
setFieldsValue({ [name]: next }, false);
|
|
13970
13971
|
}
|
|
13971
13972
|
};
|
|
13972
13973
|
const { validateTrigger } = this.props;
|
|
@@ -14726,7 +14727,7 @@
|
|
|
14726
14727
|
handleClick2(item);
|
|
14727
14728
|
}
|
|
14728
14729
|
},
|
|
14729
|
-
item.value === innerValue ? /* @__PURE__ */ React.createElement("i",
|
|
14730
|
+
item.value === innerValue ? /* @__PURE__ */ React.createElement("i", { className: "nut-menu-container-item-icon" }, icon || /* @__PURE__ */ React.createElement(
|
|
14730
14731
|
o$5,
|
|
14731
14732
|
{
|
|
14732
14733
|
color: activeColor,
|
|
@@ -14736,7 +14737,7 @@
|
|
|
14736
14737
|
/* @__PURE__ */ React.createElement(
|
|
14737
14738
|
"div",
|
|
14738
14739
|
{
|
|
14739
|
-
className: getIconCName(item.value, value)
|
|
14740
|
+
className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
|
|
14740
14741
|
style: {
|
|
14741
14742
|
color: `${item.value === innerValue ? activeColor : ""}`
|
|
14742
14743
|
}
|
|
@@ -20607,15 +20608,17 @@
|
|
|
20607
20608
|
const defaultEffect = (args) => {
|
|
20608
20609
|
return React.Children.map(args.children, (child, index) => {
|
|
20609
20610
|
const { isVertical, getSpringsAxis, loop: loop2, count } = args;
|
|
20611
|
+
const rtl = useRtl();
|
|
20612
|
+
const position = rtl ? "right" : "left";
|
|
20610
20613
|
return /* @__PURE__ */ React.createElement(
|
|
20611
20614
|
animated.div,
|
|
20612
20615
|
{
|
|
20613
20616
|
className: "nut-swiper-slide",
|
|
20614
20617
|
style: {
|
|
20615
|
-
[isVertical ? "y" : "x"]: getSpringsAxis().to((
|
|
20616
|
-
return getPerSlidePosition$1(index,
|
|
20618
|
+
[isVertical ? "y" : "x"]: getSpringsAxis().to((position2) => {
|
|
20619
|
+
return getPerSlidePosition$1(index, position2, loop2, count);
|
|
20617
20620
|
}),
|
|
20618
|
-
[isVertical ? "top" :
|
|
20621
|
+
[isVertical ? "top" : position]: `-${index * 100}%`
|
|
20619
20622
|
}
|
|
20620
20623
|
},
|
|
20621
20624
|
child
|
|
@@ -20635,6 +20638,8 @@
|
|
|
20635
20638
|
};
|
|
20636
20639
|
const focusEffect = (args) => {
|
|
20637
20640
|
return React.Children.map(args.children, (child, index) => {
|
|
20641
|
+
const rtl = useRtl();
|
|
20642
|
+
const position = rtl ? "right" : "left";
|
|
20638
20643
|
const {
|
|
20639
20644
|
isVertical,
|
|
20640
20645
|
springs,
|
|
@@ -20652,11 +20657,11 @@
|
|
|
20652
20657
|
className: "nut-swiper-slide",
|
|
20653
20658
|
style: {
|
|
20654
20659
|
[isVertical ? "y" : "x"]: springs[isVertical ? "y" : "x"].to(
|
|
20655
|
-
(
|
|
20656
|
-
return getPerSlidePosition(index,
|
|
20660
|
+
(position2) => {
|
|
20661
|
+
return getPerSlidePosition(index, position2, loop2, count);
|
|
20657
20662
|
}
|
|
20658
20663
|
),
|
|
20659
|
-
[isVertical ? "top" :
|
|
20664
|
+
[isVertical ? "top" : position]: `-${index * 100}%`,
|
|
20660
20665
|
scale: springs.s.to((ss) => {
|
|
20661
20666
|
const scales = getRefValue(transforms);
|
|
20662
20667
|
if (!scales) return 1;
|