@zat-design/sisyphus-react 3.3.3-beta.5 → 3.3.3-beta.6

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.
@@ -1941,6 +1941,9 @@ div.pro-textarea-view::after {
1941
1941
  display: none;
1942
1942
  padding-bottom: 12px;
1943
1943
  }
1944
+ .pro-textarea .ant-input {
1945
+ resize: auto !important;
1946
+ }
1944
1947
  .pro-form-list-block-title {
1945
1948
  height: 14px;
1946
1949
  margin: calc(var(--zaui-space-size-xs, 4px) * var(--zaui-size, 1)) 0;
@@ -2233,10 +2236,12 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2233
2236
  .pro-group {
2234
2237
  width: unset !important;
2235
2238
  }
2236
- .pro-group.pro-group-diy-width .ant-space .ant-space-item {
2239
+ .pro-group.pro-group-diy-width .ant-space .ant-space-item,
2240
+ .pro-group.pro-group-width-auto .ant-space .ant-space-item {
2237
2241
  width: auto;
2238
2242
  }
2239
- .pro-group.pro-group-diy-width .ant-space .ant-space-item .ant-space-item {
2243
+ .pro-group.pro-group-diy-width .ant-space .ant-space-item .ant-space-item,
2244
+ .pro-group.pro-group-width-auto .ant-space .ant-space-item .ant-space-item {
2240
2245
  width: auto;
2241
2246
  }
2242
2247
  .pro-group .ant-space {
@@ -40,9 +40,7 @@ var TextAreaDef = function TextAreaDef(props) {
40
40
  showCount: true,
41
41
  autoComplete: "off",
42
42
  placeholder: placeholder || "".concat(locale.ProForm.inputPlaceholder).concat(label || ''),
43
- autoSize: {
44
- minRows: 4
45
- }
43
+ autoSize: true
46
44
  }, omit(initialConfig, ['trim'])), rest), {}, {
47
45
  className: _className
48
46
  }));
@@ -10,3 +10,10 @@ div.pro-textarea-view {
10
10
  padding-bottom: 12px;
11
11
  }
12
12
  }
13
+
14
+ // input-textarea级联选择
15
+ .pro-textarea {
16
+ .@{ant-prefix}-input {
17
+ resize: auto !important;
18
+ }
19
+ }
@@ -51,6 +51,9 @@ var Group = function Group(props) {
51
51
  'pro-group-diy-width': columns.some(function (item) {
52
52
  var _item$fieldProps, _item$fieldProps$styl;
53
53
  return item === null || item === void 0 ? void 0 : (_item$fieldProps = item.fieldProps) === null || _item$fieldProps === void 0 ? void 0 : (_item$fieldProps$styl = _item$fieldProps.style) === null || _item$fieldProps$styl === void 0 ? void 0 : _item$fieldProps$styl.width;
54
+ }),
55
+ 'pro-group-width-auto': columns.some(function (item) {
56
+ return ['Radio', 'Checkbox', 'Switch'].includes(item.type);
54
57
  })
55
58
  }, "".concat(className), className));
56
59
  return _jsx("div", {
@@ -60,7 +63,9 @@ var Group = function Group(props) {
60
63
  columns: data.columns,
61
64
  form: form
62
65
  }, omit(otherProps, ['colProps'])))
