@carefrees/form-utils-react-taro 0.0.14 → 0.0.15
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/README.md +6 -0
- package/assets/index.css +46 -39
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- package/lib/formItem/index.js +3 -3
- package/lib/formList/index.js +3 -3
- package/lib/hooks/attr/attr.FormItem.js +3 -3
- package/lib/index.d.ts +0 -1
- package/lib/index.js +56 -72
- package/lib/layout/index.js +5 -5
- package/lib/layout/layout.formItem.js +3 -3
- package/package.json +8 -4
- package/src/index.tsx +0 -1
- package/esm/styles/index.css +0 -199
- package/lib/styles/index.css +0 -199
- package/src/styles/index.css +0 -207
package/README.md
CHANGED
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
npm install @carefrees/form-utils-react-taro # yarn add @carefrees/form-utils-react-taro # pnpm add @carefrees/form-utils-react-taro
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
+
## 加载样式
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import '@carefrees/form-utils-react-taro/assets/index.css';
|
|
13
|
+
```
|
|
14
|
+
|
|
9
15
|
## 使用
|
|
10
16
|
|
|
11
17
|
### 基本使用
|
package/assets/index.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
html.dark .carefrees-form {
|
|
3
3
|
--form-color: #e3e3e3;
|
|
4
4
|
--form-header-color: #e3e3e3;
|
|
5
|
-
--form-font-size:
|
|
5
|
+
--form-font-size: 0.7rem;
|
|
6
6
|
--form-border-color: #e0e0e0;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ html.dark .carefrees-form {
|
|
|
10
10
|
.carefrees-form {
|
|
11
11
|
--form-color: rgba(0, 0, 0, 0.88);
|
|
12
12
|
--form-header-color: #1d2129;
|
|
13
|
-
--form-font-size:
|
|
13
|
+
--form-font-size: 0.7rem;
|
|
14
14
|
--form-border-color: #e0e0e0;
|
|
15
15
|
|
|
16
16
|
box-sizing: border-box;
|
|
@@ -18,12 +18,19 @@ html.dark .carefrees-form {
|
|
|
18
18
|
color: var(--form-color, rgba(0, 0, 0, 0.88));
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
/* 表单 */
|
|
22
|
+
/* .carefrees-form {
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
background-color: #fff;
|
|
25
|
+
font-size: 0.7rem;
|
|
26
|
+
} */
|
|
27
|
+
|
|
21
28
|
/* 布局 */
|
|
22
29
|
.carefrees-form-layout {
|
|
23
30
|
width: 100%;
|
|
24
31
|
box-sizing: border-box;
|
|
25
|
-
border-radius:
|
|
26
|
-
padding-bottom:
|
|
32
|
+
border-radius: 0.2rem;
|
|
33
|
+
padding-bottom: 0.4rem;
|
|
27
34
|
position: relative;
|
|
28
35
|
}
|
|
29
36
|
|
|
@@ -32,11 +39,11 @@ html.dark .carefrees-form {
|
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
.carefrees-form-layout.bordered {
|
|
35
|
-
border: 1px solid
|
|
42
|
+
border: 1px solid #e0e0e0;
|
|
36
43
|
}
|
|
37
44
|
.carefrees-form-layout.bordered .carefrees-form-layout-header {
|
|
38
|
-
padding-inline-start:
|
|
39
|
-
padding-inline-end:
|
|
45
|
+
padding-inline-start: 0.4rem;
|
|
46
|
+
padding-inline-end: 0.4rem;
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
.carefrees-form-layout-header {
|
|
@@ -44,25 +51,25 @@ html.dark .carefrees-form {
|
|
|
44
51
|
justify-content: space-between;
|
|
45
52
|
align-items: center;
|
|
46
53
|
flex-direction: row;
|
|
47
|
-
border-bottom: 1px solid
|
|
48
|
-
padding-top:
|
|
49
|
-
padding-bottom:
|
|
50
|
-
margin-block-end:
|
|
51
|
-
padding-inline-start:
|
|
52
|
-
padding-inline-end:
|
|
54
|
+
border-bottom: 1px solid #e0e0e0;
|
|
55
|
+
padding-top: 0.25rem;
|
|
56
|
+
padding-bottom: 0.25rem;
|
|
57
|
+
margin-block-end: 0.2rem;
|
|
58
|
+
padding-inline-start: 0.1rem;
|
|
59
|
+
padding-inline-end: 0.1rem;
|
|
53
60
|
box-sizing: border-box;
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
.carefrees-form-layout-header-title {
|
|
57
|
-
font-size:
|
|
64
|
+
font-size: 0.7rem;
|
|
58
65
|
font-weight: 600;
|
|
59
|
-
color:
|
|
66
|
+
color: #1d2129;
|
|
60
67
|
box-sizing: border-box;
|
|
61
68
|
}
|
|
62
69
|
.carefrees-form-layout-header-extra {
|
|
63
|
-
font-size:
|
|
70
|
+
font-size: 0.7rem;
|
|
64
71
|
font-weight: 500;
|
|
65
|
-
color:
|
|
72
|
+
color: #1d2129;
|
|
66
73
|
box-sizing: border-box;
|
|
67
74
|
}
|
|
68
75
|
|
|
@@ -70,21 +77,21 @@ html.dark .carefrees-form {
|
|
|
70
77
|
width: 100%;
|
|
71
78
|
display: grid;
|
|
72
79
|
grid-template-columns: repeat(1, auto);
|
|
73
|
-
gap:
|
|
74
|
-
padding-left:
|
|
75
|
-
padding-right:
|
|
80
|
+
gap: 0.1rem;
|
|
81
|
+
padding-left: 0.1rem;
|
|
82
|
+
padding-right: 0.1rem;
|
|
76
83
|
box-sizing: border-box;
|
|
77
84
|
}
|
|
78
85
|
|
|
79
86
|
/* 表单项 */
|
|
80
87
|
.carefrees-form-item {
|
|
81
|
-
font-size:
|
|
88
|
+
font-size: 0.7rem;
|
|
82
89
|
display: flex;
|
|
83
90
|
flex-direction: row;
|
|
84
91
|
align-items: flex-start;
|
|
85
|
-
padding:
|
|
92
|
+
padding: 0.4rem;
|
|
86
93
|
box-sizing: border-box;
|
|
87
|
-
color:
|
|
94
|
+
color: rgba(0, 0, 0, 0.88);
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
.carefrees-form-item-container {
|
|
@@ -92,18 +99,18 @@ html.dark .carefrees-form {
|
|
|
92
99
|
height: 100%;
|
|
93
100
|
display: flex;
|
|
94
101
|
flex-direction: column;
|
|
95
|
-
gap:
|
|
102
|
+
gap: 0.2rem;
|
|
96
103
|
box-sizing: border-box;
|
|
97
104
|
}
|
|
98
105
|
.carefrees-form-item-container.left {
|
|
99
106
|
flex-direction: row;
|
|
100
|
-
gap:
|
|
107
|
+
gap: 0.4rem;
|
|
101
108
|
}
|
|
102
109
|
.carefrees-form-item-container.left .carefrees-form-item-label-warp {
|
|
103
110
|
text-align: right;
|
|
104
111
|
}
|
|
105
112
|
.carefrees-form-item-container.between {
|
|
106
|
-
gap:
|
|
113
|
+
gap: 0.4rem;
|
|
107
114
|
text-align: left;
|
|
108
115
|
flex-direction: row;
|
|
109
116
|
justify-content: space-between;
|
|
@@ -125,8 +132,8 @@ html.dark .carefrees-form {
|
|
|
125
132
|
align-items: center;
|
|
126
133
|
justify-content: flex-start;
|
|
127
134
|
position: relative;
|
|
128
|
-
font-size:
|
|
129
|
-
color:
|
|
135
|
+
font-size: 0.7rem;
|
|
136
|
+
color: rgba(0, 0, 0, 0.88);
|
|
130
137
|
min-height: 1.4rem;
|
|
131
138
|
}
|
|
132
139
|
|
|
@@ -135,8 +142,8 @@ html.dark .carefrees-form {
|
|
|
135
142
|
display: inline-block;
|
|
136
143
|
text-align: center;
|
|
137
144
|
margin: 0;
|
|
138
|
-
margin-inline-end:
|
|
139
|
-
margin-inline-start:
|
|
145
|
+
margin-inline-end: 0.1rem;
|
|
146
|
+
margin-inline-start: 0.1rem;
|
|
140
147
|
box-sizing: border-box;
|
|
141
148
|
}
|
|
142
149
|
|
|
@@ -144,7 +151,7 @@ html.dark .carefrees-form {
|
|
|
144
151
|
content: '*';
|
|
145
152
|
color: red;
|
|
146
153
|
display: inline-block;
|
|
147
|
-
margin-inline-end:
|
|
154
|
+
margin-inline-end: 0.2rem;
|
|
148
155
|
box-sizing: border-box;
|
|
149
156
|
}
|
|
150
157
|
|
|
@@ -155,7 +162,7 @@ html.dark .carefrees-form {
|
|
|
155
162
|
align-items: flex-start;
|
|
156
163
|
justify-content: flex-start;
|
|
157
164
|
box-sizing: border-box;
|
|
158
|
-
gap:
|
|
165
|
+
gap: 0.2rem;
|
|
159
166
|
flex: 1;
|
|
160
167
|
}
|
|
161
168
|
.carefrees-form-item-body-input {
|
|
@@ -169,7 +176,7 @@ html.dark .carefrees-form {
|
|
|
169
176
|
}
|
|
170
177
|
|
|
171
178
|
.carefrees-form-item-body-input.input-bordered {
|
|
172
|
-
border-bottom: 1px solid
|
|
179
|
+
border-bottom: 1px solid #e0e0e0;
|
|
173
180
|
}
|
|
174
181
|
|
|
175
182
|
.carefrees-form-item-body-help {
|
|
@@ -184,9 +191,9 @@ html.dark .carefrees-form {
|
|
|
184
191
|
top: auto;
|
|
185
192
|
left: 0;
|
|
186
193
|
right: 0;
|
|
187
|
-
bottom: -
|
|
188
|
-
padding-top:
|
|
189
|
-
font-size:
|
|
194
|
+
bottom: -0.8rem;
|
|
195
|
+
padding-top: 0.1rem;
|
|
196
|
+
font-size: 0.6rem;
|
|
190
197
|
box-sizing: border-box;
|
|
191
198
|
z-index: 10;
|
|
192
199
|
pointer-events: none;
|
|
@@ -199,18 +206,18 @@ html.dark .carefrees-form {
|
|
|
199
206
|
top: auto;
|
|
200
207
|
left: 0;
|
|
201
208
|
right: 0;
|
|
202
|
-
bottom: -
|
|
209
|
+
bottom: -0.8rem;
|
|
203
210
|
}
|
|
204
211
|
.carefrees-form-item-body-error.top-left {
|
|
205
212
|
justify-content: start;
|
|
206
|
-
top: -
|
|
213
|
+
top: -0.8rem;
|
|
207
214
|
left: 0px;
|
|
208
215
|
right: 0px;
|
|
209
216
|
bottom: auto;
|
|
210
217
|
}
|
|
211
218
|
.carefrees-form-item-body-error.top-right {
|
|
212
219
|
justify-content: flex-end;
|
|
213
|
-
top: -
|
|
220
|
+
top: -0.8rem;
|
|
214
221
|
left: 0px;
|
|
215
222
|
right: 0px;
|
|
216
223
|
bottom: auto;
|
package/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormInstanceBase, ValidateErrorEntity } from '@carefrees/form-utils';
|
|
3
3
|
import { FormLayoutProps } from './layout';
|
|
4
|
-
import './styles/index.css';
|
|
5
4
|
export * from './formItem';
|
|
6
5
|
export * from './formList';
|
|
7
6
|
export * from './layout';
|
package/esm/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import classnames from "classnames";
|
|
|
4
4
|
import { FormLayout } from "./layout/index.js";
|
|
5
5
|
import { FormInstanceContext, useForm, useRegisterForm } from "@carefrees/form-utils-react-hooks";
|
|
6
6
|
import { Form } from "@tarojs/components";
|
|
7
|
-
import "./styles/index.css";
|
|
8
7
|
export * from "./formItem/index.js";
|
|
9
8
|
export * from "./formList/index.js";
|
|
10
9
|
export * from "./layout/index.js";
|
package/lib/formItem/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -97,10 +97,10 @@ const FormHideItem = /*#__PURE__*/ (0, external_react_namespaceObject.memo)((pro
|
|
|
97
97
|
});
|
|
98
98
|
exports.FormHideItem = __webpack_exports__.FormHideItem;
|
|
99
99
|
exports.FormItem = __webpack_exports__.FormItem;
|
|
100
|
-
for(var
|
|
100
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
101
101
|
"FormHideItem",
|
|
102
102
|
"FormItem"
|
|
103
|
-
].indexOf(
|
|
103
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
104
104
|
Object.defineProperty(exports, '__esModule', {
|
|
105
105
|
value: true
|
|
106
106
|
});
|
package/lib/formList/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -65,10 +65,10 @@ const FormHideList = /*#__PURE__*/ (0, external_react_namespaceObject.memo)((pro
|
|
|
65
65
|
});
|
|
66
66
|
exports.FormHideList = __webpack_exports__.FormHideList;
|
|
67
67
|
exports.FormList = __webpack_exports__.FormList;
|
|
68
|
-
for(var
|
|
68
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
69
69
|
"FormHideList",
|
|
70
70
|
"FormList"
|
|
71
|
-
].indexOf(
|
|
71
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
72
72
|
Object.defineProperty(exports, '__esModule', {
|
|
73
73
|
value: true
|
|
74
74
|
});
|
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -86,9 +86,9 @@ const useFormItemAttr = (options)=>{
|
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
88
|
exports.useFormItemAttr = __webpack_exports__.useFormItemAttr;
|
|
89
|
-
for(var
|
|
89
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
90
90
|
"useFormItemAttr"
|
|
91
|
-
].indexOf(
|
|
91
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
92
92
|
Object.defineProperty(exports, '__esModule', {
|
|
93
93
|
value: true
|
|
94
94
|
});
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormInstanceBase, ValidateErrorEntity } from '@carefrees/form-utils';
|
|
3
3
|
import { FormLayoutProps } from './layout';
|
|
4
|
-
import './styles/index.css';
|
|
5
4
|
export * from './formItem';
|
|
6
5
|
export * from './formList';
|
|
7
6
|
export * from './layout';
|
package/lib/index.js
CHANGED
|
@@ -1,36 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"./formItem"
|
|
3
|
+
"./formItem" (module) {
|
|
4
4
|
module.exports = require("./formItem/index.js");
|
|
5
5
|
},
|
|
6
|
-
"./formList"
|
|
6
|
+
"./formList" (module) {
|
|
7
7
|
module.exports = require("./formList/index.js");
|
|
8
8
|
},
|
|
9
|
-
"./hooks/attr/attr.FormItem"
|
|
9
|
+
"./hooks/attr/attr.FormItem" (module) {
|
|
10
10
|
module.exports = require("./hooks/attr/attr.FormItem.js");
|
|
11
11
|
},
|
|
12
|
-
"./layout"
|
|
12
|
+
"./layout" (module) {
|
|
13
13
|
module.exports = require("./layout/index.js");
|
|
14
14
|
},
|
|
15
|
-
"./layout/layout.formItem"
|
|
15
|
+
"./layout/layout.formItem" (module) {
|
|
16
16
|
module.exports = require("./layout/layout.formItem.js");
|
|
17
17
|
},
|
|
18
|
-
"
|
|
19
|
-
module.exports = require("./styles/index.css");
|
|
20
|
-
},
|
|
21
|
-
"@carefrees/form-utils-react-hooks": function(module) {
|
|
18
|
+
"@carefrees/form-utils-react-hooks" (module) {
|
|
22
19
|
module.exports = require("@carefrees/form-utils-react-hooks");
|
|
23
20
|
},
|
|
24
|
-
"@tarojs/components"
|
|
21
|
+
"@tarojs/components" (module) {
|
|
25
22
|
module.exports = require("@tarojs/components");
|
|
26
23
|
},
|
|
27
|
-
classnames
|
|
24
|
+
classnames (module) {
|
|
28
25
|
module.exports = require("classnames");
|
|
29
26
|
},
|
|
30
|
-
react
|
|
27
|
+
react (module) {
|
|
31
28
|
module.exports = require("react");
|
|
32
29
|
},
|
|
33
|
-
"react/jsx-runtime"
|
|
30
|
+
"react/jsx-runtime" (module) {
|
|
34
31
|
module.exports = require("react/jsx-runtime");
|
|
35
32
|
}
|
|
36
33
|
};
|
|
@@ -66,7 +63,7 @@ function __webpack_require__(moduleId) {
|
|
|
66
63
|
})();
|
|
67
64
|
(()=>{
|
|
68
65
|
__webpack_require__.r = (exports1)=>{
|
|
69
|
-
if (
|
|
66
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
70
67
|
value: 'Module'
|
|
71
68
|
});
|
|
72
69
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -80,76 +77,63 @@ var __webpack_exports__ = {};
|
|
|
80
77
|
__webpack_require__.d(__webpack_exports__, {
|
|
81
78
|
Form: ()=>Form
|
|
82
79
|
});
|
|
83
|
-
var
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
var
|
|
89
|
-
var
|
|
90
|
-
__webpack_require__("./
|
|
91
|
-
var
|
|
92
|
-
|
|
93
|
-
for(var __WEBPACK_IMPORT_KEY__ in _formItem__WEBPACK_IMPORTED_MODULE_7__)if ([
|
|
80
|
+
var react_jsx_runtime__rspack_import_0 = __webpack_require__("react/jsx-runtime");
|
|
81
|
+
var react__rspack_import_1 = __webpack_require__("react");
|
|
82
|
+
var classnames__rspack_import_2 = __webpack_require__("classnames");
|
|
83
|
+
var classnames__rspack_import_2_default = /*#__PURE__*/ __webpack_require__.n(classnames__rspack_import_2);
|
|
84
|
+
var _layout__rspack_import_3 = __webpack_require__("./layout");
|
|
85
|
+
var _carefrees_form_utils_react_hooks__rspack_import_4 = __webpack_require__("@carefrees/form-utils-react-hooks");
|
|
86
|
+
var _tarojs_components__rspack_import_5 = __webpack_require__("@tarojs/components");
|
|
87
|
+
var _formItem__rspack_import_6 = __webpack_require__("./formItem");
|
|
88
|
+
var __rspack_reexport = {};
|
|
89
|
+
for(const __rspack_import_key in _formItem__rspack_import_6)if ([
|
|
94
90
|
"Form",
|
|
95
91
|
"default"
|
|
96
|
-
].indexOf(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
102
|
-
for(var __WEBPACK_IMPORT_KEY__ in _formList__WEBPACK_IMPORTED_MODULE_8__)if ([
|
|
92
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_formItem__rspack_import_6[__rspack_import_key];
|
|
93
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
94
|
+
var _formList__rspack_import_7 = __webpack_require__("./formList");
|
|
95
|
+
var __rspack_reexport = {};
|
|
96
|
+
for(const __rspack_import_key in _formList__rspack_import_7)if ([
|
|
103
97
|
"Form",
|
|
104
98
|
"default"
|
|
105
|
-
].indexOf(
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
110
|
-
for(var __WEBPACK_IMPORT_KEY__ in _layout__WEBPACK_IMPORTED_MODULE_3__)if ([
|
|
99
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_formList__rspack_import_7[__rspack_import_key];
|
|
100
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
101
|
+
var __rspack_reexport = {};
|
|
102
|
+
for(const __rspack_import_key in _layout__rspack_import_3)if ([
|
|
111
103
|
"Form",
|
|
112
104
|
"default"
|
|
113
|
-
].indexOf(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
119
|
-
for(var __WEBPACK_IMPORT_KEY__ in _layout_layout_formItem__WEBPACK_IMPORTED_MODULE_9__)if ([
|
|
105
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_layout__rspack_import_3[__rspack_import_key];
|
|
106
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
107
|
+
var _layout_layout_formItem__rspack_import_8 = __webpack_require__("./layout/layout.formItem");
|
|
108
|
+
var __rspack_reexport = {};
|
|
109
|
+
for(const __rspack_import_key in _layout_layout_formItem__rspack_import_8)if ([
|
|
120
110
|
"Form",
|
|
121
111
|
"default"
|
|
122
|
-
].indexOf(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
128
|
-
for(var __WEBPACK_IMPORT_KEY__ in _hooks_attr_attr_FormItem__WEBPACK_IMPORTED_MODULE_10__)if ([
|
|
112
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_layout_layout_formItem__rspack_import_8[__rspack_import_key];
|
|
113
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
114
|
+
var _hooks_attr_attr_FormItem__rspack_import_9 = __webpack_require__("./hooks/attr/attr.FormItem");
|
|
115
|
+
var __rspack_reexport = {};
|
|
116
|
+
for(const __rspack_import_key in _hooks_attr_attr_FormItem__rspack_import_9)if ([
|
|
129
117
|
"Form",
|
|
130
118
|
"default"
|
|
131
|
-
].indexOf(
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
136
|
-
for(var __WEBPACK_IMPORT_KEY__ in _carefrees_form_utils_react_hooks__WEBPACK_IMPORTED_MODULE_4__)if ([
|
|
119
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_hooks_attr_attr_FormItem__rspack_import_9[__rspack_import_key];
|
|
120
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
121
|
+
var __rspack_reexport = {};
|
|
122
|
+
for(const __rspack_import_key in _carefrees_form_utils_react_hooks__rspack_import_4)if ([
|
|
137
123
|
"Form",
|
|
138
124
|
"default"
|
|
139
|
-
].indexOf(
|
|
140
|
-
|
|
141
|
-
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
142
|
-
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
125
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_carefrees_form_utils_react_hooks__rspack_import_4[__rspack_import_key];
|
|
126
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
143
127
|
function Form(props) {
|
|
144
128
|
const { children, form, style, className, formData, hideData, hideRuleData, isAutoUpdatedFormData = false, name, onFinish, onFinishFailed, onValuesChange, layoutStyle, layoutClassName, ...rest } = props;
|
|
145
|
-
const formInstance = (0,
|
|
146
|
-
(0,
|
|
147
|
-
const cls = (0,
|
|
148
|
-
(0,
|
|
129
|
+
const formInstance = (0, _carefrees_form_utils_react_hooks__rspack_import_4.useForm)(form);
|
|
130
|
+
(0, _carefrees_form_utils_react_hooks__rspack_import_4.useRegisterForm)(formInstance, name);
|
|
131
|
+
const cls = (0, react__rspack_import_1.useMemo)(()=>classnames__rspack_import_2_default()('carefrees-form', className), []);
|
|
132
|
+
(0, react__rspack_import_1.useMemo)(()=>formInstance.ctor(formData, hideData, hideRuleData), []);
|
|
149
133
|
formInstance.onFinish = onFinish;
|
|
150
134
|
formInstance.onValuesChange = onValuesChange;
|
|
151
135
|
formInstance.onFinishFailed = onFinishFailed;
|
|
152
|
-
(0,
|
|
136
|
+
(0, react__rspack_import_1.useEffect)(()=>{
|
|
153
137
|
if (isAutoUpdatedFormData) formInstance.resetFormValues(formData);
|
|
154
138
|
}, [
|
|
155
139
|
isAutoUpdatedFormData,
|
|
@@ -160,13 +144,13 @@ var __webpack_exports__ = {};
|
|
|
160
144
|
event?.stopPropagation?.();
|
|
161
145
|
formInstance.submit();
|
|
162
146
|
};
|
|
163
|
-
return /*#__PURE__*/ (0,
|
|
147
|
+
return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)(_carefrees_form_utils_react_hooks__rspack_import_4.FormInstanceContext.Provider, {
|
|
164
148
|
value: formInstance,
|
|
165
|
-
children: /*#__PURE__*/ (0,
|
|
149
|
+
children: /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)(_tarojs_components__rspack_import_5.Form, {
|
|
166
150
|
className: cls,
|
|
167
151
|
style: style,
|
|
168
152
|
onSubmit: onSubmit,
|
|
169
|
-
children: /*#__PURE__*/ (0,
|
|
153
|
+
children: /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)(_layout__rspack_import_3.FormLayout, {
|
|
170
154
|
...rest,
|
|
171
155
|
className: layoutClassName,
|
|
172
156
|
style: layoutStyle,
|
|
@@ -177,9 +161,9 @@ var __webpack_exports__ = {};
|
|
|
177
161
|
}
|
|
178
162
|
})();
|
|
179
163
|
exports.Form = __webpack_exports__.Form;
|
|
180
|
-
for(var
|
|
164
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
181
165
|
"Form"
|
|
182
|
-
].indexOf(
|
|
166
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
183
167
|
Object.defineProperty(exports, '__esModule', {
|
|
184
168
|
value: true
|
|
185
169
|
});
|
package/lib/layout/index.js
CHANGED
|
@@ -22,7 +22,7 @@ var __webpack_require__ = {};
|
|
|
22
22
|
})();
|
|
23
23
|
(()=>{
|
|
24
24
|
__webpack_require__.r = (exports1)=>{
|
|
25
|
-
if (
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
26
|
value: 'Module'
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -33,8 +33,8 @@ var __webpack_require__ = {};
|
|
|
33
33
|
var __webpack_exports__ = {};
|
|
34
34
|
__webpack_require__.r(__webpack_exports__);
|
|
35
35
|
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
FormLayout: ()=>FormLayout,
|
|
37
|
+
FormLayoutRows: ()=>FormLayoutRows
|
|
38
38
|
});
|
|
39
39
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
40
|
const external_react_namespaceObject = require("react");
|
|
@@ -137,10 +137,10 @@ const FormLayoutRows = (props)=>{
|
|
|
137
137
|
};
|
|
138
138
|
exports.FormLayout = __webpack_exports__.FormLayout;
|
|
139
139
|
exports.FormLayoutRows = __webpack_exports__.FormLayoutRows;
|
|
140
|
-
for(var
|
|
140
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
141
141
|
"FormLayout",
|
|
142
142
|
"FormLayoutRows"
|
|
143
|
-
].indexOf(
|
|
143
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
144
144
|
Object.defineProperty(exports, '__esModule', {
|
|
145
145
|
value: true
|
|
146
146
|
});
|
|
@@ -22,7 +22,7 @@ var __webpack_require__ = {};
|
|
|
22
22
|
})();
|
|
23
23
|
(()=>{
|
|
24
24
|
__webpack_require__.r = (exports1)=>{
|
|
25
|
-
if (
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
26
|
value: 'Module'
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -149,9 +149,9 @@ const LayoutFormItem = /*#__PURE__*/ (0, external_react_namespaceObject.memo)((p
|
|
|
149
149
|
});
|
|
150
150
|
});
|
|
151
151
|
exports.LayoutFormItem = __webpack_exports__.LayoutFormItem;
|
|
152
|
-
for(var
|
|
152
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
153
153
|
"LayoutFormItem"
|
|
154
|
-
].indexOf(
|
|
154
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
155
155
|
Object.defineProperty(exports, '__esModule', {
|
|
156
156
|
value: true
|
|
157
157
|
});
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "SunLxy <1011771396@qq.com>",
|
|
4
4
|
"description": "taro react 表单组件",
|
|
5
5
|
"homepage": "https://github.com/SunLxy/carefrees-form-utils",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.15",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"types": "lib/index.d.ts",
|
|
9
9
|
"module": "esm/index.js",
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/SunLxy/carefrees-form-utils.git"
|
|
21
|
+
},
|
|
18
22
|
"files": [
|
|
19
23
|
"src",
|
|
20
24
|
"lib",
|
|
@@ -22,8 +26,8 @@
|
|
|
22
26
|
"assets"
|
|
23
27
|
],
|
|
24
28
|
"dependencies": {
|
|
25
|
-
"@carefrees/form-utils": "^0.0.
|
|
26
|
-
"@carefrees/form-utils-react-hooks": "^0.0.
|
|
29
|
+
"@carefrees/form-utils": "^0.0.15",
|
|
30
|
+
"@carefrees/form-utils-react-hooks": "^0.0.15",
|
|
27
31
|
"classnames": "2.5.1"
|
|
28
32
|
},
|
|
29
33
|
"devDependencies": {
|
|
@@ -31,4 +35,4 @@
|
|
|
31
35
|
"@types/react": "18.2.21",
|
|
32
36
|
"react": "^18.2.0"
|
|
33
37
|
}
|
|
34
|
-
}
|
|
38
|
+
}
|
package/src/index.tsx
CHANGED
|
@@ -5,7 +5,6 @@ import { FormLayout, FormLayoutProps } from './layout';
|
|
|
5
5
|
import { useRegisterForm, useForm, FormInstanceContext } from '@carefrees/form-utils-react-hooks';
|
|
6
6
|
import { Form as TaroForm } from '@tarojs/components';
|
|
7
7
|
import type { CommonEventFunction, FormProps as TaroFormProps } from '@tarojs/components';
|
|
8
|
-
import './styles/index.css';
|
|
9
8
|
export * from './formItem';
|
|
10
9
|
export * from './formList';
|
|
11
10
|
export * from './layout';
|
package/esm/styles/index.css
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
.carefrees-form {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
background-color: #fff;
|
|
4
|
-
font-size: 14px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.carefrees-form-layout {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
border-radius: 4px;
|
|
10
|
-
width: 100%;
|
|
11
|
-
padding-bottom: 8px;
|
|
12
|
-
position: relative;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.carefrees-form-layout.all-colspan {
|
|
16
|
-
grid-column: 1 / -1;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.carefrees-form-layout.bordered {
|
|
20
|
-
border: 1px solid #e0e0e0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.carefrees-form-layout.bordered .carefrees-form-layout-header {
|
|
24
|
-
padding-inline: 8px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.carefrees-form-layout-header {
|
|
28
|
-
padding-top: 5px;
|
|
29
|
-
padding-bottom: 5px;
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
border-bottom: 1px solid #e0e0e0;
|
|
32
|
-
flex-direction: row;
|
|
33
|
-
justify-content: space-between;
|
|
34
|
-
align-items: center;
|
|
35
|
-
margin-block-end: 4px;
|
|
36
|
-
padding-inline: 2px;
|
|
37
|
-
display: flex;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.carefrees-form-layout-header-title {
|
|
41
|
-
color: #1d2129;
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
font-size: 14px;
|
|
44
|
-
font-weight: 600;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.carefrees-form-layout-header-extra {
|
|
48
|
-
color: #1d2129;
|
|
49
|
-
box-sizing: border-box;
|
|
50
|
-
font-size: 14px;
|
|
51
|
-
font-weight: 500;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.carefrees-form-layout-body {
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
grid-template-columns: repeat(1, auto);
|
|
57
|
-
gap: 2px;
|
|
58
|
-
width: 100%;
|
|
59
|
-
padding-left: 2px;
|
|
60
|
-
padding-right: 2px;
|
|
61
|
-
display: grid;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.carefrees-form-item {
|
|
65
|
-
box-sizing: border-box;
|
|
66
|
-
color: #000000e0;
|
|
67
|
-
flex-direction: row;
|
|
68
|
-
align-items: flex-start;
|
|
69
|
-
padding: 8px;
|
|
70
|
-
font-size: 14px;
|
|
71
|
-
display: flex;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.carefrees-form-item-container {
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
flex-direction: column;
|
|
77
|
-
flex: 1;
|
|
78
|
-
gap: 4px;
|
|
79
|
-
height: 100%;
|
|
80
|
-
display: flex;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.carefrees-form-item-container.left {
|
|
84
|
-
flex-direction: row;
|
|
85
|
-
gap: 8px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.carefrees-form-item-container.left .carefrees-form-item-label-warp {
|
|
89
|
-
text-align: right;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.carefrees-form-item-container.between {
|
|
93
|
-
text-align: left;
|
|
94
|
-
flex-direction: row;
|
|
95
|
-
justify-content: space-between;
|
|
96
|
-
gap: 8px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.carefrees-form-item-container.between .carefrees-form-item-body, .carefrees-form-item-container.between .carefrees-form-item-body-input {
|
|
100
|
-
text-align: right;
|
|
101
|
-
justify-content: flex-end;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.carefrees-form-item-label-warp {
|
|
105
|
-
box-sizing: border-box;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.carefrees-form-item-label {
|
|
109
|
-
box-sizing: border-box;
|
|
110
|
-
color: #000000e0;
|
|
111
|
-
justify-content: flex-start;
|
|
112
|
-
align-items: center;
|
|
113
|
-
min-height: 1.4rem;
|
|
114
|
-
font-size: 14px;
|
|
115
|
-
display: flex;
|
|
116
|
-
position: relative;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.carefrees-form-item-label.show-colon:after {
|
|
120
|
-
content: ":";
|
|
121
|
-
text-align: center;
|
|
122
|
-
box-sizing: border-box;
|
|
123
|
-
margin: 0;
|
|
124
|
-
margin-inline: 2px;
|
|
125
|
-
display: inline-block;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.carefrees-form-item-label.required:before {
|
|
129
|
-
content: "*";
|
|
130
|
-
color: red;
|
|
131
|
-
box-sizing: border-box;
|
|
132
|
-
margin-inline-end: 4px;
|
|
133
|
-
display: inline-block;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.carefrees-form-item-body {
|
|
137
|
-
box-sizing: border-box;
|
|
138
|
-
flex-direction: column;
|
|
139
|
-
flex: 1;
|
|
140
|
-
justify-content: flex-start;
|
|
141
|
-
align-items: flex-start;
|
|
142
|
-
gap: 4px;
|
|
143
|
-
display: flex;
|
|
144
|
-
position: relative;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.carefrees-form-item-body-input {
|
|
148
|
-
box-sizing: border-box;
|
|
149
|
-
flex-direction: row;
|
|
150
|
-
flex: 1;
|
|
151
|
-
justify-content: flex-start;
|
|
152
|
-
align-items: center;
|
|
153
|
-
width: 100%;
|
|
154
|
-
display: flex;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.carefrees-form-item-body-input.input-bordered {
|
|
158
|
-
border-bottom: 1px solid #e0e0e0;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.carefrees-form-item-body-help {
|
|
162
|
-
box-sizing: border-box;
|
|
163
|
-
width: 100%;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.carefrees-form-item-body-error {
|
|
167
|
-
color: red;
|
|
168
|
-
box-sizing: border-box;
|
|
169
|
-
z-index: 10;
|
|
170
|
-
pointer-events: none;
|
|
171
|
-
flex-direction: row;
|
|
172
|
-
justify-content: start;
|
|
173
|
-
width: 100%;
|
|
174
|
-
padding-top: 2px;
|
|
175
|
-
font-size: 12px;
|
|
176
|
-
display: flex;
|
|
177
|
-
position: absolute;
|
|
178
|
-
inset: auto 0 -16px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.carefrees-form-item-body-error.right-bottom {
|
|
182
|
-
justify-content: flex-end;
|
|
183
|
-
inset: auto 0 -16px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.carefrees-form-item-body-error.top-left {
|
|
187
|
-
justify-content: start;
|
|
188
|
-
inset: -16px 0 auto;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.carefrees-form-item-body-error.top-right {
|
|
192
|
-
justify-content: flex-end;
|
|
193
|
-
inset: -16px 0 auto;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.carefrees-form-item-extra {
|
|
197
|
-
box-sizing: border-box;
|
|
198
|
-
}
|
|
199
|
-
|
package/lib/styles/index.css
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
.carefrees-form {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
background-color: #fff;
|
|
4
|
-
font-size: 14px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.carefrees-form-layout {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
border-radius: 4px;
|
|
10
|
-
width: 100%;
|
|
11
|
-
padding-bottom: 8px;
|
|
12
|
-
position: relative;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.carefrees-form-layout.all-colspan {
|
|
16
|
-
grid-column: 1 / -1;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.carefrees-form-layout.bordered {
|
|
20
|
-
border: 1px solid #e0e0e0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.carefrees-form-layout.bordered .carefrees-form-layout-header {
|
|
24
|
-
padding-inline: 8px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.carefrees-form-layout-header {
|
|
28
|
-
padding-top: 5px;
|
|
29
|
-
padding-bottom: 5px;
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
border-bottom: 1px solid #e0e0e0;
|
|
32
|
-
flex-direction: row;
|
|
33
|
-
justify-content: space-between;
|
|
34
|
-
align-items: center;
|
|
35
|
-
margin-block-end: 4px;
|
|
36
|
-
padding-inline: 2px;
|
|
37
|
-
display: flex;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.carefrees-form-layout-header-title {
|
|
41
|
-
color: #1d2129;
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
font-size: 14px;
|
|
44
|
-
font-weight: 600;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.carefrees-form-layout-header-extra {
|
|
48
|
-
color: #1d2129;
|
|
49
|
-
box-sizing: border-box;
|
|
50
|
-
font-size: 14px;
|
|
51
|
-
font-weight: 500;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.carefrees-form-layout-body {
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
grid-template-columns: repeat(1, auto);
|
|
57
|
-
gap: 2px;
|
|
58
|
-
width: 100%;
|
|
59
|
-
padding-left: 2px;
|
|
60
|
-
padding-right: 2px;
|
|
61
|
-
display: grid;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.carefrees-form-item {
|
|
65
|
-
box-sizing: border-box;
|
|
66
|
-
color: #000000e0;
|
|
67
|
-
flex-direction: row;
|
|
68
|
-
align-items: flex-start;
|
|
69
|
-
padding: 8px;
|
|
70
|
-
font-size: 14px;
|
|
71
|
-
display: flex;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.carefrees-form-item-container {
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
flex-direction: column;
|
|
77
|
-
flex: 1;
|
|
78
|
-
gap: 4px;
|
|
79
|
-
height: 100%;
|
|
80
|
-
display: flex;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.carefrees-form-item-container.left {
|
|
84
|
-
flex-direction: row;
|
|
85
|
-
gap: 8px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.carefrees-form-item-container.left .carefrees-form-item-label-warp {
|
|
89
|
-
text-align: right;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.carefrees-form-item-container.between {
|
|
93
|
-
text-align: left;
|
|
94
|
-
flex-direction: row;
|
|
95
|
-
justify-content: space-between;
|
|
96
|
-
gap: 8px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.carefrees-form-item-container.between .carefrees-form-item-body, .carefrees-form-item-container.between .carefrees-form-item-body-input {
|
|
100
|
-
text-align: right;
|
|
101
|
-
justify-content: flex-end;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.carefrees-form-item-label-warp {
|
|
105
|
-
box-sizing: border-box;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.carefrees-form-item-label {
|
|
109
|
-
box-sizing: border-box;
|
|
110
|
-
color: #000000e0;
|
|
111
|
-
justify-content: flex-start;
|
|
112
|
-
align-items: center;
|
|
113
|
-
min-height: 1.4rem;
|
|
114
|
-
font-size: 14px;
|
|
115
|
-
display: flex;
|
|
116
|
-
position: relative;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.carefrees-form-item-label.show-colon:after {
|
|
120
|
-
content: ":";
|
|
121
|
-
text-align: center;
|
|
122
|
-
box-sizing: border-box;
|
|
123
|
-
margin: 0;
|
|
124
|
-
margin-inline: 2px;
|
|
125
|
-
display: inline-block;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.carefrees-form-item-label.required:before {
|
|
129
|
-
content: "*";
|
|
130
|
-
color: red;
|
|
131
|
-
box-sizing: border-box;
|
|
132
|
-
margin-inline-end: 4px;
|
|
133
|
-
display: inline-block;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.carefrees-form-item-body {
|
|
137
|
-
box-sizing: border-box;
|
|
138
|
-
flex-direction: column;
|
|
139
|
-
flex: 1;
|
|
140
|
-
justify-content: flex-start;
|
|
141
|
-
align-items: flex-start;
|
|
142
|
-
gap: 4px;
|
|
143
|
-
display: flex;
|
|
144
|
-
position: relative;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.carefrees-form-item-body-input {
|
|
148
|
-
box-sizing: border-box;
|
|
149
|
-
flex-direction: row;
|
|
150
|
-
flex: 1;
|
|
151
|
-
justify-content: flex-start;
|
|
152
|
-
align-items: center;
|
|
153
|
-
width: 100%;
|
|
154
|
-
display: flex;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.carefrees-form-item-body-input.input-bordered {
|
|
158
|
-
border-bottom: 1px solid #e0e0e0;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.carefrees-form-item-body-help {
|
|
162
|
-
box-sizing: border-box;
|
|
163
|
-
width: 100%;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.carefrees-form-item-body-error {
|
|
167
|
-
color: red;
|
|
168
|
-
box-sizing: border-box;
|
|
169
|
-
z-index: 10;
|
|
170
|
-
pointer-events: none;
|
|
171
|
-
flex-direction: row;
|
|
172
|
-
justify-content: start;
|
|
173
|
-
width: 100%;
|
|
174
|
-
padding-top: 2px;
|
|
175
|
-
font-size: 12px;
|
|
176
|
-
display: flex;
|
|
177
|
-
position: absolute;
|
|
178
|
-
inset: auto 0 -16px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.carefrees-form-item-body-error.right-bottom {
|
|
182
|
-
justify-content: flex-end;
|
|
183
|
-
inset: auto 0 -16px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.carefrees-form-item-body-error.top-left {
|
|
187
|
-
justify-content: start;
|
|
188
|
-
inset: -16px 0 auto;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.carefrees-form-item-body-error.top-right {
|
|
192
|
-
justify-content: flex-end;
|
|
193
|
-
inset: -16px 0 auto;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.carefrees-form-item-extra {
|
|
197
|
-
box-sizing: border-box;
|
|
198
|
-
}
|
|
199
|
-
|
package/src/styles/index.css
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
/* 表单 */
|
|
2
|
-
.carefrees-form {
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
background-color: #fff;
|
|
5
|
-
font-size: 14px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/* 布局 */
|
|
9
|
-
.carefrees-form-layout {
|
|
10
|
-
width: 100%;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
border-radius: 4px;
|
|
13
|
-
padding-bottom: 8px;
|
|
14
|
-
position: relative;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.carefrees-form-layout.all-colspan {
|
|
18
|
-
grid-column: 1 / -1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.carefrees-form-layout.bordered {
|
|
22
|
-
border: 1px solid #e0e0e0;
|
|
23
|
-
}
|
|
24
|
-
.carefrees-form-layout.bordered .carefrees-form-layout-header {
|
|
25
|
-
padding-inline-start: 8px;
|
|
26
|
-
padding-inline-end: 8px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.carefrees-form-layout-header {
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: space-between;
|
|
32
|
-
align-items: center;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
border-bottom: 1px solid #e0e0e0;
|
|
35
|
-
padding-top: 5px;
|
|
36
|
-
padding-bottom: 5px;
|
|
37
|
-
margin-block-end: 4px;
|
|
38
|
-
padding-inline-start: 2px;
|
|
39
|
-
padding-inline-end: 2px;
|
|
40
|
-
box-sizing: border-box;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.carefrees-form-layout-header-title {
|
|
44
|
-
font-size: 14px;
|
|
45
|
-
font-weight: 600;
|
|
46
|
-
color: #1d2129;
|
|
47
|
-
box-sizing: border-box;
|
|
48
|
-
}
|
|
49
|
-
.carefrees-form-layout-header-extra {
|
|
50
|
-
font-size: 14px;
|
|
51
|
-
font-weight: 500;
|
|
52
|
-
color: #1d2129;
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.carefrees-form-layout-body {
|
|
57
|
-
width: 100%;
|
|
58
|
-
display: grid;
|
|
59
|
-
grid-template-columns: repeat(1, auto);
|
|
60
|
-
gap: 2px;
|
|
61
|
-
padding-left: 2px;
|
|
62
|
-
padding-right: 2px;
|
|
63
|
-
box-sizing: border-box;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* 表单项 */
|
|
67
|
-
.carefrees-form-item {
|
|
68
|
-
font-size: 14px;
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: row;
|
|
71
|
-
align-items: flex-start;
|
|
72
|
-
padding: 8px;
|
|
73
|
-
box-sizing: border-box;
|
|
74
|
-
color: rgba(0, 0, 0, 0.88);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.carefrees-form-item-container {
|
|
78
|
-
flex: 1;
|
|
79
|
-
height: 100%;
|
|
80
|
-
display: flex;
|
|
81
|
-
flex-direction: column;
|
|
82
|
-
gap: 4px;
|
|
83
|
-
box-sizing: border-box;
|
|
84
|
-
}
|
|
85
|
-
.carefrees-form-item-container.left {
|
|
86
|
-
flex-direction: row;
|
|
87
|
-
gap: 8px;
|
|
88
|
-
}
|
|
89
|
-
.carefrees-form-item-container.left .carefrees-form-item-label-warp {
|
|
90
|
-
text-align: right;
|
|
91
|
-
}
|
|
92
|
-
.carefrees-form-item-container.between {
|
|
93
|
-
gap: 8px;
|
|
94
|
-
text-align: left;
|
|
95
|
-
flex-direction: row;
|
|
96
|
-
justify-content: space-between;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.carefrees-form-item-container.between .carefrees-form-item-body,
|
|
100
|
-
.carefrees-form-item-container.between .carefrees-form-item-body-input {
|
|
101
|
-
justify-content: flex-end;
|
|
102
|
-
text-align: right;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.carefrees-form-item-label-warp {
|
|
106
|
-
box-sizing: border-box;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.carefrees-form-item-label {
|
|
110
|
-
box-sizing: border-box;
|
|
111
|
-
display: flex;
|
|
112
|
-
align-items: center;
|
|
113
|
-
justify-content: flex-start;
|
|
114
|
-
position: relative;
|
|
115
|
-
font-size: 14px;
|
|
116
|
-
color: rgba(0, 0, 0, 0.88);
|
|
117
|
-
min-height: 1.4rem;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.carefrees-form-item-label.show-colon::after {
|
|
121
|
-
content: ':';
|
|
122
|
-
display: inline-block;
|
|
123
|
-
text-align: center;
|
|
124
|
-
margin: 0;
|
|
125
|
-
margin-inline-end: 2px;
|
|
126
|
-
margin-inline-start: 2px;
|
|
127
|
-
box-sizing: border-box;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.carefrees-form-item-label.required::before {
|
|
131
|
-
content: '*';
|
|
132
|
-
color: red;
|
|
133
|
-
display: inline-block;
|
|
134
|
-
margin-inline-end: 4px;
|
|
135
|
-
box-sizing: border-box;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.carefrees-form-item-body {
|
|
139
|
-
position: relative;
|
|
140
|
-
display: flex;
|
|
141
|
-
flex-direction: column;
|
|
142
|
-
align-items: flex-start;
|
|
143
|
-
justify-content: flex-start;
|
|
144
|
-
box-sizing: border-box;
|
|
145
|
-
gap: 4px;
|
|
146
|
-
flex: 1;
|
|
147
|
-
}
|
|
148
|
-
.carefrees-form-item-body-input {
|
|
149
|
-
box-sizing: border-box;
|
|
150
|
-
width: 100%;
|
|
151
|
-
flex: 1;
|
|
152
|
-
display: flex;
|
|
153
|
-
justify-content: flex-start;
|
|
154
|
-
align-items: center;
|
|
155
|
-
flex-direction: row;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.carefrees-form-item-body-input.input-bordered {
|
|
159
|
-
border-bottom: 1px solid #e0e0e0;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.carefrees-form-item-body-help {
|
|
163
|
-
width: 100%;
|
|
164
|
-
box-sizing: border-box;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.carefrees-form-item-body-error {
|
|
168
|
-
position: absolute;
|
|
169
|
-
width: 100%;
|
|
170
|
-
color: red;
|
|
171
|
-
top: auto;
|
|
172
|
-
left: 0;
|
|
173
|
-
right: 0;
|
|
174
|
-
bottom: -16px;
|
|
175
|
-
padding-top: 2px;
|
|
176
|
-
font-size: 12px;
|
|
177
|
-
box-sizing: border-box;
|
|
178
|
-
z-index: 10;
|
|
179
|
-
pointer-events: none;
|
|
180
|
-
display: flex;
|
|
181
|
-
flex-direction: row;
|
|
182
|
-
justify-content: start;
|
|
183
|
-
}
|
|
184
|
-
.carefrees-form-item-body-error.right-bottom {
|
|
185
|
-
justify-content: flex-end;
|
|
186
|
-
top: auto;
|
|
187
|
-
left: 0;
|
|
188
|
-
right: 0;
|
|
189
|
-
bottom: -16px;
|
|
190
|
-
}
|
|
191
|
-
.carefrees-form-item-body-error.top-left {
|
|
192
|
-
justify-content: start;
|
|
193
|
-
top: -16px;
|
|
194
|
-
left: 0px;
|
|
195
|
-
right: 0px;
|
|
196
|
-
bottom: auto;
|
|
197
|
-
}
|
|
198
|
-
.carefrees-form-item-body-error.top-right {
|
|
199
|
-
justify-content: flex-end;
|
|
200
|
-
top: -16px;
|
|
201
|
-
left: 0px;
|
|
202
|
-
right: 0px;
|
|
203
|
-
bottom: auto;
|
|
204
|
-
}
|
|
205
|
-
.carefrees-form-item-extra {
|
|
206
|
-
box-sizing: border-box;
|
|
207
|
-
}
|