@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
package/es/Form/config.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare const componentConfig: {
|
|
|
25
25
|
placeholder: ({ label }: import("./modal").HItemProps) => string;
|
|
26
26
|
};
|
|
27
27
|
submit: ({ position, reset, extraList, ...props }: import("../Submit").ISubmitProps) => JSX.Element;
|
|
28
|
-
textArea: ({ autoSize, ...props }: import("
|
|
28
|
+
textArea: ({ autoSize, bordered, className, ...props }: import("../TextArea").HTextAreaProps) => JSX.Element;
|
|
29
29
|
colorInput: ({ value, onChange, defaultColor, ...props }: import("../Input/modal").HInputProps) => JSX.Element;
|
|
30
30
|
cascader: ({ request, options, fieldNames: propsFieldNames, ...props }: import("../Cascader").HCascaderProps) => JSX.Element;
|
|
31
31
|
verificationCodeInput: import("react").ForwardRefExoticComponent<import("./modal").HFormItemProps & import("react").RefAttributes<any>>;
|
|
@@ -3,12 +3,13 @@ import _typeof from '@babel/runtime-corejs3/helpers/typeof';
|
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
4
4
|
import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
|
|
5
5
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { InputNumber } from 'antd';
|
|
8
8
|
import { SwapRightOutlined } from '@ant-design/icons';
|
|
9
|
-
import
|
|
9
|
+
import { useState, useMemo } from 'react';
|
|
10
10
|
import { useClassName } from '../hooks/index.js';
|
|
11
11
|
import HFormConnect from '../Form/HFormConnect.js';
|
|
12
|
+
import Index$1 from '../InputGroup/index.js';
|
|
12
13
|
|
|
13
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
15
|
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); }
|
|
@@ -22,49 +23,27 @@ var useArrayProps = function useArrayProps(props) {
|
|
|
22
23
|
return [props, props];
|
|
23
24
|
}, [props]);
|
|
24
25
|
};
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
value = _ref
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (!children) {
|
|
31
|
-
return jsx(Fragment, {});
|
|
32
|
-
}
|
|
33
|
-
if (/*#__PURE__*/React.isValidElement(children)) {
|
|
34
|
-
return jsx("div", {
|
|
35
|
-
className: addonClassname,
|
|
36
|
-
children: /*#__PURE__*/React.cloneElement(children, {
|
|
37
|
-
value: value,
|
|
38
|
-
onChange: onChange
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return jsx("div", {
|
|
43
|
-
className: addonClassname,
|
|
44
|
-
children: children
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
var InputNumberGroup = function InputNumberGroup(_ref2) {
|
|
48
|
-
var _ref2$value = _ref2.value,
|
|
49
|
-
value = _ref2$value === void 0 ? {} : _ref2$value,
|
|
50
|
-
_ref2$valueMap = _ref2.valueMap,
|
|
51
|
-
valueMap = _ref2$valueMap === void 0 ? {
|
|
26
|
+
var Content = function Content(_ref) {
|
|
27
|
+
var _ref$value = _ref.value,
|
|
28
|
+
value = _ref$value === void 0 ? {} : _ref$value,
|
|
29
|
+
_ref$valueMap = _ref.valueMap,
|
|
30
|
+
valueMap = _ref$valueMap === void 0 ? {
|
|
52
31
|
min: "min",
|
|
53
32
|
max: "max"
|
|
54
|
-
} :
|
|
55
|
-
onChange =
|
|
56
|
-
|
|
57
|
-
placeholder =
|
|
58
|
-
|
|
59
|
-
inputNumberProps =
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
noHandlerWrap =
|
|
63
|
-
addFormat =
|
|
64
|
-
disabled =
|
|
65
|
-
|
|
66
|
-
minValMk =
|
|
67
|
-
maxValMk =
|
|
33
|
+
} : _ref$valueMap,
|
|
34
|
+
onChange = _ref.onChange,
|
|
35
|
+
_ref$placeholder = _ref.placeholder,
|
|
36
|
+
placeholder = _ref$placeholder === void 0 ? ["请输入", "请输入"] : _ref$placeholder,
|
|
37
|
+
_ref$inputNumberProps = _ref.inputNumberProps,
|
|
38
|
+
inputNumberProps = _ref$inputNumberProps === void 0 ? {} : _ref$inputNumberProps;
|
|
39
|
+
_ref.addonAfter;
|
|
40
|
+
var _ref$noHandlerWrap = _ref.noHandlerWrap,
|
|
41
|
+
noHandlerWrap = _ref$noHandlerWrap === void 0 ? true : _ref$noHandlerWrap,
|
|
42
|
+
addFormat = _ref.addFormat,
|
|
43
|
+
disabled = _ref.disabled;
|
|
44
|
+
_ref.addonBefore;
|
|
45
|
+
var minValMk = _ref.minValMk,
|
|
46
|
+
maxValMk = _ref.maxValMk;
|
|
68
47
|
var min = valueMap.min,
|
|
69
48
|
max = valueMap.max;
|
|
70
49
|
var minVal = value[min],
|
|
@@ -81,10 +60,8 @@ var InputNumberGroup = function InputNumberGroup(_ref2) {
|
|
|
81
60
|
_useState2 = _slicedToArray(_useState, 2),
|
|
82
61
|
focus = _useState2[0],
|
|
83
62
|
setFocus = _useState2[1];
|
|
84
|
-
var
|
|
85
|
-
var bodyClassname = useClassName(["hw-input-group-body"]);
|
|
63
|
+
var bodyClassname = useClassName(["hw-input-group-number-body"]);
|
|
86
64
|
var activeClassname = useClassName(["hw-input-group-active"]);
|
|
87
|
-
var borderClassname = useClassName(["hw-input-group-border"]);
|
|
88
65
|
var oneClassname = useClassName(["hw-input-group-one"]);
|
|
89
66
|
var iconClassname = useClassName(["hw-input-group-icon"]);
|
|
90
67
|
var disabledClassname = useClassName(["hw-input-group-disabled"]);
|
|
@@ -121,68 +98,59 @@ var InputNumberGroup = function InputNumberGroup(_ref2) {
|
|
|
121
98
|
newVal[key] = val;
|
|
122
99
|
onChange === null || onChange === void 0 || onChange(newVal);
|
|
123
100
|
};
|
|
124
|
-
return jsxs(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
value:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
min
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
onBlur: function onBlur() {
|
|
166
|
-
setFocus(false);
|
|
167
|
-
},
|
|
168
|
-
onChange: function onChange(val) {
|
|
169
|
-
change(max, val);
|
|
170
|
-
}
|
|
171
|
-
}, edProps), {}, {
|
|
172
|
-
disabled: disabled
|
|
173
|
-
}))]
|
|
174
|
-
}), jsx(Addon, {
|
|
175
|
-
value: value,
|
|
176
|
-
onChange: onChange,
|
|
177
|
-
children: addonAfter
|
|
178
|
-
})]
|
|
101
|
+
return jsxs("div", {
|
|
102
|
+
className: "".concat(bodyClassname, " \n ").concat(focus ? activeClassname : "", " \n ").concat(noHandlerWrap ? noHandlerWrapClassname : "", "\n ").concat(disabled ? disabledClassname : notDisabledClassname, "\n "),
|
|
103
|
+
children: [jsx(InputNumber, _objectSpread(_objectSpread({
|
|
104
|
+
bordered: false,
|
|
105
|
+
value: minVal,
|
|
106
|
+
max: maxValMk ? maxValMk(maxVal) : maxVal,
|
|
107
|
+
min: 0,
|
|
108
|
+
className: oneClassname,
|
|
109
|
+
onFocus: function onFocus() {
|
|
110
|
+
setFocus(true);
|
|
111
|
+
},
|
|
112
|
+
onBlur: function onBlur() {
|
|
113
|
+
setFocus(false);
|
|
114
|
+
},
|
|
115
|
+
onChange: function onChange(val) {
|
|
116
|
+
change(min, val);
|
|
117
|
+
},
|
|
118
|
+
placeholder: fsPlaceholder
|
|
119
|
+
}, fsProps), {}, {
|
|
120
|
+
disabled: disabled
|
|
121
|
+
})), jsx("div", {
|
|
122
|
+
className: iconClassname,
|
|
123
|
+
children: jsx(SwapRightOutlined, {})
|
|
124
|
+
}), jsx(InputNumber, _objectSpread(_objectSpread({
|
|
125
|
+
bordered: false,
|
|
126
|
+
value: maxVal,
|
|
127
|
+
className: oneClassname,
|
|
128
|
+
placeholder: edPlaceholder,
|
|
129
|
+
min: minValMk ? minValMk(minVal) : minVal,
|
|
130
|
+
onFocus: function onFocus() {
|
|
131
|
+
setFocus(true);
|
|
132
|
+
},
|
|
133
|
+
onBlur: function onBlur() {
|
|
134
|
+
setFocus(false);
|
|
135
|
+
},
|
|
136
|
+
onChange: function onChange(val) {
|
|
137
|
+
change(max, val);
|
|
138
|
+
}
|
|
139
|
+
}, edProps), {}, {
|
|
140
|
+
disabled: disabled
|
|
141
|
+
}))]
|
|
179
142
|
});
|
|
180
143
|
};
|
|
144
|
+
var InputNumberGroup = function InputNumberGroup(props) {
|
|
145
|
+
return jsx(Index$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
146
|
+
children: jsx(Content, {})
|
|
147
|
+
}));
|
|
148
|
+
};
|
|
181
149
|
var Index = HFormConnect(InputNumberGroup);
|
|
182
150
|
var HInputNumberGroup = {
|
|
183
151
|
Component: Index,
|
|
184
|
-
placeholder: function placeholder(
|
|
185
|
-
var label =
|
|
152
|
+
placeholder: function placeholder(_ref4) {
|
|
153
|
+
var label = _ref4.label;
|
|
186
154
|
return ["\u8BF7\u8F93\u5165".concat(label, "\u6700\u5C0F\u503C"), "\u8BF7\u8F93\u5165".concat(label, "\u6700\u5927\u503C")];
|
|
187
155
|
}
|
|
188
156
|
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
4
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { useClassName } from '../hooks/index.js';
|
|
7
|
+
import { Input } from 'antd';
|
|
8
|
+
|
|
9
|
+
var _excluded = ["addonAfter", "addonBefore", "children", "value", "onChange"];
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
var Addon = function Addon(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
value = _ref.value,
|
|
15
|
+
onChange = _ref.onChange;
|
|
16
|
+
var addonClassname = useClassName(["hw-addon"]);
|
|
17
|
+
if (!children) {
|
|
18
|
+
return jsx(Fragment, {});
|
|
19
|
+
}
|
|
20
|
+
if (/*#__PURE__*/React.isValidElement(children)) {
|
|
21
|
+
return jsx("div", {
|
|
22
|
+
className: addonClassname,
|
|
23
|
+
children: /*#__PURE__*/React.cloneElement(children, {
|
|
24
|
+
value: value,
|
|
25
|
+
onChange: onChange
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return jsx("div", {
|
|
30
|
+
className: addonClassname,
|
|
31
|
+
children: children
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var Index = function Index(_ref2) {
|
|
35
|
+
var addonAfter = _ref2.addonAfter,
|
|
36
|
+
addonBefore = _ref2.addonBefore,
|
|
37
|
+
children = _ref2.children,
|
|
38
|
+
value = _ref2.value,
|
|
39
|
+
onChange = _ref2.onChange,
|
|
40
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
41
|
+
var contentClassname = useClassName(["hw-input-group"]);
|
|
42
|
+
var bodyClassname = useClassName(["hw-input-group-body"]);
|
|
43
|
+
return jsxs(Input.Group, {
|
|
44
|
+
compact: true,
|
|
45
|
+
className: contentClassname,
|
|
46
|
+
children: [jsx(Addon, {
|
|
47
|
+
value: value,
|
|
48
|
+
onChange: onChange,
|
|
49
|
+
children: addonBefore
|
|
50
|
+
}), jsx("div", {
|
|
51
|
+
className: bodyClassname,
|
|
52
|
+
children: /*#__PURE__*/React.cloneElement(children, _objectSpread({
|
|
53
|
+
value: value,
|
|
54
|
+
onChange: onChange
|
|
55
|
+
}, props))
|
|
56
|
+
}), jsx(Addon, {
|
|
57
|
+
value: value,
|
|
58
|
+
onChange: onChange,
|
|
59
|
+
children: addonAfter
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { Index as default };
|
|
65
|
+
// powered by hdj
|
package/es/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/es/TextArea/index.js
CHANGED
|
@@ -3,8 +3,9 @@ import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
|
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
import { Input } from 'antd';
|
|
6
|
+
import { useClassName } from '../hooks/index.js';
|
|
6
7
|
|
|
7
|
-
var _excluded = ["autoSize"];
|
|
8
|
+
var _excluded = ["autoSize", "bordered", "className"];
|
|
8
9
|
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; }
|
|
9
10
|
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; }
|
|
10
11
|
var TextArea = (function (_ref) {
|
|
@@ -13,10 +14,18 @@ var TextArea = (function (_ref) {
|
|
|
13
14
|
minRows: 4,
|
|
14
15
|
maxRows: 4
|
|
15
16
|
} : _ref$autoSize,
|
|
17
|
+
_ref$bordered = _ref.bordered,
|
|
18
|
+
bordered = _ref$bordered === void 0 ? true : _ref$bordered,
|
|
19
|
+
_ref$className = _ref.className,
|
|
20
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
16
21
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
|
|
22
|
+
var noBorderClassName = useClassName("hw-text-area-no-border");
|
|
23
|
+
var borderClassName = !bordered ? noBorderClassName : "";
|
|
24
|
+
return jsx(Input.TextArea, _objectSpread(_objectSpread({
|
|
18
25
|
autoSize: autoSize
|
|
19
|
-
}, props)
|
|
26
|
+
}, props), {}, {
|
|
27
|
+
className: "".concat(borderClassName, " ").concat(className)
|
|
28
|
+
}));
|
|
20
29
|
});
|
|
21
30
|
|
|
22
31
|
export { TextArea as default };
|
package/es/hooks/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import _typeof from '@babel/runtime-corejs3/helpers/typeof';
|
|
3
3
|
import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
|
|
4
4
|
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
5
|
-
import {
|
|
5
|
+
import { useContext, useMemo } from 'react';
|
|
6
6
|
import { ConfigContext } from 'antd/es/config-provider';
|
|
7
7
|
import { useFormConfigContext } from '../Form/Context/FormConfigProvider.js';
|
|
8
8
|
|
package/es/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/es/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/es/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { useHDialogForm } from './DialogForm/hooks.js';
|
|
|
7
7
|
export { default as HFormConnect } from './Form/HFormConnect.js';
|
|
8
8
|
export { default as HFormConfigProvider } from './Form/Context/FormConfigProvider.js';
|
|
9
9
|
export { default as HBasicForm } from './Form/Basic.js';
|
|
10
|
+
export { default as HInputGroup } from './InputGroup/index.js';
|
|
10
11
|
import Index$1 from './DialogForm/ModalForm.js';
|
|
11
12
|
import Index$2 from './DialogForm/DrawerForm/index.js';
|
|
12
13
|
|
package/lib/Form/config.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare const componentConfig: {
|
|
|
25
25
|
placeholder: ({ label }: import("./modal").HItemProps) => string;
|
|
26
26
|
};
|
|
27
27
|
submit: ({ position, reset, extraList, ...props }: import("../Submit").ISubmitProps) => JSX.Element;
|
|
28
|
-
textArea: ({ autoSize, ...props }: import("
|
|
28
|
+
textArea: ({ autoSize, bordered, className, ...props }: import("../TextArea").HTextAreaProps) => JSX.Element;
|
|
29
29
|
colorInput: ({ value, onChange, defaultColor, ...props }: import("../Input/modal").HInputProps) => JSX.Element;
|
|
30
30
|
cascader: ({ request, options, fieldNames: propsFieldNames, ...props }: import("../Cascader").HCascaderProps) => JSX.Element;
|
|
31
31
|
verificationCodeInput: import("react").ForwardRefExoticComponent<import("./modal").HFormItemProps & import("react").RefAttributes<any>>;
|