@arco-design/mobile-react 2.23.0 → 2.24.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 +27 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/render.d.ts +3 -1
- package/cjs/_helpers/render.js +10 -3
- package/cjs/action-sheet/index.d.ts +5 -5
- package/cjs/action-sheet/index.js +4 -3
- package/cjs/action-sheet/methods.d.ts +1 -1
- package/cjs/badge/style/css/index.css +1 -2
- package/cjs/checkbox/checkbox.js +4 -0
- package/cjs/circle-progress/index.js +4 -0
- package/cjs/context-provider/index.d.ts +4 -0
- package/cjs/context-provider/index.js +14 -2
- package/cjs/dialog/index.d.ts +8 -8
- package/cjs/dialog/index.js +3 -2
- package/cjs/dialog/methods.d.ts +3 -3
- package/cjs/dialog/style/css/index.css +1 -2
- package/cjs/ellipsis/components/js-ellipsis.d.ts +4 -2
- package/cjs/ellipsis/components/js-ellipsis.js +14 -1
- package/cjs/ellipsis/components/native-ellipsis.d.ts +1 -1
- package/cjs/ellipsis/components/native-ellipsis.js +6 -1
- package/cjs/ellipsis/demo/style/css/mobile.css +1 -1
- package/cjs/ellipsis/demo/style/mobile.less +3 -1
- package/cjs/ellipsis/index.js +6 -2
- package/cjs/ellipsis/style/css/index.css +14 -1
- package/cjs/ellipsis/style/index.less +15 -1
- package/cjs/ellipsis/type.d.ts +22 -76
- package/cjs/image-preview/index.d.ts +3 -3
- package/cjs/image-preview/index.js +3 -2
- package/cjs/image-preview/methods.d.ts +2 -1
- package/cjs/image-preview/methods.js +2 -2
- package/cjs/input/hooks.js +1 -0
- package/cjs/input/index.d.ts +5 -0
- package/cjs/input/index.js +6 -2
- package/cjs/masking/index.d.ts +4 -14
- package/cjs/masking/index.js +3 -2
- package/cjs/masking/methods.d.ts +3 -2
- package/cjs/masking/methods.js +2 -2
- package/cjs/nav-bar/index.d.ts +12 -0
- package/cjs/nav-bar/index.js +8 -2
- package/cjs/notify/index.d.ts +12 -12
- package/cjs/notify/index.js +3 -2
- package/cjs/notify/methods.d.ts +2 -1
- package/cjs/notify/methods.js +2 -2
- package/cjs/picker-view/components/picker-cell.js +3 -1
- package/cjs/popup/index.d.ts +4 -4
- package/cjs/popup/index.js +3 -2
- package/cjs/popup/methods.d.ts +1 -1
- package/cjs/popup-swiper/index.d.ts +12 -6
- package/cjs/popup-swiper/index.js +3 -2
- package/cjs/popup-swiper/methods.d.ts +1 -1
- package/cjs/progress/index.js +4 -0
- package/cjs/rate/index.js +5 -0
- package/cjs/slider/index.js +6 -1
- package/cjs/stepper/index.js +7 -1
- package/cjs/swipe-action/index.d.ts +1 -0
- package/cjs/swipe-action/index.js +10 -0
- package/cjs/switch/index.js +4 -0
- package/cjs/toast/index.d.ts +18 -18
- package/cjs/toast/index.js +3 -2
- package/cjs/toast/methods.d.ts +2 -1
- package/cjs/toast/methods.js +2 -2
- package/dist/index.js +141 -47
- package/dist/index.min.js +3 -3
- package/dist/style.css +26 -114
- package/dist/style.min.css +1 -1
- package/esm/_helpers/render.d.ts +3 -1
- package/esm/_helpers/render.js +10 -3
- package/esm/action-sheet/index.d.ts +5 -5
- package/esm/action-sheet/index.js +4 -3
- package/esm/action-sheet/methods.d.ts +1 -1
- package/esm/badge/style/css/index.css +1 -2
- package/esm/checkbox/checkbox.js +4 -0
- package/esm/circle-progress/index.js +4 -0
- package/esm/context-provider/index.d.ts +4 -0
- package/esm/context-provider/index.js +13 -2
- package/esm/dialog/index.d.ts +8 -8
- package/esm/dialog/index.js +3 -2
- package/esm/dialog/methods.d.ts +3 -3
- package/esm/dialog/style/css/index.css +1 -2
- package/esm/ellipsis/components/js-ellipsis.d.ts +4 -2
- package/esm/ellipsis/components/js-ellipsis.js +14 -1
- package/esm/ellipsis/components/native-ellipsis.d.ts +1 -1
- package/esm/ellipsis/components/native-ellipsis.js +6 -1
- package/esm/ellipsis/demo/style/css/mobile.css +1 -1
- package/esm/ellipsis/demo/style/mobile.less +3 -1
- package/esm/ellipsis/index.js +6 -2
- package/esm/ellipsis/style/css/index.css +14 -1
- package/esm/ellipsis/style/index.less +15 -1
- package/esm/ellipsis/type.d.ts +22 -76
- package/esm/image-preview/index.d.ts +3 -3
- package/esm/image-preview/index.js +3 -2
- package/esm/image-preview/methods.d.ts +2 -1
- package/esm/image-preview/methods.js +2 -2
- package/esm/input/hooks.js +1 -0
- package/esm/input/index.d.ts +5 -0
- package/esm/input/index.js +6 -2
- package/esm/masking/index.d.ts +4 -14
- package/esm/masking/index.js +3 -2
- package/esm/masking/methods.d.ts +3 -2
- package/esm/masking/methods.js +2 -2
- package/esm/nav-bar/index.d.ts +12 -0
- package/esm/nav-bar/index.js +8 -2
- package/esm/notify/index.d.ts +12 -12
- package/esm/notify/index.js +3 -2
- package/esm/notify/methods.d.ts +2 -1
- package/esm/notify/methods.js +2 -2
- package/esm/picker-view/components/picker-cell.js +3 -1
- package/esm/popup/index.d.ts +4 -4
- package/esm/popup/index.js +3 -2
- package/esm/popup/methods.d.ts +1 -1
- package/esm/popup-swiper/index.d.ts +12 -6
- package/esm/popup-swiper/index.js +3 -2
- package/esm/popup-swiper/methods.d.ts +1 -1
- package/esm/progress/index.js +4 -0
- package/esm/rate/index.js +5 -0
- package/esm/slider/index.js +6 -1
- package/esm/stepper/index.js +7 -1
- package/esm/swipe-action/index.d.ts +1 -0
- package/esm/swipe-action/index.js +1 -0
- package/esm/switch/index.js +4 -0
- package/esm/toast/index.d.ts +18 -18
- package/esm/toast/index.js +3 -2
- package/esm/toast/methods.d.ts +2 -1
- package/esm/toast/methods.js +2 -2
- package/package.json +3 -3
- package/style/css/public.css +4 -4
- package/tokens/app/arcodesign/default/css-variables.less +2 -0
- package/tokens/app/arcodesign/default/index.d.ts +2 -0
- package/tokens/app/arcodesign/default/index.js +127 -125
- package/tokens/app/arcodesign/default/index.json +24 -0
- package/tokens/app/arcodesign/default/index.less +2 -0
- package/umd/_helpers/render.d.ts +3 -1
- package/umd/_helpers/render.js +13 -7
- package/umd/action-sheet/index.d.ts +5 -5
- package/umd/action-sheet/index.js +4 -3
- package/umd/action-sheet/methods.d.ts +1 -1
- package/umd/badge/style/css/index.css +1 -2
- package/umd/checkbox/checkbox.js +4 -0
- package/umd/circle-progress/index.js +4 -0
- package/umd/context-provider/index.d.ts +4 -0
- package/umd/context-provider/index.js +13 -1
- package/umd/dialog/index.d.ts +8 -8
- package/umd/dialog/index.js +3 -2
- package/umd/dialog/methods.d.ts +3 -3
- package/umd/dialog/style/css/index.css +1 -2
- package/umd/ellipsis/components/js-ellipsis.d.ts +4 -2
- package/umd/ellipsis/components/js-ellipsis.js +14 -1
- package/umd/ellipsis/components/native-ellipsis.d.ts +1 -1
- package/umd/ellipsis/components/native-ellipsis.js +6 -1
- package/umd/ellipsis/demo/style/css/mobile.css +1 -1
- package/umd/ellipsis/demo/style/mobile.less +3 -1
- package/umd/ellipsis/index.js +6 -2
- package/umd/ellipsis/style/css/index.css +14 -1
- package/umd/ellipsis/style/index.less +15 -1
- package/umd/ellipsis/type.d.ts +22 -76
- package/umd/image-preview/index.d.ts +3 -3
- package/umd/image-preview/index.js +3 -2
- package/umd/image-preview/methods.d.ts +2 -1
- package/umd/image-preview/methods.js +2 -2
- package/umd/input/hooks.js +1 -0
- package/umd/input/index.d.ts +5 -0
- package/umd/input/index.js +6 -2
- package/umd/masking/index.d.ts +4 -14
- package/umd/masking/index.js +3 -2
- package/umd/masking/methods.d.ts +3 -2
- package/umd/masking/methods.js +2 -2
- package/umd/nav-bar/index.d.ts +12 -0
- package/umd/nav-bar/index.js +8 -2
- package/umd/notify/index.d.ts +12 -12
- package/umd/notify/index.js +3 -2
- package/umd/notify/methods.d.ts +2 -1
- package/umd/notify/methods.js +2 -2
- package/umd/picker-view/components/picker-cell.js +3 -1
- package/umd/popup/index.d.ts +4 -4
- package/umd/popup/index.js +3 -2
- package/umd/popup/methods.d.ts +1 -1
- package/umd/popup-swiper/index.d.ts +12 -6
- package/umd/popup-swiper/index.js +3 -2
- package/umd/popup-swiper/methods.d.ts +1 -1
- package/umd/progress/index.js +4 -0
- package/umd/rate/index.js +5 -0
- package/umd/slider/index.js +6 -1
- package/umd/stepper/index.js +7 -1
- package/umd/swipe-action/index.d.ts +1 -0
- package/umd/swipe-action/index.js +11 -4
- package/umd/switch/index.js +4 -0
- package/umd/toast/index.d.ts +18 -18
- package/umd/toast/index.js +3 -2
- package/umd/toast/methods.d.ts +2 -1
- package/umd/toast/methods.js +2 -2
package/dist/index.js
CHANGED
@@ -898,6 +898,10 @@
|
|
898
898
|
SearchBar: {
|
899
899
|
placeholder: '请输入要查询的内容',
|
900
900
|
cancelBtn: '取消'
|
901
|
+
},
|
902
|
+
Stepper: {
|
903
|
+
minusButtonName: '减少',
|
904
|
+
addButtonName: '增加'
|
901
905
|
}
|
902
906
|
};
|
903
907
|
|
@@ -1147,6 +1151,16 @@
|
|
1147
1151
|
}, children);
|
1148
1152
|
}
|
1149
1153
|
var ContextLayout = GlobalContext.Consumer;
|
1154
|
+
function CompWithGlobalContext(Component) {
|
1155
|
+
return function (props) {
|
1156
|
+
var propsContext = props.context,
|
1157
|
+
others = __rest(props, ["context"]);
|
1158
|
+
|
1159
|
+
return /*#__PURE__*/React__default["default"].createElement(ContextLayout, null, function (context) {
|
1160
|
+
return /*#__PURE__*/React__default["default"].createElement(ContextProvider, __assign({}, __assign(__assign({}, context), propsContext)), /*#__PURE__*/React__default["default"].createElement(Component, __assign({}, others)));
|
1161
|
+
});
|
1162
|
+
};
|
1163
|
+
}
|
1150
1164
|
|
1151
1165
|
/**
|
1152
1166
|
* React.createPortal的简单封装。
|
@@ -2576,16 +2590,20 @@
|
|
2576
2590
|
var ReactDOMRender =
|
2577
2591
|
/** @class */
|
2578
2592
|
function () {
|
2579
|
-
function ReactDOMRender(app, container) {
|
2593
|
+
function ReactDOMRender(app, container, context) {
|
2580
2594
|
var _this = this;
|
2581
2595
|
|
2582
2596
|
this.render = function (props) {
|
2583
2597
|
var CustomApp = _this.app;
|
2584
2598
|
|
2599
|
+
var propsWithContext = __assign(__assign({}, props), {
|
2600
|
+
context: _this.context
|
2601
|
+
});
|
2602
|
+
|
2585
2603
|
if (_this.root) {
|
2586
|
-
_this.root.render( /*#__PURE__*/React__default["default"].createElement(CustomApp, __assign({},
|
2604
|
+
_this.root.render( /*#__PURE__*/React__default["default"].createElement(CustomApp, __assign({}, propsWithContext)));
|
2587
2605
|
} else {
|
2588
|
-
_this.root = render( /*#__PURE__*/React__default["default"].createElement(CustomApp, __assign({},
|
2606
|
+
_this.root = render( /*#__PURE__*/React__default["default"].createElement(CustomApp, __assign({}, propsWithContext)), _this.container);
|
2589
2607
|
}
|
2590
2608
|
};
|
2591
2609
|
|
@@ -2598,6 +2616,7 @@
|
|
2598
2616
|
|
2599
2617
|
this.app = app;
|
2600
2618
|
this.container = container;
|
2619
|
+
this.context = context;
|
2601
2620
|
}
|
2602
2621
|
|
2603
2622
|
return ReactDOMRender;
|
@@ -2610,7 +2629,7 @@
|
|
2610
2629
|
};
|
2611
2630
|
}
|
2612
2631
|
|
2613
|
-
return function (config) {
|
2632
|
+
return function (config, context) {
|
2614
2633
|
var baseProps = __assign(__assign({
|
2615
2634
|
unmountOnExit: true
|
2616
2635
|
}, normalize(config)), {
|
@@ -2624,7 +2643,7 @@
|
|
2624
2643
|
var id = "_" + (containerId || 'ARCO_MASKING') + "_DIV_" + (config.key || '') + "_";
|
2625
2644
|
var div = appendElementById(id, baseProps.getContainer).child;
|
2626
2645
|
var leaving = false;
|
2627
|
-
var render = new ReactDOMRender(Component, div).render;
|
2646
|
+
var render = new ReactDOMRender(Component, div, context).render;
|
2628
2647
|
|
2629
2648
|
function update(newConfig) {
|
2630
2649
|
dynamicProps = __assign(__assign({}, dynamicProps), normalize(newConfig));
|
@@ -2847,6 +2866,7 @@
|
|
2847
2866
|
open: open$5(Comp)
|
2848
2867
|
};
|
2849
2868
|
}
|
2869
|
+
var MaskingWithGlobalContext = CompWithGlobalContext(Masking);
|
2850
2870
|
/**
|
2851
2871
|
* 通用模态弹窗,内部内容自定义。默认做了防滚动穿透处理,如果弹层内容中需要滚动,则需将滚动容器传入`getScrollContainer`属性以在未滚动到顶部或底部时释放滚动。
|
2852
2872
|
* @en Generic modal popup with custom internal content. By default, anti-scroll penetration processing is performed. If scrolling is required in the content of the bullet layer, need to pass the scroll container to the `getScrollContainer` to release scrolling when it is not scrolled to the top or bottom.
|
@@ -2856,7 +2876,7 @@
|
|
2856
2876
|
* @name_en Masking
|
2857
2877
|
*/
|
2858
2878
|
|
2859
|
-
var Masking$1 = componentWrapper(Masking, methodsGenerator$7(
|
2879
|
+
var Masking$1 = componentWrapper(Masking, methodsGenerator$7(MaskingWithGlobalContext));
|
2860
2880
|
|
2861
2881
|
function open$4(Component) {
|
2862
2882
|
return open$5(Component, 'ARCO_POPUP');
|
@@ -2924,6 +2944,7 @@
|
|
2924
2944
|
open: open$4(Comp)
|
2925
2945
|
};
|
2926
2946
|
}
|
2947
|
+
var PopupWithGlobalContext = CompWithGlobalContext(Popup);
|
2927
2948
|
/**
|
2928
2949
|
* 基于模态弹窗的的全屏菜单,支持各个方向。默认做了防滚动穿透处理,如果弹层内容中需要滚动,则需将滚动容器传入`getScrollContainer`属性以在未滚动到顶部或底部时释放滚动。
|
2929
2950
|
* @en A full-screen menu based on a modal popup, supporting all directions. By default, anti-scroll penetration processing is performed. If scrolling is required in the content of the popup layer, you need to pass the scroll container to the `getScrollContainer` property to release scrolling when it is not scrolled to the top or bottom.
|
@@ -2933,7 +2954,7 @@
|
|
2933
2954
|
* @name_en Popup
|
2934
2955
|
*/
|
2935
2956
|
|
2936
|
-
var Popup$1 = componentWrapper(Popup, methodsGenerator$6(
|
2957
|
+
var Popup$1 = componentWrapper(Popup, methodsGenerator$6(PopupWithGlobalContext));
|
2937
2958
|
|
2938
2959
|
function open$3(Component) {
|
2939
2960
|
return open$5(Component, 'ARCO_ACTION_SHEET');
|
@@ -3020,16 +3041,17 @@
|
|
3020
3041
|
open: open$3(Comp)
|
3021
3042
|
};
|
3022
3043
|
}
|
3044
|
+
var ActionSheetWithGlobalContext = CompWithGlobalContext(ActionSheet);
|
3023
3045
|
/**
|
3024
3046
|
* 动作面板组件
|
3025
|
-
* @en ActionSheet
|
3047
|
+
* @en ActionSheet Component
|
3026
3048
|
* @type 反馈
|
3027
3049
|
* @type_en FeedBack
|
3028
3050
|
* @name 动作面板
|
3029
3051
|
* @name_en ActionSheet
|
3030
3052
|
*/
|
3031
3053
|
|
3032
|
-
var index$e = componentWrapper(ActionSheet, methodsGenerator$5(
|
3054
|
+
var index$e = componentWrapper(ActionSheet, methodsGenerator$5(ActionSheetWithGlobalContext));
|
3033
3055
|
|
3034
3056
|
var GroupContext = /*#__PURE__*/React__default["default"].createContext({
|
3035
3057
|
isFromGroup: false
|
@@ -5272,7 +5294,7 @@
|
|
5272
5294
|
}
|
5273
5295
|
|
5274
5296
|
function toast(Component, type) {
|
5275
|
-
return function (originConfig) {
|
5297
|
+
return function (originConfig, context) {
|
5276
5298
|
var config = typeof originConfig === 'string' ? {
|
5277
5299
|
content: originConfig,
|
5278
5300
|
type: 'info'
|
@@ -5286,7 +5308,7 @@
|
|
5286
5308
|
var div = document.createElement('div');
|
5287
5309
|
document.body.appendChild(div);
|
5288
5310
|
|
5289
|
-
var _a = new ReactDOMRender(Component, div),
|
5311
|
+
var _a = new ReactDOMRender(Component, div, context),
|
5290
5312
|
render = _a.render,
|
5291
5313
|
unmount = _a.unmount;
|
5292
5314
|
|
@@ -5517,6 +5539,7 @@
|
|
5517
5539
|
warn: toast(Comp, 'warn')
|
5518
5540
|
};
|
5519
5541
|
}
|
5542
|
+
var ToastWithGlobalContext = CompWithGlobalContext(Toast);
|
5520
5543
|
/**
|
5521
5544
|
* 轻提示组件,支持各个场景下调用方法。
|
5522
5545
|
* @en The toast component, supports calling methods in various scenarios.
|
@@ -5526,7 +5549,7 @@
|
|
5526
5549
|
* @name_en Toast
|
5527
5550
|
*/
|
5528
5551
|
|
5529
|
-
var index$b = componentWrapper(Toast, methodsGenerator$4(
|
5552
|
+
var index$b = componentWrapper(Toast, methodsGenerator$4(ToastWithGlobalContext));
|
5530
5553
|
|
5531
5554
|
/**
|
5532
5555
|
* 开关组件,支持点击和滑动触发开关动作。
|
@@ -5630,6 +5653,10 @@
|
|
5630
5653
|
return /*#__PURE__*/React__default["default"].createElement(ContextLayout, null, function (_a) {
|
5631
5654
|
var prefixCls = _a.prefixCls;
|
5632
5655
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
5656
|
+
role: "switch",
|
5657
|
+
"aria-checked": switchChecked,
|
5658
|
+
"aria-disabled": disabled,
|
5659
|
+
tabIndex: 0,
|
5633
5660
|
ref: domRef,
|
5634
5661
|
className: cls(prefixCls + "-switch all-border-box", className, "type-" + platform, "system-" + system, shape, {
|
5635
5662
|
checked: switchChecked,
|
@@ -6066,6 +6093,10 @@
|
|
6066
6093
|
return /*#__PURE__*/React__default["default"].createElement(ContextLayout, null, function (_a) {
|
6067
6094
|
var prefixCls = _a.prefixCls;
|
6068
6095
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
6096
|
+
role: "checkbox",
|
6097
|
+
"aria-checked": checked,
|
6098
|
+
"aria-disabled": disabled,
|
6099
|
+
tabIndex: 0,
|
6069
6100
|
ref: domRef,
|
6070
6101
|
style: style,
|
6071
6102
|
className: cls(className, prefixCls + "-" + componentName, "shape-" + shape, {
|
@@ -6240,6 +6271,10 @@
|
|
6240
6271
|
function renderCircleProgress(_a) {
|
6241
6272
|
var prefixCls = _a.prefixCls;
|
6242
6273
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
6274
|
+
role: "progressbar",
|
6275
|
+
"aria-valuemin": 0,
|
6276
|
+
"aria-valuemax": 100,
|
6277
|
+
"aria-valuenow": percentage,
|
6243
6278
|
className: cls(prefixCls + "-circle-progress", disabled ? prefixCls + "-circle-progress-disabled" : '', "" + className),
|
6244
6279
|
style: __assign({
|
6245
6280
|
width: circleSize,
|
@@ -8589,6 +8624,7 @@
|
|
8589
8624
|
open: open$2(Comp)
|
8590
8625
|
};
|
8591
8626
|
}
|
8627
|
+
var DialogWithGlobalContext = CompWithGlobalContext(Dialog);
|
8592
8628
|
/**
|
8593
8629
|
* 模态对话框,在浮层中显示,引导用户进行相关操作。默认做了防滚动穿透处理,如果弹层内容中需要滚动,则需将滚动容器传入`getScrollContainer`属性以在未滚动到顶部或底部时释放滚动。
|
8594
8630
|
* @en A modal dialog, displayed in a floating layer, guides the user to perform related operations. By default, anti-scroll penetration processing is performed. If scrolling is required in the content of the bullet layer, you need to pass the scroll container to `getScrollContainer` to release scrolling when it is not scrolled to the top or bottom.
|
@@ -8598,7 +8634,7 @@
|
|
8598
8634
|
* @name_en Dialog
|
8599
8635
|
*/
|
8600
8636
|
|
8601
|
-
var index$9 = componentWrapper(Dialog, methodsGenerator$3(
|
8637
|
+
var index$9 = componentWrapper(Dialog, methodsGenerator$3(DialogWithGlobalContext));
|
8602
8638
|
|
8603
8639
|
// 定义秒,分,小时,天的转化常量
|
8604
8640
|
// @en Define conversion constants for seconds, minutes, hours, days
|
@@ -9389,12 +9425,14 @@
|
|
9389
9425
|
ref: wrapRef,
|
9390
9426
|
onTouchStart: _handleItemTouchStart,
|
9391
9427
|
onTouchEnd: _handleColumnTouchEnd,
|
9392
|
-
onTouchCancel: _handleColumnTouchEnd
|
9428
|
+
onTouchCancel: _handleColumnTouchEnd,
|
9429
|
+
"aria-disabled": disabled
|
9393
9430
|
}, data.map(function (item, index) {
|
9394
9431
|
var _a;
|
9395
9432
|
|
9396
9433
|
var dis = Math.abs(index - currentIndex);
|
9397
9434
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
9435
|
+
"aria-label": index === currentIndex ? "" + item.value : '',
|
9398
9436
|
key: index + "_" + item.value,
|
9399
9437
|
className: cls(prefixCls + "-column-item", (_a = {
|
9400
9438
|
selected: index === currentIndex
|
@@ -12332,7 +12370,20 @@
|
|
12332
12370
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
12333
12371
|
ref: textRef,
|
12334
12372
|
className: prefixCls + "-js-content"
|
12335
|
-
}
|
12373
|
+
}, dangerouslyUseInnerHTML ? /*#__PURE__*/React__default["default"].createElement("span", {
|
12374
|
+
className: prefixCls + "-js-content-initial",
|
12375
|
+
style: {
|
12376
|
+
WebkitLineClamp: maxLine
|
12377
|
+
},
|
12378
|
+
dangerouslySetInnerHTML: {
|
12379
|
+
__html: text
|
12380
|
+
}
|
12381
|
+
}) : /*#__PURE__*/React__default["default"].createElement("span", {
|
12382
|
+
className: prefixCls + "-js-content-initial",
|
12383
|
+
style: {
|
12384
|
+
WebkitLineClamp: maxLine
|
12385
|
+
}
|
12386
|
+
}, text)), /*#__PURE__*/React__default["default"].createElement("span", {
|
12336
12387
|
ref: ellipsisRef,
|
12337
12388
|
className: prefixCls + "-js-content-ellipsis",
|
12338
12389
|
onClick: onEllipsisNodeClick
|
@@ -12349,8 +12400,10 @@
|
|
12349
12400
|
dangerouslyUseInnerHTML = _a.dangerouslyUseInnerHTML,
|
12350
12401
|
text = _a.text,
|
12351
12402
|
maxLine = _a.maxLine,
|
12403
|
+
ellipsisNode = _a.ellipsisNode,
|
12352
12404
|
_b = _a.collapseNode,
|
12353
12405
|
collapseNode = _b === void 0 ? '' : _b,
|
12406
|
+
onEllipsisNodeClick = _a.onEllipsisNodeClick,
|
12354
12407
|
onCollapseNodeClick = _a.onCollapseNodeClick;
|
12355
12408
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
12356
12409
|
className: cls(prefixCls + "-native", {
|
@@ -12369,7 +12422,10 @@
|
|
12369
12422
|
}) : /*#__PURE__*/React__default["default"].createElement("span", null, text), !ellipsis && collapseNode && /*#__PURE__*/React__default["default"].createElement("span", {
|
12370
12423
|
onClick: onCollapseNodeClick,
|
12371
12424
|
className: cls(prefixCls + "-native-collapse")
|
12372
|
-
}, collapseNode))
|
12425
|
+
}, collapseNode), ellipsis && (ellipsisNode !== '...' || onEllipsisNodeClick) ? /*#__PURE__*/React__default["default"].createElement("span", {
|
12426
|
+
onClick: onEllipsisNodeClick,
|
12427
|
+
className: cls(prefixCls + "-native-ellipsis-node")
|
12428
|
+
}, ellipsisNode) : null);
|
12373
12429
|
}
|
12374
12430
|
|
12375
12431
|
var NativeEllipsis$1 = /*#__PURE__*/React__default["default"].memo(NativeEllipsis);
|
@@ -12396,15 +12452,17 @@
|
|
12396
12452
|
ellipsisNode = _c === void 0 ? '...' : _c,
|
12397
12453
|
_d = props.collapseNode,
|
12398
12454
|
collapseNode = _d === void 0 ? '' : _d,
|
12399
|
-
onCollapseNodeClick = props.onCollapseNodeClick,
|
12400
12455
|
endExcludes = props.endExcludes,
|
12401
12456
|
_e = props.reflowOnResize,
|
12402
12457
|
reflowOnResize = _e === void 0 ? false : _e,
|
12458
|
+
_f = props.floatEllipsisNode,
|
12459
|
+
floatEllipsisNode = _f === void 0 ? false : _f,
|
12403
12460
|
onReflow = props.onReflow,
|
12461
|
+
onCollapseNodeClick = props.onCollapseNodeClick,
|
12404
12462
|
onEllipsisNodeClick = props.onEllipsisNodeClick;
|
12405
12463
|
var domRef = React.useRef(null);
|
12406
12464
|
var jsEllipsisRef = React.useRef(null);
|
12407
|
-
var useNativeEllipsis = isSupportWebkitLineClamp() && maxHeight === void 0 &&
|
12465
|
+
var useNativeEllipsis = isSupportWebkitLineClamp() && maxHeight === void 0 && (!endExcludes || endExcludes.length === 0) && !onReflow && (floatEllipsisNode || ellipsisNode === '...' && !onEllipsisNodeClick);
|
12408
12466
|
React.useImperativeHandle(ref, function () {
|
12409
12467
|
var _a;
|
12410
12468
|
|
@@ -12424,7 +12482,9 @@
|
|
12424
12482
|
dangerouslyUseInnerHTML: dangerouslyUseInnerHTML,
|
12425
12483
|
text: text,
|
12426
12484
|
maxLine: maxLine,
|
12485
|
+
ellipsisNode: ellipsisNode,
|
12427
12486
|
collapseNode: collapseNode,
|
12487
|
+
onEllipsisNodeClick: onEllipsisNodeClick,
|
12428
12488
|
onCollapseNodeClick: onCollapseNodeClick
|
12429
12489
|
}) : /*#__PURE__*/React__default["default"].createElement(JsEllipsis$1, {
|
12430
12490
|
ref: jsEllipsisRef,
|
@@ -16871,7 +16931,7 @@
|
|
16871
16931
|
}();
|
16872
16932
|
|
16873
16933
|
function open$1(Component) {
|
16874
|
-
return function (config) {
|
16934
|
+
return function (config, context) {
|
16875
16935
|
var baseProps = __assign(__assign({
|
16876
16936
|
unmountOnExit: true
|
16877
16937
|
}, config || {}), {
|
@@ -16885,7 +16945,7 @@
|
|
16885
16945
|
var id = "_ARCO_IMAGE_PREVIEW_DIV_" + (baseProps.key || '') + "_";
|
16886
16946
|
var div = appendElementById(id, baseProps.getContainer).child;
|
16887
16947
|
var leaving = false;
|
16888
|
-
var render = new ReactDOMRender(Component, div).render;
|
16948
|
+
var render = new ReactDOMRender(Component, div, context).render;
|
16889
16949
|
|
16890
16950
|
function update(newConfig) {
|
16891
16951
|
dynamicProps = __assign(__assign({}, dynamicProps), newConfig || {});
|
@@ -17890,6 +17950,7 @@
|
|
17890
17950
|
open: open$1(Comp)
|
17891
17951
|
};
|
17892
17952
|
}
|
17953
|
+
var ImagePreviewWithGlobalContext = CompWithGlobalContext(ImagePreview);
|
17893
17954
|
/**
|
17894
17955
|
* 图片预览组件,支持循环轮播、双指/双击缩放、缩略图放大效果。
|
17895
17956
|
* @en The image preview, supports circular rotation, two-finger/double-tap zoom, and thumbnail zoom effects.
|
@@ -17899,7 +17960,7 @@
|
|
17899
17960
|
* @name_en ImagePreview
|
17900
17961
|
*/
|
17901
17962
|
|
17902
|
-
var index$7 = componentWrapper(ImagePreview, methodsGenerator$2(
|
17963
|
+
var index$7 = componentWrapper(ImagePreview, methodsGenerator$2(ImagePreviewWithGlobalContext));
|
17903
17964
|
|
17904
17965
|
function useInputLogic(props, inputRef) {
|
17905
17966
|
var value = props.value,
|
@@ -18099,6 +18160,7 @@
|
|
18099
18160
|
|
18100
18161
|
function renderWrapper(prefixCls, type, children) {
|
18101
18162
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
18163
|
+
role: "search",
|
18102
18164
|
className: prefixCls + "-container all-border-box " + (className || ''),
|
18103
18165
|
style: style,
|
18104
18166
|
ref: wrapRef
|
@@ -18161,19 +18223,21 @@
|
|
18161
18223
|
inputClass = props.inputClass,
|
18162
18224
|
inputStyle = props.inputStyle,
|
18163
18225
|
_b = props.nativeProps,
|
18164
|
-
nativeProps = _b === void 0 ? {} : _b
|
18226
|
+
nativeProps = _b === void 0 ? {} : _b,
|
18227
|
+
_c = props.ariaLabel,
|
18228
|
+
ariaLabel = _c === void 0 ? '' : _c;
|
18165
18229
|
var inputRef = React.useRef(null);
|
18166
18230
|
|
18167
|
-
var
|
18168
|
-
inputValue =
|
18169
|
-
handleChange =
|
18170
|
-
handleInput =
|
18171
|
-
handleKeyDown =
|
18172
|
-
handleFocus =
|
18173
|
-
handleBlur =
|
18174
|
-
handleClick =
|
18175
|
-
renderWrapper =
|
18176
|
-
wrapRef =
|
18231
|
+
var _d = useInputLogic(props, inputRef),
|
18232
|
+
inputValue = _d.inputValue,
|
18233
|
+
handleChange = _d.handleChange,
|
18234
|
+
handleInput = _d.handleInput,
|
18235
|
+
handleKeyDown = _d.handleKeyDown,
|
18236
|
+
handleFocus = _d.handleFocus,
|
18237
|
+
handleBlur = _d.handleBlur,
|
18238
|
+
handleClick = _d.handleClick,
|
18239
|
+
renderWrapper = _d.renderWrapper,
|
18240
|
+
wrapRef = _d.wrapRef;
|
18177
18241
|
|
18178
18242
|
React.useImperativeHandle(ref, function () {
|
18179
18243
|
return {
|
@@ -18205,7 +18269,9 @@
|
|
18205
18269
|
onChange: handleChange,
|
18206
18270
|
onInput: handleInput,
|
18207
18271
|
onKeyDown: handleKeyDown,
|
18208
|
-
onClick: handleClick
|
18272
|
+
onClick: handleClick,
|
18273
|
+
"aria-disabled": disabled,
|
18274
|
+
"aria-label": ariaLabel
|
18209
18275
|
})));
|
18210
18276
|
}
|
18211
18277
|
|
@@ -18439,18 +18505,22 @@
|
|
18439
18505
|
getScrollContainer = props.getScrollContainer,
|
18440
18506
|
_h = props.showOffset,
|
18441
18507
|
showOffset = _h === void 0 ? 0 : _h,
|
18442
|
-
getComputedStyleByScroll = props.getComputedStyleByScroll
|
18508
|
+
getComputedStyleByScroll = props.getComputedStyleByScroll,
|
18509
|
+
_j = props.ariaLabel,
|
18510
|
+
ariaLabel = _j === void 0 ? '' : _j,
|
18511
|
+
_k = props.ariaRole,
|
18512
|
+
ariaRole = _k === void 0 ? 'banner' : _k;
|
18443
18513
|
var navBarRef = React.useRef(null);
|
18444
18514
|
|
18445
|
-
var
|
18446
|
-
scrollToggleHide =
|
18447
|
-
setScrollToggleHide =
|
18515
|
+
var _l = React.useState(showOffset > 0),
|
18516
|
+
scrollToggleHide = _l[0],
|
18517
|
+
setScrollToggleHide = _l[1];
|
18448
18518
|
|
18449
18519
|
var relBackground = scrollToggleHide ? 'transparent' : '';
|
18450
18520
|
|
18451
|
-
var
|
18452
|
-
customStyle =
|
18453
|
-
setCustomStyle =
|
18521
|
+
var _m = React.useState({}),
|
18522
|
+
customStyle = _m[0],
|
18523
|
+
setCustomStyle = _m[1];
|
18454
18524
|
|
18455
18525
|
var system = useSystem();
|
18456
18526
|
|
@@ -18527,7 +18597,9 @@
|
|
18527
18597
|
paddingTop: fixed && statusBarHeight ? statusBarHeight + "px" : ''
|
18528
18598
|
}, style || {}), relBackground ? {
|
18529
18599
|
background: relBackground
|
18530
|
-
} : {})
|
18600
|
+
} : {}),
|
18601
|
+
"aria-label": ariaLabel,
|
18602
|
+
role: ariaRole
|
18531
18603
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
18532
18604
|
className: cls(className, system, prefixCls + "-nav-bar-wrapper", (_c = {}, _c[prefixCls + "-nav-bar-wrapper-fixed"] = fixed, _c[prefixCls + "-nav-bar-wrapper-border"] = hasBottomLine, _c)),
|
18533
18605
|
style: __assign({
|
@@ -18731,7 +18803,7 @@
|
|
18731
18803
|
});
|
18732
18804
|
|
18733
18805
|
function notify(Component, type) {
|
18734
|
-
return function (originConfig) {
|
18806
|
+
return function (originConfig, context) {
|
18735
18807
|
var config = typeof originConfig === 'string' ? {
|
18736
18808
|
content: originConfig,
|
18737
18809
|
type: 'info'
|
@@ -18750,7 +18822,7 @@
|
|
18750
18822
|
document.body.appendChild(div);
|
18751
18823
|
}
|
18752
18824
|
|
18753
|
-
var _a = new ReactDOMRender(Component, div),
|
18825
|
+
var _a = new ReactDOMRender(Component, div, context),
|
18754
18826
|
render = _a.render,
|
18755
18827
|
unmount = _a.unmount;
|
18756
18828
|
|
@@ -18936,6 +19008,7 @@
|
|
18936
19008
|
warn: notify(Comp, 'warn')
|
18937
19009
|
};
|
18938
19010
|
}
|
19011
|
+
var NotifyWithGlobalContext = CompWithGlobalContext(Notify);
|
18939
19012
|
/**
|
18940
19013
|
* 主动操作后显示的反馈信息横条,可采用方法调用或者组件调用的方式
|
18941
19014
|
* @en The feedback information bar displayed after active operation can be called by method or by component.
|
@@ -18945,7 +19018,7 @@
|
|
18945
19018
|
* @name_en Notify
|
18946
19019
|
*/
|
18947
19020
|
|
18948
|
-
var index$6 = componentWrapper(Notify, methodsGenerator$1(
|
19021
|
+
var index$6 = componentWrapper(Notify, methodsGenerator$1(NotifyWithGlobalContext));
|
18949
19022
|
|
18950
19023
|
function Arrow() {
|
18951
19024
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
@@ -20605,6 +20678,7 @@
|
|
20605
20678
|
open: open(Comp)
|
20606
20679
|
};
|
20607
20680
|
}
|
20681
|
+
var PopupSwiperWithGlobalContext = CompWithGlobalContext(PopupSwiper);
|
20608
20682
|
/**
|
20609
20683
|
* 基于弹出层(Popup)封装的具有手势关闭功能的弹出层组件,拥有 Popup 组件的其他能力。
|
20610
20684
|
* @en The popup with gesture closing function based on the popup encapsulation, has other capabilities of the Popup component.
|
@@ -20614,7 +20688,7 @@
|
|
20614
20688
|
* @name_en PopupSwiper
|
20615
20689
|
*/
|
20616
20690
|
|
20617
|
-
var index$4 = componentWrapper(PopupSwiper, methodsGenerator(
|
20691
|
+
var index$4 = componentWrapper(PopupSwiper, methodsGenerator(PopupSwiperWithGlobalContext));
|
20618
20692
|
|
20619
20693
|
/**
|
20620
20694
|
* 进度条组件,可根据外界传递进来的百分比进行进度展示
|
@@ -20699,6 +20773,10 @@
|
|
20699
20773
|
function renderBarProgress(_a) {
|
20700
20774
|
var prefixCls = _a.prefixCls;
|
20701
20775
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
20776
|
+
role: "progressbar",
|
20777
|
+
"aria-valuenow": percentage,
|
20778
|
+
"aria-valuemax": 100,
|
20779
|
+
"aria-valuemin": 0,
|
20702
20780
|
className: cls(prefixCls + "-progress", {
|
20703
20781
|
'progress-fixed': mode === 'nav'
|
20704
20782
|
}, {
|
@@ -21602,6 +21680,11 @@
|
|
21602
21680
|
return /*#__PURE__*/React__default["default"].createElement(ContextLayout, null, function (_a) {
|
21603
21681
|
var prefixCls = _a.prefixCls;
|
21604
21682
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
21683
|
+
role: "slider",
|
21684
|
+
"aria-valuemin": 0,
|
21685
|
+
"aria-valuemax": count,
|
21686
|
+
"aria-valuenow": innerValue,
|
21687
|
+
"aria-disabled": disabled,
|
21605
21688
|
className: cls(prefixCls + "-rate", className, {
|
21606
21689
|
disabled: disabled
|
21607
21690
|
}),
|
@@ -22343,7 +22426,12 @@
|
|
22343
22426
|
'show-marks': showMarks
|
22344
22427
|
}),
|
22345
22428
|
style: style,
|
22346
|
-
ref: domRef
|
22429
|
+
ref: domRef,
|
22430
|
+
role: "slider",
|
22431
|
+
"aria-valuemin": min,
|
22432
|
+
"aria-valuemax": max,
|
22433
|
+
"aria-valuenow": Array.isArray(valueGroup) ? valueGroup[0] : valueGroup,
|
22434
|
+
"aria-disabled": disabled
|
22347
22435
|
}, isHorizontal ? renderPrefixLabel : renderSuffixLabel, /*#__PURE__*/React__default["default"].createElement("div", {
|
22348
22436
|
className: prefixCls + "-slider-wrapper"
|
22349
22437
|
}, /*#__PURE__*/React__default["default"].createElement(Marks, {
|
@@ -23043,6 +23131,7 @@
|
|
23043
23131
|
ref: domRef,
|
23044
23132
|
onClick: onClick
|
23045
23133
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
23134
|
+
"aria-label": "decrease",
|
23046
23135
|
onClick: handleMinusButtonClick
|
23047
23136
|
}, minusButton || /*#__PURE__*/React__default["default"].createElement("div", {
|
23048
23137
|
className: cls(prefixCls + "-stepper-minus-button")
|
@@ -23060,8 +23149,13 @@
|
|
23060
23149
|
value: showValue,
|
23061
23150
|
readOnly: inputReadonly,
|
23062
23151
|
ref: inputRef,
|
23063
|
-
type: "number"
|
23152
|
+
type: "number",
|
23153
|
+
role: "spinbutton",
|
23154
|
+
"aria-valuenow": Number(showValue),
|
23155
|
+
"aria-valuemax": max,
|
23156
|
+
"aria-valuemin": min
|
23064
23157
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
23158
|
+
"aria-label": "increase",
|
23065
23159
|
onClick: handleAddButtonClick
|
23066
23160
|
}, addButton || /*#__PURE__*/React__default["default"].createElement("div", {
|
23067
23161
|
className: cls(prefixCls + "-stepper-add-button")
|