@sheinx/base 3.9.9-beta.15 → 3.9.9-beta.16

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,4CAiIrC,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,4CAmIrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -49,6 +49,7 @@ var FormItem = function FormItem(props) {
49
49
  inline = _labelConfig$rest.inline,
50
50
  keepErrorHeight = _labelConfig$rest.keepErrorHeight,
51
51
  keepErrorBelow = _labelConfig$rest.keepErrorBelow,
52
+ keepErrorAbove = _labelConfig$rest.keepErrorAbove,
52
53
  colon = _labelConfig$rest.colon;
53
54
  var renderLabel = function renderLabel() {
54
55
  if (label === undefined || label === null || label === '') return null;
@@ -145,11 +146,11 @@ var FormItem = function FormItem(props) {
145
146
  label: labelText
146
147
  }),
147
148
  children: children
148
- }), !!tip && (!showError || keepErrorBelow) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
149
+ }), keepErrorAbove && renderError(), !!tip && (!showError || keepErrorBelow || keepErrorAbove) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
149
150
  ref: labelTipRef,
150
151
  className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
151
152
  children: tip
152
- }), renderError()]
153
+ }), !keepErrorAbove && renderError()]
153
154
  }))]
154
155
  }));
155
156
  };
@@ -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,4CAiIrC,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,4CAmIrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -42,6 +42,7 @@ var FormItem = function FormItem(props) {
42
42
  inline = _labelConfig$rest.inline,
43
43
  keepErrorHeight = _labelConfig$rest.keepErrorHeight,
44
44
  keepErrorBelow = _labelConfig$rest.keepErrorBelow,
45
+ keepErrorAbove = _labelConfig$rest.keepErrorAbove,
45
46
  colon = _labelConfig$rest.colon;
46
47
  var renderLabel = function renderLabel() {
47
48
  if (label === undefined || label === null || label === '') return null;
@@ -138,11 +139,11 @@ var FormItem = function FormItem(props) {
138
139
  label: labelText
139
140
  }),
140
141
  children: children
141
- }), !!tip && (!showError || keepErrorBelow) && /*#__PURE__*/_jsx("div", {
142
+ }), keepErrorAbove && renderError(), !!tip && (!showError || keepErrorBelow || keepErrorAbove) && /*#__PURE__*/_jsx("div", {
142
143
  ref: labelTipRef,
143
144
  className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
144
145
  children: tip
145
- }), renderError()]
146
+ }), !keepErrorAbove && renderError()]
146
147
  }))]
147
148
  }));
148
149
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.9.9-beta.15",
3
+ "version": "3.9.9-beta.16",
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.9.9-beta.15",
13
+ "@sheinx/hooks": "3.9.9-beta.16",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.3.3"