@arco-design/mobile-react 2.22.3 → 2.23.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/image-picker/index.js +18 -12
- package/cjs/image-picker/type.d.ts +10 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +5 -1
- package/cjs/input/style/css/index.css +1 -0
- package/cjs/input/style/index.less +1 -0
- package/cjs/stepper/demo/style/css/mobile.css +4 -0
- package/cjs/stepper/demo/style/mobile.less +10 -0
- package/cjs/stepper/hooks/useButtonClick.d.ts +11 -0
- package/cjs/stepper/hooks/useButtonClick.js +74 -0
- package/cjs/stepper/hooks/useInputEvent.d.ts +9 -0
- package/cjs/stepper/hooks/useInputEvent.js +59 -0
- package/cjs/stepper/hooks/useValue.d.ts +6 -0
- package/cjs/stepper/hooks/useValue.js +44 -0
- package/cjs/stepper/index.d.ts +13 -0
- package/cjs/stepper/index.js +184 -0
- package/cjs/stepper/style/css/index.css +76 -0
- package/cjs/stepper/style/css/index.d.ts +2 -0
- package/cjs/stepper/style/css/index.js +5 -0
- package/cjs/stepper/style/index.d.ts +2 -0
- package/cjs/stepper/style/index.js +5 -0
- package/cjs/stepper/style/index.less +80 -0
- package/cjs/stepper/type.d.ts +159 -0
- package/cjs/stepper/type.js +3 -0
- package/cjs/style.d.ts +1 -0
- package/cjs/style.js +2 -0
- package/dist/index.js +349 -10
- package/dist/index.min.js +3 -3
- package/dist/style.css +64 -0
- package/dist/style.min.css +1 -1
- package/esm/image-picker/index.js +18 -12
- package/esm/image-picker/type.d.ts +10 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/input/style/css/index.css +1 -0
- package/esm/input/style/index.less +1 -0
- package/esm/stepper/demo/style/css/mobile.css +4 -0
- package/esm/stepper/demo/style/mobile.less +10 -0
- package/esm/stepper/hooks/useButtonClick.d.ts +11 -0
- package/esm/stepper/hooks/useButtonClick.js +69 -0
- package/esm/stepper/hooks/useInputEvent.d.ts +9 -0
- package/esm/stepper/hooks/useInputEvent.js +53 -0
- package/esm/stepper/hooks/useValue.d.ts +6 -0
- package/esm/stepper/hooks/useValue.js +38 -0
- package/esm/stepper/index.d.ts +13 -0
- package/esm/stepper/index.js +157 -0
- package/esm/stepper/style/css/index.css +76 -0
- package/esm/stepper/style/css/index.d.ts +2 -0
- package/esm/stepper/style/css/index.js +2 -0
- package/esm/stepper/style/index.d.ts +2 -0
- package/esm/stepper/style/index.js +2 -0
- package/esm/stepper/style/index.less +80 -0
- package/esm/stepper/type.d.ts +159 -0
- package/esm/stepper/type.js +1 -0
- package/esm/style.d.ts +1 -0
- package/esm/style.js +1 -0
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +15 -0
- package/tokens/app/arcodesign/default/index.d.ts +15 -0
- package/tokens/app/arcodesign/default/index.js +16 -1
- package/tokens/app/arcodesign/default/index.json +180 -0
- package/tokens/app/arcodesign/default/index.less +15 -0
- package/umd/image-picker/index.js +18 -12
- package/umd/image-picker/type.d.ts +10 -0
- package/umd/index.d.ts +1 -0
- package/umd/index.js +7 -5
- package/umd/input/style/css/index.css +1 -0
- package/umd/input/style/index.less +1 -0
- package/umd/stepper/demo/style/css/mobile.css +4 -0
- package/umd/stepper/demo/style/mobile.less +10 -0
- package/umd/stepper/hooks/useButtonClick.d.ts +11 -0
- package/umd/stepper/hooks/useButtonClick.js +86 -0
- package/umd/stepper/hooks/useInputEvent.d.ts +9 -0
- package/umd/stepper/hooks/useInputEvent.js +71 -0
- package/umd/stepper/hooks/useValue.d.ts +6 -0
- package/umd/stepper/hooks/useValue.js +56 -0
- package/umd/stepper/index.d.ts +13 -0
- package/umd/stepper/index.js +185 -0
- package/umd/stepper/style/css/index.css +76 -0
- package/umd/stepper/style/css/index.d.ts +2 -0
- package/umd/stepper/style/css/index.js +15 -0
- package/umd/stepper/style/index.d.ts +2 -0
- package/umd/stepper/style/index.js +15 -0
- package/umd/stepper/style/index.less +80 -0
- package/umd/stepper/type.d.ts +159 -0
- package/umd/stepper/type.js +17 -0
- package/umd/style.d.ts +1 -0
- package/umd/style.js +4 -4
@@ -0,0 +1,159 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
export interface StepperProps {
|
3
|
+
/**
|
4
|
+
* 自定义类名
|
5
|
+
* @en Custom classname
|
6
|
+
*/
|
7
|
+
className?: string;
|
8
|
+
/**
|
9
|
+
* 自定义样式
|
10
|
+
* @en Custom stylesheet
|
11
|
+
* */
|
12
|
+
style?: React.CSSProperties;
|
13
|
+
/**
|
14
|
+
* input样式
|
15
|
+
* @en Input stylesheet
|
16
|
+
*/
|
17
|
+
inputStyle?: React.CSSProperties;
|
18
|
+
/**
|
19
|
+
* input类名
|
20
|
+
* @en Input class
|
21
|
+
*/
|
22
|
+
inputClass?: string;
|
23
|
+
/**
|
24
|
+
* 绑定值,传入即受控
|
25
|
+
* @en Bundled value (Controlled)
|
26
|
+
*/
|
27
|
+
value?: number;
|
28
|
+
/**
|
29
|
+
* 默认值
|
30
|
+
* @en Default value
|
31
|
+
* @default 1
|
32
|
+
*/
|
33
|
+
defaultValue?: number;
|
34
|
+
/**
|
35
|
+
* 是否允许内容为空
|
36
|
+
* @en Whether the content is allowed to be empty
|
37
|
+
* @default false
|
38
|
+
*/
|
39
|
+
allowEmpty?: boolean;
|
40
|
+
/**
|
41
|
+
* 格式化到小数点后固定位数,设置为 0 表示格式化到整数
|
42
|
+
* @en Formatted to a decimal point after a fixed number of digits, set to 0 indicates formatting to an integer
|
43
|
+
* @default 0
|
44
|
+
*/
|
45
|
+
digits?: number;
|
46
|
+
/**
|
47
|
+
* 是否禁用步进器
|
48
|
+
* @en Whether to disable the stepper
|
49
|
+
* @default false
|
50
|
+
*/
|
51
|
+
disabled?: boolean;
|
52
|
+
/**
|
53
|
+
* 输入框只读状态
|
54
|
+
* @en Input read only status
|
55
|
+
* @default false
|
56
|
+
*/
|
57
|
+
inputReadonly?: boolean;
|
58
|
+
/**
|
59
|
+
* 最大值
|
60
|
+
* @en Max value
|
61
|
+
* @default Infinity
|
62
|
+
*/
|
63
|
+
max?: number;
|
64
|
+
/**
|
65
|
+
* 最小值
|
66
|
+
* @en Min value
|
67
|
+
* @default 1
|
68
|
+
*/
|
69
|
+
min?: number;
|
70
|
+
/**
|
71
|
+
* 是否允许操作大于/小于极限值时,操作结果等于极限值
|
72
|
+
* @en If an operation is allowed to be greater more/less than the limit value, the result of the operation is equal to the limit value
|
73
|
+
*/
|
74
|
+
equalLimitDisabled?: boolean;
|
75
|
+
/**
|
76
|
+
* 递增/减值
|
77
|
+
* @en Incremental/Impairment value
|
78
|
+
* @default 1
|
79
|
+
*/
|
80
|
+
step?: number;
|
81
|
+
/**
|
82
|
+
* 边框风格
|
83
|
+
* @en Border style
|
84
|
+
* @default "default"
|
85
|
+
*/
|
86
|
+
theme?: 'square' | 'round' | 'default';
|
87
|
+
/**
|
88
|
+
* 格式化内部值(优先级最高)
|
89
|
+
* @en Format the inner value
|
90
|
+
*/
|
91
|
+
formatter?: (innerValue: number) => number | Promise<number>;
|
92
|
+
/**
|
93
|
+
* 增加按钮
|
94
|
+
* @en Add button
|
95
|
+
*/
|
96
|
+
addButton?: ReactNode;
|
97
|
+
/**
|
98
|
+
* 删除按钮
|
99
|
+
* @en Delete button
|
100
|
+
*/
|
101
|
+
minusButton?: ReactNode;
|
102
|
+
/**
|
103
|
+
* 自定义输入框函数
|
104
|
+
* @en The function of customizing the input
|
105
|
+
*/
|
106
|
+
renderContent?: (innerValue: number) => ReactNode;
|
107
|
+
/**
|
108
|
+
* 输入框失去焦点时触发
|
109
|
+
* @en Triggers when the input loses focus
|
110
|
+
*/
|
111
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
112
|
+
/**
|
113
|
+
* 数据变化时的触发
|
114
|
+
* @en Triggers when the data change
|
115
|
+
*/
|
116
|
+
onChange?: (value: number | null) => void;
|
117
|
+
/**
|
118
|
+
* 输入框获得焦点时触发
|
119
|
+
* @en Triggers when the input gets focus
|
120
|
+
*/
|
121
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
122
|
+
/**
|
123
|
+
* 点击增加按钮时触发
|
124
|
+
* @en Triggers when the add button is clicked
|
125
|
+
*/
|
126
|
+
onAddButtonClick?: (e: React.MouseEvent) => void;
|
127
|
+
/**
|
128
|
+
* 点击减少按钮时触发
|
129
|
+
* @en Triggers when the minus button is clicked
|
130
|
+
*/
|
131
|
+
onMinusButtonClick?: (e: React.MouseEvent) => void;
|
132
|
+
/**
|
133
|
+
* 点击最外侧dom时触发
|
134
|
+
* @en Triggers when the most out dom is clicked
|
135
|
+
*/
|
136
|
+
onClick?: (e: React.MouseEvent) => void;
|
137
|
+
/**
|
138
|
+
* 输入框输入时触发
|
139
|
+
* @en Triggers when the input is inputting
|
140
|
+
*/
|
141
|
+
onInput?: (e: React.ChangeEvent) => void;
|
142
|
+
}
|
143
|
+
export interface StepperRef {
|
144
|
+
/**
|
145
|
+
* 最外层元素 DOM
|
146
|
+
* @en The most out element dom
|
147
|
+
*/
|
148
|
+
dom: HTMLDivElement | null;
|
149
|
+
/**
|
150
|
+
* 输入框 DOM
|
151
|
+
* @en Input dom
|
152
|
+
*/
|
153
|
+
input: HTMLInputElement | null;
|
154
|
+
/**
|
155
|
+
* 改变内部值的方法
|
156
|
+
* @en The function of changing inner value
|
157
|
+
*/
|
158
|
+
changeValue: (newValue: number | null) => void;
|
159
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
(function (global, factory) {
|
2
|
+
if (typeof define === "function" && define.amd) {
|
3
|
+
define(["exports"], factory);
|
4
|
+
} else if (typeof exports !== "undefined") {
|
5
|
+
factory(exports);
|
6
|
+
} else {
|
7
|
+
var mod = {
|
8
|
+
exports: {}
|
9
|
+
};
|
10
|
+
factory(mod.exports);
|
11
|
+
global.type = mod.exports;
|
12
|
+
}
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
|
14
|
+
"use strict";
|
15
|
+
|
16
|
+
_exports.__esModule = true;
|
17
|
+
});
|
package/umd/style.d.ts
CHANGED
package/umd/style.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["../style/public.less", "./action-sheet/style", "./cell/style", "./loading/style", "./badge/style", "./avatar/style", "./button/style", "./carousel/style", "./toast/style", "./switch/style", "./checkbox/style", "./circle-progress/style", "./collapse/style", "./tabs/style", "./context-provider/style", "./dialog/style", "./count-down/style", "./date-picker/style", "./dropdown/style", "./dropdown-menu/style", "./ellipsis/style", "./grid/style", "./image/style", "./show-monitor/style", "./image-picker/style", "./image-preview/style", "./input/style", "./load-more/style", "./masking/style", "./nav-bar/style", "./notice-bar/style", "./notify/style", "./pagination/style", "./picker/style", "./picker-view/style", "./popover/style", "./popup/style", "./popup-swiper/style", "./portal/style", "./progress/style", "./pull-refresh/style", "./radio/style", "./rate/style", "./slider/style", "./search-bar/style", "./steps/style", "./sticky/style", "./swipe-action/style", "./swipe-load/style", "./tab-bar/style", "./tag/style", "./textarea/style", "./transition/style"], factory);
|
3
|
+
define(["../style/public.less", "./action-sheet/style", "./cell/style", "./loading/style", "./badge/style", "./avatar/style", "./button/style", "./carousel/style", "./toast/style", "./switch/style", "./checkbox/style", "./circle-progress/style", "./collapse/style", "./tabs/style", "./context-provider/style", "./dialog/style", "./count-down/style", "./date-picker/style", "./dropdown/style", "./dropdown-menu/style", "./ellipsis/style", "./grid/style", "./image/style", "./show-monitor/style", "./image-picker/style", "./image-preview/style", "./input/style", "./load-more/style", "./masking/style", "./nav-bar/style", "./notice-bar/style", "./notify/style", "./pagination/style", "./picker/style", "./picker-view/style", "./popover/style", "./popup/style", "./popup-swiper/style", "./portal/style", "./progress/style", "./pull-refresh/style", "./radio/style", "./rate/style", "./slider/style", "./search-bar/style", "./stepper/style", "./steps/style", "./sticky/style", "./swipe-action/style", "./swipe-load/style", "./tab-bar/style", "./tag/style", "./textarea/style", "./transition/style"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(require("../style/public.less"), require("./action-sheet/style"), require("./cell/style"), require("./loading/style"), require("./badge/style"), require("./avatar/style"), require("./button/style"), require("./carousel/style"), require("./toast/style"), require("./switch/style"), require("./checkbox/style"), require("./circle-progress/style"), require("./collapse/style"), require("./tabs/style"), require("./context-provider/style"), require("./dialog/style"), require("./count-down/style"), require("./date-picker/style"), require("./dropdown/style"), require("./dropdown-menu/style"), require("./ellipsis/style"), require("./grid/style"), require("./image/style"), require("./show-monitor/style"), require("./image-picker/style"), require("./image-preview/style"), require("./input/style"), require("./load-more/style"), require("./masking/style"), require("./nav-bar/style"), require("./notice-bar/style"), require("./notify/style"), require("./pagination/style"), require("./picker/style"), require("./picker-view/style"), require("./popover/style"), require("./popup/style"), require("./popup-swiper/style"), require("./portal/style"), require("./progress/style"), require("./pull-refresh/style"), require("./radio/style"), require("./rate/style"), require("./slider/style"), require("./search-bar/style"), require("./steps/style"), require("./sticky/style"), require("./swipe-action/style"), require("./swipe-load/style"), require("./tab-bar/style"), require("./tag/style"), require("./textarea/style"), require("./transition/style"));
|
5
|
+
factory(require("../style/public.less"), require("./action-sheet/style"), require("./cell/style"), require("./loading/style"), require("./badge/style"), require("./avatar/style"), require("./button/style"), require("./carousel/style"), require("./toast/style"), require("./switch/style"), require("./checkbox/style"), require("./circle-progress/style"), require("./collapse/style"), require("./tabs/style"), require("./context-provider/style"), require("./dialog/style"), require("./count-down/style"), require("./date-picker/style"), require("./dropdown/style"), require("./dropdown-menu/style"), require("./ellipsis/style"), require("./grid/style"), require("./image/style"), require("./show-monitor/style"), require("./image-picker/style"), require("./image-preview/style"), require("./input/style"), require("./load-more/style"), require("./masking/style"), require("./nav-bar/style"), require("./notice-bar/style"), require("./notify/style"), require("./pagination/style"), require("./picker/style"), require("./picker-view/style"), require("./popover/style"), require("./popup/style"), require("./popup-swiper/style"), require("./portal/style"), require("./progress/style"), require("./pull-refresh/style"), require("./radio/style"), require("./rate/style"), require("./slider/style"), require("./search-bar/style"), require("./stepper/style"), require("./steps/style"), require("./sticky/style"), require("./swipe-action/style"), require("./swipe-load/style"), require("./tab-bar/style"), require("./tag/style"), require("./textarea/style"), require("./transition/style"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(global._public, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style);
|
10
|
+
factory(global._public, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style);
|
11
11
|
global.style = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_public, _style, _style2, _style3, _style4, _style5, _style6, _style7, _style8, _style9, _style10, _style11, _style12, _style13, _style14, _style15, _style16, _style17, _style18, _style19, _style20, _style21, _style22, _style23, _style24, _style25, _style26, _style27, _style28, _style29, _style30, _style31, _style32, _style33, _style34, _style35, _style36, _style37, _style38, _style39, _style40, _style41, _style42, _style43, _style44, _style45, _style46, _style47, _style48, _style49, _style50, _style51, _style52) {
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_public, _style, _style2, _style3, _style4, _style5, _style6, _style7, _style8, _style9, _style10, _style11, _style12, _style13, _style14, _style15, _style16, _style17, _style18, _style19, _style20, _style21, _style22, _style23, _style24, _style25, _style26, _style27, _style28, _style29, _style30, _style31, _style32, _style33, _style34, _style35, _style36, _style37, _style38, _style39, _style40, _style41, _style42, _style43, _style44, _style45, _style46, _style47, _style48, _style49, _style50, _style51, _style52, _style53) {
|
14
14
|
"use strict";
|
15
15
|
});
|