@lobehub/ui 1.155.7 → 1.155.8
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.
|
@@ -34,7 +34,7 @@ export interface FormGroupProps extends Omit<CollapseProps, 'collapsible' | 'ite
|
|
|
34
34
|
defaultActive?: boolean;
|
|
35
35
|
extra?: ReactNode;
|
|
36
36
|
icon?: IconProps['icon'];
|
|
37
|
-
|
|
37
|
+
keyValue?: string | number;
|
|
38
38
|
onCollapse?: (active: boolean) => void;
|
|
39
39
|
title?: ReactNode;
|
|
40
40
|
variant?: FormVariant;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
6
|
-
var _excluded = ["className", "icon", "title", "children", "extra", "variant", "defaultActive", "collapsible", "active", "
|
|
6
|
+
var _excluded = ["className", "icon", "title", "children", "extra", "variant", "defaultActive", "collapsible", "active", "keyValue", "onCollapse"];
|
|
7
7
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
8
8
|
import { createStyles, useResponsive } from 'antd-style';
|
|
9
9
|
import { isUndefined } from 'lodash-es';
|
|
@@ -43,8 +43,8 @@ var FormGroup = /*#__PURE__*/memo(function (_ref2) {
|
|
|
43
43
|
defaultActive = _ref2$defaultActive === void 0 ? true : _ref2$defaultActive,
|
|
44
44
|
collapsible = _ref2.collapsible,
|
|
45
45
|
active = _ref2.active,
|
|
46
|
-
_ref2$
|
|
47
|
-
|
|
46
|
+
_ref2$keyValue = _ref2.keyValue,
|
|
47
|
+
keyValue = _ref2$keyValue === void 0 ? 'group' : _ref2$keyValue,
|
|
48
48
|
onCollapse = _ref2.onCollapse,
|
|
49
49
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
50
50
|
var _useResponsive = useResponsive(),
|
|
@@ -79,14 +79,14 @@ var FormGroup = /*#__PURE__*/memo(function (_ref2) {
|
|
|
79
79
|
})]
|
|
80
80
|
});
|
|
81
81
|
return /*#__PURE__*/_jsx(Collapse, _objectSpread({
|
|
82
|
-
activeKey: isUndefined(active) ? undefined : active ? [
|
|
82
|
+
activeKey: isUndefined(active) ? undefined : active ? [keyValue] : [],
|
|
83
83
|
className: cx(groupClassName, className),
|
|
84
84
|
collapsible: defaultCollapsible,
|
|
85
|
-
defaultActiveKey: defaultActive ? [
|
|
85
|
+
defaultActiveKey: defaultActive ? [keyValue] : undefined,
|
|
86
86
|
items: [{
|
|
87
87
|
children: children,
|
|
88
88
|
extra: extra,
|
|
89
|
-
key:
|
|
89
|
+
key: keyValue,
|
|
90
90
|
label: titleContent
|
|
91
91
|
}],
|
|
92
92
|
onChange: function onChange(v) {
|
package/es/Form/index.js
CHANGED
|
@@ -54,6 +54,7 @@ var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
54
54
|
defaultActive: defaultActiveKey && group !== null && group !== void 0 && group.key ? defaultActiveKey.includes(key) : group === null || group === void 0 ? void 0 : group.defaultActive,
|
|
55
55
|
extra: group === null || group === void 0 ? void 0 : group.extra,
|
|
56
56
|
icon: group === null || group === void 0 ? void 0 : group.icon,
|
|
57
|
+
keyValue: key,
|
|
57
58
|
onCollapse: function onCollapse(active) {
|
|
58
59
|
var keys = activeKey || defaultActiveKey || [];
|
|
59
60
|
keys = keys.filter(function (k) {
|
package/es/FormModal/index.js
CHANGED
package/es/FormModal/style.js
CHANGED
|
@@ -7,7 +7,7 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
7
7
|
prefixCls = _ref.prefixCls,
|
|
8
8
|
responsive = _ref.responsive;
|
|
9
9
|
return {
|
|
10
|
-
footer: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n inset-block-end: 0;\n inset-inline: 0;\n\n width:
|
|
11
|
-
form: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", "-form-group-title {\n font-size: 15px;\n font-weight: 500;\n }\n\n ", " {\n .", "-form-group-title {\n font-size: 14px;\n font-weight: normal;\n }\n\n .", "-form-group {\n width: calc(100% + 32px);\n margin-inline: -16px;\n background: transparent;\n }\n }\n "])), prefixCls, responsive.mobile, prefixCls, prefixCls)
|
|
10
|
+
footer: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n inset-block-end: 0;\n inset-inline: 0;\n\n width: 100%;\n margin: 0;\n padding: 16px;\n\n background: ", ";\n "])), token.colorBgContainer),
|
|
11
|
+
form: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: static;\n .", "-form-group-title {\n font-size: 15px;\n font-weight: 500;\n }\n\n ", " {\n .", "-form-group-title {\n font-size: 14px;\n font-weight: normal;\n }\n\n .", "-form-group {\n width: calc(100% + 32px);\n margin-inline: -16px;\n background: transparent;\n }\n }\n "])), prefixCls, responsive.mobile, prefixCls, prefixCls)
|
|
12
12
|
};
|
|
13
13
|
});
|