@nutui/nutui-react 1.4.0 → 1.4.1
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 +13 -0
- package/dist/esm/Icon/style/index.js +1 -2
- package/dist/esm/Input.js +3 -3
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/Overlay.js +2 -2
- package/dist/esm/Popup.js +3 -2
- package/dist/esm/Range.js +1 -3
- package/dist/esm/Swiper.js +8 -4
- package/dist/esm/{overlay-ed3eb37d.js → overlay-41da5070.js} +1 -1
- package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +1 -1
- package/dist/esm/types/src/packages/animate/type.d.ts +2 -2
- package/dist/esm/types/src/packages/animatingnumbers/animatingnumbers.d.ts +1 -1
- package/dist/esm/types/src/packages/avatar/avatar.d.ts +1 -1
- package/dist/esm/types/src/packages/badge/badge.d.ts +1 -1
- package/dist/esm/types/src/packages/button/button.d.ts +3 -3
- package/dist/esm/types/src/packages/calendar/calendar.d.ts +1 -1
- package/dist/esm/types/src/packages/calendaritem/calendaritem.d.ts +2 -2
- package/dist/esm/types/src/packages/cascader/types.d.ts +1 -1
- package/dist/esm/types/src/packages/col/col.d.ts +1 -1
- package/dist/esm/types/src/packages/dialog/Mask.d.ts +1 -1
- package/dist/esm/types/src/packages/dialog/config.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialog.d.ts +1 -1
- package/dist/esm/types/src/packages/divider/divider.d.ts +2 -2
- package/dist/esm/types/src/packages/ellipsis/ellipsis.d.ts +1 -1
- package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +2 -2
- package/dist/esm/types/src/packages/form/types.d.ts +2 -2
- package/dist/esm/types/src/packages/formitem/formitem.d.ts +2 -2
- package/dist/esm/types/src/packages/formitem/types.d.ts +2 -2
- package/dist/esm/types/src/packages/grid/grid.d.ts +1 -1
- package/dist/esm/types/src/packages/griditem/griditem.d.ts +1 -1
- package/dist/esm/types/src/packages/image/image.d.ts +2 -2
- package/dist/esm/types/src/packages/input/input.d.ts +5 -5
- package/dist/esm/types/src/packages/popover/popover.d.ts +2 -2
- package/dist/esm/types/src/packages/popup/popup.d.ts +1 -1
- package/dist/esm/types/src/packages/progress/progress.d.ts +2 -2
- package/dist/esm/types/src/packages/pulltorefresh/pulltorefresh.d.ts +1 -1
- package/dist/esm/types/src/packages/radio/radio.d.ts +2 -2
- package/dist/esm/types/src/packages/radiogroup/radiogroup.d.ts +2 -2
- package/dist/esm/types/src/packages/range/range.d.ts +1 -2
- package/dist/esm/types/src/packages/row/row.d.ts +1 -1
- package/dist/esm/types/src/packages/sidenavbar/sidenavbar.d.ts +1 -1
- package/dist/esm/types/src/packages/sidenavbar/type.d.ts +3 -3
- package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.d.ts +1 -1
- package/dist/esm/types/src/packages/skeleton/skeleton.d.ts +1 -1
- package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.d.ts +1 -1
- package/dist/esm/types/src/packages/swipe/swipe.d.ts +2 -2
- package/dist/esm/types/src/packages/swiper/swiper.d.ts +2 -1
- package/dist/esm/types/src/packages/table/table.d.ts +1 -1
- package/dist/esm/types/src/packages/tabs/tabs.d.ts +1 -1
- package/dist/esm/types/src/packages/tag/tag.d.ts +1 -1
- package/dist/esm/types/src/packages/uploader/uploader.d.ts +2 -2
- package/dist/esm/types/src/packages/virtuallist/type.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +1 -1
- package/dist/esm/types/src/utils/get-scroll-parent.d.ts +1 -1
- package/dist/esm/types/src/utils/render.d.ts +1 -1
- package/dist/esm/types/src/utils/useTouch.d.ts +1 -1
- package/dist/esm/types/src/utils/useWatch.d.ts +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/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 +90 -78
- package/dist/nutui.react.umd.js +90 -78
- package/dist/packages/input/input.scss +15 -0
- package/dist/packages/searchbar/searchbar.scss +6 -13
- package/dist/packages/swiper/swiper.scss +0 -3
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +1 -0
- package/dist/styles/variables.scss +8 -4
- package/dist/types/index.d.ts +56 -56
- package/package.json +2 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.4.
|
|
2
|
+
* @nutui/nutui-react v1.4.1-beta.0 Wed Dec 28 2022 16:47:00 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
})(classnames);
|
|
426
426
|
var classNames = classnames.exports;
|
|
427
427
|
const defaultOverlayProps = {
|
|
428
|
-
zIndex:
|
|
428
|
+
zIndex: 1e3,
|
|
429
429
|
duration: 0.3,
|
|
430
430
|
overlayClass: "",
|
|
431
431
|
closeOnClickOverlay: true,
|
|
@@ -996,7 +996,7 @@
|
|
|
996
996
|
},
|
|
997
997
|
...defaultOverlayProps
|
|
998
998
|
};
|
|
999
|
-
let _zIndex =
|
|
999
|
+
let _zIndex = 1e3;
|
|
1000
1000
|
const Popup = (props) => {
|
|
1001
1001
|
const {
|
|
1002
1002
|
children,
|
|
@@ -7731,7 +7731,7 @@
|
|
|
7731
7731
|
])
|
|
7732
7732
|
}, tabTitle)));
|
|
7733
7733
|
};
|
|
7734
|
-
function clamp(v, min, max) {
|
|
7734
|
+
function clamp$1(v, min, max) {
|
|
7735
7735
|
return Math.max(min, Math.min(v, max));
|
|
7736
7736
|
}
|
|
7737
7737
|
const V = {
|
|
@@ -7762,7 +7762,7 @@
|
|
|
7762
7762
|
}
|
|
7763
7763
|
function rubberbandIfOutOfBounds$1(position, min, max, constant = 0.15) {
|
|
7764
7764
|
if (constant === 0)
|
|
7765
|
-
return clamp(position, min, max);
|
|
7765
|
+
return clamp$1(position, min, max);
|
|
7766
7766
|
if (position < min)
|
|
7767
7767
|
return -rubberband$1(min - position, max - min, constant) + min;
|
|
7768
7768
|
if (position > max)
|
|
@@ -8651,15 +8651,14 @@
|
|
|
8651
8651
|
pointerCapture(_v, _k, {
|
|
8652
8652
|
pointer: {
|
|
8653
8653
|
capture = true,
|
|
8654
|
-
buttons = 1
|
|
8654
|
+
buttons = 1,
|
|
8655
|
+
keys = true
|
|
8655
8656
|
} = {}
|
|
8656
8657
|
}) {
|
|
8657
8658
|
this.pointerButtons = buttons;
|
|
8659
|
+
this.keys = keys;
|
|
8658
8660
|
return !this.pointerLock && this.device === "pointer" && capture;
|
|
8659
8661
|
},
|
|
8660
|
-
keys(value = true) {
|
|
8661
|
-
return value;
|
|
8662
|
-
},
|
|
8663
8662
|
threshold(value, _k, {
|
|
8664
8663
|
filterTaps = false,
|
|
8665
8664
|
tapsThreshold = 3,
|
|
@@ -9260,7 +9259,7 @@
|
|
|
9260
9259
|
return value;
|
|
9261
9260
|
}
|
|
9262
9261
|
};
|
|
9263
|
-
const _excluded$
|
|
9262
|
+
const _excluded$3 = ["target", "eventOptions", "window", "enabled", "transform"];
|
|
9264
9263
|
function resolveWith(config2 = {}, resolvers) {
|
|
9265
9264
|
const result = {};
|
|
9266
9265
|
for (const [key, resolver] of Object.entries(resolvers)) {
|
|
@@ -9288,7 +9287,7 @@
|
|
|
9288
9287
|
window: window2,
|
|
9289
9288
|
enabled,
|
|
9290
9289
|
transform
|
|
9291
|
-
} = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
9290
|
+
} = _ref, rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
9292
9291
|
_config.shared = resolveWith({
|
|
9293
9292
|
target,
|
|
9294
9293
|
eventOptions,
|
|
@@ -9889,6 +9888,7 @@
|
|
|
9889
9888
|
const index = arr.findIndex(test);
|
|
9890
9889
|
return index < 0 ? arr.length : index;
|
|
9891
9890
|
}
|
|
9891
|
+
const clamp = (min, max, v) => Math.min(Math.max(v, min), max);
|
|
9892
9892
|
const colors = {
|
|
9893
9893
|
transparent: 0,
|
|
9894
9894
|
aliceblue: 4042850303,
|
|
@@ -10210,6 +10210,64 @@
|
|
|
10210
10210
|
break;
|
|
10211
10211
|
return i - 1;
|
|
10212
10212
|
}
|
|
10213
|
+
const steps = (steps2, direction = "end") => (progress) => {
|
|
10214
|
+
progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 1e-3);
|
|
10215
|
+
const expanded = progress * steps2;
|
|
10216
|
+
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
|
|
10217
|
+
return clamp(0, 1, rounded / steps2);
|
|
10218
|
+
};
|
|
10219
|
+
const c1 = 1.70158;
|
|
10220
|
+
const c2 = c1 * 1.525;
|
|
10221
|
+
const c3 = c1 + 1;
|
|
10222
|
+
const c4 = 2 * Math.PI / 3;
|
|
10223
|
+
const c5 = 2 * Math.PI / 4.5;
|
|
10224
|
+
const bounceOut = (x) => {
|
|
10225
|
+
const n1 = 7.5625;
|
|
10226
|
+
const d1 = 2.75;
|
|
10227
|
+
if (x < 1 / d1) {
|
|
10228
|
+
return n1 * x * x;
|
|
10229
|
+
} else if (x < 2 / d1) {
|
|
10230
|
+
return n1 * (x -= 1.5 / d1) * x + 0.75;
|
|
10231
|
+
} else if (x < 2.5 / d1) {
|
|
10232
|
+
return n1 * (x -= 2.25 / d1) * x + 0.9375;
|
|
10233
|
+
} else {
|
|
10234
|
+
return n1 * (x -= 2.625 / d1) * x + 0.984375;
|
|
10235
|
+
}
|
|
10236
|
+
};
|
|
10237
|
+
const easings = {
|
|
10238
|
+
linear: (x) => x,
|
|
10239
|
+
easeInQuad: (x) => x * x,
|
|
10240
|
+
easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
|
|
10241
|
+
easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
|
|
10242
|
+
easeInCubic: (x) => x * x * x,
|
|
10243
|
+
easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
|
|
10244
|
+
easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
|
|
10245
|
+
easeInQuart: (x) => x * x * x * x,
|
|
10246
|
+
easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
|
|
10247
|
+
easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
|
|
10248
|
+
easeInQuint: (x) => x * x * x * x * x,
|
|
10249
|
+
easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
|
|
10250
|
+
easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
|
|
10251
|
+
easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
|
|
10252
|
+
easeOutSine: (x) => Math.sin(x * Math.PI / 2),
|
|
10253
|
+
easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
|
|
10254
|
+
easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
|
|
10255
|
+
easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
|
|
10256
|
+
easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,
|
|
10257
|
+
easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
|
|
10258
|
+
easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
|
|
10259
|
+
easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,
|
|
10260
|
+
easeInBack: (x) => c3 * x * x * x - c1 * x * x,
|
|
10261
|
+
easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
|
|
10262
|
+
easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
|
|
10263
|
+
easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
|
|
10264
|
+
easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
|
|
10265
|
+
easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,
|
|
10266
|
+
easeInBounce: (x) => 1 - bounceOut(1 - x),
|
|
10267
|
+
easeOutBounce: bounceOut,
|
|
10268
|
+
easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2,
|
|
10269
|
+
steps
|
|
10270
|
+
};
|
|
10213
10271
|
function _extends$3() {
|
|
10214
10272
|
_extends$3 = Object.assign ? Object.assign.bind() : function(target) {
|
|
10215
10273
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -10891,57 +10949,6 @@
|
|
|
10891
10949
|
friction: 120
|
|
10892
10950
|
}
|
|
10893
10951
|
};
|
|
10894
|
-
const c1 = 1.70158;
|
|
10895
|
-
const c2 = c1 * 1.525;
|
|
10896
|
-
const c3 = c1 + 1;
|
|
10897
|
-
const c4 = 2 * Math.PI / 3;
|
|
10898
|
-
const c5 = 2 * Math.PI / 4.5;
|
|
10899
|
-
const bounceOut = (x) => {
|
|
10900
|
-
const n1 = 7.5625;
|
|
10901
|
-
const d1 = 2.75;
|
|
10902
|
-
if (x < 1 / d1) {
|
|
10903
|
-
return n1 * x * x;
|
|
10904
|
-
} else if (x < 2 / d1) {
|
|
10905
|
-
return n1 * (x -= 1.5 / d1) * x + 0.75;
|
|
10906
|
-
} else if (x < 2.5 / d1) {
|
|
10907
|
-
return n1 * (x -= 2.25 / d1) * x + 0.9375;
|
|
10908
|
-
} else {
|
|
10909
|
-
return n1 * (x -= 2.625 / d1) * x + 0.984375;
|
|
10910
|
-
}
|
|
10911
|
-
};
|
|
10912
|
-
const easings = {
|
|
10913
|
-
linear: (x) => x,
|
|
10914
|
-
easeInQuad: (x) => x * x,
|
|
10915
|
-
easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
|
|
10916
|
-
easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
|
|
10917
|
-
easeInCubic: (x) => x * x * x,
|
|
10918
|
-
easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
|
|
10919
|
-
easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
|
|
10920
|
-
easeInQuart: (x) => x * x * x * x,
|
|
10921
|
-
easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
|
|
10922
|
-
easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
|
|
10923
|
-
easeInQuint: (x) => x * x * x * x * x,
|
|
10924
|
-
easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
|
|
10925
|
-
easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
|
|
10926
|
-
easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
|
|
10927
|
-
easeOutSine: (x) => Math.sin(x * Math.PI / 2),
|
|
10928
|
-
easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
|
|
10929
|
-
easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
|
|
10930
|
-
easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
|
|
10931
|
-
easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,
|
|
10932
|
-
easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
|
|
10933
|
-
easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
|
|
10934
|
-
easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,
|
|
10935
|
-
easeInBack: (x) => c3 * x * x * x - c1 * x * x,
|
|
10936
|
-
easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
|
|
10937
|
-
easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
|
|
10938
|
-
easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
|
|
10939
|
-
easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
|
|
10940
|
-
easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,
|
|
10941
|
-
easeInBounce: (x) => 1 - bounceOut(1 - x),
|
|
10942
|
-
easeOutBounce: bounceOut,
|
|
10943
|
-
easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2
|
|
10944
|
-
};
|
|
10945
10952
|
const defaults = _extends$1({}, config.default, {
|
|
10946
10953
|
mass: 1,
|
|
10947
10954
|
damping: 1,
|
|
@@ -11137,7 +11144,7 @@
|
|
|
11137
11144
|
};
|
|
11138
11145
|
const animate = (arg1, arg2) => {
|
|
11139
11146
|
const bailSignal = new BailSignal();
|
|
11140
|
-
const skipAnimationSignal = new
|
|
11147
|
+
const skipAnimationSignal = new SkipAnimationSignal();
|
|
11141
11148
|
return (async () => {
|
|
11142
11149
|
if (globals.skipAnimation) {
|
|
11143
11150
|
stopAsync(state);
|
|
@@ -11186,7 +11193,7 @@
|
|
|
11186
11193
|
} catch (err) {
|
|
11187
11194
|
if (err instanceof BailSignal) {
|
|
11188
11195
|
result = err.result;
|
|
11189
|
-
} else if (err instanceof
|
|
11196
|
+
} else if (err instanceof SkipAnimationSignal) {
|
|
11190
11197
|
result = err.result;
|
|
11191
11198
|
} else {
|
|
11192
11199
|
throw err;
|
|
@@ -11220,7 +11227,7 @@
|
|
|
11220
11227
|
this.result = void 0;
|
|
11221
11228
|
}
|
|
11222
11229
|
}
|
|
11223
|
-
class
|
|
11230
|
+
class SkipAnimationSignal extends Error {
|
|
11224
11231
|
constructor() {
|
|
11225
11232
|
super("SkipAnimationSignal");
|
|
11226
11233
|
this.result = void 0;
|
|
@@ -12251,11 +12258,11 @@
|
|
|
12251
12258
|
}
|
|
12252
12259
|
return target;
|
|
12253
12260
|
}
|
|
12254
|
-
const _excluded$
|
|
12261
|
+
const _excluded$6 = ["children"];
|
|
12255
12262
|
const SpringContext = (_ref) => {
|
|
12256
12263
|
let {
|
|
12257
12264
|
children
|
|
12258
|
-
} = _ref, props = _objectWithoutPropertiesLoose$1(_ref, _excluded$
|
|
12265
|
+
} = _ref, props = _objectWithoutPropertiesLoose$1(_ref, _excluded$6);
|
|
12259
12266
|
const inherited = React.useContext(ctx);
|
|
12260
12267
|
const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
|
|
12261
12268
|
props = useMemoOne(() => ({
|
|
@@ -12558,7 +12565,7 @@
|
|
|
12558
12565
|
}
|
|
12559
12566
|
return target;
|
|
12560
12567
|
}
|
|
12561
|
-
const _excluded$2 = ["style", "children", "scrollTop", "scrollLeft"];
|
|
12568
|
+
const _excluded$2 = ["style", "children", "scrollTop", "scrollLeft", "viewBox"];
|
|
12562
12569
|
const isCustomPropRE = /^--/;
|
|
12563
12570
|
function dangerousStyleValue(name, value) {
|
|
12564
12571
|
if (value == null || typeof value === "boolean" || value === "")
|
|
@@ -12577,7 +12584,8 @@
|
|
|
12577
12584
|
style,
|
|
12578
12585
|
children,
|
|
12579
12586
|
scrollTop,
|
|
12580
|
-
scrollLeft
|
|
12587
|
+
scrollLeft,
|
|
12588
|
+
viewBox
|
|
12581
12589
|
} = _ref, attributes = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
12582
12590
|
const values = Object.values(attributes);
|
|
12583
12591
|
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (n) => "-" + n.toLowerCase())));
|
|
@@ -12603,6 +12611,9 @@
|
|
|
12603
12611
|
if (scrollLeft !== void 0) {
|
|
12604
12612
|
instance.scrollLeft = scrollLeft;
|
|
12605
12613
|
}
|
|
12614
|
+
if (viewBox !== void 0) {
|
|
12615
|
+
instance.setAttribute("viewBox", viewBox);
|
|
12616
|
+
}
|
|
12606
12617
|
}
|
|
12607
12618
|
let isUnitlessNumber = {
|
|
12608
12619
|
animationIterationCount: true,
|
|
@@ -14110,7 +14121,6 @@
|
|
|
14110
14121
|
button,
|
|
14111
14122
|
vertical,
|
|
14112
14123
|
marks,
|
|
14113
|
-
change,
|
|
14114
14124
|
dragStart,
|
|
14115
14125
|
dragEnd,
|
|
14116
14126
|
onChange,
|
|
@@ -14131,7 +14141,7 @@
|
|
|
14131
14141
|
const root = React.useRef(null);
|
|
14132
14142
|
const [marksList, SetMarksList] = React.useState([]);
|
|
14133
14143
|
React.useEffect(() => {
|
|
14134
|
-
if (modelValue) {
|
|
14144
|
+
if (typeof modelValue === "number") {
|
|
14135
14145
|
if (!range2 && (modelValue < min || modelValue > max)) {
|
|
14136
14146
|
SetInitValue(0);
|
|
14137
14147
|
Toast.text(`${modelValue} ${locale.range.rangeText}`);
|
|
@@ -14281,7 +14291,6 @@
|
|
|
14281
14291
|
SetInitValue(value);
|
|
14282
14292
|
}
|
|
14283
14293
|
if ((marks || end) && !isSameValue(value, startValue)) {
|
|
14284
|
-
change && change(value);
|
|
14285
14294
|
onChange && onChange(value);
|
|
14286
14295
|
}
|
|
14287
14296
|
};
|
|
@@ -16584,7 +16593,8 @@
|
|
|
16584
16593
|
`${disabled ? `${prefixCls}-disabled` : ""}`,
|
|
16585
16594
|
`${required2 ? `${prefixCls}-required` : ""}`,
|
|
16586
16595
|
`${error ? `${prefixCls}-error` : ""}`,
|
|
16587
|
-
`${border ? `${prefixCls}-border` : ""}
|
|
16596
|
+
`${border ? `${prefixCls}-border` : ""}`,
|
|
16597
|
+
`${slotButton || rightIcon ? `${prefixCls}-right-mark` : ""}`
|
|
16588
16598
|
].filter(Boolean).join(" ");
|
|
16589
16599
|
}, [disabled, required2, error, border]);
|
|
16590
16600
|
const updateValue = (value, trigger = "onChange") => {
|
|
@@ -16759,7 +16769,7 @@
|
|
|
16759
16769
|
onClick: (e2) => {
|
|
16760
16770
|
handleClear(e2);
|
|
16761
16771
|
}
|
|
16762
|
-
}) : null, rightIcon && rightIcon.length > 0 ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16772
|
+
}) : null), rightIcon && rightIcon.length > 0 ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16763
16773
|
className: "nut-input-right-icon",
|
|
16764
16774
|
onClick: (e2) => {
|
|
16765
16775
|
handleClickRightIcon(e2);
|
|
@@ -16771,7 +16781,7 @@
|
|
|
16771
16781
|
size: rightIconSize
|
|
16772
16782
|
})) : null, slotButton ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16773
16783
|
className: "nut-input-button"
|
|
16774
|
-
}, slotButton) : null
|
|
16784
|
+
}, slotButton) : null, showWordLimit && maxlength ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16775
16785
|
className: "nut-input-word-limit"
|
|
16776
16786
|
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
16777
16787
|
className: "nut-input-word-num"
|
|
@@ -22193,6 +22203,7 @@
|
|
|
22193
22203
|
autoPlay: 0,
|
|
22194
22204
|
direction: "horizontal",
|
|
22195
22205
|
paginationColor: "#fff",
|
|
22206
|
+
paginationBgColor: "#ddd",
|
|
22196
22207
|
paginationVisible: false,
|
|
22197
22208
|
loop: true,
|
|
22198
22209
|
touchable: true,
|
|
@@ -22447,10 +22458,10 @@
|
|
|
22447
22458
|
const val = isVertical ? rect.height - _size : rect.width - _size;
|
|
22448
22459
|
_offset = moveOffset + (active === childCount - 1 && !props.loop ? -val / 2 : val / 2);
|
|
22449
22460
|
}
|
|
22450
|
-
target.style.transform = `translate3D${!isVertical ? `(${_offset}px,0,0)` : `(0,${_offset}px,0)`}`;
|
|
22451
22461
|
target.style.transitionDuration = `${_swiper.current.moving ? 0 : props.duration}ms`;
|
|
22452
22462
|
target.style[isVertical ? "height" : "width"] = `${Number(size) * childCount}px`;
|
|
22453
22463
|
target.style[isVertical ? "width" : "height"] = `${isVertical ? width : height}px`;
|
|
22464
|
+
target.style.transform = `translate3D${!isVertical ? `(${_offset}px,0,0)` : `(0,${_offset}px,0)`}`;
|
|
22454
22465
|
};
|
|
22455
22466
|
const onTouchStart = (e2) => {
|
|
22456
22467
|
if (props.isPreventDefault)
|
|
@@ -22604,9 +22615,10 @@
|
|
|
22604
22615
|
return /* @__PURE__ */ React__default["default"].createElement("i", {
|
|
22605
22616
|
style: (active + childCount) % childCount === index ? {
|
|
22606
22617
|
backgroundColor: propSwiper.paginationColor
|
|
22607
|
-
} :
|
|
22618
|
+
} : {
|
|
22619
|
+
backgroundColor: propSwiper.paginationBgColor
|
|
22620
|
+
},
|
|
22608
22621
|
className: classNames({
|
|
22609
|
-
[`${b("pagination-item")}`]: true,
|
|
22610
22622
|
active: (active + childCount) % childCount === index
|
|
22611
22623
|
}),
|
|
22612
22624
|
key: index
|
|
@@ -112,6 +112,21 @@ textarea {
|
|
|
112
112
|
flex: 1;
|
|
113
113
|
vertical-align: middle;
|
|
114
114
|
}
|
|
115
|
+
&-right-mark {
|
|
116
|
+
.nut-input-value {
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: space-between;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.nut-input-inner {
|
|
123
|
+
flex: 1;
|
|
124
|
+
}
|
|
125
|
+
.nut-input-button,
|
|
126
|
+
.nut-input-right-icon {
|
|
127
|
+
width: auto;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
115
130
|
&-inner {
|
|
116
131
|
position: relative;
|
|
117
132
|
display: flex;
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
padding: 0 20px;
|
|
35
35
|
}
|
|
36
36
|
.nut-searchbar {
|
|
37
|
-
position: relative;
|
|
38
37
|
display: flex;
|
|
39
38
|
align-items: center;
|
|
40
39
|
width: $searchbar-width;
|
|
@@ -45,21 +44,19 @@
|
|
|
45
44
|
&__content {
|
|
46
45
|
position: relative;
|
|
47
46
|
flex: 1;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
height: $searchbar-input-height;
|
|
48
51
|
}
|
|
49
52
|
&__icon {
|
|
50
53
|
position: absolute !important;
|
|
51
|
-
z-index: 888;
|
|
52
|
-
transform: translate(-50%, -50%);
|
|
53
|
-
width: 15px;
|
|
54
|
-
overflow: hidden;
|
|
55
54
|
}
|
|
56
55
|
&__leftin-icon {
|
|
57
|
-
left:
|
|
58
|
-
top: 53%;
|
|
56
|
+
left: 10px;
|
|
59
57
|
}
|
|
60
58
|
&__rightin-icon {
|
|
61
59
|
right: 5px;
|
|
62
|
-
top: 53%;
|
|
63
60
|
}
|
|
64
61
|
.nut-searchbar__input-box {
|
|
65
62
|
display: flex;
|
|
@@ -70,14 +67,12 @@
|
|
|
70
67
|
border: 0;
|
|
71
68
|
outline: 0;
|
|
72
69
|
box-sizing: border-box;
|
|
73
|
-
|
|
74
70
|
width: $searchbar-input-width;
|
|
75
71
|
height: $searchbar-input-height;
|
|
76
72
|
width: 100%;
|
|
77
73
|
padding: $searchbar-input-padding;
|
|
78
74
|
border-radius: 0;
|
|
79
75
|
font-size: $font-size-small;
|
|
80
|
-
// box-shadow: $searchbar-input-box-shadow;
|
|
81
76
|
background: $searchbar-input-background;
|
|
82
77
|
color: $searchbar-input-text-color;
|
|
83
78
|
}
|
|
@@ -90,9 +85,7 @@
|
|
|
90
85
|
&__clear {
|
|
91
86
|
position: absolute !important;
|
|
92
87
|
z-index: 888;
|
|
93
|
-
right:
|
|
94
|
-
top: 47%;
|
|
95
|
-
transform: translate(-50%, -40%);
|
|
88
|
+
right: 8px;
|
|
96
89
|
i {
|
|
97
90
|
color: $gray1 !important;
|
|
98
91
|
}
|