@arco-design/mobile-react 2.23.0 → 2.24.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/CHANGELOG.md +16 -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/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 +115 -43
- package/dist/index.min.js +3 -3
- package/dist/style.css +13 -113
- 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/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/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/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/cjs/toast/methods.js
CHANGED
@@ -12,7 +12,7 @@ var _mobileUtils = require("@arco-design/mobile-utils");
|
|
12
12
|
var _render = require("../_helpers/render");
|
13
13
|
|
14
14
|
function toast(Component, type) {
|
15
|
-
return function (originConfig) {
|
15
|
+
return function (originConfig, context) {
|
16
16
|
var config = typeof originConfig === 'string' ? {
|
17
17
|
content: originConfig,
|
18
18
|
type: 'info'
|
@@ -26,7 +26,7 @@ function toast(Component, type) {
|
|
26
26
|
var div = document.createElement('div');
|
27
27
|
document.body.appendChild(div);
|
28
28
|
|
29
|
-
var _ReactDOMRender = new _render.ReactDOMRender(Component, div),
|
29
|
+
var _ReactDOMRender = new _render.ReactDOMRender(Component, div, context),
|
30
30
|
render = _ReactDOMRender.render,
|
31
31
|
unmount = _ReactDOMRender.unmount;
|
32
32
|
|
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
|
@@ -16871,7 +16909,7 @@
|
|
16871
16909
|
}();
|
16872
16910
|
|
16873
16911
|
function open$1(Component) {
|
16874
|
-
return function (config) {
|
16912
|
+
return function (config, context) {
|
16875
16913
|
var baseProps = __assign(__assign({
|
16876
16914
|
unmountOnExit: true
|
16877
16915
|
}, config || {}), {
|
@@ -16885,7 +16923,7 @@
|
|
16885
16923
|
var id = "_ARCO_IMAGE_PREVIEW_DIV_" + (baseProps.key || '') + "_";
|
16886
16924
|
var div = appendElementById(id, baseProps.getContainer).child;
|
16887
16925
|
var leaving = false;
|
16888
|
-
var render = new ReactDOMRender(Component, div).render;
|
16926
|
+
var render = new ReactDOMRender(Component, div, context).render;
|
16889
16927
|
|
16890
16928
|
function update(newConfig) {
|
16891
16929
|
dynamicProps = __assign(__assign({}, dynamicProps), newConfig || {});
|
@@ -17890,6 +17928,7 @@
|
|
17890
17928
|
open: open$1(Comp)
|
17891
17929
|
};
|
17892
17930
|
}
|
17931
|
+
var ImagePreviewWithGlobalContext = CompWithGlobalContext(ImagePreview);
|
17893
17932
|
/**
|
17894
17933
|
* 图片预览组件,支持循环轮播、双指/双击缩放、缩略图放大效果。
|
17895
17934
|
* @en The image preview, supports circular rotation, two-finger/double-tap zoom, and thumbnail zoom effects.
|
@@ -17899,7 +17938,7 @@
|
|
17899
17938
|
* @name_en ImagePreview
|
17900
17939
|
*/
|
17901
17940
|
|
17902
|
-
var index$7 = componentWrapper(ImagePreview, methodsGenerator$2(
|
17941
|
+
var index$7 = componentWrapper(ImagePreview, methodsGenerator$2(ImagePreviewWithGlobalContext));
|
17903
17942
|
|
17904
17943
|
function useInputLogic(props, inputRef) {
|
17905
17944
|
var value = props.value,
|
@@ -18099,6 +18138,7 @@
|
|
18099
18138
|
|
18100
18139
|
function renderWrapper(prefixCls, type, children) {
|
18101
18140
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
18141
|
+
role: "search",
|
18102
18142
|
className: prefixCls + "-container all-border-box " + (className || ''),
|
18103
18143
|
style: style,
|
18104
18144
|
ref: wrapRef
|
@@ -18161,19 +18201,21 @@
|
|
18161
18201
|
inputClass = props.inputClass,
|
18162
18202
|
inputStyle = props.inputStyle,
|
18163
18203
|
_b = props.nativeProps,
|
18164
|
-
nativeProps = _b === void 0 ? {} : _b
|
18204
|
+
nativeProps = _b === void 0 ? {} : _b,
|
18205
|
+
_c = props.ariaLabel,
|
18206
|
+
ariaLabel = _c === void 0 ? '' : _c;
|
18165
18207
|
var inputRef = React.useRef(null);
|
18166
18208
|
|
18167
|
-
var
|
18168
|
-
inputValue =
|
18169
|
-
handleChange =
|
18170
|
-
handleInput =
|
18171
|
-
handleKeyDown =
|
18172
|
-
handleFocus =
|
18173
|
-
handleBlur =
|
18174
|
-
handleClick =
|
18175
|
-
renderWrapper =
|
18176
|
-
wrapRef =
|
18209
|
+
var _d = useInputLogic(props, inputRef),
|
18210
|
+
inputValue = _d.inputValue,
|
18211
|
+
handleChange = _d.handleChange,
|
18212
|
+
handleInput = _d.handleInput,
|
18213
|
+
handleKeyDown = _d.handleKeyDown,
|
18214
|
+
handleFocus = _d.handleFocus,
|
18215
|
+
handleBlur = _d.handleBlur,
|
18216
|
+
handleClick = _d.handleClick,
|
18217
|
+
renderWrapper = _d.renderWrapper,
|
18218
|
+
wrapRef = _d.wrapRef;
|
18177
18219
|
|
18178
18220
|
React.useImperativeHandle(ref, function () {
|
18179
18221
|
return {
|
@@ -18205,7 +18247,9 @@
|
|
18205
18247
|
onChange: handleChange,
|
18206
18248
|
onInput: handleInput,
|
18207
18249
|
onKeyDown: handleKeyDown,
|
18208
|
-
onClick: handleClick
|
18250
|
+
onClick: handleClick,
|
18251
|
+
"aria-disabled": disabled,
|
18252
|
+
"aria-label": ariaLabel
|
18209
18253
|
})));
|
18210
18254
|
}
|
18211
18255
|
|
@@ -18439,18 +18483,22 @@
|
|
18439
18483
|
getScrollContainer = props.getScrollContainer,
|
18440
18484
|
_h = props.showOffset,
|
18441
18485
|
showOffset = _h === void 0 ? 0 : _h,
|
18442
|
-
getComputedStyleByScroll = props.getComputedStyleByScroll
|
18486
|
+
getComputedStyleByScroll = props.getComputedStyleByScroll,
|
18487
|
+
_j = props.ariaLabel,
|
18488
|
+
ariaLabel = _j === void 0 ? '' : _j,
|
18489
|
+
_k = props.ariaRole,
|
18490
|
+
ariaRole = _k === void 0 ? 'banner' : _k;
|
18443
18491
|
var navBarRef = React.useRef(null);
|
18444
18492
|
|
18445
|
-
var
|
18446
|
-
scrollToggleHide =
|
18447
|
-
setScrollToggleHide =
|
18493
|
+
var _l = React.useState(showOffset > 0),
|
18494
|
+
scrollToggleHide = _l[0],
|
18495
|
+
setScrollToggleHide = _l[1];
|
18448
18496
|
|
18449
18497
|
var relBackground = scrollToggleHide ? 'transparent' : '';
|
18450
18498
|
|
18451
|
-
var
|
18452
|
-
customStyle =
|
18453
|
-
setCustomStyle =
|
18499
|
+
var _m = React.useState({}),
|
18500
|
+
customStyle = _m[0],
|
18501
|
+
setCustomStyle = _m[1];
|
18454
18502
|
|
18455
18503
|
var system = useSystem();
|
18456
18504
|
|
@@ -18527,7 +18575,9 @@
|
|
18527
18575
|
paddingTop: fixed && statusBarHeight ? statusBarHeight + "px" : ''
|
18528
18576
|
}, style || {}), relBackground ? {
|
18529
18577
|
background: relBackground
|
18530
|
-
} : {})
|
18578
|
+
} : {}),
|
18579
|
+
"aria-label": ariaLabel,
|
18580
|
+
role: ariaRole
|
18531
18581
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
18532
18582
|
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
18583
|
style: __assign({
|
@@ -18731,7 +18781,7 @@
|
|
18731
18781
|
});
|
18732
18782
|
|
18733
18783
|
function notify(Component, type) {
|
18734
|
-
return function (originConfig) {
|
18784
|
+
return function (originConfig, context) {
|
18735
18785
|
var config = typeof originConfig === 'string' ? {
|
18736
18786
|
content: originConfig,
|
18737
18787
|
type: 'info'
|
@@ -18750,7 +18800,7 @@
|
|
18750
18800
|
document.body.appendChild(div);
|
18751
18801
|
}
|
18752
18802
|
|
18753
|
-
var _a = new ReactDOMRender(Component, div),
|
18803
|
+
var _a = new ReactDOMRender(Component, div, context),
|
18754
18804
|
render = _a.render,
|
18755
18805
|
unmount = _a.unmount;
|
18756
18806
|
|
@@ -18936,6 +18986,7 @@
|
|
18936
18986
|
warn: notify(Comp, 'warn')
|
18937
18987
|
};
|
18938
18988
|
}
|
18989
|
+
var NotifyWithGlobalContext = CompWithGlobalContext(Notify);
|
18939
18990
|
/**
|
18940
18991
|
* 主动操作后显示的反馈信息横条,可采用方法调用或者组件调用的方式
|
18941
18992
|
* @en The feedback information bar displayed after active operation can be called by method or by component.
|
@@ -18945,7 +18996,7 @@
|
|
18945
18996
|
* @name_en Notify
|
18946
18997
|
*/
|
18947
18998
|
|
18948
|
-
var index$6 = componentWrapper(Notify, methodsGenerator$1(
|
18999
|
+
var index$6 = componentWrapper(Notify, methodsGenerator$1(NotifyWithGlobalContext));
|
18949
19000
|
|
18950
19001
|
function Arrow() {
|
18951
19002
|
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
@@ -20605,6 +20656,7 @@
|
|
20605
20656
|
open: open(Comp)
|
20606
20657
|
};
|
20607
20658
|
}
|
20659
|
+
var PopupSwiperWithGlobalContext = CompWithGlobalContext(PopupSwiper);
|
20608
20660
|
/**
|
20609
20661
|
* 基于弹出层(Popup)封装的具有手势关闭功能的弹出层组件,拥有 Popup 组件的其他能力。
|
20610
20662
|
* @en The popup with gesture closing function based on the popup encapsulation, has other capabilities of the Popup component.
|
@@ -20614,7 +20666,7 @@
|
|
20614
20666
|
* @name_en PopupSwiper
|
20615
20667
|
*/
|
20616
20668
|
|
20617
|
-
var index$4 = componentWrapper(PopupSwiper, methodsGenerator(
|
20669
|
+
var index$4 = componentWrapper(PopupSwiper, methodsGenerator(PopupSwiperWithGlobalContext));
|
20618
20670
|
|
20619
20671
|
/**
|
20620
20672
|
* 进度条组件,可根据外界传递进来的百分比进行进度展示
|
@@ -20699,6 +20751,10 @@
|
|
20699
20751
|
function renderBarProgress(_a) {
|
20700
20752
|
var prefixCls = _a.prefixCls;
|
20701
20753
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
20754
|
+
role: "progressbar",
|
20755
|
+
"aria-valuenow": percentage,
|
20756
|
+
"aria-valuemax": 100,
|
20757
|
+
"aria-valuemin": 0,
|
20702
20758
|
className: cls(prefixCls + "-progress", {
|
20703
20759
|
'progress-fixed': mode === 'nav'
|
20704
20760
|
}, {
|
@@ -21602,6 +21658,11 @@
|
|
21602
21658
|
return /*#__PURE__*/React__default["default"].createElement(ContextLayout, null, function (_a) {
|
21603
21659
|
var prefixCls = _a.prefixCls;
|
21604
21660
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
21661
|
+
role: "slider",
|
21662
|
+
"aria-valuemin": 0,
|
21663
|
+
"aria-valuemax": count,
|
21664
|
+
"aria-valuenow": innerValue,
|
21665
|
+
"aria-disabled": disabled,
|
21605
21666
|
className: cls(prefixCls + "-rate", className, {
|
21606
21667
|
disabled: disabled
|
21607
21668
|
}),
|
@@ -22343,7 +22404,12 @@
|
|
22343
22404
|
'show-marks': showMarks
|
22344
22405
|
}),
|
22345
22406
|
style: style,
|
22346
|
-
ref: domRef
|
22407
|
+
ref: domRef,
|
22408
|
+
role: "slider",
|
22409
|
+
"aria-valuemin": min,
|
22410
|
+
"aria-valuemax": max,
|
22411
|
+
"aria-valuenow": Array.isArray(valueGroup) ? valueGroup[0] : valueGroup,
|
22412
|
+
"aria-disabled": disabled
|
22347
22413
|
}, isHorizontal ? renderPrefixLabel : renderSuffixLabel, /*#__PURE__*/React__default["default"].createElement("div", {
|
22348
22414
|
className: prefixCls + "-slider-wrapper"
|
22349
22415
|
}, /*#__PURE__*/React__default["default"].createElement(Marks, {
|
@@ -23043,6 +23109,7 @@
|
|
23043
23109
|
ref: domRef,
|
23044
23110
|
onClick: onClick
|
23045
23111
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
23112
|
+
"aria-label": "decrease",
|
23046
23113
|
onClick: handleMinusButtonClick
|
23047
23114
|
}, minusButton || /*#__PURE__*/React__default["default"].createElement("div", {
|
23048
23115
|
className: cls(prefixCls + "-stepper-minus-button")
|
@@ -23060,8 +23127,13 @@
|
|
23060
23127
|
value: showValue,
|
23061
23128
|
readOnly: inputReadonly,
|
23062
23129
|
ref: inputRef,
|
23063
|
-
type: "number"
|
23130
|
+
type: "number",
|
23131
|
+
role: "spinbutton",
|
23132
|
+
"aria-valuenow": Number(showValue),
|
23133
|
+
"aria-valuemax": max,
|
23134
|
+
"aria-valuemin": min
|
23064
23135
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
23136
|
+
"aria-label": "increase",
|
23065
23137
|
onClick: handleAddButtonClick
|
23066
23138
|
}, addButton || /*#__PURE__*/React__default["default"].createElement("div", {
|
23067
23139
|
className: cls(prefixCls + "-stepper-add-button")
|