63
- }) : _jsx(_Space, _objectSpread(_objectSpread({}, omit(space, ['separator', 'compact'])), {}, {
66
+ }) : _jsx(_Space, _objectSpread(_objectSpread({
67
+ align: "start"
68
+ }, omit(space, ['separator', 'compact'])), {}, {
64
69
  children: data.columns.map(function (column, index) {
65
70
  return _jsx(RenderFields, _objectSpread({
66
71
  columns: [column],
@@ -20,8 +20,9 @@
20
20
 
21
21
  .pro-group {
22
22
  width: unset !important;
23
+
23
24
 
24
- &.pro-group-diy-width {
25
+ &.pro-group-diy-width, &.pro-group-width-auto {
25
26
  .@{ant-prefix}-space .@{ant-prefix}-space-item {
26
27
  width: auto;
27
28
 
@@ -46,7 +46,7 @@ var useRules = function useRules(props) {
46
46
  internalRule.rules = internalRule.rules && rulesCreator(internalRule.rules, _label, isSelect);
47
47
  useEffect(function () {
48
48
  // 添加完整性校验
49
- if (names && !isBoolean(labelRequired) || type === 'Group' && Array.isArray(names) && required) {
49
+ if (names && !isBoolean(labelRequired)) {
50
50
  var customRequired = {
51
51
  validator: function validator(rules, value) {
52
52
  // 完整性校验, 空数组不校验, 数组有值且值不完整则校验不通过
@@ -56,6 +56,9 @@ var useRules = function useRules(props) {
56
56
  return Promise.resolve();
57
57
  }
58
58
  };
59
+ if (type === 'Group' && Array.isArray(names) && !required) {
60
+ customRequired = null;
61
+ }
59
62
  internalRule.rules.push(customRequired);
60
63
  }
61
64
  }, [internalRule]);
@@ -46,9 +46,7 @@ var TextAreaDef = function TextAreaDef(props) {
46
46
  showCount: true,
47
47
  autoComplete: "off",
48
48
  placeholder: placeholder || "".concat(_locale.default.ProForm.inputPlaceholder).concat(label || ''),
49
- autoSize: {
50
- minRows: 4
51
- }
49
+ autoSize: true
52
50
  }, (0, _lodash.omit)(initialConfig, ['trim'])), rest), {}, {
53
51
  className: _className
54
52
  }));
@@ -10,3 +10,10 @@ div.pro-textarea-view {
10
10
  padding-bottom: 12px;
11
11
  }
12
12
  }
13
+
14
+ // input-textarea级联选择
15
+ .pro-textarea {
16
+ .@{ant-prefix}-input {
17
+ resize: auto !important;
18
+ }
19
+ }
@@ -55,6 +55,9 @@ var Group = function Group(props) {
55
55
  'pro-group-diy-width': columns.some(function (item) {
56
56
  var _item$fieldProps, _item$fieldProps$styl;
57
57
  return item === null || item === void 0 ? void 0 : (_item$fieldProps = item.fieldProps) === null || _item$fieldProps === void 0 ? void 0 : (_item$fieldProps$styl = _item$fieldProps.style) === null || _item$fieldProps$styl === void 0 ? void 0 : _item$fieldProps$styl.width;
58
+ }),
59
+ 'pro-group-width-auto': columns.some(function (item) {
60
+ return ['Radio', 'Checkbox', 'Switch'].includes(item.type);
58
61
  })
59
62
  }, "".concat(className), className));
60
63
  return (0, _jsxRuntime.jsx)("div", {
@@ -64,7 +67,9 @@ var Group = function Group(props) {
64
67
  columns: data.columns,
65
68
  form: form
66
69
  }, (0, _lodash.omit)(otherProps, ['colProps'])))
67
- }) : (0, _jsxRuntime.jsx)(_antd.Space, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(space, ['separator', 'compact'])), {}, {
70
+ }) : (0, _jsxRuntime.jsx)(_antd.Space, (0, _objectSpread2.default)((0, _objectSpread2.default)({
71
+ align: "start"
72
+ }, (0, _lodash.omit)(space, ['separator', 'compact'])), {}, {
68
73
  children: data.columns.map(function (column, index) {
69
74
  return (0, _jsxRuntime.jsx)(_RenderFields.default, (0, _objectSpread2.default)({
70
75
  columns: [column],
@@ -20,8 +20,9 @@
20
20
 
21
21
  .pro-group {
22
22
  width: unset !important;
23
+
23
24
 
24
- &.pro-group-diy-width {
25
+ &.pro-group-diy-width, &.pro-group-width-auto {
25
26
  .@{ant-prefix}-space .@{ant-prefix}-space-item {
26
27
  width: auto;
27
28
 
@@ -53,7 +53,7 @@ var useRules = function useRules(props) {
53
53
  internalRule.rules = internalRule.rules && (0, _rulesCreator.rulesCreator)(internalRule.rules, _label, isSelect);
54
54
  (0, _react.useEffect)(function () {
55
55
  // 添加完整性校验
56
- if (names && !(0, _lodash.isBoolean)(labelRequired) || type === 'Group' && Array.isArray(names) && required) {
56
+ if (names && !(0, _lodash.isBoolean)(labelRequired)) {
57
57
  var customRequired = {
58
58
  validator: function validator(rules, value) {
59
59
  // 完整性校验, 空数组不校验, 数组有值且值不完整则校验不通过
@@ -63,6 +63,9 @@ var useRules = function useRules(props) {
63
63
  return Promise.resolve();
64
64
  }
65
65
  };
66
+ if (type === 'Group' && Array.isArray(names) && !required) {
67
+ customRequired = null;
68
+ }
66
69
  internalRule.rules.push(customRequired);
67
70
  }
68
71
  }, [internalRule]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.3.3-beta.5",
3
+ "version": "3.3.3-beta.6",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",