@arco-design/mobile-react 2.38.2 → 2.38.4
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 +24 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/action-sheet/index.d.ts +10 -10
- package/cjs/action-sheet/index.js +6 -2
- package/cjs/action-sheet/methods.d.ts +2 -2
- package/cjs/cell/cell.d.ts +1 -1
- package/cjs/cell/cell.js +36 -7
- package/cjs/cell/style/css/index.css +46 -16
- package/cjs/cell/style/index.less +52 -11
- package/cjs/cell/type.d.ts +8 -1
- package/cjs/date-picker/index.d.ts +1 -1
- package/cjs/date-picker/index.js +3 -0
- package/cjs/dialog/index.d.ts +0 -1
- package/cjs/form/form-item.d.ts +5 -4
- package/cjs/form/form-item.js +1 -1
- package/cjs/form/type.d.ts +2 -3
- package/cjs/form/useForm.d.ts +1 -1
- package/cjs/pull-refresh/android-pull-refresh.d.ts +1 -1
- package/cjs/pull-refresh/hooks.d.ts +2 -2
- package/cjs/pull-refresh/ios-pull-refresh.d.ts +1 -1
- package/cjs/pull-refresh/ios-pull-refresh.js +3 -1
- package/cjs/pull-refresh/model.d.ts +0 -1
- package/cjs/stepper/hooks/useValue.d.ts +1 -1
- package/cjs/stepper/type.d.ts +1 -1
- package/cjs/swipe-action/type.d.ts +1 -1
- package/cjs/uploader/upload/upload.d.ts +4 -4
- package/dist/index.js +1337 -1301
- package/dist/index.min.js +4 -4
- package/dist/style.css +33 -8
- package/dist/style.min.css +1 -1
- package/esm/action-sheet/index.d.ts +10 -10
- package/esm/action-sheet/index.js +6 -2
- package/esm/action-sheet/methods.d.ts +2 -2
- package/esm/cell/cell.d.ts +1 -1
- package/esm/cell/cell.js +37 -8
- package/esm/cell/style/css/index.css +46 -16
- package/esm/cell/style/index.less +52 -11
- package/esm/cell/type.d.ts +8 -1
- package/esm/date-picker/index.d.ts +1 -1
- package/esm/date-picker/index.js +3 -0
- package/esm/dialog/index.d.ts +0 -1
- package/esm/form/form-item.d.ts +5 -4
- package/esm/form/form-item.js +5 -5
- package/esm/form/type.d.ts +2 -3
- package/esm/form/useForm.d.ts +1 -1
- package/esm/form/useForm.js +3 -3
- package/esm/pull-refresh/android-pull-refresh.d.ts +1 -1
- package/esm/pull-refresh/android-pull-refresh.js +2 -2
- package/esm/pull-refresh/hooks.d.ts +2 -2
- package/esm/pull-refresh/hooks.js +2 -2
- package/esm/pull-refresh/ios-pull-refresh.d.ts +1 -1
- package/esm/pull-refresh/ios-pull-refresh.js +2 -1
- package/esm/pull-refresh/model.d.ts +0 -1
- package/esm/stepper/hooks/useValue.d.ts +1 -1
- package/esm/stepper/hooks/useValue.js +2 -2
- package/esm/stepper/type.d.ts +1 -1
- package/esm/swipe-action/type.d.ts +1 -1
- package/esm/uploader/upload/upload.d.ts +4 -4
- package/esm/uploader/upload/upload.js +3 -3
- package/esnext/action-sheet/index.d.ts +10 -10
- package/esnext/action-sheet/index.js +7 -3
- package/esnext/action-sheet/methods.d.ts +2 -2
- package/esnext/cell/cell.d.ts +1 -1
- package/esnext/cell/cell.js +19 -3
- package/esnext/cell/style/css/index.css +46 -16
- package/esnext/cell/style/index.less +52 -11
- package/esnext/cell/type.d.ts +8 -1
- package/esnext/date-picker/index.d.ts +1 -1
- package/esnext/date-picker/index.js +5 -0
- package/esnext/dialog/index.d.ts +0 -1
- package/esnext/form/form-item.d.ts +5 -4
- package/esnext/form/form-item.js +11 -6
- package/esnext/form/type.d.ts +2 -3
- package/esnext/form/useForm.d.ts +1 -1
- package/esnext/form/useForm.js +4 -5
- package/esnext/pull-refresh/android-pull-refresh.d.ts +1 -1
- package/esnext/pull-refresh/android-pull-refresh.js +2 -2
- package/esnext/pull-refresh/hooks.d.ts +2 -2
- package/esnext/pull-refresh/hooks.js +3 -3
- package/esnext/pull-refresh/ios-pull-refresh.d.ts +1 -1
- package/esnext/pull-refresh/ios-pull-refresh.js +2 -1
- package/esnext/pull-refresh/model.d.ts +0 -1
- package/esnext/stepper/hooks/useValue.d.ts +1 -1
- package/esnext/stepper/hooks/useValue.js +2 -2
- package/esnext/stepper/type.d.ts +1 -1
- package/esnext/swipe-action/type.d.ts +1 -1
- package/esnext/uploader/upload/upload.d.ts +4 -4
- package/esnext/uploader/upload/upload.js +3 -3
- package/package.json +3 -3
- 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 +2 -0
- package/tokens/app/arcodesign/default/index.json +20 -0
- package/tokens/app/arcodesign/default/index.less +2 -0
- package/umd/action-sheet/index.d.ts +10 -10
- package/umd/action-sheet/index.js +6 -2
- package/umd/action-sheet/methods.d.ts +2 -2
- package/umd/cell/cell.d.ts +1 -1
- package/umd/cell/cell.js +36 -7
- package/umd/cell/style/css/index.css +46 -16
- package/umd/cell/style/index.less +52 -11
- package/umd/cell/type.d.ts +8 -1
- package/umd/date-picker/index.d.ts +1 -1
- package/umd/date-picker/index.js +3 -0
- package/umd/dialog/index.d.ts +0 -1
- package/umd/form/form-item.d.ts +5 -4
- package/umd/form/form-item.js +1 -1
- package/umd/form/type.d.ts +2 -3
- package/umd/form/useForm.d.ts +1 -1
- package/umd/pull-refresh/android-pull-refresh.d.ts +1 -1
- package/umd/pull-refresh/hooks.d.ts +2 -2
- package/umd/pull-refresh/ios-pull-refresh.d.ts +1 -1
- package/umd/pull-refresh/ios-pull-refresh.js +5 -5
- package/umd/pull-refresh/model.d.ts +0 -1
- package/umd/stepper/hooks/useValue.d.ts +1 -1
- package/umd/stepper/type.d.ts +1 -1
- package/umd/swipe-action/type.d.ts +1 -1
- package/umd/uploader/upload/upload.d.ts +4 -4
package/umd/cell/type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type React from 'react';
|
|
2
3
|
export interface CellProps {
|
|
3
4
|
/**
|
|
4
5
|
* 自定义样式
|
|
@@ -60,6 +61,12 @@ export interface CellProps {
|
|
|
60
61
|
* @default true
|
|
61
62
|
*/
|
|
62
63
|
bordered?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 是否启用点击态效果
|
|
66
|
+
* @en Whether to enable click effect
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
clickable?: boolean;
|
|
63
70
|
/**
|
|
64
71
|
* 点击单元格事件回调
|
|
65
72
|
* @en Callback for cell click event
|
package/umd/date-picker/index.js
CHANGED
|
@@ -490,6 +490,9 @@
|
|
|
490
490
|
(0, _react.useEffect)(function () {
|
|
491
491
|
_updateRangeValue(currentTs);
|
|
492
492
|
}, [currentTs]);
|
|
493
|
+
(0, _react.useEffect)(function () {
|
|
494
|
+
setCurrentTs(isRange ? Math.min(maxTs, Math.max(minTs, userSetCurrentTs[0])) : Math.min(maxTs, Math.max(minTs, userSetCurrentTs)));
|
|
495
|
+
}, [userSetCurrentTs, maxTs, minTs, isRange]);
|
|
493
496
|
(0, _react.useEffect)(function () {
|
|
494
497
|
if (visible) {
|
|
495
498
|
// 初始化当前时间
|
package/umd/dialog/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { ILocale } from '@arco-design/mobile-utils';
|
|
4
|
-
import type { Promise } from 'es6-promise';
|
|
5
4
|
import type { MaskingCommonProps, MaskingRef, OpenBaseProps } from '../masking';
|
|
6
5
|
export * from './methods';
|
|
7
6
|
export interface FooterButtonOptions {
|
package/umd/form/form-item.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React, { PureComponent } from 'react';
|
|
3
3
|
import { FormItemContext } from './form-item-context';
|
|
4
|
-
import { IFieldError, FieldValue, IFormItemInnerProps, FormItemProps, ValidateStatus, FormItemRef,
|
|
4
|
+
import type { IFieldError, FieldValue, IFormItemInnerProps, FormItemProps, ValidateStatus, FormItemRef, IFormItemContext } from './type';
|
|
5
|
+
import { ValueChangeType } from './type';
|
|
5
6
|
interface IFormItemInnerState {
|
|
6
7
|
validateStatus: ValidateStatus;
|
|
7
8
|
errors?: ReactNode[];
|
|
@@ -19,7 +20,7 @@ declare class FormItemInner extends PureComponent<IFormItemInnerProps, IFormItem
|
|
|
19
20
|
changeType: ValueChangeType;
|
|
20
21
|
} | undefined) => void;
|
|
21
22
|
getInitialValue: () => any;
|
|
22
|
-
getFieldError: () =>
|
|
23
|
+
getFieldError: () => ReactNode[];
|
|
23
24
|
isFieldTouched: () => boolean;
|
|
24
25
|
getAllRuleValidateTriggers: () => string[];
|
|
25
26
|
validateField: (validateTrigger?: string | undefined) => Promise<IFieldError>;
|
package/umd/form/form-item.js
CHANGED
package/umd/form/type.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IRules } from '@arco-design/mobile-utils';
|
|
2
|
-
import { ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { Promise } from 'es6-promise';
|
|
1
|
+
import type { IRules } from '@arco-design/mobile-utils';
|
|
2
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
4
3
|
export declare type FieldValue = any;
|
|
5
4
|
export declare type FieldItem = Record<string, FieldValue>;
|
|
6
5
|
export declare type ILayout = 'horizontal' | 'vertical' | 'inline';
|
package/umd/form/useForm.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PullRefreshRef, PullRefreshBasicProps } from './model';
|
|
2
|
+
import type { PullRefreshRef, PullRefreshBasicProps } from './model';
|
|
3
3
|
export declare const PullRefresh: React.ForwardRefExoticComponent<PullRefreshBasicProps & React.RefAttributes<PullRefreshRef>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
|
-
import { Promise } from 'es6-promise';
|
|
2
|
+
import { Promise as ES6Promise } from 'es6-promise';
|
|
3
3
|
import { PullRefreshStatus } from './model';
|
|
4
4
|
export declare const useCommonState: ({ onRefresh, loosingMinHeight, }: {
|
|
5
5
|
onRefresh?: (() => Promise<void>) | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const useCommonState: ({ onRefresh, loosingMinHeight, }: {
|
|
|
13
13
|
labelRef: RefObject<HTMLDivElement>;
|
|
14
14
|
domRef: RefObject<HTMLDivElement>;
|
|
15
15
|
loosingHeight: number;
|
|
16
|
-
handleRefresh: () =>
|
|
16
|
+
handleRefresh: () => ES6Promise<[void | undefined, unknown]>;
|
|
17
17
|
tipsHeight: number;
|
|
18
18
|
};
|
|
19
19
|
export declare const useAddScrollEvents: ({ domRef, handleTouchStart, handleTouchMove, handleTouchEnd, }: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PullRefreshRef, PullRefreshBasicProps } from './model';
|
|
2
|
+
import type { PullRefreshRef, PullRefreshBasicProps } from './model';
|
|
3
3
|
export declare const PullRefresh: React.ForwardRefExoticComponent<PullRefreshBasicProps & React.RefAttributes<PullRefreshRef>>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
if (typeof define === "function" && define.amd) {
|
|
3
|
-
define(["exports", "@babel/runtime/helpers/extends", "react", "@arco-design/mobile-utils", "../loading", "../context-provider", "./model", "./hooks", "../_helpers"], factory);
|
|
3
|
+
define(["exports", "@babel/runtime/helpers/extends", "react", "@arco-design/mobile-utils", "es6-promise", "../loading", "../context-provider", "./model", "./hooks", "../_helpers"], factory);
|
|
4
4
|
} else if (typeof exports !== "undefined") {
|
|
5
|
-
factory(exports, require("@babel/runtime/helpers/extends"), require("react"), require("@arco-design/mobile-utils"), require("../loading"), require("../context-provider"), require("./model"), require("./hooks"), require("../_helpers"));
|
|
5
|
+
factory(exports, require("@babel/runtime/helpers/extends"), require("react"), require("@arco-design/mobile-utils"), require("es6-promise"), require("../loading"), require("../context-provider"), require("./model"), require("./hooks"), require("../_helpers"));
|
|
6
6
|
} else {
|
|
7
7
|
var mod = {
|
|
8
8
|
exports: {}
|
|
9
9
|
};
|
|
10
|
-
factory(mod.exports, global._extends, global.react, global.mobileUtils, global.loading, global.contextProvider, global.model, global.hooks, global._helpers);
|
|
10
|
+
factory(mod.exports, global._extends, global.react, global.mobileUtils, global.es6Promise, global.loading, global.contextProvider, global.model, global.hooks, global._helpers);
|
|
11
11
|
global.iosPullRefresh = mod.exports;
|
|
12
12
|
}
|
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _react, _mobileUtils, _loading, _contextProvider, _model, _hooks, _helpers) {
|
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _react, _mobileUtils, _es6Promise, _loading, _contextProvider, _model, _hooks, _helpers) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
16
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
}, [disabled, ifShouldHandle]);
|
|
144
144
|
|
|
145
145
|
var refresh = function refresh() {
|
|
146
|
-
return new Promise(function (resolve) {
|
|
146
|
+
return new _es6Promise.Promise(function (resolve) {
|
|
147
147
|
if (domRef.current) {
|
|
148
148
|
domRef.current.style.overflow = 'hidden';
|
|
149
149
|
var animationKey = new Date().getTime();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { StepperProps } from '..';
|
|
2
|
+
import type { StepperProps } from '..';
|
|
3
3
|
export default function useValue(params: Required<Pick<StepperProps, 'defaultValue' | 'min' | 'max' | 'digits'>> & Pick<StepperProps, 'formatter' | 'value'>): {
|
|
4
4
|
updateValue: (updater: number | ((oldValue: number) => number)) => void;
|
|
5
5
|
actualInputValue: number;
|
package/umd/stepper/type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Promise } from 'es6-promise';
|
|
4
|
-
import { AdapterFile, CommonFileItem, UploadCommonProps } from './type';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import { Promise as ES6Promise } from 'es6-promise';
|
|
4
|
+
import type { AdapterFile, CommonFileItem, UploadCommonProps } from './type';
|
|
5
5
|
export declare class Upload<FileItem extends CommonFileItem = CommonFileItem> {
|
|
6
6
|
props: UploadCommonProps<FileItem>;
|
|
7
7
|
fileRef: React.MutableRefObject<HTMLInputElement | null>;
|
|
@@ -17,4 +17,4 @@ export declare class Upload<FileItem extends CommonFileItem = CommonFileItem> {
|
|
|
17
17
|
handleClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, file: FileItem, index: number) => void;
|
|
18
18
|
handleTouchStart: (e: React.TouchEvent<HTMLDivElement>, image: FileItem, index: number) => void;
|
|
19
19
|
}
|
|
20
|
-
export declare const parseFile: (file: AdapterFile) =>
|
|
20
|
+
export declare const parseFile: (file: AdapterFile) => ES6Promise<unknown>;
|