@sheinx/base 3.6.2-beta.1 → 3.6.2-beta.2

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.
@@ -82,10 +82,12 @@ var _default = exports.default = function _default(props) {
82
82
  var children = props.children,
83
83
  className = props.className,
84
84
  width = props.width,
85
- style = props.style;
86
- var rootClass = (0, _classnames.default)(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.group, props.seperate && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSeperate), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupLarge), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupDisabled), !!focus && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupFocus), (status === 'error' || error) && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupError));
85
+ style = props.style,
86
+ _props$seperate = props.seperate,
87
+ seperate = _props$seperate === void 0 ? true : _props$seperate;
88
+ var rootClass = (0, _classnames.default)(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.group, seperate && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSeperate), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupLarge), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupDisabled), !!focus && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupFocus), (status === 'error' || error) && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupError));
87
89
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, _hooks.util.getDataAttribute({
88
- role: props.seperate ? 'input-group-seperate' : 'input-group'
90
+ role: seperate ? 'input-group-seperate' : 'input-group'
89
91
  })), {}, {
90
92
  className: rootClass,
91
93
  style: _objectSpread({
@@ -2,12 +2,26 @@ import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { InputStyle } from './input.type';
4
4
  import { CommonType } from '../common/type';
5
- export interface InputGroupProps {
6
- children?: ReactNode;
5
+ export interface InputGroupProps extends Pick<CommonType, 'status' | 'style' | 'size'> {
6
+ /**
7
+ * @en Custom class name
8
+ * @cn 自定义类名
9
+ */
7
10
  className?: string;
11
+ /**
12
+ * @en children
13
+ * @cn 子元素
14
+ */
15
+ children?: ReactNode;
16
+ /**
17
+ * @en width
18
+ * @cn 宽度
19
+ */
8
20
  width?: string | number;
9
- style?: React.CSSProperties;
10
- size?: 'small' | 'large' | 'default';
21
+ /**
22
+ * @cn 是否禁用 Input.Group 区域内容
23
+ * @en Whether to disable
24
+ */
11
25
  disabled?: boolean;
12
26
  jssStyle: InputStyle;
13
27
  /**
@@ -23,11 +37,10 @@ export interface InputGroupProps {
23
37
  * @cn 失去焦点后的回调
24
38
  */
25
39
  onBlur?: React.FocusEventHandler;
26
- status?: CommonType['status'];
27
40
  /**
28
41
  * @en Whether to seperate the border
29
42
  * @cn 是否分离边框
30
- * @default false
43
+ * @default true
31
44
  */
32
45
  seperate?: boolean;
33
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.type.d.ts","sourceRoot":"","sources":["input-group.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,K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E,OAAO,CAAC;CACpB"}
@@ -74,10 +74,12 @@ export default (function (props) {
74
74
  var children = props.children,
75
75
  className = props.className,
76
76
  width = props.width,
77
- style = props.style;
78
- var rootClass = classNames(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.group, props.seperate && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSeperate), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupLarge), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupDisabled), !!focus && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupFocus), (status === 'error' || error) && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupError));
77
+ style = props.style,
78
+ _props$seperate = props.seperate,
79
+ seperate = _props$seperate === void 0 ? true : _props$seperate;
80
+ var rootClass = classNames(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.group, seperate && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSeperate), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupLarge), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupDisabled), !!focus && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupFocus), (status === 'error' || error) && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupError));
79
81
  return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, util.getDataAttribute({
80
- role: props.seperate ? 'input-group-seperate' : 'input-group'
82
+ role: seperate ? 'input-group-seperate' : 'input-group'
81
83
  })), {}, {
82
84
  className: rootClass,
83
85
  style: _objectSpread({
@@ -2,12 +2,26 @@ import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { InputStyle } from './input.type';
4
4
  import { CommonType } from '../common/type';
5
- export interface InputGroupProps {
6
- children?: ReactNode;
5
+ export interface InputGroupProps extends Pick<CommonType, 'status' | 'style' | 'size'> {
6
+ /**
7
+ * @en Custom class name
8
+ * @cn 自定义类名
9
+ */
7
10
  className?: string;
11
+ /**
12
+ * @en children
13
+ * @cn 子元素
14
+ */
15
+ children?: ReactNode;
16
+ /**
17
+ * @en width
18
+ * @cn 宽度
19
+ */
8
20
  width?: string | number;
9
- style?: React.CSSProperties;
10
- size?: 'small' | 'large' | 'default';
21
+ /**
22
+ * @cn 是否禁用 Input.Group 区域内容
23
+ * @en Whether to disable
24
+ */
11
25
  disabled?: boolean;
12
26
  jssStyle: InputStyle;
13
27
  /**
@@ -23,11 +37,10 @@ export interface InputGroupProps {
23
37
  * @cn 失去焦点后的回调
24
38
  */
25
39
  onBlur?: React.FocusEventHandler;
26
- status?: CommonType['status'];
27
40
  /**
28
41
  * @en Whether to seperate the border
29
42
  * @cn 是否分离边框
30
- * @default false
43
+ * @default true
31
44
  */
32
45
  seperate?: boolean;
33
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.type.d.ts","sourceRoot":"","sources":["input-group.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,UAAU,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACjC,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"input-group.type.d.ts","sourceRoot":"","sources":["input-group.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IACpF;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,UAAU,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.6.2-beta.1",
3
+ "version": "3.6.2-beta.2",
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.6.2-beta.1",
13
+ "@sheinx/hooks": "3.6.2-beta.2",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"