@nutui/nutui-react-taro 2.3.7 → 2.3.8-beta.0
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/Address.js +3 -3
- package/dist/esm/AvatarCropper.js +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Collapse.js +2 -2
- package/dist/esm/CollapseItem.js +1 -1
- package/dist/esm/DatePicker.js +3 -2
- package/dist/esm/Ellipsis.js +2 -1
- package/dist/esm/NavBar/style/style.css +1 -1
- package/dist/esm/NavBar.js +4 -1
- package/dist/esm/Picker.js +2 -1
- package/dist/esm/Popover.js +1 -1
- package/dist/esm/Radio.js +1 -1
- package/dist/esm/RadioGroup.js +1 -1
- package/dist/esm/Rate/style/style.css +1 -1
- package/dist/esm/Rate.js +5 -1
- package/dist/esm/Step/style/style.css +1 -1
- package/dist/esm/Step.js +2 -1
- package/dist/esm/Steps/style/style.css +1 -1
- package/dist/esm/Steps.js +1 -1
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/Tour.js +2 -2
- package/dist/esm/Video.js +1 -2
- package/dist/esm/{address.taro-TWHlPzXv.js → address.taro-LCSSqsR-.js} +1 -1
- package/dist/esm/{avatarcropper.taro-_IENn5QL.js → avatarcropper.taro-GIZxzMJ_.js} +2 -2
- package/dist/esm/{cascader.taro-QW13vwKb.js → cascader.taro-x_X9F_pH.js} +1 -1
- package/dist/esm/{collapse.taro-l21-Cvji.js → collapse.taro-sZibDygv.js} +1 -1
- package/dist/esm/{collapseitem.taro-9w-h_UP6.js → collapseitem.taro-AaQ_msgd.js} +2 -2
- package/dist/esm/{datepicker.taro-OrqtwJFM.js → datepicker.taro-S111IvJO.js} +1 -1
- package/dist/esm/{ellipsis.taro-ov_C4kbs.js → ellipsis.taro-VApVqS_j.js} +39 -45
- package/dist/esm/navbar.taro-AuKPDCaW.js +105 -0
- package/dist/esm/nutui-react.es.js +18 -17
- package/dist/esm/{picker.taro-_bT5c-BS.js → picker.taro-RAYmFSC0.js} +1 -11
- package/dist/esm/{popover.taro-ScQymuJC.js → popover.taro-MUrnn7xY.js} +1 -1
- package/dist/esm/{radio.taro-mZvB2wwi.js → radio.taro-EKJXMjnX.js} +7 -6
- package/dist/esm/rate.taro-_5Mjd_EO.js +146 -0
- package/dist/esm/{step.taro-kCAQ4Q3-.js → step.taro-_DEZqFGb.js} +6 -5
- package/dist/esm/{steps.taro-n6BT6nWE.js → steps.taro-PH0qWPla.js} +5 -4
- package/dist/esm/{tabs.taro-aR3XROu9.js → tabs.taro-w8ra49Qb.js} +3 -3
- package/dist/esm/{tour.taro-GabSljal.js → tour.taro-HLsDVf9g.js} +3 -3
- package/dist/esm/types/src/packages/navbar/navbar.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/radio/index.d.ts +2 -1
- package/dist/esm/types/src/packages/radio/index.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/radio/radio.d.ts +1 -2
- package/dist/esm/types/src/packages/radio/radio.taro.d.ts +1 -2
- package/dist/esm/types/src/packages/radio/types.d.ts +2 -0
- package/dist/esm/types/src/packages/radiogroup/context.d.ts +2 -0
- package/dist/esm/types/src/packages/radiogroup/index.d.ts +1 -0
- package/dist/esm/types/src/packages/radiogroup/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/radiogroup/radiogroup.d.ts +4 -6
- package/dist/esm/types/src/packages/radiogroup/radiogroup.taro.d.ts +4 -6
- package/dist/esm/types/src/packages/radiogroup/types.d.ts +4 -0
- package/dist/esm/types/src/packages/rate/rate.d.ts +2 -0
- package/dist/esm/types/src/packages/rate/rate.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/video/video.taro.d.ts +4 -5
- package/dist/esm/use-refs-IdrY0ww3.js +15 -0
- package/dist/esm/{video.taro-MDBF77xf.js → video.taro-csvHwS2v.js} +5 -7
- 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 +174 -71
- package/dist/nutui.react.umd.js +167 -64
- package/dist/packages/navbar/navbar.scss +7 -0
- package/dist/packages/rate/rate.scss +6 -0
- package/dist/packages/step/step.scss +5 -4
- package/dist/packages/tabs/tabs.scss +1 -0
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/types/packages/navbar/navbar.taro.d.ts +2 -1
- package/dist/types/packages/overlay/overlay.taro.d.ts +5 -1
- package/dist/types/packages/radio/index.d.ts +2 -1
- package/dist/types/packages/radio/index.taro.d.ts +2 -1
- package/dist/types/packages/radio/radio.d.ts +1 -2
- package/dist/types/packages/radio/radio.taro.d.ts +1 -2
- package/dist/types/packages/radio/types.d.ts +2 -0
- package/dist/types/packages/radiogroup/context.d.ts +2 -0
- package/dist/types/packages/radiogroup/index.d.ts +1 -0
- package/dist/types/packages/radiogroup/index.taro.d.ts +1 -0
- package/dist/types/packages/radiogroup/radiogroup.d.ts +4 -6
- package/dist/types/packages/radiogroup/radiogroup.taro.d.ts +8 -6
- package/dist/types/packages/radiogroup/types.d.ts +4 -0
- package/dist/types/packages/rate/rate.d.ts +2 -0
- package/dist/types/packages/rate/rate.taro.d.ts +2 -0
- package/dist/types/packages/video/video.taro.d.ts +4 -5
- package/package.json +1 -1
- package/dist/esm/navbar.taro-v0VHQWR4.js +0 -63
- package/dist/esm/rate.taro-ZkOVGSDs.js +0 -77
package/dist/nutui.react.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v2.3.
|
|
11
|
+
* @nutui/nutui-react-taro v2.3.8-beta.0 Fri Jan 26 2024 15:05:58 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -4503,24 +4503,64 @@ var __publicField = (obj, key, value) => {
|
|
|
4503
4503
|
zIndex
|
|
4504
4504
|
};
|
|
4505
4505
|
};
|
|
4506
|
+
const leftRef = React.useRef(null);
|
|
4507
|
+
const rightRef = React.useRef(null);
|
|
4508
|
+
const wrapperRef = React.useRef(null);
|
|
4509
|
+
const [contentWidth, setContentWidth] = React.useState("50%");
|
|
4510
|
+
const getNodeWidth = async (node) => {
|
|
4511
|
+
if (node) {
|
|
4512
|
+
const refe = await getRectByTaro(node);
|
|
4513
|
+
return refe.width;
|
|
4514
|
+
}
|
|
4515
|
+
return 0;
|
|
4516
|
+
};
|
|
4517
|
+
React.useEffect(() => {
|
|
4518
|
+
if (titleAlign === "left") {
|
|
4519
|
+
return;
|
|
4520
|
+
}
|
|
4521
|
+
if (!(back || left2 || right2)) {
|
|
4522
|
+
setContentWidth("100%");
|
|
4523
|
+
}
|
|
4524
|
+
const init = async () => {
|
|
4525
|
+
const leftRectWidth = await getNodeWidth(leftRef == null ? void 0 : leftRef.current);
|
|
4526
|
+
const rightRectWidth = await getNodeWidth(rightRef == null ? void 0 : rightRef.current);
|
|
4527
|
+
const wrapperWidth = await getNodeWidth(wrapperRef == null ? void 0 : wrapperRef.current);
|
|
4528
|
+
let centerWidth = wrapperWidth / 2;
|
|
4529
|
+
if (leftRectWidth && rightRectWidth) {
|
|
4530
|
+
centerWidth = wrapperWidth - (leftRectWidth > rightRectWidth ? leftRectWidth * 2 : rightRectWidth * 2);
|
|
4531
|
+
} else {
|
|
4532
|
+
centerWidth = wrapperWidth - leftRectWidth * 2 - rightRectWidth * 2;
|
|
4533
|
+
}
|
|
4534
|
+
setContentWidth(centerWidth.toFixed(2));
|
|
4535
|
+
};
|
|
4536
|
+
init();
|
|
4537
|
+
}, [left2, right2, back]);
|
|
4506
4538
|
const renderLeft = () => {
|
|
4507
|
-
return /* @__PURE__ */ React.createElement(
|
|
4508
|
-
|
|
4539
|
+
return back || left2 ? /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix2}-left`, ref: leftRef }, back && /* @__PURE__ */ React.createElement(
|
|
4540
|
+
components.View,
|
|
4509
4541
|
{
|
|
4510
4542
|
className: `${classPrefix2}-left-back`,
|
|
4511
4543
|
onClick: (e2) => onBackClick(e2)
|
|
4512
4544
|
},
|
|
4513
4545
|
back
|
|
4514
|
-
), left2);
|
|
4546
|
+
), left2) : null;
|
|
4515
4547
|
};
|
|
4516
4548
|
const renderContent = () => {
|
|
4517
|
-
|
|
4549
|
+
let titleStyle = {};
|
|
4550
|
+
if (titleAlign === "center") {
|
|
4551
|
+
const contentRealWidth = `${contentWidth}${/%$/i.test(contentWidth) ? "" : "px"}`;
|
|
4552
|
+
titleStyle = {
|
|
4553
|
+
minWidth: contentRealWidth,
|
|
4554
|
+
width: contentRealWidth
|
|
4555
|
+
};
|
|
4556
|
+
}
|
|
4557
|
+
return /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix2}-title`, style: titleStyle }, children);
|
|
4518
4558
|
};
|
|
4519
4559
|
const renderRight = () => {
|
|
4520
|
-
return /* @__PURE__ */ React.createElement(
|
|
4560
|
+
return /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix2}-right`, ref: rightRef }, right2);
|
|
4521
4561
|
};
|
|
4522
4562
|
const renderWrapper = () => {
|
|
4523
|
-
return /* @__PURE__ */ React.createElement(
|
|
4563
|
+
return /* @__PURE__ */ React.createElement(components.View, { className: cls, style: styles(), ref: wrapperRef }, renderLeft(), renderContent(), renderRight());
|
|
4524
4564
|
};
|
|
4525
4565
|
const classes = classNames({
|
|
4526
4566
|
[`${classPrefix2}-fixed`]: fixed,
|
|
@@ -4528,7 +4568,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4528
4568
|
[`${classPrefix2}-title-align-${titleAlign}`]: true
|
|
4529
4569
|
});
|
|
4530
4570
|
const cls = classNames(classPrefix2, classes, className);
|
|
4531
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement(
|
|
4571
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
|
|
4532
4572
|
};
|
|
4533
4573
|
NavBar.defaultProps = defaultProps$1h;
|
|
4534
4574
|
NavBar.displayName = "NutNavBar";
|
|
@@ -11132,6 +11172,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11132
11172
|
value,
|
|
11133
11173
|
defaultValue,
|
|
11134
11174
|
onChange,
|
|
11175
|
+
shape,
|
|
11135
11176
|
labelPosition,
|
|
11136
11177
|
direction,
|
|
11137
11178
|
options,
|
|
@@ -11167,6 +11208,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11167
11208
|
value: {
|
|
11168
11209
|
labelPosition: labelPosition || "right",
|
|
11169
11210
|
disabled,
|
|
11211
|
+
shape,
|
|
11170
11212
|
value: val2State,
|
|
11171
11213
|
check: (value2) => {
|
|
11172
11214
|
setVal2State(value2);
|
|
@@ -11294,11 +11336,11 @@ var __publicField = (obj, key, value) => {
|
|
|
11294
11336
|
className: classNames(color())
|
|
11295
11337
|
}) : /* @__PURE__ */ React.createElement(I$1, { className: classNames(color()) });
|
|
11296
11338
|
};
|
|
11339
|
+
const renderByShape = (shape2) => {
|
|
11340
|
+
return shape2 === "button" ? renderButton() : /* @__PURE__ */ React.createElement(React.Fragment, null, renderIcon(), renderLabel());
|
|
11341
|
+
};
|
|
11297
11342
|
const renderRadioItem = () => {
|
|
11298
|
-
|
|
11299
|
-
return renderButton();
|
|
11300
|
-
}
|
|
11301
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, renderIcon(), renderLabel());
|
|
11343
|
+
return renderByShape(context && context.shape ? context.shape : shape);
|
|
11302
11344
|
};
|
|
11303
11345
|
const handleClick = (e2) => {
|
|
11304
11346
|
if (disabled || checkedStatement)
|
|
@@ -11640,7 +11682,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11640
11682
|
uncheckedIcon: null,
|
|
11641
11683
|
disabled: false,
|
|
11642
11684
|
readOnly: false,
|
|
11643
|
-
allowHalf: false
|
|
11685
|
+
allowHalf: false,
|
|
11686
|
+
touchable: false
|
|
11644
11687
|
};
|
|
11645
11688
|
const Rate = (props) => {
|
|
11646
11689
|
const {
|
|
@@ -11655,13 +11698,17 @@ var __publicField = (obj, key, value) => {
|
|
|
11655
11698
|
disabled,
|
|
11656
11699
|
readOnly,
|
|
11657
11700
|
allowHalf,
|
|
11658
|
-
|
|
11701
|
+
touchable,
|
|
11702
|
+
onChange,
|
|
11703
|
+
onTouchEnd
|
|
11659
11704
|
} = {
|
|
11660
11705
|
...defaultProps$P,
|
|
11661
11706
|
...props
|
|
11662
11707
|
};
|
|
11663
11708
|
const classPrefix2 = "nut-rate";
|
|
11664
11709
|
const [countArray, setCountArray] = React.useState([1, 2, 3, 4, 5]);
|
|
11710
|
+
const [refs, setRefs] = useRefs();
|
|
11711
|
+
const rateRects = React.useRef([]);
|
|
11665
11712
|
const [score, setScore] = usePropsValue({
|
|
11666
11713
|
value,
|
|
11667
11714
|
defaultValue: Math.max(defaultValue || 0, min),
|
|
@@ -11698,8 +11745,70 @@ var __publicField = (obj, key, value) => {
|
|
|
11698
11745
|
const value2 = Math.max(min, n - 0.5);
|
|
11699
11746
|
setScore(value2);
|
|
11700
11747
|
};
|
|
11748
|
+
const getScoreByPosition = (x) => {
|
|
11749
|
+
var _a;
|
|
11750
|
+
if ((_a = rateRects.current) == null ? void 0 : _a.length) {
|
|
11751
|
+
for (let index = rateRects.current.length - 1; index >= 0; index--) {
|
|
11752
|
+
const item = rateRects.current[index];
|
|
11753
|
+
if (item && x > item.left) {
|
|
11754
|
+
return allowHalf ? index + (x > item.left + item.width / 2 ? 1 : 0.5) : index + 1;
|
|
11755
|
+
}
|
|
11756
|
+
}
|
|
11757
|
+
return 0;
|
|
11758
|
+
}
|
|
11759
|
+
};
|
|
11760
|
+
const updateRects = () => {
|
|
11761
|
+
for (let index = 0; index < refs.length; index++) {
|
|
11762
|
+
const item = refs[index];
|
|
11763
|
+
if (item) {
|
|
11764
|
+
getRectByTaro(item).then((res) => {
|
|
11765
|
+
rateRects.current[index] = res;
|
|
11766
|
+
});
|
|
11767
|
+
}
|
|
11768
|
+
}
|
|
11769
|
+
};
|
|
11770
|
+
Taro.useReady(() => {
|
|
11771
|
+
updateRects();
|
|
11772
|
+
});
|
|
11773
|
+
const handleTouchStart = (e2) => {
|
|
11774
|
+
if (!touchable || readOnly || disabled) {
|
|
11775
|
+
return;
|
|
11776
|
+
}
|
|
11777
|
+
if (e2.cancelable) {
|
|
11778
|
+
e2.preventDefault();
|
|
11779
|
+
}
|
|
11780
|
+
e2.stopPropagation();
|
|
11781
|
+
updateRects();
|
|
11782
|
+
};
|
|
11783
|
+
const handleTouchMove = (e2) => {
|
|
11784
|
+
if (!touchable || readOnly || disabled) {
|
|
11785
|
+
return;
|
|
11786
|
+
}
|
|
11787
|
+
if (e2.cancelable) {
|
|
11788
|
+
e2.preventDefault();
|
|
11789
|
+
}
|
|
11790
|
+
e2.stopPropagation();
|
|
11791
|
+
const val = getScoreByPosition(e2.touches[0].clientX);
|
|
11792
|
+
if (val !== void 0) {
|
|
11793
|
+
setScore(Math.max(min, val));
|
|
11794
|
+
}
|
|
11795
|
+
};
|
|
11796
|
+
const handleTouchEnd = (e2) => {
|
|
11797
|
+
if (!touchable || readOnly || disabled) {
|
|
11798
|
+
return;
|
|
11799
|
+
}
|
|
11800
|
+
if (e2.cancelable) {
|
|
11801
|
+
e2.preventDefault();
|
|
11802
|
+
}
|
|
11803
|
+
e2.stopPropagation();
|
|
11804
|
+
const val = getScoreByPosition(e2.changedTouches[0].clientX);
|
|
11805
|
+
if (val !== void 0) {
|
|
11806
|
+
setScore(Math.max(min, val));
|
|
11807
|
+
onTouchEnd && onTouchEnd(e2, Math.max(min, val));
|
|
11808
|
+
}
|
|
11809
|
+
};
|
|
11701
11810
|
return /* @__PURE__ */ React.createElement(
|
|
11702
|
-
|
|
11811
|
+
components.View,
|
|
11703
11812
|
{
|
|
11704
11813
|
className: classNames(
|
|
11705
11814
|
classPrefix2,
|
|
@@ -11709,14 +11818,20 @@ var __publicField = (obj, key, value) => {
|
|
|
11709
11818
|
},
|
|
11710
11819
|
className
|
|
11711
11820
|
),
|
|
11712
|
-
|
|
11821
|
+
catchMove: true,
|
|
11822
|
+
style,
|
|
11823
|
+
onTouchStart: handleTouchStart,
|
|
11824
|
+
onTouchMove: handleTouchMove,
|
|
11825
|
+
onTouchEnd: handleTouchEnd,
|
|
11826
|
+
onTouchCancel: handleTouchEnd
|
|
11713
11827
|
},
|
|
11714
|
-
countArray.map((n) => {
|
|
11828
|
+
countArray.map((n, index) => {
|
|
11715
11829
|
return /* @__PURE__ */ React.createElement(
|
|
11716
11830
|
"div",
|
|
11717
11831
|
{
|
|
11718
11832
|
className: `${classPrefix2}-item`,
|
|
11719
11833
|
key: n,
|
|
11834
|
+
ref: setRefs(index),
|
|
11720
11835
|
onClick: (event) => onClick(event, n)
|
|
11721
11836
|
},
|
|
11722
11837
|
/* @__PURE__ */ React.createElement(
|
|
@@ -16173,10 +16288,10 @@ var __publicField = (obj, key, value) => {
|
|
|
16173
16288
|
const [contentCopy, setContentCopy] = React.useState(content);
|
|
16174
16289
|
const lineH = React.useRef(0);
|
|
16175
16290
|
const originHeight = React.useRef(0);
|
|
16176
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
16291
|
+
const refRandomId = React.useRef(Math.random().toString(36).slice(-8));
|
|
16177
16292
|
const widthRef = React.useRef("auto");
|
|
16178
|
-
|
|
16179
|
-
|
|
16293
|
+
const widthBase = React.useRef([14, 10, 7, 8.4, 10]);
|
|
16294
|
+
const symbolTextWidth = React.useRef(widthBase.current[0] * 0.7921);
|
|
16180
16295
|
const chineseReg = /^[\u4e00-\u9fa5]+$/;
|
|
16181
16296
|
const digitReg = /^[0-9]+$/;
|
|
16182
16297
|
const letterUpperReg = /^[A-Z]+$/;
|
|
@@ -16186,23 +16301,16 @@ var __publicField = (obj, key, value) => {
|
|
|
16186
16301
|
width ? `${classPrefix$6}-width` : "",
|
|
16187
16302
|
className
|
|
16188
16303
|
);
|
|
16189
|
-
|
|
16190
|
-
setExceeded(false);
|
|
16191
|
-
setExpanded(false);
|
|
16304
|
+
React.useEffect(() => {
|
|
16192
16305
|
setContentCopy(content);
|
|
16193
16306
|
Taro.nextTick(() => {
|
|
16194
16307
|
getSymbolInfo();
|
|
16195
16308
|
getReference();
|
|
16196
16309
|
});
|
|
16197
|
-
};
|
|
16198
|
-
Taro.useReady(() => init());
|
|
16199
|
-
React.useEffect(
|
|
16200
|
-
() => init(),
|
|
16201
|
-
[content, lineH.current, maxHeight.current, originHeight.current]
|
|
16202
|
-
);
|
|
16310
|
+
}, [content]);
|
|
16203
16311
|
const getSymbolInfo = async () => {
|
|
16204
16312
|
const refe = await getRectByTaro(symbolContain == null ? void 0 : symbolContain.current);
|
|
16205
|
-
symbolTextWidth = refe.width ? Math.ceil(refe.width) : Math.ceil(widthBase[0] * 0.7921);
|
|
16313
|
+
symbolTextWidth.current = refe.width ? Math.ceil(refe.width) : Math.ceil(widthBase.current[0] * 0.7921);
|
|
16206
16314
|
};
|
|
16207
16315
|
const symbolText = () => {
|
|
16208
16316
|
if (direction === "end" || direction === "middle") {
|
|
@@ -16211,9 +16319,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16211
16319
|
return `${symbol}${expandText}${symbol}`;
|
|
16212
16320
|
};
|
|
16213
16321
|
const getReference = async () => {
|
|
16214
|
-
const element = root2.current;
|
|
16215
16322
|
const query = Taro.createSelectorQuery();
|
|
16216
|
-
query.select(
|
|
16323
|
+
query.select(`#root${refRandomId.current}`) && query.select(`#root${refRandomId.current}`).fields(
|
|
16217
16324
|
{
|
|
16218
16325
|
computedStyle: [
|
|
16219
16326
|
"width",
|
|
@@ -16236,7 +16343,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16236
16343
|
originHeight.current = pxToNumber(res.height);
|
|
16237
16344
|
widthRef.current = res.width;
|
|
16238
16345
|
const bsize = pxToNumber(res.fontSize);
|
|
16239
|
-
widthBase = [
|
|
16346
|
+
widthBase.current = [
|
|
16240
16347
|
bsize,
|
|
16241
16348
|
bsize * 0.72,
|
|
16242
16349
|
bsize * 0.53,
|
|
@@ -16307,7 +16414,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16307
16414
|
setContentCopy(newContent);
|
|
16308
16415
|
};
|
|
16309
16416
|
const tailorContent = (left2, right2, type2 = "") => {
|
|
16310
|
-
const threeDotWidth = symbolTextWidth;
|
|
16417
|
+
const threeDotWidth = symbolTextWidth.current;
|
|
16311
16418
|
const direc = direction === "middle" && type2 ? type2 : direction;
|
|
16312
16419
|
setExceeded(true);
|
|
16313
16420
|
let widthPart = -1;
|
|
@@ -16327,15 +16434,15 @@ var __publicField = (obj, key, value) => {
|
|
|
16327
16434
|
while (widthPart < contentPartWidth) {
|
|
16328
16435
|
const zi = content[marking];
|
|
16329
16436
|
if (chineseReg.test(zi)) {
|
|
16330
|
-
widthPart = Number(widthPart + widthBase[0]);
|
|
16437
|
+
widthPart = Number(widthPart + widthBase.current[0]);
|
|
16331
16438
|
} else if (letterUpperReg.test(zi)) {
|
|
16332
|
-
widthPart = Number(widthPart + widthBase[1]);
|
|
16439
|
+
widthPart = Number(widthPart + widthBase.current[1]);
|
|
16333
16440
|
} else if (letterLowerReg.test(zi)) {
|
|
16334
|
-
widthPart = Number(widthPart + widthBase[2]);
|
|
16441
|
+
widthPart = Number(widthPart + widthBase.current[2]);
|
|
16335
16442
|
} else if (digitReg.test(zi)) {
|
|
16336
|
-
widthPart = Number(widthPart + widthBase[3]);
|
|
16443
|
+
widthPart = Number(widthPart + widthBase.current[3]);
|
|
16337
16444
|
} else {
|
|
16338
|
-
widthPart = Number(widthPart + widthBase[4]);
|
|
16445
|
+
widthPart = Number(widthPart + widthBase.current[4]);
|
|
16339
16446
|
}
|
|
16340
16447
|
cutoff = marking;
|
|
16341
16448
|
direc === "end" ? marking++ : marking--;
|
|
@@ -16369,20 +16476,22 @@ var __publicField = (obj, key, value) => {
|
|
|
16369
16476
|
className: classes,
|
|
16370
16477
|
onClick: handleClick,
|
|
16371
16478
|
ref: root2,
|
|
16372
|
-
id: `root${refRandomId}`,
|
|
16479
|
+
id: `root${refRandomId.current}`,
|
|
16373
16480
|
...rest
|
|
16374
16481
|
},
|
|
16375
|
-
/* @__PURE__ */ React.createElement(
|
|
16376
|
-
|
|
16482
|
+
/* @__PURE__ */ React.createElement(components.View, null, !exceeded ? /* @__PURE__ */ React.createElement(
|
|
16483
|
+
components.View,
|
|
16377
16484
|
{
|
|
16378
16485
|
className: "nut-ellipsis-wordbreak",
|
|
16379
16486
|
style: {
|
|
16380
|
-
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}
|
|
16487
|
+
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}`,
|
|
16488
|
+
height: "20px",
|
|
16489
|
+
overflow: "hidden"
|
|
16381
16490
|
}
|
|
16382
16491
|
},
|
|
16383
16492
|
content
|
|
16384
|
-
) : null, exceeded && !expanded ? /* @__PURE__ */ React.createElement(
|
|
16385
|
-
|
|
16493
|
+
) : null, exceeded && !expanded ? /* @__PURE__ */ React.createElement(
|
|
16494
|
+
components.View,
|
|
16386
16495
|
{
|
|
16387
16496
|
className: "nut-ellipsis-wordbreak",
|
|
16388
16497
|
style: {
|
|
@@ -16404,8 +16513,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16404
16513
|
) : null,
|
|
16405
16514
|
((_c = ellipsis.current) == null ? void 0 : _c.tailing) && symbol,
|
|
16406
16515
|
(_d = ellipsis.current) == null ? void 0 : _d.tailing
|
|
16407
|
-
)
|
|
16408
|
-
|
|
16516
|
+
) : null, exceeded && expanded ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
16517
|
+
components.View,
|
|
16409
16518
|
{
|
|
16410
16519
|
style: {
|
|
16411
16520
|
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}`
|
|
@@ -16424,20 +16533,20 @@ var __publicField = (obj, key, value) => {
|
|
|
16424
16533
|
collapseText
|
|
16425
16534
|
) : null) : null)
|
|
16426
16535
|
), /* @__PURE__ */ React.createElement(
|
|
16427
|
-
|
|
16536
|
+
components.View,
|
|
16428
16537
|
{
|
|
16429
16538
|
className: "nut-ellipsis-copy",
|
|
16430
16539
|
ref: rootContain,
|
|
16431
|
-
id: `rootContain${refRandomId}`,
|
|
16540
|
+
id: `rootContain${refRandomId.current}`,
|
|
16432
16541
|
style: { width: `${widthRef}` }
|
|
16433
16542
|
},
|
|
16434
|
-
/* @__PURE__ */ React.createElement(
|
|
16543
|
+
/* @__PURE__ */ React.createElement(components.View, null, contentCopy)
|
|
16435
16544
|
), /* @__PURE__ */ React.createElement(
|
|
16436
|
-
|
|
16545
|
+
components.View,
|
|
16437
16546
|
{
|
|
16438
16547
|
className: "nut-ellipsis-copy",
|
|
16439
16548
|
ref: symbolContain,
|
|
16440
|
-
id: `symbolContain${refRandomId}`,
|
|
16549
|
+
id: `symbolContain${refRandomId.current}`,
|
|
16441
16550
|
style: { display: "inline" }
|
|
16442
16551
|
},
|
|
16443
16552
|
symbolText()
|
|
@@ -17136,7 +17245,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17136
17245
|
}
|
|
17137
17246
|
return `${classPrefix2}-icon`;
|
|
17138
17247
|
};
|
|
17139
|
-
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React.createElement(
|
|
17248
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React.createElement(components.View, { className: "nut-step-head" }, /* @__PURE__ */ React.createElement(components.View, { className: "nut-step-line" }), /* @__PURE__ */ React.createElement(components.View, { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React.createElement("span", { className: "nut-step-inner" }, value))), (title || description) && /* @__PURE__ */ React.createElement(components.View, { className: "nut-step-main" }, /* @__PURE__ */ React.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React.createElement("span", { className: "nut-step-description" }, description)));
|
|
17140
17249
|
};
|
|
17141
17250
|
Step.defaultProps = defaultProps$d;
|
|
17142
17251
|
Step.displayName = "NutStep";
|
|
@@ -17169,14 +17278,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17169
17278
|
},
|
|
17170
17279
|
className
|
|
17171
17280
|
);
|
|
17172
|
-
return /* @__PURE__ */ React.createElement(DataContext.Provider, { value: parentSteps }, React.createElement(
|
|
17173
|
-
"div",
|
|
17174
|
-
{
|
|
17175
|
-
className: classes,
|
|
17176
|
-
...restProps
|
|
17177
|
-
},
|
|
17178
|
-
children
|
|
17179
|
-
));
|
|
17281
|
+
return /* @__PURE__ */ React.createElement(DataContext.Provider, { value: parentSteps }, /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, children));
|
|
17180
17282
|
};
|
|
17181
17283
|
Steps.defaultProps = defaultProps$c;
|
|
17182
17284
|
Steps.displayName = "NutSteps";
|
|
@@ -17707,7 +17809,6 @@ var __publicField = (obj, key, value) => {
|
|
|
17707
17809
|
Tour.defaultProps = defaultProps$9;
|
|
17708
17810
|
Tour.displayName = "NutTour";
|
|
17709
17811
|
const defaultProps$8 = {
|
|
17710
|
-
...ComponentDefaults,
|
|
17711
17812
|
source: {
|
|
17712
17813
|
type: {},
|
|
17713
17814
|
src: ""
|
|
@@ -17729,6 +17830,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17729
17830
|
source,
|
|
17730
17831
|
options,
|
|
17731
17832
|
className,
|
|
17833
|
+
style,
|
|
17732
17834
|
onPlay,
|
|
17733
17835
|
onPause,
|
|
17734
17836
|
onPlayEnd,
|
|
@@ -17738,7 +17840,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17738
17840
|
...props
|
|
17739
17841
|
};
|
|
17740
17842
|
const classes = classNames(classPrefix$2, className);
|
|
17741
|
-
return /* @__PURE__ */ React.createElement(
|
|
17843
|
+
return /* @__PURE__ */ React.createElement(components.View, { className: classes, style }, /* @__PURE__ */ React.createElement(
|
|
17742
17844
|
components.Video,
|
|
17743
17845
|
{
|
|
17744
17846
|
className: "nut-video-player",
|
|
@@ -17750,7 +17852,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17750
17852
|
src: source.src,
|
|
17751
17853
|
onPlay,
|
|
17752
17854
|
onPause,
|
|
17753
|
-
onEnded: onPlayEnd
|
|
17855
|
+
onEnded: onPlayEnd,
|
|
17856
|
+
...restProps
|
|
17754
17857
|
}
|
|
17755
17858
|
));
|
|
17756
17859
|
};
|
|
@@ -108,10 +108,17 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
+
.nut-navbar-right {
|
|
112
|
+
position: static;
|
|
113
|
+
display: inline-flex;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
padding-left: 0;
|
|
116
|
+
}
|
|
111
117
|
.nut-navbar-left-back {
|
|
112
118
|
margin-right: 0;
|
|
113
119
|
}
|
|
114
120
|
.nut-navbar-title {
|
|
121
|
+
min-width: 0;
|
|
115
122
|
margin: 0;
|
|
116
123
|
flex: 1;
|
|
117
124
|
justify-content: flex-start;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.nut-rate {
|
|
2
2
|
display: flex;
|
|
3
|
+
touch-action: pan-x;
|
|
3
4
|
|
|
4
5
|
&.disabled {
|
|
5
6
|
.nut-rate-item-icon {
|
|
@@ -30,9 +31,14 @@
|
|
|
30
31
|
left: 0;
|
|
31
32
|
top: 0;
|
|
32
33
|
overflow: hidden;
|
|
34
|
+
|
|
35
|
+
.nut-icon {
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
&-icon {
|
|
41
|
+
display: flex;
|
|
36
42
|
color: $rate-icon-color;
|
|
37
43
|
cursor: pointer;
|
|
38
44
|
|
|
@@ -56,10 +56,11 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&-main {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
padding: 0 10%;
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
&-title {
|