@hw-component/form 1.9.59 → 1.9.61
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/es/Form/config.d.ts +1 -1
- package/es/Input/InputNumberGroup.js +72 -104
- package/es/InputGroup/index.d.ts +9 -0
- package/es/InputGroup/index.js +65 -0
- package/es/TextArea/index.d.ts +4 -1
- package/es/TextArea/index.js +12 -3
- package/es/hooks/index.js +1 -1
- package/es/index.css +30 -26
- package/es/index.d.ts +2 -1
- package/es/index.js +1 -0
- package/lib/Form/config.d.ts +1 -1
- package/lib/Input/InputNumberGroup.js +76 -108
- package/lib/InputGroup/index.d.ts +9 -0
- package/lib/InputGroup/index.js +68 -0
- package/lib/TextArea/index.d.ts +4 -1
- package/lib/TextArea/index.js +12 -3
- package/lib/index.css +30 -26
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -4
- package/package.json +1 -1
- package/src/components/Input/InputNumberGroup.tsx +58 -76
- package/src/components/Input/index.less +5 -18
- package/src/components/InputGroup/index.less +26 -0
- package/src/components/InputGroup/index.tsx +42 -0
- package/src/components/TextArea/index.less +8 -0
- package/src/components/TextArea/index.tsx +11 -2
- package/src/components/index.tsx +1 -0
- package/src/components/styles/index.less +2 -14
- package/src/pages/Form/index.tsx +6 -123
- package/src/pages/Input/index.tsx +2 -0
- package/src/pages/InputNumberGroup/index.tsx +3 -1
|
@@ -10,8 +10,9 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
10
10
|
var antd = require('antd');
|
|
11
11
|
var icons = require('@ant-design/icons');
|
|
12
12
|
var React = require('react');
|
|
13
|
-
var index = require('../hooks/index.js');
|
|
13
|
+
var index$1 = require('../hooks/index.js');
|
|
14
14
|
var HFormConnect = require('../Form/HFormConnect.js');
|
|
15
|
+
var index = require('../InputGroup/index.js');
|
|
15
16
|
|
|
16
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
18
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -25,49 +26,27 @@ var useArrayProps = function useArrayProps(props) {
|
|
|
25
26
|
return [props, props];
|
|
26
27
|
}, [props]);
|
|
27
28
|
};
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
value = _ref
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (!children) {
|
|
34
|
-
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
35
|
-
}
|
|
36
|
-
if (/*#__PURE__*/React.isValidElement(children)) {
|
|
37
|
-
return jsxRuntime.jsx("div", {
|
|
38
|
-
className: addonClassname,
|
|
39
|
-
children: /*#__PURE__*/React.cloneElement(children, {
|
|
40
|
-
value: value,
|
|
41
|
-
onChange: onChange
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
return jsxRuntime.jsx("div", {
|
|
46
|
-
className: addonClassname,
|
|
47
|
-
children: children
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
var InputNumberGroup = function InputNumberGroup(_ref2) {
|
|
51
|
-
var _ref2$value = _ref2.value,
|
|
52
|
-
value = _ref2$value === void 0 ? {} : _ref2$value,
|
|
53
|
-
_ref2$valueMap = _ref2.valueMap,
|
|
54
|
-
valueMap = _ref2$valueMap === void 0 ? {
|
|
29
|
+
var Content = function Content(_ref) {
|
|
30
|
+
var _ref$value = _ref.value,
|
|
31
|
+
value = _ref$value === void 0 ? {} : _ref$value,
|
|
32
|
+
_ref$valueMap = _ref.valueMap,
|
|
33
|
+
valueMap = _ref$valueMap === void 0 ? {
|
|
55
34
|
min: "min",
|
|
56
35
|
max: "max"
|
|
57
|
-
} :
|
|
58
|
-
onChange =
|
|
59
|
-
|
|
60
|
-
placeholder =
|
|
61
|
-
|
|
62
|
-
inputNumberProps =
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
noHandlerWrap =
|
|
66
|
-
addFormat =
|
|
67
|
-
disabled =
|
|
68
|
-
|
|
69
|
-
minValMk =
|
|
70
|
-
maxValMk =
|
|
36
|
+
} : _ref$valueMap,
|
|
37
|
+
onChange = _ref.onChange,
|
|
38
|
+
_ref$placeholder = _ref.placeholder,
|
|
39
|
+
placeholder = _ref$placeholder === void 0 ? ["请输入", "请输入"] : _ref$placeholder,
|
|
40
|
+
_ref$inputNumberProps = _ref.inputNumberProps,
|
|
41
|
+
inputNumberProps = _ref$inputNumberProps === void 0 ? {} : _ref$inputNumberProps;
|
|
42
|
+
_ref.addonAfter;
|
|
43
|
+
var _ref$noHandlerWrap = _ref.noHandlerWrap,
|
|
44
|
+
noHandlerWrap = _ref$noHandlerWrap === void 0 ? true : _ref$noHandlerWrap,
|
|
45
|
+
addFormat = _ref.addFormat,
|
|
46
|
+
disabled = _ref.disabled;
|
|
47
|
+
_ref.addonBefore;
|
|
48
|
+
var minValMk = _ref.minValMk,
|
|
49
|
+
maxValMk = _ref.maxValMk;
|
|
71
50
|
var min = valueMap.min,
|
|
72
51
|
max = valueMap.max;
|
|
73
52
|
var minVal = value[min],
|
|
@@ -84,15 +63,13 @@ var InputNumberGroup = function InputNumberGroup(_ref2) {
|
|
|
84
63
|
_useState2 = _slicedToArray(_useState, 2),
|
|
85
64
|
focus = _useState2[0],
|
|
86
65
|
setFocus = _useState2[1];
|
|
87
|
-
var
|
|
88
|
-
var
|
|
89
|
-
var
|
|
90
|
-
var
|
|
91
|
-
var
|
|
92
|
-
var
|
|
93
|
-
var
|
|
94
|
-
var notDisabledClassname = index.useClassName(["hw-input-group-not-disabled"]);
|
|
95
|
-
var noHandlerWrapClassname = index.useClassName(["hw-input-group-no-handler-wrap"]);
|
|
66
|
+
var bodyClassname = index$1.useClassName(["hw-input-group-number-body"]);
|
|
67
|
+
var activeClassname = index$1.useClassName(["hw-input-group-active"]);
|
|
68
|
+
var oneClassname = index$1.useClassName(["hw-input-group-one"]);
|
|
69
|
+
var iconClassname = index$1.useClassName(["hw-input-group-icon"]);
|
|
70
|
+
var disabledClassname = index$1.useClassName(["hw-input-group-disabled"]);
|
|
71
|
+
var notDisabledClassname = index$1.useClassName(["hw-input-group-not-disabled"]);
|
|
72
|
+
var noHandlerWrapClassname = index$1.useClassName(["hw-input-group-no-handler-wrap"]);
|
|
96
73
|
addFormat === null || addFormat === void 0 || addFormat({
|
|
97
74
|
float: {
|
|
98
75
|
inputValue: function inputValue(item, initValue) {
|
|
@@ -124,68 +101,59 @@ var InputNumberGroup = function InputNumberGroup(_ref2) {
|
|
|
124
101
|
newVal[key] = val;
|
|
125
102
|
onChange === null || onChange === void 0 || onChange(newVal);
|
|
126
103
|
};
|
|
127
|
-
return jsxRuntime.jsxs(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
value:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
min
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
onBlur: function onBlur() {
|
|
169
|
-
setFocus(false);
|
|
170
|
-
},
|
|
171
|
-
onChange: function onChange(val) {
|
|
172
|
-
change(max, val);
|
|
173
|
-
}
|
|
174
|
-
}, edProps), {}, {
|
|
175
|
-
disabled: disabled
|
|
176
|
-
}))]
|
|
177
|
-
}), jsxRuntime.jsx(Addon, {
|
|
178
|
-
value: value,
|
|
179
|
-
onChange: onChange,
|
|
180
|
-
children: addonAfter
|
|
181
|
-
})]
|
|
104
|
+
return jsxRuntime.jsxs("div", {
|
|
105
|
+
className: "".concat(bodyClassname, " \n ").concat(focus ? activeClassname : "", " \n ").concat(noHandlerWrap ? noHandlerWrapClassname : "", "\n ").concat(disabled ? disabledClassname : notDisabledClassname, "\n "),
|
|
106
|
+
children: [jsxRuntime.jsx(antd.InputNumber, _objectSpread(_objectSpread({
|
|
107
|
+
bordered: false,
|
|
108
|
+
value: minVal,
|
|
109
|
+
max: maxValMk ? maxValMk(maxVal) : maxVal,
|
|
110
|
+
min: 0,
|
|
111
|
+
className: oneClassname,
|
|
112
|
+
onFocus: function onFocus() {
|
|
113
|
+
setFocus(true);
|
|
114
|
+
},
|
|
115
|
+
onBlur: function onBlur() {
|
|
116
|
+
setFocus(false);
|
|
117
|
+
},
|
|
118
|
+
onChange: function onChange(val) {
|
|
119
|
+
change(min, val);
|
|
120
|
+
},
|
|
121
|
+
placeholder: fsPlaceholder
|
|
122
|
+
}, fsProps), {}, {
|
|
123
|
+
disabled: disabled
|
|
124
|
+
})), jsxRuntime.jsx("div", {
|
|
125
|
+
className: iconClassname,
|
|
126
|
+
children: jsxRuntime.jsx(icons.SwapRightOutlined, {})
|
|
127
|
+
}), jsxRuntime.jsx(antd.InputNumber, _objectSpread(_objectSpread({
|
|
128
|
+
bordered: false,
|
|
129
|
+
value: maxVal,
|
|
130
|
+
className: oneClassname,
|
|
131
|
+
placeholder: edPlaceholder,
|
|
132
|
+
min: minValMk ? minValMk(minVal) : minVal,
|
|
133
|
+
onFocus: function onFocus() {
|
|
134
|
+
setFocus(true);
|
|
135
|
+
},
|
|
136
|
+
onBlur: function onBlur() {
|
|
137
|
+
setFocus(false);
|
|
138
|
+
},
|
|
139
|
+
onChange: function onChange(val) {
|
|
140
|
+
change(max, val);
|
|
141
|
+
}
|
|
142
|
+
}, edProps), {}, {
|
|
143
|
+
disabled: disabled
|
|
144
|
+
}))]
|
|
182
145
|
});
|
|
183
146
|
};
|
|
147
|
+
var InputNumberGroup = function InputNumberGroup(props) {
|
|
148
|
+
return jsxRuntime.jsx(index.default, _objectSpread(_objectSpread({}, props), {}, {
|
|
149
|
+
children: jsxRuntime.jsx(Content, {})
|
|
150
|
+
}));
|
|
151
|
+
};
|
|
184
152
|
var Index = HFormConnect.default(InputNumberGroup);
|
|
185
153
|
var HInputNumberGroup = {
|
|
186
154
|
Component: Index,
|
|
187
|
-
placeholder: function placeholder(
|
|
188
|
-
var label =
|
|
155
|
+
placeholder: function placeholder(_ref4) {
|
|
156
|
+
var label = _ref4.label;
|
|
189
157
|
return ["\u8BF7\u8F93\u5165".concat(label, "\u6700\u5C0F\u503C"), "\u8BF7\u8F93\u5165".concat(label, "\u6700\u5927\u503C")];
|
|
190
158
|
}
|
|
191
159
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
6
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var index = require('../hooks/index.js');
|
|
10
|
+
var antd = require('antd');
|
|
11
|
+
|
|
12
|
+
var _excluded = ["addonAfter", "addonBefore", "children", "value", "onChange"];
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
+
var Addon = function Addon(_ref) {
|
|
16
|
+
var children = _ref.children,
|
|
17
|
+
value = _ref.value,
|
|
18
|
+
onChange = _ref.onChange;
|
|
19
|
+
var addonClassname = index.useClassName(["hw-addon"]);
|
|
20
|
+
if (!children) {
|
|
21
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
22
|
+
}
|
|
23
|
+
if (/*#__PURE__*/React.isValidElement(children)) {
|
|
24
|
+
return jsxRuntime.jsx("div", {
|
|
25
|
+
className: addonClassname,
|
|
26
|
+
children: /*#__PURE__*/React.cloneElement(children, {
|
|
27
|
+
value: value,
|
|
28
|
+
onChange: onChange
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return jsxRuntime.jsx("div", {
|
|
33
|
+
className: addonClassname,
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var Index = function Index(_ref2) {
|
|
38
|
+
var addonAfter = _ref2.addonAfter,
|
|
39
|
+
addonBefore = _ref2.addonBefore,
|
|
40
|
+
children = _ref2.children,
|
|
41
|
+
value = _ref2.value,
|
|
42
|
+
onChange = _ref2.onChange,
|
|
43
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
44
|
+
var contentClassname = index.useClassName(["hw-input-group"]);
|
|
45
|
+
var bodyClassname = index.useClassName(["hw-input-group-body"]);
|
|
46
|
+
return jsxRuntime.jsxs(antd.Input.Group, {
|
|
47
|
+
compact: true,
|
|
48
|
+
className: contentClassname,
|
|
49
|
+
children: [jsxRuntime.jsx(Addon, {
|
|
50
|
+
value: value,
|
|
51
|
+
onChange: onChange,
|
|
52
|
+
children: addonBefore
|
|
53
|
+
}), jsxRuntime.jsx("div", {
|
|
54
|
+
className: bodyClassname,
|
|
55
|
+
children: /*#__PURE__*/React.cloneElement(children, _objectSpread({
|
|
56
|
+
value: value,
|
|
57
|
+
onChange: onChange
|
|
58
|
+
}, props))
|
|
59
|
+
}), jsxRuntime.jsx(Addon, {
|
|
60
|
+
value: value,
|
|
61
|
+
onChange: onChange,
|
|
62
|
+
children: addonAfter
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
exports.default = Index;
|
|
68
|
+
// powered by h
|
package/lib/TextArea/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { TextAreaProps } from "antd/es/input";
|
|
2
|
-
|
|
2
|
+
export interface HTextAreaProps extends TextAreaProps {
|
|
3
|
+
bordered?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: ({ autoSize, bordered, className, ...props }: HTextAreaProps) => JSX.Element;
|
|
3
6
|
export default _default;
|
package/lib/TextArea/index.js
CHANGED
|
@@ -6,8 +6,9 @@ var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
|
6
6
|
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var antd = require('antd');
|
|
9
|
+
var index = require('../hooks/index.js');
|
|
9
10
|
|
|
10
|
-
var _excluded = ["autoSize"];
|
|
11
|
+
var _excluded = ["autoSize", "bordered", "className"];
|
|
11
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
13
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
14
|
var TextArea = (function (_ref) {
|
|
@@ -16,10 +17,18 @@ var TextArea = (function (_ref) {
|
|
|
16
17
|
minRows: 4,
|
|
17
18
|
maxRows: 4
|
|
18
19
|
} : _ref$autoSize,
|
|
20
|
+
_ref$bordered = _ref.bordered,
|
|
21
|
+
bordered = _ref$bordered === void 0 ? true : _ref$bordered,
|
|
22
|
+
_ref$className = _ref.className,
|
|
23
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
19
24
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
-
|
|
25
|
+
var noBorderClassName = index.useClassName("hw-text-area-no-border");
|
|
26
|
+
var borderClassName = !bordered ? noBorderClassName : "";
|
|
27
|
+
return jsxRuntime.jsx(antd.Input.TextArea, _objectSpread(_objectSpread({
|
|
21
28
|
autoSize: autoSize
|
|
22
|
-
}, props)
|
|
29
|
+
}, props), {}, {
|
|
30
|
+
className: "".concat(borderClassName, " ").concat(className)
|
|
31
|
+
}));
|
|
23
32
|
});
|
|
24
33
|
|
|
25
34
|
exports.default = TextArea;
|
package/lib/index.css
CHANGED
|
@@ -160,28 +160,16 @@
|
|
|
160
160
|
.ant-hw-form-form-item .ant-form-item-label {
|
|
161
161
|
overflow: visible;
|
|
162
162
|
}
|
|
163
|
-
.ant-hw-input-group {
|
|
164
|
-
display: -webkit-box !important;
|
|
165
|
-
display: -webkit-flex !important;
|
|
166
|
-
display: -ms-flexbox !important;
|
|
167
|
-
display: flex !important;
|
|
168
|
-
width: 100%;
|
|
169
|
-
color: rgba(0, 0, 0, 0.25);
|
|
170
|
-
}
|
|
171
163
|
.ant-hw-input-group .ant-hw-input-group-disabled {
|
|
172
164
|
background-color: #f5f5f5;
|
|
173
165
|
}
|
|
174
|
-
.ant-hw-input-group .ant-hw-input-group-body {
|
|
175
|
-
|
|
166
|
+
.ant-hw-input-group .ant-hw-input-group-number-body {
|
|
167
|
+
width: 100%;
|
|
168
|
+
border: 1px solid #d9d9d9;
|
|
176
169
|
display: -webkit-box !important;
|
|
177
170
|
display: -webkit-flex !important;
|
|
178
171
|
display: -ms-flexbox !important;
|
|
179
172
|
display: flex !important;
|
|
180
|
-
-webkit-box-flex: 1;
|
|
181
|
-
-webkit-flex: 1;
|
|
182
|
-
-ms-flex: 1;
|
|
183
|
-
flex: 1;
|
|
184
|
-
border: 1px solid #d9d9d9;
|
|
185
173
|
}
|
|
186
174
|
.ant-hw-input-group .ant-hw-input-group-not-disabled:hover {
|
|
187
175
|
border-color: #40a9ff;
|
|
@@ -195,14 +183,6 @@
|
|
|
195
183
|
.ant-hw-input-group .ant-hw-input-group-no-handler-wrap .ant-input-number-handler-wrap {
|
|
196
184
|
display: none;
|
|
197
185
|
}
|
|
198
|
-
.ant-hw-input-group .ant-hw-input-group-border {
|
|
199
|
-
position: absolute;
|
|
200
|
-
left: -1px;
|
|
201
|
-
display: none;
|
|
202
|
-
width: 1px;
|
|
203
|
-
height: 100%;
|
|
204
|
-
background-color: #40a9ff;
|
|
205
|
-
}
|
|
206
186
|
.ant-hw-input-group .ant-hw-input-group-icon {
|
|
207
187
|
display: -webkit-box;
|
|
208
188
|
display: -webkit-flex;
|
|
@@ -234,7 +214,7 @@
|
|
|
234
214
|
.ant-hw-color-input-picker {
|
|
235
215
|
box-shadow: 0 0 0 0 !important;
|
|
236
216
|
}
|
|
237
|
-
.ant-form-item-has-error .ant-hw-input-group-body {
|
|
217
|
+
.ant-form-item-has-error .ant-hw-input-group-number-body {
|
|
238
218
|
border-color: #ff4d4f !important;
|
|
239
219
|
}
|
|
240
220
|
.ant-form-item-has-error .ant-hw-input-group-active {
|
|
@@ -262,6 +242,31 @@
|
|
|
262
242
|
.ant-hw-switch .ant-hw-switch-after {
|
|
263
243
|
margin-left: 4px;
|
|
264
244
|
}
|
|
245
|
+
.ant-hw-text-area-no-border {
|
|
246
|
+
border: none !important;
|
|
247
|
+
}
|
|
248
|
+
.ant-hw-text-area-no-border:focus {
|
|
249
|
+
box-shadow: none !important;
|
|
250
|
+
}
|
|
251
|
+
.ant-hw-input-group {
|
|
252
|
+
display: -webkit-box !important;
|
|
253
|
+
display: -webkit-flex !important;
|
|
254
|
+
display: -ms-flexbox !important;
|
|
255
|
+
display: flex !important;
|
|
256
|
+
width: 100%;
|
|
257
|
+
color: rgba(0, 0, 0, 0.25);
|
|
258
|
+
}
|
|
259
|
+
.ant-hw-input-group .ant-hw-input-group-body {
|
|
260
|
+
position: relative;
|
|
261
|
+
display: -webkit-box !important;
|
|
262
|
+
display: -webkit-flex !important;
|
|
263
|
+
display: -ms-flexbox !important;
|
|
264
|
+
display: flex !important;
|
|
265
|
+
-webkit-box-flex: 1;
|
|
266
|
+
-webkit-flex: 1;
|
|
267
|
+
-ms-flex: 1;
|
|
268
|
+
flex: 1;
|
|
269
|
+
}
|
|
265
270
|
.ant-hw-addon {
|
|
266
271
|
display: -webkit-box !important;
|
|
267
272
|
display: -webkit-flex !important;
|
|
@@ -275,7 +280,6 @@
|
|
|
275
280
|
background-color: #fafafa;
|
|
276
281
|
border: 1px solid #d9d9d9;
|
|
277
282
|
}
|
|
278
|
-
.ant-form-item-has-error .ant-hw-
|
|
279
|
-
color: #ff4d4f;
|
|
283
|
+
.ant-form-item-has-error .ant-hw-input-group-body {
|
|
280
284
|
border-color: #ff4d4f !important;
|
|
281
285
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { useHDialogForm } from "@/components/DialogForm/hooks";
|
|
|
5
5
|
export { default as HFormConnect } from "./Form/HFormConnect";
|
|
6
6
|
export { default as HFormConfigProvider } from "./Form/Context/FormConfigProvider";
|
|
7
7
|
export { default as HBasicForm } from "./Form/Basic";
|
|
8
|
+
export { default as HInputGroup } from "./InputGroup";
|
|
8
9
|
export declare const HSelect: import("react").ForwardRefExoticComponent<import("./Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
|
|
9
10
|
export declare const HInput: ({ copy: copyProps, value, addonAfter, ...props }: import("./Input/modal").HInputProps) => JSX.Element;
|
|
10
11
|
export declare const HSelectInput: import("react").ForwardRefExoticComponent<import("./Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
|
|
@@ -20,7 +21,7 @@ export declare const HRadioGroup: ({ value, options, onChange, fieldNames: props
|
|
|
20
21
|
export declare const HTimePicker: import("react").ForwardRefExoticComponent<import("./Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
|
|
21
22
|
export declare const HInputNumber: ({ style, ...props }: import("antd").InputNumberProps) => JSX.Element;
|
|
22
23
|
export declare const HPageHandler: import("react").FC<import("./PageHandler/modal").IHPageHandler<any>>;
|
|
23
|
-
export declare const HTextArea: ({ autoSize, ...props }: import("
|
|
24
|
+
export declare const HTextArea: ({ autoSize, bordered, className, ...props }: import("./TextArea").HTextAreaProps) => JSX.Element;
|
|
24
25
|
export declare const HColorInput: ({ value, onChange, defaultColor, ...props }: import("./Input/modal").HInputProps) => JSX.Element;
|
|
25
26
|
export declare const HModalForm: import("react").FC<import("./DialogForm/modal").DialogFormProps<any, any>>;
|
|
26
27
|
export declare const HDrawerForm: import("react").FC<import("./DialogForm/modal").DialogFormProps<any, any>>;
|
package/lib/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var config = require('./Form/config.js');
|
|
4
|
-
var index$
|
|
4
|
+
var index$2 = require('./PageHandler/index.js');
|
|
5
5
|
var index = require('./Form/index.js');
|
|
6
6
|
var useHForm = require('./Form/hooks/useHForm.js');
|
|
7
7
|
var hooks = require('./DialogForm/hooks.js');
|
|
8
8
|
var HFormConnect = require('./Form/HFormConnect.js');
|
|
9
9
|
var FormConfigProvider = require('./Form/Context/FormConfigProvider.js');
|
|
10
10
|
var Basic = require('./Form/Basic.js');
|
|
11
|
+
var index$1 = require('./InputGroup/index.js');
|
|
11
12
|
var ModalForm = require('./DialogForm/ModalForm.js');
|
|
12
|
-
var index$
|
|
13
|
+
var index$3 = require('./DialogForm/DrawerForm/index.js');
|
|
13
14
|
|
|
14
15
|
var HSelect = config.default.select;
|
|
15
16
|
var HInput = config.default.input;
|
|
@@ -25,11 +26,11 @@ var HRangePicker = config.default.rangePicker.Component;
|
|
|
25
26
|
var HRadioGroup = config.default.radioGroup;
|
|
26
27
|
var HTimePicker = config.default.timePicker;
|
|
27
28
|
var HInputNumber = config.default.inputNumber;
|
|
28
|
-
var HPageHandler = index$
|
|
29
|
+
var HPageHandler = index$2.default;
|
|
29
30
|
var HTextArea = config.default.textArea;
|
|
30
31
|
var HColorInput = config.default.colorInput;
|
|
31
32
|
var HModalForm = ModalForm.default;
|
|
32
|
-
var HDrawerForm = index$
|
|
33
|
+
var HDrawerForm = index$3.default;
|
|
33
34
|
var HCascader = config.default.cascader;
|
|
34
35
|
var HVerificationCodeInput = config.default.verificationCodeInput;
|
|
35
36
|
var HTrimInput = config.default.trimInput;
|
|
@@ -42,6 +43,7 @@ exports.useHDialogForm = hooks.useHDialogForm;
|
|
|
42
43
|
exports.HFormConnect = HFormConnect.default;
|
|
43
44
|
exports.HFormConfigProvider = FormConfigProvider.default;
|
|
44
45
|
exports.HBasicForm = Basic.default;
|
|
46
|
+
exports.HInputGroup = index$1.default;
|
|
45
47
|
exports.HButtonInput = HButtonInput;
|
|
46
48
|
exports.HCascader = HCascader;
|
|
47
49
|
exports.HCheckBox = HCheckBox;
|