@arco-design/mobile-react 2.30.9 → 2.31.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 +32 -0
- package/README.en-US.md +70 -2
- package/README.md +69 -2
- package/cjs/carousel/index.js +3 -0
- package/cjs/form/form-item.d.ts +3 -0
- package/cjs/form/form-item.js +38 -10
- package/cjs/form/style/css/index.css +13 -0
- package/cjs/form/style/index.less +18 -0
- package/cjs/icon/IconCheck/index.js +1 -2
- package/cjs/icon/IconDownload/index.d.ts +7 -0
- package/cjs/icon/IconDownload/index.js +41 -0
- package/cjs/icon/IconFile/index.d.ts +7 -0
- package/cjs/icon/IconFile/index.js +41 -0
- package/cjs/icon/IconKeyboard/index.js +1 -0
- package/cjs/icon/IconQuestionCircle/index.js +1 -2
- package/cjs/icon/IconUpload/index.js +6 -4
- package/cjs/icon/IconUserFill/index.js +1 -2
- package/cjs/icon/index.d.ts +3 -1
- package/cjs/icon/index.js +17 -7
- package/cjs/icon/type.d.ts +3 -1
- package/cjs/image-picker/index.js +15 -161
- package/cjs/image-picker/type.d.ts +4 -73
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +6 -2
- package/cjs/input/hooks.js +2 -2
- package/cjs/input/props.d.ts +2 -2
- package/cjs/picker/index.js +60 -19
- package/cjs/picker/type.d.ts +7 -2
- package/cjs/picker-view/components/cascader.d.ts +1 -0
- package/cjs/picker-view/components/cascader.js +8 -1
- package/cjs/picker-view/components/picker-cell.d.ts +1 -0
- package/cjs/picker-view/components/picker-cell.js +6 -1
- package/cjs/picker-view/index.d.ts +6 -1
- package/cjs/picker-view/index.js +25 -13
- package/cjs/style.d.ts +1 -0
- package/cjs/style.js +3 -1
- package/cjs/tabs/tab-cell.js +54 -29
- package/cjs/tabs/type.d.ts +5 -0
- package/cjs/uploader/index.d.ts +16 -0
- package/cjs/uploader/index.js +180 -0
- package/cjs/uploader/style/css/index.css +650 -0
- package/cjs/uploader/style/css/index.d.ts +4 -0
- package/cjs/uploader/style/css/index.js +9 -0
- package/cjs/uploader/style/index.d.ts +4 -0
- package/cjs/uploader/style/index.js +9 -0
- package/cjs/uploader/style/index.less +161 -0
- package/cjs/uploader/type.d.ts +108 -0
- package/cjs/uploader/type.js +3 -0
- package/cjs/uploader/upload/index.d.ts +2 -0
- package/cjs/uploader/upload/index.js +19 -0
- package/cjs/uploader/upload/type.d.ts +107 -0
- package/cjs/uploader/upload/type.js +3 -0
- package/cjs/uploader/upload/upload.d.ts +20 -0
- package/cjs/uploader/upload/upload.js +189 -0
- package/dist/index.js +679 -310
- package/dist/index.min.js +4 -4
- package/dist/style.css +593 -0
- package/dist/style.min.css +1 -1
- package/esm/carousel/index.js +3 -0
- package/esm/form/form-item.d.ts +3 -0
- package/esm/form/form-item.js +36 -10
- package/esm/form/style/css/index.css +13 -0
- package/esm/form/style/index.less +18 -0
- package/esm/icon/IconCheck/index.js +1 -2
- package/esm/icon/IconDownload/index.d.ts +7 -0
- package/esm/icon/IconDownload/index.js +30 -0
- package/esm/icon/IconFile/index.d.ts +7 -0
- package/esm/icon/IconFile/index.js +30 -0
- package/esm/icon/IconKeyboard/index.js +1 -0
- package/esm/icon/IconQuestionCircle/index.js +1 -2
- package/esm/icon/IconUpload/index.js +6 -4
- package/esm/icon/IconUserFill/index.js +1 -2
- package/esm/icon/index.d.ts +3 -1
- package/esm/icon/index.js +3 -1
- package/esm/icon/type.d.ts +3 -1
- package/esm/image-picker/index.js +14 -160
- package/esm/image-picker/type.d.ts +4 -73
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/input/hooks.js +2 -2
- package/esm/input/props.d.ts +2 -2
- package/esm/picker/index.js +61 -20
- package/esm/picker/type.d.ts +7 -2
- package/esm/picker-view/components/cascader.d.ts +1 -0
- package/esm/picker-view/components/cascader.js +8 -1
- package/esm/picker-view/components/picker-cell.d.ts +1 -0
- package/esm/picker-view/components/picker-cell.js +6 -1
- package/esm/picker-view/index.d.ts +6 -1
- package/esm/picker-view/index.js +26 -13
- package/esm/style.d.ts +1 -0
- package/esm/style.js +2 -1
- package/esm/tabs/tab-cell.js +56 -30
- package/esm/tabs/type.d.ts +5 -0
- package/esm/uploader/index.d.ts +16 -0
- package/esm/uploader/index.js +150 -0
- package/esm/uploader/style/css/index.css +650 -0
- package/esm/uploader/style/css/index.d.ts +4 -0
- package/esm/uploader/style/css/index.js +4 -0
- package/esm/uploader/style/index.d.ts +4 -0
- package/esm/uploader/style/index.js +4 -0
- package/esm/uploader/style/index.less +161 -0
- package/esm/uploader/type.d.ts +108 -0
- package/esm/uploader/type.js +1 -0
- package/esm/uploader/upload/index.d.ts +2 -0
- package/esm/uploader/upload/index.js +2 -0
- package/esm/uploader/upload/type.d.ts +107 -0
- package/esm/uploader/upload/type.js +1 -0
- package/esm/uploader/upload/upload.d.ts +20 -0
- package/esm/uploader/upload/upload.js +175 -0
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +27 -0
- package/tokens/app/arcodesign/default/index.d.ts +27 -0
- package/tokens/app/arcodesign/default/index.js +28 -1
- package/tokens/app/arcodesign/default/index.json +292 -0
- package/tokens/app/arcodesign/default/index.less +27 -0
- package/umd/carousel/index.js +3 -0
- package/umd/form/form-item.d.ts +3 -0
- package/umd/form/form-item.js +38 -10
- package/umd/form/style/css/index.css +13 -0
- package/umd/form/style/index.less +18 -0
- package/umd/icon/IconCheck/index.js +1 -2
- package/umd/icon/IconDownload/index.d.ts +7 -0
- package/umd/icon/IconDownload/index.js +49 -0
- package/umd/icon/IconFile/index.d.ts +7 -0
- package/umd/icon/IconFile/index.js +49 -0
- package/umd/icon/IconKeyboard/index.js +1 -0
- package/umd/icon/IconQuestionCircle/index.js +1 -2
- package/umd/icon/IconUpload/index.js +6 -4
- package/umd/icon/IconUserFill/index.js +1 -2
- package/umd/icon/index.d.ts +3 -1
- package/umd/icon/index.js +15 -9
- package/umd/icon/type.d.ts +3 -1
- package/umd/image-picker/index.js +17 -163
- package/umd/image-picker/type.d.ts +4 -73
- package/umd/index.d.ts +1 -0
- package/umd/index.js +7 -5
- package/umd/input/hooks.js +2 -2
- package/umd/input/props.d.ts +2 -2
- package/umd/picker/index.js +60 -19
- package/umd/picker/type.d.ts +7 -2
- package/umd/picker-view/components/cascader.d.ts +1 -0
- package/umd/picker-view/components/cascader.js +8 -1
- package/umd/picker-view/components/picker-cell.d.ts +1 -0
- package/umd/picker-view/components/picker-cell.js +6 -1
- package/umd/picker-view/index.d.ts +6 -1
- package/umd/picker-view/index.js +25 -13
- package/umd/style.d.ts +1 -0
- package/umd/style.js +4 -4
- package/umd/tabs/tab-cell.js +54 -29
- package/umd/tabs/type.d.ts +5 -0
- package/umd/uploader/index.d.ts +16 -0
- package/umd/uploader/index.js +178 -0
- package/umd/uploader/style/css/index.css +650 -0
- package/umd/uploader/style/css/index.d.ts +4 -0
- package/umd/uploader/style/css/index.js +15 -0
- package/umd/uploader/style/index.d.ts +4 -0
- package/umd/uploader/style/index.js +15 -0
- package/umd/uploader/style/index.less +161 -0
- package/umd/uploader/type.d.ts +108 -0
- package/umd/uploader/type.js +17 -0
- package/umd/uploader/upload/index.d.ts +2 -0
- package/umd/uploader/upload/index.js +27 -0
- package/umd/uploader/upload/type.d.ts +107 -0
- package/umd/uploader/upload/type.js +17 -0
- package/umd/uploader/upload/upload.d.ts +20 -0
- package/umd/uploader/upload/upload.js +200 -0
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,38 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [2.31.0](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.30.10...@arco-design/mobile-react@2.31.0) (2024-04-09)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* `Form` support picker components ([#249](https://github.com/arco-design/arco-design-mobile/issues/249)) ([3b1f6f7](https://github.com/arco-design/arco-design-mobile/commit/3b1f6f7460ac2417fd7c099c8f26904be972750e))
|
12
|
+
* `Tabs` do not execute forceupdate for the first time ([#248](https://github.com/arco-design/arco-design-mobile/issues/248)) ([e05cc9f](https://github.com/arco-design/arco-design-mobile/commit/e05cc9fd5df64a1b5a5d8054fc58b5e428997711))
|
13
|
+
* add icons ([#250](https://github.com/arco-design/arco-design-mobile/issues/250)) ([46ddefc](https://github.com/arco-design/arco-design-mobile/commit/46ddefc48fb39a51f2767ff384c535c19934b16f))
|
14
|
+
* optimize "autoFocus" of `SearchBar`, `Input`, `Textarea` & support search QA & optimize `Tabs` document ([#253](https://github.com/arco-design/arco-design-mobile/issues/253)) ([3684d09](https://github.com/arco-design/arco-design-mobile/commit/3684d09cdbde0f1c3f41ae0ca4aa6a03be830364))
|
15
|
+
|
16
|
+
|
17
|
+
### Features
|
18
|
+
|
19
|
+
* add component `Uploader` & abstract common logic of `ImagePicker` ([#251](https://github.com/arco-design/arco-design-mobile/issues/251)) ([9f6a795](https://github.com/arco-design/arco-design-mobile/commit/9f6a79573cfe5f74589ae244732db8c13ef07f0b))
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
## [2.30.10](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.30.9...@arco-design/mobile-react@2.30.10) (2024-03-04)
|
26
|
+
|
27
|
+
|
28
|
+
### Bug Fixes
|
29
|
+
|
30
|
+
* `Carousel` reset transforms when loop status changes ([#243](https://github.com/arco-design/arco-design-mobile/issues/243)) ([3983669](https://github.com/arco-design/arco-design-mobile/commit/398366920556ea4eb91ee87035f62443ad8db1d1))
|
31
|
+
* `Picker` onOk method adds new parameters ([#237](https://github.com/arco-design/arco-design-mobile/issues/237)) ([ef2e800](https://github.com/arco-design/arco-design-mobile/commit/ef2e8001c390174a12ca8b815e96c71436420e94))
|
32
|
+
* `Tabs` tab-cell support "updateLayout" method ([#234](https://github.com/arco-design/arco-design-mobile/issues/234)) ([1f17383](https://github.com/arco-design/arco-design-mobile/commit/1f17383592be7917a3f8392025ada60c788738f4))
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
6
38
|
## [2.30.9](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.30.8...@arco-design/mobile-react@2.30.9) (2024-02-27)
|
7
39
|
|
8
40
|
|
package/README.en-US.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.30.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.30.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.30.10/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.30.10/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## Full import
|
@@ -134,6 +134,74 @@ import { Button as ArcoButton } from '@arco-design/mobile-react';
|
|
134
134
|
import { IconAsk, IconBack } from '@arco-design/mobile-react/esm/icon';
|
135
135
|
```
|
136
136
|
|
137
|
+
|
138
|
+
## Partial import(Vite)
|
139
|
+
|
140
|
+
It is recommended to use `vite-plugin-importer` to import(**<a href="https://www.npmjs.com/package/vite-plugin-importer" target="_blank">Click here</a>** to know more from this plugin):
|
141
|
+
|
142
|
+
```
|
143
|
+
npm install vite-plugin-importer -D
|
144
|
+
```
|
145
|
+
|
146
|
+
### Import components on demand
|
147
|
+
|
148
|
+
**vite.config.ts** :
|
149
|
+
|
150
|
+
```js
|
151
|
+
import usePluginImport from 'vite-plugin-importer'
|
152
|
+
|
153
|
+
export default defineConfig({
|
154
|
+
plugins: [
|
155
|
+
usePluginImport({
|
156
|
+
libraryName: "@arco-design/mobile-react",
|
157
|
+
libraryDirectory: "esm",
|
158
|
+
style: (path) => `${path}/style`,
|
159
|
+
})
|
160
|
+
]
|
161
|
+
})
|
162
|
+
```
|
163
|
+
|
164
|
+
### Import icons on demand
|
165
|
+
|
166
|
+
**vite.config.ts** :
|
167
|
+
|
168
|
+
```js
|
169
|
+
import usePluginImport from 'vite-plugin-importer'
|
170
|
+
|
171
|
+
export default defineConfig({
|
172
|
+
plugins: [
|
173
|
+
usePluginImport({
|
174
|
+
libraryName: "@arco-design/mobile-react/esm/icon",
|
175
|
+
libraryDirectory: "",
|
176
|
+
camel2DashComponentName: false,
|
177
|
+
})
|
178
|
+
]
|
179
|
+
})
|
180
|
+
```
|
181
|
+
|
182
|
+
If both component and Icon need to be imported on demand, you just declare all and do not need any change.
|
183
|
+
|
184
|
+
**vite.config.ts** :
|
185
|
+
|
186
|
+
```js
|
187
|
+
import usePluginImport from 'vite-plugin-importer'
|
188
|
+
|
189
|
+
export default defineConfig({
|
190
|
+
plugins: [
|
191
|
+
usePluginImport({
|
192
|
+
libraryName: "@arco-design/mobile-react",
|
193
|
+
libraryDirectory: "esm",
|
194
|
+
style: (path) => `${path}/style`,
|
195
|
+
}),
|
196
|
+
usePluginImport({
|
197
|
+
libraryName: "@arco-design/mobile-react/esm/icon",
|
198
|
+
libraryDirectory: "",
|
199
|
+
camel2DashComponentName: false,
|
200
|
+
})
|
201
|
+
]
|
202
|
+
})
|
203
|
+
```
|
204
|
+
|
137
205
|
## Partial import (manual)
|
138
206
|
|
139
207
|
If you don't use babel-plugin-import, you need to import js and css files manually. The following example has the same effect as the import statement above:
|
package/README.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.30.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.30.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.30.10/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.30.10/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## 引入全部
|
@@ -134,6 +134,73 @@ import { Button as ArcoButton } from '@arco-design/mobile-react';
|
|
134
134
|
import { IconAsk, IconBack } from '@arco-design/mobile-react/esm/icon';
|
135
135
|
```
|
136
136
|
|
137
|
+
## 部分引入(Vite)
|
138
|
+
|
139
|
+
如果是 Vite 构建工具的话,则推荐使用 `vite-plugin-importer` 引入(该插件具体使用 **<a href="https://www.npmjs.com/package/vite-plugin-importer" target="_blank">戳这里</a>** ):
|
140
|
+
|
141
|
+
```
|
142
|
+
npm install vite-plugin-importer -D
|
143
|
+
```
|
144
|
+
|
145
|
+
### 组件按需引入
|
146
|
+
|
147
|
+
**vite.config.ts** 中配置:
|
148
|
+
|
149
|
+
```js
|
150
|
+
import usePluginImport from 'vite-plugin-importer'
|
151
|
+
|
152
|
+
export default defineConfig({
|
153
|
+
plugins: [
|
154
|
+
usePluginImport({
|
155
|
+
libraryName: "@arco-design/mobile-react",
|
156
|
+
libraryDirectory: "esm",
|
157
|
+
style: (path) => `${path}/style`,
|
158
|
+
})
|
159
|
+
]
|
160
|
+
})
|
161
|
+
```
|
162
|
+
|
163
|
+
### Icon 按需引入
|
164
|
+
|
165
|
+
**vite.config.ts** 中配置:
|
166
|
+
|
167
|
+
```js
|
168
|
+
import usePluginImport from 'vite-plugin-importer'
|
169
|
+
|
170
|
+
export default defineConfig({
|
171
|
+
plugins: [
|
172
|
+
usePluginImport({
|
173
|
+
libraryName: "@arco-design/mobile-react/esm/icon",
|
174
|
+
libraryDirectory: "",
|
175
|
+
camel2DashComponentName: false,
|
176
|
+
})
|
177
|
+
]
|
178
|
+
})
|
179
|
+
```
|
180
|
+
|
181
|
+
如果同时存在 组件 和 Icon 的按需引入方式,不需要做改动,可以同时声明
|
182
|
+
|
183
|
+
**vite.config.ts** 中配置:
|
184
|
+
|
185
|
+
```js
|
186
|
+
import usePluginImport from 'vite-plugin-importer'
|
187
|
+
|
188
|
+
export default defineConfig({
|
189
|
+
plugins: [
|
190
|
+
usePluginImport({
|
191
|
+
libraryName: "@arco-design/mobile-react",
|
192
|
+
libraryDirectory: "esm",
|
193
|
+
style: (path) => `${path}/style`,
|
194
|
+
}),
|
195
|
+
usePluginImport({
|
196
|
+
libraryName: "@arco-design/mobile-react/esm/icon",
|
197
|
+
libraryDirectory: "",
|
198
|
+
camel2DashComponentName: false,
|
199
|
+
})
|
200
|
+
]
|
201
|
+
})
|
202
|
+
```
|
203
|
+
|
137
204
|
## 部分引入(手动)
|
138
205
|
|
139
206
|
如果不使用babel-plugin-import,则需要手动引入js和css文件。下方例子效果等同于上方引入语句:
|
package/cjs/carousel/index.js
CHANGED
@@ -655,6 +655,9 @@ var Carousel = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
655
655
|
|
656
656
|
function getFakeChild() {
|
657
657
|
if (noLoop) {
|
658
|
+
// 循环状态从有到无时,重置 transforms
|
659
|
+
// @en reset transforms when loop status changes to false
|
660
|
+
setTransforms([]);
|
658
661
|
return;
|
659
662
|
}
|
660
663
|
|
package/cjs/form/form-item.d.ts
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { FormItemProps, FormItemRef } from './type';
|
3
|
+
export declare function DefaultPickerLinkedContainer({ value }: {
|
4
|
+
value: (string | number)[];
|
5
|
+
}): JSX.Element;
|
3
6
|
declare const _default: React.ForwardRefExoticComponent<FormItemProps & React.RefAttributes<FormItemRef>>;
|
4
7
|
export default _default;
|
package/cjs/form/form-item.js
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
4
|
|
5
5
|
exports.__esModule = true;
|
6
|
+
exports.DefaultPickerLinkedContainer = DefaultPickerLinkedContainer;
|
6
7
|
exports.default = void 0;
|
7
8
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
@@ -29,6 +30,21 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
29
30
|
|
30
31
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
31
32
|
|
33
|
+
function DefaultPickerLinkedContainer(_ref) {
|
34
|
+
var value = _ref.value;
|
35
|
+
|
36
|
+
var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
|
37
|
+
prefixCls = _useContext.prefixCls,
|
38
|
+
locale = _useContext.locale;
|
39
|
+
|
40
|
+
var className = prefixCls + "-form-picker-link-container";
|
41
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
42
|
+
className: className
|
43
|
+
}, value && value.length ? value.join('-') : /*#__PURE__*/_react.default.createElement("span", {
|
44
|
+
className: className + "-placeholder"
|
45
|
+
}, locale == null ? void 0 : locale.Form.pickerDefaultHint));
|
46
|
+
}
|
47
|
+
|
32
48
|
var FormItemInner = /*#__PURE__*/function (_PureComponent) {
|
33
49
|
(0, _inheritsLoose2.default)(FormItemInner, _PureComponent);
|
34
50
|
|
@@ -215,6 +231,8 @@ var FormItemInner = /*#__PURE__*/function (_PureComponent) {
|
|
215
231
|
_proto.renderChildren = function renderChildren() {
|
216
232
|
var _props,
|
217
233
|
_children$type,
|
234
|
+
_children$props7,
|
235
|
+
_children$props8,
|
218
236
|
_this2 = this;
|
219
237
|
|
220
238
|
var _this$props4 = this.props,
|
@@ -255,16 +273,26 @@ var FormItemInner = /*#__PURE__*/function (_PureComponent) {
|
|
255
273
|
case _type.FormInternalComponentType.DatePicker:
|
256
274
|
props = {
|
257
275
|
currentTs: getFieldValue(field),
|
258
|
-
onChange: this.
|
259
|
-
disabled: this.props.disabled
|
276
|
+
onChange: this.innerTriggerFunctionWithValueFirst,
|
277
|
+
disabled: this.props.disabled,
|
278
|
+
renderLinkedContainer: ((_children$props7 = children.props) == null ? void 0 : _children$props7.renderLinkedContainer) || function (val) {
|
279
|
+
return /*#__PURE__*/_react.default.createElement(DefaultPickerLinkedContainer, {
|
280
|
+
value: val
|
281
|
+
});
|
282
|
+
}
|
260
283
|
};
|
261
284
|
break;
|
262
285
|
|
263
286
|
case _type.FormInternalComponentType.Picker:
|
264
287
|
props = {
|
265
|
-
|
266
|
-
|
267
|
-
disabled: this.props.disabled
|
288
|
+
value: getFieldValue(field),
|
289
|
+
onChange: this.innerTriggerFunctionWithValueFirst,
|
290
|
+
disabled: this.props.disabled,
|
291
|
+
renderLinkedContainer: ((_children$props8 = children.props) == null ? void 0 : _children$props8.renderLinkedContainer) || function (val) {
|
292
|
+
return /*#__PURE__*/_react.default.createElement(DefaultPickerLinkedContainer, {
|
293
|
+
value: val
|
294
|
+
});
|
295
|
+
}
|
268
296
|
};
|
269
297
|
break;
|
270
298
|
|
@@ -329,12 +357,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
329
357
|
className = _props$className === void 0 ? '' : _props$className,
|
330
358
|
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
331
359
|
|
332
|
-
var
|
333
|
-
prefixCls =
|
360
|
+
var _useContext2 = (0, _react.useContext)(_contextProvider.GlobalContext),
|
361
|
+
prefixCls = _useContext2.prefixCls;
|
334
362
|
|
335
|
-
var
|
336
|
-
layout =
|
337
|
-
propsDisabled =
|
363
|
+
var _useContext3 = (0, _react.useContext)(_formItemContext.FormItemContext),
|
364
|
+
layout = _useContext3.layout,
|
365
|
+
propsDisabled = _useContext3.disabled;
|
338
366
|
|
339
367
|
var _useState = (0, _react.useState)(null),
|
340
368
|
errors = _useState[0],
|
@@ -604,6 +604,13 @@
|
|
604
604
|
height: 0.32rem ;
|
605
605
|
line-height: 0.32rem ;
|
606
606
|
}
|
607
|
+
.arco-form-picker-link-container {
|
608
|
+
font-size: 0.32rem;
|
609
|
+
color: #1d2129 ;
|
610
|
+
}
|
611
|
+
.arco-form-picker-link-container-placeholder {
|
612
|
+
color: #c9cdd4 ;
|
613
|
+
}
|
607
614
|
/***************************************************
|
608
615
|
* *
|
609
616
|
* Arco Theme Style *
|
@@ -638,4 +645,10 @@
|
|
638
645
|
.arco-theme-dark .arco-form-item-warning-message {
|
639
646
|
color: #FF9626 ;
|
640
647
|
}
|
648
|
+
.arco-theme-dark .arco-form-picker-link-container {
|
649
|
+
color: #f6f6f6 ;
|
650
|
+
}
|
651
|
+
.arco-theme-dark .arco-form-picker-link-container-placeholder {
|
652
|
+
color: #5f5f60 ;
|
653
|
+
}
|
641
654
|
/********************* End *************************/
|
@@ -89,6 +89,14 @@
|
|
89
89
|
}
|
90
90
|
}
|
91
91
|
}
|
92
|
+
|
93
|
+
&-picker-link-container {
|
94
|
+
.rem(font-size, 16);
|
95
|
+
.use-var(color, font-color);
|
96
|
+
&-placeholder {
|
97
|
+
.use-var(color, input-placeholder-color);
|
98
|
+
}
|
99
|
+
}
|
92
100
|
}
|
93
101
|
|
94
102
|
/***************************************************
|
@@ -149,6 +157,16 @@
|
|
149
157
|
.use-var(color, dark-form-item-warning-message-color);
|
150
158
|
}
|
151
159
|
}
|
160
|
+
&-picker-link-container {
|
161
|
+
@{arco-dark-mode-selector} & {
|
162
|
+
.use-var(color, dark-font-color);
|
163
|
+
}
|
164
|
+
&-placeholder {
|
165
|
+
@{arco-dark-mode-selector} & {
|
166
|
+
.use-var(color, dark-input-placeholder-color);
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}
|
152
170
|
}
|
153
171
|
}
|
154
172
|
/********************* End *************************/
|
@@ -35,8 +35,7 @@ function IconCheck(props) {
|
|
35
35
|
}, other), /*#__PURE__*/_react.default.createElement("path", {
|
36
36
|
fillRule: "evenodd",
|
37
37
|
clipRule: "evenodd",
|
38
|
-
d: "M16.702 4.47a.5.5 0 00-.705.06L8.33 13.596 3.82 9.724a.5.5 0 00-.705.054l-.652.758a.5.5 0 00.054.706L7.361 15.4a.5.5 0 00.054.053l.526.445.22.188a.5.5 0 00.722-.047l8.641-10.218a.5.5 0 00-.059-.705l-.763-.645z"
|
39
|
-
fill: useCurrentColor ? 'currentColor' : '#000'
|
38
|
+
d: "M16.702 4.47a.5.5 0 00-.705.06L8.33 13.596 3.82 9.724a.5.5 0 00-.705.054l-.652.758a.5.5 0 00.054.706L7.361 15.4a.5.5 0 00.054.053l.526.445.22.188a.5.5 0 00.722-.047l8.641-10.218a.5.5 0 00-.059-.705l-.763-.645z"
|
40
39
|
}));
|
41
40
|
});
|
42
41
|
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { SVGAttributes, CSSProperties } from 'react';
|
2
|
+
export interface IconProps extends SVGAttributes<SVGElement> {
|
3
|
+
className?: string;
|
4
|
+
useCurrentColor?: boolean;
|
5
|
+
style?: CSSProperties;
|
6
|
+
}
|
7
|
+
export default function IconDownload(props: IconProps): JSX.Element;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports.default = IconDownload;
|
7
|
+
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
+
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
11
|
+
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
13
|
+
|
14
|
+
var _contextProvider = require("../../context-provider");
|
15
|
+
|
16
|
+
var _excluded = ["className", "useCurrentColor", "style"];
|
17
|
+
|
18
|
+
function IconDownload(props) {
|
19
|
+
var _props$className = props.className,
|
20
|
+
className = _props$className === void 0 ? '' : _props$className,
|
21
|
+
_props$useCurrentColo = props.useCurrentColor,
|
22
|
+
useCurrentColor = _props$useCurrentColo === void 0 ? true : _props$useCurrentColo,
|
23
|
+
style = props.style,
|
24
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref) {
|
26
|
+
var prefixCls = _ref.prefixCls;
|
27
|
+
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
|
28
|
+
className: prefixCls + "-icon " + prefixCls + "-icon-download " + className,
|
29
|
+
width: "1em",
|
30
|
+
height: "1em",
|
31
|
+
style: style,
|
32
|
+
fill: useCurrentColor ? 'currentColor' : '#000',
|
33
|
+
xmlns: "http://www.w3.org/2000/svg",
|
34
|
+
viewBox: "0 0 16 16"
|
35
|
+
}, other), /*#__PURE__*/_react.default.createElement("path", {
|
36
|
+
d: "M7.3,8.8V1.7h1.3v7.1l1.9-1.9l0.9,0.9L8,11.3L4.5,7.8l0.9-0.9L7.3,8.8z M3.3,13v-1.3H2v2.7h12v-2.7\th-1.3V13H3.3z",
|
37
|
+
fillRule: "evenodd",
|
38
|
+
clipRule: "evenodd"
|
39
|
+
}));
|
40
|
+
});
|
41
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
exports.__esModule = true;
|
6
|
+
exports.default = IconFile;
|
7
|
+
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
9
|
+
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
11
|
+
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
13
|
+
|
14
|
+
var _contextProvider = require("../../context-provider");
|
15
|
+
|
16
|
+
var _excluded = ["className", "useCurrentColor", "style"];
|
17
|
+
|
18
|
+
function IconFile(props) {
|
19
|
+
var _props$className = props.className,
|
20
|
+
className = _props$className === void 0 ? '' : _props$className,
|
21
|
+
_props$useCurrentColo = props.useCurrentColor,
|
22
|
+
useCurrentColor = _props$useCurrentColo === void 0 ? true : _props$useCurrentColo,
|
23
|
+
style = props.style,
|
24
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref) {
|
26
|
+
var prefixCls = _ref.prefixCls;
|
27
|
+
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
|
28
|
+
className: prefixCls + "-icon " + prefixCls + "-icon-file " + className,
|
29
|
+
width: "1em",
|
30
|
+
height: "1em",
|
31
|
+
style: style,
|
32
|
+
fill: useCurrentColor ? 'currentColor' : '#000',
|
33
|
+
xmlns: "http://www.w3.org/2000/svg",
|
34
|
+
viewBox: "0 0 16 16"
|
35
|
+
}, other), /*#__PURE__*/_react.default.createElement("path", {
|
36
|
+
d: "M2.3,2.7c0-0.7,0.6-1.3,1.3-1.3h7.3l2.7,2.7v9.3c0,0.7-0.6,1.3-1.3,1.3H3.7c-0.7,0-1.3-0.6-1.3-1.3\tV2.7z M10.4,2.7H3.7v10.7h8.7V4.6L10.4,2.7z M10.7,7.7H5.3V6.3h5.3V7.7z M8.7,10.3H5.3V9h3.3V10.3z",
|
37
|
+
fillRule: "evenodd",
|
38
|
+
clipRule: "evenodd"
|
39
|
+
}));
|
40
|
+
});
|
41
|
+
}
|
@@ -35,8 +35,7 @@ function IconQuestionCircle(props) {
|
|
35
35
|
}, other), /*#__PURE__*/_react.default.createElement("path", {
|
36
36
|
fillRule: "evenodd",
|
37
37
|
clipRule: "evenodd",
|
38
|
-
d: "M7.982.68a7.312 7.312 0 110 14.625 7.312 7.312 0 010-14.625zm0 1.33a5.983 5.983 0 100 11.965 5.983 5.983 0 000-11.966zm.333 8.641c.183 0 .332.15.332.333v.664a.332.332 0 01-.332.333H7.65a.332.332 0 01-.332-.333v-.664c0-.184.148-.333.332-.333h.665zm-.427-6.647c.79 0 1.447.19 1.97.574.522.382.784.95.784 1.7 0 .461-.114.85-.341 1.165-.133.191-.389.436-.766.733l-.373.293c-.202.16-.337.345-.403.558a1.8 1.8 0 00-.048.323.332.332 0 01-.331.304h-.744a.332.332 0 01-.331-.363c.043-.463.088-.755.137-.878.091-.229.325-.492.703-.79l.383-.302c.126-.096.774-.553.774-.957 0-.405-.07-.553-.273-.775-.203-.222-.66-.294-1.073-.294-.405 0-.752.108-.922.38a1.921 1.921 0 00-.189.4 1.388 1.388 0 00-.048.204.332.332 0 01-.328.276h-.782a.332.332 0 01-.33-.37c.008-.074.017-.136.025-.185.13-.722.458-1.253.985-1.592.413-.27.92-.404 1.521-.404z"
|
39
|
-
fill: useCurrentColor ? 'currentColor' : '#000'
|
38
|
+
d: "M7.982.68a7.312 7.312 0 110 14.625 7.312 7.312 0 010-14.625zm0 1.33a5.983 5.983 0 100 11.965 5.983 5.983 0 000-11.966zm.333 8.641c.183 0 .332.15.332.333v.664a.332.332 0 01-.332.333H7.65a.332.332 0 01-.332-.333v-.664c0-.184.148-.333.332-.333h.665zm-.427-6.647c.79 0 1.447.19 1.97.574.522.382.784.95.784 1.7 0 .461-.114.85-.341 1.165-.133.191-.389.436-.766.733l-.373.293c-.202.16-.337.345-.403.558a1.8 1.8 0 00-.048.323.332.332 0 01-.331.304h-.744a.332.332 0 01-.331-.363c.043-.463.088-.755.137-.878.091-.229.325-.492.703-.79l.383-.302c.126-.096.774-.553.774-.957 0-.405-.07-.553-.273-.775-.203-.222-.66-.294-1.073-.294-.405 0-.752.108-.922.38a1.921 1.921 0 00-.189.4 1.388 1.388 0 00-.048.204.332.332 0 01-.328.276h-.782a.332.332 0 01-.33-.37c.008-.074.017-.136.025-.185.13-.722.458-1.253.985-1.592.413-.27.92-.404 1.521-.404z"
|
40
39
|
}));
|
41
40
|
});
|
42
41
|
}
|
@@ -30,10 +30,12 @@ function IconUpload(props) {
|
|
30
30
|
height: "1em",
|
31
31
|
style: style,
|
32
32
|
fill: useCurrentColor ? 'currentColor' : '#000',
|
33
|
-
|
34
|
-
|
35
|
-
}, other), /*#__PURE__*/_react.default.createElement("
|
36
|
-
d: "
|
33
|
+
xmlns: "http://www.w3.org/2000/svg",
|
34
|
+
viewBox: "0 0 14 14"
|
35
|
+
}, other), /*#__PURE__*/_react.default.createElement("path", {
|
36
|
+
d: "M7,1.5l3.1,3.1L9.2,5.4L7.6,3.7v5.9H6.4V3.7L4.8,5.4L3.9,4.6L7,1.5z M2.9,11.4v-1.2H1.8v2.3h10.5\tv-2.3h-1.2v1.2H2.9z",
|
37
|
+
fillRule: "evenodd",
|
38
|
+
clipRule: "evenodd"
|
37
39
|
}));
|
38
40
|
});
|
39
41
|
}
|
@@ -33,8 +33,7 @@ function IconUserFill(props) {
|
|
33
33
|
fill: useCurrentColor ? 'currentColor' : '#000',
|
34
34
|
xmlns: "http://www.w3.org/2000/svg"
|
35
35
|
}, other), /*#__PURE__*/_react.default.createElement("path", {
|
36
|
-
d: "M12.5 10.833c2.301 0 5 1.786 5 5v2.5c0 .46-.373.834-.833.834H3.333a.833.833 0 01-.833-.834v-2.5c0-3.211 2.699-5 5-5h5zM10 1.25a4.167 4.167 0 110 8.333 4.167 4.167 0 010-8.333z"
|
37
|
-
fill: useCurrentColor ? 'currentColor' : '#000'
|
36
|
+
d: "M12.5 10.833c2.301 0 5 1.786 5 5v2.5c0 .46-.373.834-.833.834H3.333a.833.833 0 01-.833-.834v-2.5c0-3.211 2.699-5 5-5h5zM10 1.25a4.167 4.167 0 110 8.333 4.167 4.167 0 010-8.333z"
|
38
37
|
}));
|
39
38
|
});
|
40
39
|
}
|
package/cjs/icon/index.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
export { default as IconUpload } from './IconUpload';
|
2
1
|
export { default as IconSquareChecked } from './IconSquareChecked';
|
3
2
|
export { default as IconTriUp } from './IconTriUp';
|
4
3
|
export { default as IconMore } from './IconMore';
|
@@ -54,4 +53,7 @@ export { default as IconGift } from './IconGift';
|
|
54
53
|
export { default as IconStarHalf } from './IconStarHalf';
|
55
54
|
export { default as IconKeyboard } from './IconKeyboard';
|
56
55
|
export { default as IconKeyboardDelete } from './IconKeyboardDelete';
|
56
|
+
export { default as IconDownload } from './IconDownload';
|
57
|
+
export { default as IconFile } from './IconFile';
|
58
|
+
export { default as IconUpload } from './IconUpload';
|
57
59
|
export * from './type';
|
package/cjs/icon/index.js
CHANGED
@@ -4,7 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
4
4
|
|
5
5
|
exports.__esModule = true;
|
6
6
|
var _exportNames = {
|
7
|
-
IconUpload: true,
|
8
7
|
IconSquareChecked: true,
|
9
8
|
IconTriUp: true,
|
10
9
|
IconMore: true,
|
@@ -59,13 +58,12 @@ var _exportNames = {
|
|
59
58
|
IconGift: true,
|
60
59
|
IconStarHalf: true,
|
61
60
|
IconKeyboard: true,
|
62
|
-
IconKeyboardDelete: true
|
61
|
+
IconKeyboardDelete: true,
|
62
|
+
IconDownload: true,
|
63
|
+
IconFile: true,
|
64
|
+
IconUpload: true
|
63
65
|
};
|
64
|
-
exports.IconWarnCircleFill = exports.IconWarnCircle = exports.IconUserFill = exports.IconUser = exports.IconUpload = exports.IconTriUp = exports.IconTriDown = exports.IconSuccessCircle = exports.IconSubway = exports.IconStarHalf = exports.IconStarFill = exports.IconStar = exports.IconSquareUnchecked = exports.IconSquareDisabled = exports.IconSquareChecked = exports.IconSound = exports.IconSmileFill = exports.IconShopping = exports.IconShop = exports.IconSetting = exports.IconSearch = exports.IconScan = exports.IconSad = exports.IconRefresh = exports.IconQuestionCircle = exports.IconPlay = exports.IconPicture = exports.IconNoticeOff = exports.IconNotice = exports.IconMore = exports.IconMinus = exports.IconLikeCircle = exports.IconKeyboardDelete = exports.IconKeyboard = exports.IconHome = exports.IconHeart = exports.IconGift = exports.IconEyelashInvisible = exports.IconEyeVisible = exports.IconEyeInvisible = exports.IconErrorCircle = exports.IconEdit = exports.IconDelete = exports.IconCloseBold = exports.IconClose = exports.IconClear = exports.IconCircleUnchecked = exports.IconCircleDisabled = exports.IconCircleChecked = exports.IconCheckBold = exports.IconCheck = exports.IconArrowUp = exports.IconArrowIn = exports.IconArrowDown = exports.IconArrowBack = exports.IconAdd = void 0;
|
65
|
-
|
66
|
-
var _IconUpload = _interopRequireDefault(require("./IconUpload"));
|
67
|
-
|
68
|
-
exports.IconUpload = _IconUpload.default;
|
66
|
+
exports.IconWarnCircleFill = exports.IconWarnCircle = exports.IconUserFill = exports.IconUser = exports.IconUpload = exports.IconTriUp = exports.IconTriDown = exports.IconSuccessCircle = exports.IconSubway = exports.IconStarHalf = exports.IconStarFill = exports.IconStar = exports.IconSquareUnchecked = exports.IconSquareDisabled = exports.IconSquareChecked = exports.IconSound = exports.IconSmileFill = exports.IconShopping = exports.IconShop = exports.IconSetting = exports.IconSearch = exports.IconScan = exports.IconSad = exports.IconRefresh = exports.IconQuestionCircle = exports.IconPlay = exports.IconPicture = exports.IconNoticeOff = exports.IconNotice = exports.IconMore = exports.IconMinus = exports.IconLikeCircle = exports.IconKeyboardDelete = exports.IconKeyboard = exports.IconHome = exports.IconHeart = exports.IconGift = exports.IconFile = exports.IconEyelashInvisible = exports.IconEyeVisible = exports.IconEyeInvisible = exports.IconErrorCircle = exports.IconEdit = exports.IconDownload = exports.IconDelete = exports.IconCloseBold = exports.IconClose = exports.IconClear = exports.IconCircleUnchecked = exports.IconCircleDisabled = exports.IconCircleChecked = exports.IconCheckBold = exports.IconCheck = exports.IconArrowUp = exports.IconArrowIn = exports.IconArrowDown = exports.IconArrowBack = exports.IconAdd = void 0;
|
69
67
|
|
70
68
|
var _IconSquareChecked = _interopRequireDefault(require("./IconSquareChecked"));
|
71
69
|
|
@@ -287,6 +285,18 @@ var _IconKeyboardDelete = _interopRequireDefault(require("./IconKeyboardDelete")
|
|
287
285
|
|
288
286
|
exports.IconKeyboardDelete = _IconKeyboardDelete.default;
|
289
287
|
|
288
|
+
var _IconDownload = _interopRequireDefault(require("./IconDownload"));
|
289
|
+
|
290
|
+
exports.IconDownload = _IconDownload.default;
|
291
|
+
|
292
|
+
var _IconFile = _interopRequireDefault(require("./IconFile"));
|
293
|
+
|
294
|
+
exports.IconFile = _IconFile.default;
|
295
|
+
|
296
|
+
var _IconUpload = _interopRequireDefault(require("./IconUpload"));
|
297
|
+
|
298
|
+
exports.IconUpload = _IconUpload.default;
|
299
|
+
|
290
300
|
var _type = require("./type");
|
291
301
|
|
292
302
|
Object.keys(_type).forEach(function (key) {
|
package/cjs/icon/type.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
export interface
|
2
|
+
export interface OriginIconProps extends React.SVGProps<SVGSVGElement> {
|
3
3
|
className?: string;
|
4
4
|
prefix?: string;
|
5
5
|
width?: string;
|
6
6
|
height?: string;
|
7
7
|
useCurrentColor?: boolean;
|
8
|
+
spin?: boolean;
|
8
9
|
}
|
10
|
+
export declare type IconProps = React.PropsWithoutRef<OriginIconProps> & React.RefAttributes<SVGSVGElement>;
|