@arco-design/mobile-react 2.27.4 → 2.28.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 +33 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/_helpers/hooks.d.ts +1 -0
- package/cjs/_helpers/hooks.js +44 -28
- package/cjs/action-sheet/index.d.ts +2 -2
- package/cjs/badge/index.js +2 -1
- package/cjs/badge/style/css/index.css +12 -0
- package/cjs/badge/style/index.less +3 -3
- package/cjs/button/style/css/index.css +4 -0
- package/cjs/button/style/index.less +1 -1
- package/cjs/cell/style/css/index.css +7 -0
- package/cjs/cell/style/index.less +4 -1
- package/cjs/checkbox/style/css/index.css +13 -0
- package/cjs/checkbox/style/index.less +3 -3
- package/cjs/collapse/collapse.js +12 -6
- package/cjs/dialog/index.d.ts +2 -2
- package/cjs/form/style/css/index.css +16 -0
- package/cjs/form/style/index.less +4 -4
- package/cjs/image-preview/index.d.ts +2 -2
- package/cjs/image-preview/index.js +4 -2
- package/cjs/image-preview/style/css/index.css +3 -0
- package/cjs/image-preview/style/index.less +4 -0
- package/cjs/index.d.ts +12 -12
- package/cjs/index.js +46 -46
- package/cjs/load-more/index.d.ts +5 -0
- package/cjs/load-more/index.js +2 -1
- package/cjs/masking/index.d.ts +2 -2
- package/cjs/masking/index.js +4 -2
- package/cjs/notify/index.d.ts +8 -8
- package/cjs/popover/popover.js +10 -2
- package/cjs/popup/index.d.ts +2 -2
- package/cjs/popup-swiper/index.d.ts +2 -2
- package/cjs/radio/style/css/index.css +8 -0
- package/cjs/radio/style/index.less +2 -2
- package/cjs/rate/index.js +5 -3
- package/cjs/rate/style/css/index.css +4 -0
- package/cjs/rate/style/index.less +4 -0
- package/cjs/slider/hooks/index.d.ts +1 -1
- package/cjs/slider/popover.js +6 -2
- package/cjs/stepper/hooks/useButtonClick.js +8 -9
- package/cjs/sticky/index.d.ts +5 -0
- package/cjs/sticky/index.js +20 -7
- package/cjs/style.d.ts +13 -13
- package/cjs/style.js +24 -24
- package/cjs/switch/index.js +7 -2
- package/cjs/switch/style/css/index.css +44 -0
- package/cjs/switch/style/index.less +19 -7
- package/cjs/tabs/demo/style/css/mobile.css +11 -0
- package/cjs/tabs/demo/style/mobile.less +5 -1
- package/cjs/tabs/index.js +14 -5
- package/cjs/tabs/style/css/index.css +32 -7
- package/cjs/tabs/style/index.less +9 -14
- package/cjs/tabs/tab-cell-underline.js +14 -5
- package/cjs/tabs/tab-cell.js +15 -7
- package/cjs/tabs/tab-pane.js +4 -3
- package/cjs/tabs/type.d.ts +1 -0
- package/cjs/toast/index.d.ts +12 -12
- package/cjs/toast/index.js +5 -2
- package/dist/index.js +13914 -13836
- package/dist/index.min.js +4 -4
- package/dist/style.css +3366 -3236
- package/dist/style.min.css +1 -1
- package/esm/_helpers/hooks.d.ts +1 -0
- package/esm/_helpers/hooks.js +43 -29
- package/esm/action-sheet/index.d.ts +2 -2
- package/esm/badge/index.js +2 -1
- package/esm/badge/style/css/index.css +12 -0
- package/esm/badge/style/index.less +3 -3
- package/esm/button/style/css/index.css +4 -0
- package/esm/button/style/index.less +1 -1
- package/esm/cell/style/css/index.css +7 -0
- package/esm/cell/style/index.less +4 -1
- package/esm/checkbox/style/css/index.css +13 -0
- package/esm/checkbox/style/index.less +3 -3
- package/esm/collapse/collapse.js +14 -8
- package/esm/dialog/index.d.ts +2 -2
- package/esm/form/style/css/index.css +16 -0
- package/esm/form/style/index.less +4 -4
- package/esm/image-preview/index.d.ts +2 -2
- package/esm/image-preview/index.js +4 -2
- package/esm/image-preview/style/css/index.css +3 -0
- package/esm/image-preview/style/index.less +4 -0
- package/esm/index.d.ts +12 -12
- package/esm/index.js +12 -12
- package/esm/load-more/index.d.ts +5 -0
- package/esm/load-more/index.js +2 -1
- package/esm/masking/index.d.ts +2 -2
- package/esm/masking/index.js +4 -2
- package/esm/notify/index.d.ts +8 -8
- package/esm/popover/popover.js +10 -2
- package/esm/popup/index.d.ts +2 -2
- package/esm/popup-swiper/index.d.ts +2 -2
- package/esm/radio/style/css/index.css +8 -0
- package/esm/radio/style/index.less +2 -2
- package/esm/rate/index.js +5 -3
- package/esm/rate/style/css/index.css +4 -0
- package/esm/rate/style/index.less +4 -0
- package/esm/slider/hooks/index.d.ts +1 -1
- package/esm/slider/popover.js +7 -3
- package/esm/stepper/hooks/useButtonClick.js +8 -9
- package/esm/sticky/index.d.ts +5 -0
- package/esm/sticky/index.js +20 -7
- package/esm/style.d.ts +13 -13
- package/esm/style.js +13 -13
- package/esm/switch/index.js +9 -4
- package/esm/switch/style/css/index.css +44 -0
- package/esm/switch/style/index.less +19 -7
- package/esm/tabs/demo/style/css/mobile.css +11 -0
- package/esm/tabs/demo/style/mobile.less +5 -1
- package/esm/tabs/index.js +16 -7
- package/esm/tabs/style/css/index.css +32 -7
- package/esm/tabs/style/index.less +9 -14
- package/esm/tabs/tab-cell-underline.js +14 -6
- package/esm/tabs/tab-cell.js +15 -8
- package/esm/tabs/tab-pane.js +4 -3
- package/esm/tabs/type.d.ts +1 -0
- package/esm/toast/index.d.ts +12 -12
- package/esm/toast/index.js +5 -2
- package/package.json +3 -3
- package/umd/_helpers/hooks.d.ts +1 -0
- package/umd/_helpers/hooks.js +44 -28
- package/umd/action-sheet/index.d.ts +2 -2
- package/umd/badge/index.js +2 -1
- package/umd/badge/style/css/index.css +12 -0
- package/umd/badge/style/index.less +3 -3
- package/umd/button/style/css/index.css +4 -0
- package/umd/button/style/index.less +1 -1
- package/umd/cell/style/css/index.css +7 -0
- package/umd/cell/style/index.less +4 -1
- package/umd/checkbox/style/css/index.css +13 -0
- package/umd/checkbox/style/index.less +3 -3
- package/umd/collapse/collapse.js +12 -6
- package/umd/dialog/index.d.ts +2 -2
- package/umd/form/style/css/index.css +16 -0
- package/umd/form/style/index.less +4 -4
- package/umd/image-preview/index.d.ts +2 -2
- package/umd/image-preview/index.js +4 -2
- package/umd/image-preview/style/css/index.css +3 -0
- package/umd/image-preview/style/index.less +4 -0
- package/umd/index.d.ts +12 -12
- package/umd/index.js +28 -28
- package/umd/load-more/index.d.ts +5 -0
- package/umd/load-more/index.js +2 -1
- package/umd/masking/index.d.ts +2 -2
- package/umd/masking/index.js +4 -2
- package/umd/notify/index.d.ts +8 -8
- package/umd/popover/popover.js +10 -2
- package/umd/popup/index.d.ts +2 -2
- package/umd/popup-swiper/index.d.ts +2 -2
- package/umd/radio/style/css/index.css +8 -0
- package/umd/radio/style/index.less +2 -2
- package/umd/rate/index.js +5 -3
- package/umd/rate/style/css/index.css +4 -0
- package/umd/rate/style/index.less +4 -0
- package/umd/slider/hooks/index.d.ts +1 -1
- package/umd/slider/popover.js +6 -2
- package/umd/stepper/hooks/useButtonClick.js +8 -9
- package/umd/sticky/index.d.ts +5 -0
- package/umd/sticky/index.js +20 -7
- package/umd/style.d.ts +13 -13
- package/umd/style.js +2 -2
- package/umd/switch/index.js +7 -2
- package/umd/switch/style/css/index.css +44 -0
- package/umd/switch/style/index.less +19 -7
- package/umd/tabs/demo/style/css/mobile.css +11 -0
- package/umd/tabs/demo/style/mobile.less +5 -1
- package/umd/tabs/index.js +14 -5
- package/umd/tabs/style/css/index.css +32 -7
- package/umd/tabs/style/index.less +9 -14
- package/umd/tabs/tab-cell-underline.js +16 -9
- package/umd/tabs/tab-cell.js +17 -11
- package/umd/tabs/tab-pane.js +4 -3
- package/umd/tabs/type.d.ts +1 -0
- package/umd/toast/index.d.ts +12 -12
- package/umd/toast/index.js +5 -2
package/esm/toast/index.d.ts
CHANGED
@@ -185,8 +185,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
185
185
|
* @param {string | ToastProps} config Configuration
|
186
186
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
187
187
|
*/
|
188
|
-
toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
189
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
188
|
+
toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
189
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
190
190
|
close: () => void;
|
191
191
|
hide: () => void;
|
192
192
|
};
|
@@ -196,8 +196,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
196
196
|
* @param {string | ToastProps} config Configuration
|
197
197
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
198
198
|
*/
|
199
|
-
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
200
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
199
|
+
info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
200
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
201
201
|
close: () => void;
|
202
202
|
hide: () => void;
|
203
203
|
};
|
@@ -207,8 +207,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
207
207
|
* @param {string | ToastProps} config Configuration
|
208
208
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
209
209
|
*/
|
210
|
-
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
211
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
210
|
+
success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
211
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
212
212
|
close: () => void;
|
213
213
|
hide: () => void;
|
214
214
|
};
|
@@ -218,8 +218,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
218
218
|
* @param {string | ToastProps} config Configuration
|
219
219
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
220
220
|
*/
|
221
|
-
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
222
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
221
|
+
error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
222
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
223
223
|
close: () => void;
|
224
224
|
hide: () => void;
|
225
225
|
};
|
@@ -229,8 +229,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
229
229
|
* @param {string | ToastProps} config Configuration
|
230
230
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
231
231
|
*/
|
232
|
-
loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
233
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
232
|
+
loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
233
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
234
234
|
close: () => void;
|
235
235
|
hide: () => void;
|
236
236
|
};
|
@@ -240,8 +240,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
|
|
240
240
|
* @param {string | ToastProps} config Configuration
|
241
241
|
* @returns {{ update: (config: ToastProps) => void; close: () => void }}
|
242
242
|
*/
|
243
|
-
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
244
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "
|
243
|
+
warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
244
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
|
245
245
|
close: () => void;
|
246
246
|
hide: () => void;
|
247
247
|
};
|
package/esm/toast/index.js
CHANGED
@@ -39,6 +39,7 @@ var Toast = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
39
39
|
initialBodyOverflow = props.initialBodyOverflow;
|
40
40
|
var closeTimerRef = useRef();
|
41
41
|
var domRef = useRef(null);
|
42
|
+
var wrapDomRef = useRef(null);
|
42
43
|
var isInitialMount = useRef(false);
|
43
44
|
var hasType = type && type !== 'info';
|
44
45
|
useImperativeHandle(ref, function () {
|
@@ -107,7 +108,8 @@ var Toast = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
107
108
|
className: cls(prefixClass + "-wrapper", "from-" + direction, {
|
108
109
|
'no-event': !disableBodyTouch
|
109
110
|
}),
|
110
|
-
onClick: handleClickMask
|
111
|
+
onClick: handleClickMask,
|
112
|
+
ref: wrapDomRef
|
111
113
|
}, /*#__PURE__*/React.createElement("div", {
|
112
114
|
className: cls(prefixClass + "-inner", layout, (_cls = {}, _cls[prefixClass + "-inner-mixin"] = (loading || hasType || icon) && layout === 'vertical', _cls))
|
113
115
|
}, loading && /*#__PURE__*/React.createElement("div", {
|
@@ -134,7 +136,8 @@ var Toast = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
134
136
|
}, /*#__PURE__*/React.createElement(Transition, {
|
135
137
|
in: visible,
|
136
138
|
timeout: transitionDuration,
|
137
|
-
type: "fade"
|
139
|
+
type: "fade",
|
140
|
+
nodeRef: wrapDomRef
|
138
141
|
}, renderComponent(prefixCls + "-toast"))));
|
139
142
|
});
|
140
143
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arco-design/mobile-react",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.28.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "esm/index.js",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"author": "taoyiyue@bytedance.com",
|
16
16
|
"license": "ISC",
|
17
17
|
"dependencies": {
|
18
|
-
"@arco-design/mobile-utils": "2.
|
18
|
+
"@arco-design/mobile-utils": "2.16.0",
|
19
19
|
"@arco-design/transformable": "^1.0.0",
|
20
20
|
"lodash.throttle": "^4.1.1",
|
21
21
|
"resize-observer-polyfill": "^1.5.1"
|
@@ -35,5 +35,5 @@
|
|
35
35
|
"publishConfig": {
|
36
36
|
"access": "public"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "6809000ae9f4310979628d4bd43a728d34266899"
|
39
39
|
}
|
package/umd/_helpers/hooks.d.ts
CHANGED
@@ -15,6 +15,7 @@ export declare function useListenResize(resizeHandler: () => void, deps?: any[],
|
|
15
15
|
* @param initialState {en} Initial State
|
16
16
|
*/
|
17
17
|
export declare function useMountedState<S>(initialState: S | (() => S)): [S, React.Dispatch<React.SetStateAction<S>>];
|
18
|
+
export declare function useSameRefState<T>(initialValue: T): [T, React.MutableRefObject<T>, (data: T) => void];
|
18
19
|
export declare function useRefState<T>(initialValue: T | (() => T)): [T, React.MutableRefObject<T>, React.Dispatch<React.SetStateAction<T>>];
|
19
20
|
export declare function useRefMountedState<T>(initialValue: T | (() => T)): [T, React.MutableRefObject<T>, React.Dispatch<React.SetStateAction<T>>];
|
20
21
|
export declare function useUpdateEffect(effect: () => void | (() => void), dependencies?: any[]): void;
|
package/umd/_helpers/hooks.js
CHANGED
@@ -25,6 +25,7 @@
|
|
25
25
|
_exports.useProgress = void 0;
|
26
26
|
_exports.useRefMountedState = useRefMountedState;
|
27
27
|
_exports.useRefState = useRefState;
|
28
|
+
_exports.useSameRefState = useSameRefState;
|
28
29
|
_exports.useSingleAndDoubleClick = useSingleAndDoubleClick;
|
29
30
|
_exports.useSwiperInnerScroll = useSwiperInnerScroll;
|
30
31
|
_exports.useSystem = useSystem;
|
@@ -90,11 +91,26 @@
|
|
90
91
|
return result;
|
91
92
|
}
|
92
93
|
|
93
|
-
function
|
94
|
+
function useSameRefState(initialValue) {
|
94
95
|
var _useState2 = (0, _react.useState)(initialValue),
|
95
96
|
state = _useState2[0],
|
96
97
|
setState = _useState2[1];
|
97
98
|
|
99
|
+
var stateRef = (0, _react.useRef)(state);
|
100
|
+
|
101
|
+
var setStateProxy = function setStateProxy(data) {
|
102
|
+
stateRef.current = data;
|
103
|
+
setState(data);
|
104
|
+
};
|
105
|
+
|
106
|
+
return [state, stateRef, setStateProxy];
|
107
|
+
}
|
108
|
+
|
109
|
+
function useRefState(initialValue) {
|
110
|
+
var _useState3 = (0, _react.useState)(initialValue),
|
111
|
+
state = _useState3[0],
|
112
|
+
setState = _useState3[1];
|
113
|
+
|
98
114
|
var stateRef = (0, _react.useRef)(state);
|
99
115
|
(0, _react.useEffect)(function () {
|
100
116
|
stateRef.current = state;
|
@@ -130,8 +146,8 @@
|
|
130
146
|
}
|
131
147
|
|
132
148
|
function useForceUpdate() {
|
133
|
-
var
|
134
|
-
setTick =
|
149
|
+
var _useState4 = (0, _react.useState)(0),
|
150
|
+
setTick = _useState4[1];
|
135
151
|
|
136
152
|
var update = (0, _react.useCallback)(function () {
|
137
153
|
setTick(function (tick) {
|
@@ -153,11 +169,11 @@
|
|
153
169
|
var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
|
154
170
|
currentSystem = _useContext.system;
|
155
171
|
|
156
|
-
var
|
172
|
+
var _useState5 = (0, _react.useState)(function () {
|
157
173
|
return currentSystem || (0, _mobileUtils.getSystem)();
|
158
174
|
}),
|
159
|
-
system =
|
160
|
-
setSystem =
|
175
|
+
system = _useState5[0],
|
176
|
+
setSystem = _useState5[1];
|
161
177
|
|
162
178
|
(0, _react.useEffect)(function () {
|
163
179
|
setSystem(currentSystem || (0, _mobileUtils.getSystem)());
|
@@ -166,13 +182,13 @@
|
|
166
182
|
}
|
167
183
|
|
168
184
|
function useWindowSize(listenResize) {
|
169
|
-
var _useState5 = (0, _react.useState)(0),
|
170
|
-
windowWidth = _useState5[0],
|
171
|
-
setWindowWidth = _useState5[1];
|
172
|
-
|
173
185
|
var _useState6 = (0, _react.useState)(0),
|
174
|
-
|
175
|
-
|
186
|
+
windowWidth = _useState6[0],
|
187
|
+
setWindowWidth = _useState6[1];
|
188
|
+
|
189
|
+
var _useState7 = (0, _react.useState)(0),
|
190
|
+
windowHeight = _useState7[0],
|
191
|
+
setWindowHeight = _useState7[1];
|
176
192
|
|
177
193
|
function setSize() {
|
178
194
|
setWindowWidth(window.innerWidth);
|
@@ -216,7 +232,7 @@
|
|
216
232
|
if (ele) {
|
217
233
|
var actualEle = Array.isArray(ele) ? ele : [ele];
|
218
234
|
scrollRef.current = actualEle.reduce(function (acc, nowEle) {
|
219
|
-
return [].concat(acc, nowEle &&
|
235
|
+
return [].concat(acc, nowEle && (0, _mobileUtils.safeGetComputedStyle)(nowEle).overflow !== 'hidden' ? [{
|
220
236
|
ele: nowEle,
|
221
237
|
maxScrollX: orientationDirection === 'left' || orientationDirection === 'right' ? nowEle.scrollHeight - nowEle.clientHeight : nowEle.scrollWidth - nowEle.clientWidth,
|
222
238
|
maxScrollY: orientationDirection === 'left' || orientationDirection === 'right' ? nowEle.scrollWidth - nowEle.clientWidth : nowEle.scrollHeight - nowEle.clientHeight
|
@@ -479,17 +495,17 @@
|
|
479
495
|
}
|
480
496
|
|
481
497
|
var useProgress = function useProgress(mountedTransition, percentage, duration, mountedBezier, step) {
|
482
|
-
var
|
483
|
-
currentPercentage =
|
484
|
-
setCurrentPercentage =
|
498
|
+
var _useState8 = (0, _react.useState)(0),
|
499
|
+
currentPercentage = _useState8[0],
|
500
|
+
setCurrentPercentage = _useState8[1];
|
485
501
|
|
486
|
-
var
|
487
|
-
transitionControl =
|
488
|
-
setTransitionControl =
|
502
|
+
var _useState9 = (0, _react.useState)(false),
|
503
|
+
transitionControl = _useState9[0],
|
504
|
+
setTransitionControl = _useState9[1];
|
489
505
|
|
490
|
-
var
|
491
|
-
count =
|
492
|
-
setCount =
|
506
|
+
var _useState10 = (0, _react.useState)(0),
|
507
|
+
count = _useState10[0],
|
508
|
+
setCount = _useState10[1];
|
493
509
|
|
494
510
|
var latestPercentage = (0, _react.useRef)(percentage);
|
495
511
|
(0, _react.useEffect)(function () {
|
@@ -521,9 +537,9 @@
|
|
521
537
|
delay = 200;
|
522
538
|
}
|
523
539
|
|
524
|
-
var
|
525
|
-
clickTimes =
|
526
|
-
setClickTimes =
|
540
|
+
var _useState11 = (0, _react.useState)(0),
|
541
|
+
clickTimes = _useState11[0],
|
542
|
+
setClickTimes = _useState11[1];
|
527
543
|
|
528
544
|
var eventRef = (0, _react.useRef)();
|
529
545
|
(0, _react.useEffect)(function () {
|
@@ -547,9 +563,9 @@
|
|
547
563
|
var arcoSvgKeyCount = 0;
|
548
564
|
|
549
565
|
function useGenSvgKey(userSetSvgKey) {
|
550
|
-
var
|
551
|
-
innerSvgKey =
|
552
|
-
setInnerSvgKey =
|
566
|
+
var _useState12 = (0, _react.useState)(''),
|
567
|
+
innerSvgKey = _useState12[0],
|
568
|
+
setInnerSvgKey = _useState12[1];
|
553
569
|
|
554
570
|
var svgKey = userSetSvgKey || innerSvgKey;
|
555
571
|
(0, _react.useEffect)(function () {
|
@@ -86,11 +86,11 @@ declare const _default: React.ForwardRefExoticComponent<ActionSheetProps & React
|
|
86
86
|
* @param {ActionSheetProps} config setting
|
87
87
|
* @returns {{ close: () => void; update: (newConfig: ActionSheetProps) => void; }}
|
88
88
|
*/
|
89
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
89
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
|
90
90
|
key?: string | undefined;
|
91
91
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
92
92
|
close: () => void;
|
93
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
93
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ActionSheetProps & React.RefAttributes<ActionSheetRef>>, "title" | "ref" | "key" | "context" | "translateZ" | "className" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "items" | "cancelText" | "subTitle"> & {
|
94
94
|
key?: string | undefined;
|
95
95
|
}) => void;
|
96
96
|
};
|
package/umd/badge/index.js
CHANGED
@@ -72,7 +72,8 @@
|
|
72
72
|
return /*#__PURE__*/_react.default.createElement(_transition.default, {
|
73
73
|
in: visible,
|
74
74
|
timeout: timeout,
|
75
|
-
type: "scale"
|
75
|
+
type: "scale",
|
76
|
+
nodeRef: domRef
|
76
77
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
77
78
|
className: (0, _mobileUtils.cls)(prefixCls + "-badge", className, (_cls = {}, _cls[prefixCls + "-badge-dot dot"] = dot, _cls[prefixCls + "-badge-bordered bordered"] = bordered, _cls[prefixCls + "-badge-absolute absolute"] = absolute, _cls)),
|
78
79
|
style: style,
|
@@ -89,7 +89,19 @@
|
|
89
89
|
margin-left: -8PX ;
|
90
90
|
margin-top: -8PX ;
|
91
91
|
}
|
92
|
+
[dir="rtl"] .arco-badge-absolute {
|
93
|
+
left: initial;
|
94
|
+
right: 100%;
|
95
|
+
}
|
96
|
+
[dir="rtl"] .arco-badge-absolute {
|
97
|
+
margin-left: initial;
|
98
|
+
margin-right: -8PX ;
|
99
|
+
}
|
92
100
|
.arco-badge-absolute.arco-badge-dot {
|
93
101
|
margin-left: -4PX ;
|
94
102
|
margin-top: -4PX ;
|
95
103
|
}
|
104
|
+
[dir="rtl"] .arco-badge-absolute.arco-badge-dot {
|
105
|
+
margin-left: initial;
|
106
|
+
margin-right: -4PX ;
|
107
|
+
}
|
@@ -60,13 +60,13 @@
|
|
60
60
|
&-absolute {
|
61
61
|
position: absolute;
|
62
62
|
top: 0;
|
63
|
-
left
|
64
|
-
.use-var(margin-left, badge-text-deviation);
|
63
|
+
.set-prop-with-rtl(left, 100%);
|
64
|
+
.use-var-with-rtl(margin-left, badge-text-deviation);
|
65
65
|
.use-var(margin-top, badge-text-deviation);
|
66
66
|
}
|
67
67
|
|
68
68
|
&-absolute&-dot {
|
69
|
-
.use-var(margin-left, badge-dot-deviation);
|
69
|
+
.use-var-with-rtl(margin-left, badge-dot-deviation);
|
70
70
|
.use-var(margin-top, badge-dot-deviation);
|
71
71
|
}
|
72
72
|
}
|
@@ -210,6 +210,10 @@
|
|
210
210
|
.arco-button-text-has-icon {
|
211
211
|
margin-left: 0.08rem ;
|
212
212
|
}
|
213
|
+
[dir="rtl"] .arco-button-text-has-icon {
|
214
|
+
margin-left: initial;
|
215
|
+
margin-right: 0.08rem ;
|
216
|
+
}
|
213
217
|
.arco-button-loading-icon {
|
214
218
|
display: inline-block;
|
215
219
|
vertical-align: middle;
|
@@ -164,6 +164,9 @@
|
|
164
164
|
-webkit-box-orient: vertical;
|
165
165
|
white-space: normal;
|
166
166
|
}
|
167
|
+
[dir="rtl"] .arco-cell .cell-content .cell-text {
|
168
|
+
text-align: left;
|
169
|
+
}
|
167
170
|
.arco-cell .cell-label-icon {
|
168
171
|
margin-right: 0.24rem ;
|
169
172
|
font-size: 0;
|
@@ -181,6 +184,10 @@
|
|
181
184
|
margin-left: 0.16rem ;
|
182
185
|
font-size: 0;
|
183
186
|
}
|
187
|
+
[dir="rtl"] .arco-cell .cell-arrow-icon {
|
188
|
+
-webkit-transform: scale(-1);
|
189
|
+
transform: scale(-1);
|
190
|
+
}
|
184
191
|
[dir="rtl"] .arco-cell .cell-arrow-icon {
|
185
192
|
margin-left: initial;
|
186
193
|
margin-right: 0.16rem ;
|
@@ -54,7 +54,7 @@
|
|
54
54
|
|
55
55
|
.cell-text {
|
56
56
|
width: 100%;
|
57
|
-
text-align
|
57
|
+
.set-value-with-rtl(text-align, right);
|
58
58
|
.use-var(font-size, cell-content-font-size);
|
59
59
|
.text-overflow(2);
|
60
60
|
}
|
@@ -71,6 +71,9 @@
|
|
71
71
|
}
|
72
72
|
|
73
73
|
.cell-arrow-icon {
|
74
|
+
[dir="rtl"] & {
|
75
|
+
transform: scale(-1);
|
76
|
+
}
|
74
77
|
.use-var-with-rtl(margin-left, cell-arrow-gutter);
|
75
78
|
font-size: 0;
|
76
79
|
.@{prefix}-icon {
|
@@ -32,6 +32,10 @@
|
|
32
32
|
.arco-checkbox .checkbox-icon + .checkbox-text {
|
33
33
|
margin-left: 0.16rem ;
|
34
34
|
}
|
35
|
+
[dir="rtl"] .arco-checkbox .checkbox-icon + .checkbox-text {
|
36
|
+
margin-left: initial;
|
37
|
+
margin-right: 0.16rem ;
|
38
|
+
}
|
35
39
|
.arco-checkbox.disabled .checkbox-text {
|
36
40
|
opacity: 0.5 ;
|
37
41
|
}
|
@@ -47,7 +51,16 @@
|
|
47
51
|
.arco-checkbox-group .arco-checkbox:not(:last-child) {
|
48
52
|
margin-right: 0.48rem ;
|
49
53
|
}
|
54
|
+
[dir="rtl"] .arco-checkbox-group .arco-checkbox:not(:last-child) {
|
55
|
+
margin-right: initial;
|
56
|
+
margin-left: 0.48rem ;
|
57
|
+
}
|
50
58
|
.arco-checkbox-group .arco-checkbox:not(:last-child).block,
|
51
59
|
.arco-checkbox-group .arco-checkbox:not(:last-child).justify {
|
52
60
|
margin-right: 0;
|
53
61
|
}
|
62
|
+
[dir="rtl"] .arco-checkbox-group .arco-checkbox:not(:last-child).block,
|
63
|
+
[dir="rtl"] .arco-checkbox-group .arco-checkbox:not(:last-child).justify {
|
64
|
+
margin-right: initial;
|
65
|
+
margin-left: 0;
|
66
|
+
}
|
@@ -29,7 +29,7 @@
|
|
29
29
|
}
|
30
30
|
|
31
31
|
.checkbox-icon + .checkbox-text {
|
32
|
-
.use-var(margin-left, checkbox-icon-margin-right);
|
32
|
+
.use-var-with-rtl(margin-left, checkbox-icon-margin-right);
|
33
33
|
}
|
34
34
|
|
35
35
|
&.disabled .checkbox-text {
|
@@ -48,11 +48,11 @@
|
|
48
48
|
|
49
49
|
.@{prefix}-checkbox-group {
|
50
50
|
.@{prefix}-checkbox:not(:last-child) {
|
51
|
-
.use-var(margin-right, checkbox-group-gutter);
|
51
|
+
.use-var-with-rtl(margin-right, checkbox-group-gutter);
|
52
52
|
|
53
53
|
&.block,
|
54
54
|
&.justify {
|
55
|
-
margin-right
|
55
|
+
.set-prop-with-rtl(margin-right, 0);
|
56
56
|
}
|
57
57
|
}
|
58
58
|
}
|
package/umd/collapse/collapse.js
CHANGED
@@ -66,7 +66,13 @@
|
|
66
66
|
|
67
67
|
var CollapseContext = _utils.allContexts[groupKey] || {};
|
68
68
|
var groupContext = (0, _react.useContext)(CollapseContext) || {};
|
69
|
-
|
69
|
+
|
70
|
+
var _useSameRefState = (0, _helpers.useSameRefState)(false),
|
71
|
+
opened = _useSameRefState[0],
|
72
|
+
openedRef = _useSameRefState[1],
|
73
|
+
setOpened = _useSameRefState[2];
|
74
|
+
|
75
|
+
(0, _react.useEffect)(function () {
|
70
76
|
var show = false; // 优先级: group > children
|
71
77
|
// @en Priority: group > children
|
72
78
|
|
@@ -80,7 +86,7 @@
|
|
80
86
|
show = itemActive;
|
81
87
|
}
|
82
88
|
|
83
|
-
|
89
|
+
setOpened(show);
|
84
90
|
}, [value, active, itemActive, groupContext.isGroup, groupContext.value]);
|
85
91
|
|
86
92
|
var getContentHeight = function getContentHeight() {
|
@@ -98,8 +104,8 @@
|
|
98
104
|
contentWrapRef.current.style.height = newHeight;
|
99
105
|
var transTimeout = (0, _mobileUtils.convertCssDuration)(contentWrapRef.current, 'transitionDuration');
|
100
106
|
setTimeout(function () {
|
101
|
-
return contentWrapRef.current && (contentWrapRef.current.style.height =
|
102
|
-
},
|
107
|
+
return contentWrapRef.current && (contentWrapRef.current.style.height = openedRef.current ? 'auto' : '0px');
|
108
|
+
}, openedRef.current ? transTimeout : 20);
|
103
109
|
};
|
104
110
|
|
105
111
|
var toggleOpened = function toggleOpened() {
|
@@ -122,10 +128,10 @@
|
|
122
128
|
}
|
123
129
|
|
124
130
|
var height = getContentHeight();
|
125
|
-
contentWrapRef.current.style.height =
|
131
|
+
contentWrapRef.current.style.height = openedRef.current ? contentHeightRef.current + "px" : '0px';
|
126
132
|
(0, _mobileUtils.nextTick)(function () {
|
127
133
|
contentHeightRef.current = height;
|
128
|
-
resetHeight(
|
134
|
+
resetHeight(openedRef.current ? height + "px" : '0px');
|
129
135
|
});
|
130
136
|
};
|
131
137
|
|
package/umd/dialog/index.d.ts
CHANGED
@@ -193,11 +193,11 @@ declare const _default: React.ForwardRefExoticComponent<DialogProps & React.RefA
|
|
193
193
|
* @param {DialogProps} config Configuration
|
194
194
|
* @returns {{ close: () => void; update: (newConfig: DialogProps) => void; }}
|
195
195
|
*/
|
196
|
-
open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
196
|
+
open: (config: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
|
197
197
|
key?: string | undefined;
|
198
198
|
}, context?: import("../context-provider").GlobalContextParams | undefined) => {
|
199
199
|
close: () => void;
|
200
|
-
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "
|
200
|
+
update: (newConfig: Pick<import("../context-provider").WithGlobalContext<DialogProps & React.RefAttributes<DialogRef>>, "platform" | "footer" | "title" | "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "footerType" | "renderFooter" | "footerCollapseCount" | "titleAlign" | "contentAlign" | "extra"> & {
|
201
201
|
key?: string | undefined;
|
202
202
|
}) => void;
|
203
203
|
};
|
@@ -27,6 +27,10 @@
|
|
27
27
|
padding-right: 0.32rem ;
|
28
28
|
width: 1.92rem ;
|
29
29
|
}
|
30
|
+
[dir="rtl"] .arco-form-label-item {
|
31
|
+
padding-right: initial;
|
32
|
+
padding-left: 0.32rem ;
|
33
|
+
}
|
30
34
|
.arco-form-label-item-required-asterisk {
|
31
35
|
position: absolute;
|
32
36
|
left: -0.6em;
|
@@ -35,6 +39,10 @@
|
|
35
39
|
line-height: 1.08rem ;
|
36
40
|
color: #f53f3f ;
|
37
41
|
}
|
42
|
+
[dir="rtl"] .arco-form-label-item-required-asterisk {
|
43
|
+
left: initial;
|
44
|
+
right: -0.6em;
|
45
|
+
}
|
38
46
|
.disabled .arco-form-label-item {
|
39
47
|
color: #c9cdd4 ;
|
40
48
|
}
|
@@ -68,6 +76,10 @@
|
|
68
76
|
.arco-form-item-message svg {
|
69
77
|
margin-right: 0.08rem;
|
70
78
|
}
|
79
|
+
[dir="rtl"] .arco-form-item-message svg {
|
80
|
+
margin-right: initial;
|
81
|
+
margin-left: 0.08rem;
|
82
|
+
}
|
71
83
|
.arco-form-item-error-message {
|
72
84
|
color: #f53f3f ;
|
73
85
|
}
|
@@ -80,6 +92,10 @@
|
|
80
92
|
.arco-form-item.arco-form-item-vertical .arco-input-wrap {
|
81
93
|
padding-left: 0;
|
82
94
|
}
|
95
|
+
[dir="rtl"] .arco-form-item.arco-form-item-vertical .arco-input-wrap {
|
96
|
+
padding-left: initial;
|
97
|
+
padding-right: 0;
|
98
|
+
}
|
83
99
|
.arco-form-item.arco-form-item-vertical .arco-form-label-item {
|
84
100
|
width: auto;
|
85
101
|
margin-top: 16px;
|
@@ -20,12 +20,12 @@
|
|
20
20
|
.use-var(font-size, form-item-label-item-font-size);
|
21
21
|
.use-var(line-height, form-item-label-item-line-height);
|
22
22
|
.use-var(color, form-item-label-item-color);
|
23
|
-
.use-var(padding-right, form-item-label-item-gutter);
|
23
|
+
.use-var-with-rtl(padding-right, form-item-label-item-gutter);
|
24
24
|
.use-var(width, form-item-label-item-width);
|
25
25
|
|
26
26
|
&-required-asterisk {
|
27
27
|
position: absolute;
|
28
|
-
left
|
28
|
+
.set-prop-with-rtl(left, -0.6em);
|
29
29
|
top: 0;
|
30
30
|
|
31
31
|
.use-var(font-size, form-item-label-item-font-size);
|
@@ -60,7 +60,7 @@
|
|
60
60
|
}
|
61
61
|
|
62
62
|
svg {
|
63
|
-
.rem(margin-right, 4);
|
63
|
+
.rem-with-rtl(margin-right, 4);
|
64
64
|
}
|
65
65
|
margin-bottom: 16px;
|
66
66
|
}
|
@@ -75,7 +75,7 @@
|
|
75
75
|
&-item.@{prefix}-form-item-vertical {
|
76
76
|
display: block;
|
77
77
|
.arco-input-wrap {
|
78
|
-
padding-left
|
78
|
+
.set-prop-with-rtl(padding-left, 0);
|
79
79
|
}
|
80
80
|
.@{prefix}-form-label-item {
|
81
81
|
width: auto;
|