@sheinx/base 3.7.0-beta.32 → 3.7.0-beta.33

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.
@@ -1 +1 @@
1
- {"version":3,"file":"form-item.d.ts","sourceRoot":"","sources":["form-item.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvE,QAAA,MAAM,QAAQ,UAAW,aAAa,4CA2GrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"form-item.d.ts","sourceRoot":"","sources":["form-item.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvE,QAAA,MAAM,QAAQ,UAAW,aAAa,4CA6GrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -46,6 +46,7 @@ var FormItem = function FormItem(props) {
46
46
  labelVerticalAlign = _labelConfig$rest.labelVerticalAlign,
47
47
  inline = _labelConfig$rest.inline,
48
48
  keepErrorHeight = _labelConfig$rest.keepErrorHeight,
49
+ keepErrorBelow = _labelConfig$rest.keepErrorBelow,
49
50
  colon = _labelConfig$rest.colon;
50
51
  var renderLabel = function renderLabel() {
51
52
  if (label === undefined || label === null || label === '') return null;
@@ -111,6 +112,9 @@ var FormItem = function FormItem(props) {
111
112
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Provider, {
112
113
  value: ProviderValue,
113
114
  children: children
115
+ }), !!tip && (!showError || keepErrorBelow) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
116
+ className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
117
+ children: tip
114
118
  }), showError && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
115
119
  className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.error,
116
120
  children: errors.map(function (error, index) {
@@ -120,9 +124,6 @@ var FormItem = function FormItem(props) {
120
124
  })
121
125
  }, index);
122
126
  })
123
- }), !!tip && !showError && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
124
- className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
125
- children: tip
126
127
  })]
127
128
  }))]
128
129
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"form-item.d.ts","sourceRoot":"","sources":["form-item.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvE,QAAA,MAAM,QAAQ,UAAW,aAAa,4CA2GrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"form-item.d.ts","sourceRoot":"","sources":["form-item.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvE,QAAA,MAAM,QAAQ,UAAW,aAAa,4CA6GrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -41,6 +41,7 @@ var FormItem = function FormItem(props) {
41
41
  labelVerticalAlign = _labelConfig$rest.labelVerticalAlign,
42
42
  inline = _labelConfig$rest.inline,
43
43
  keepErrorHeight = _labelConfig$rest.keepErrorHeight,
44
+ keepErrorBelow = _labelConfig$rest.keepErrorBelow,
44
45
  colon = _labelConfig$rest.colon;
45
46
  var renderLabel = function renderLabel() {
46
47
  if (label === undefined || label === null || label === '') return null;
@@ -106,6 +107,9 @@ var FormItem = function FormItem(props) {
106
107
  children: [/*#__PURE__*/_jsx(Provider, {
107
108
  value: ProviderValue,
108
109
  children: children
110
+ }), !!tip && (!showError || keepErrorBelow) && /*#__PURE__*/_jsx("div", {
111
+ className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
112
+ children: tip
109
113
  }), showError && /*#__PURE__*/_jsx("div", {
110
114
  className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.error,
111
115
  children: errors.map(function (error, index) {
@@ -115,9 +119,6 @@ var FormItem = function FormItem(props) {
115
119
  })
116
120
  }, index);
117
121
  })
118
- }), !!tip && !showError && /*#__PURE__*/_jsx("div", {
119
- className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
120
- children: tip
121
122
  })]
122
123
  }))]
123
124
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.7.0-beta.32",
3
+ "version": "3.7.0-beta.33",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.7.0-beta.32",
13
+ "@sheinx/hooks": "3.7.0-beta.33",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"