@autobest-ui/components 2.6.3-alpha.1 → 2.6.3

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.
@@ -33,24 +33,20 @@ var Adorn = function Adorn(props) {
33
33
  if (disabled) {
34
34
  return;
35
35
  }
36
- if (!isFocus) {
37
- changeFocusStatus(true);
38
- }
36
+ changeFocusStatus(true);
39
37
  if (onFocus) {
40
38
  onFocus(ev);
41
39
  }
42
- }, [onFocus, isFocus, disabled]);
40
+ }, [onFocus, disabled]);
43
41
  var onBlurCallback = useCallback(function (ev) {
44
- if (isFocus) {
45
- changeFocusStatus(false);
46
- }
42
+ changeFocusStatus(false);
47
43
  if (disabled) {
48
44
  return;
49
45
  }
50
46
  if (onBlur) {
51
47
  onBlur(ev);
52
48
  }
53
- }, [onBlur, isFocus, disabled]);
49
+ }, [onBlur, disabled]);
54
50
  return /*#__PURE__*/React.createElement("div", {
55
51
  className: classNames(prefixCls, className, (_a = {}, _a["".concat(prefixCls, "-enter")] = isEnter || isFocus, _a), (_b = {}, _b["".concat(prefixCls, "-focus")] = isFocus, _b), (_c = {}, _c["".concat(prefixCls, "-disabled")] = disabled, _c)),
56
52
  onMouseEnter: onMouseEnterCallback,
@@ -14,6 +14,18 @@ export interface PopoverProps extends Pick<TriggerProps, Exclude<keyof TriggerPr
14
14
  * 是否隐藏close图标
15
15
  */
16
16
  hiddenClose?: boolean;
17
+ /**
18
+ * 箭头 className
19
+ */
20
+ arrowClassName?: string;
21
+ /**
22
+ * close图标 className
23
+ */
24
+ closeClassName?: string;
25
+ /**
26
+ * 内容样式,可以定义内容元素样式
27
+ */
28
+ innerClassName?: string;
17
29
  }
18
30
  export declare type PopoverPlacement = TriggerPlacement;
19
31
  export declare type PopoverTriggerType = TriggerType;
@@ -28,7 +28,13 @@ export interface TriggerProps {
28
28
  * 用于手动控制浮层显隐
29
29
  */
30
30
  visible?: boolean;
31
+ /**
32
+ * 水平位移
33
+ */
31
34
  translateX?: number;
35
+ /**
36
+ * 垂直位移
37
+ */
32
38
  translateY?: number;
33
39
  /**
34
40
  * 用于嵌套多个弹框提示时, 点击别处只隐藏当前元素
@@ -38,6 +44,9 @@ export interface TriggerProps {
38
44
  * 插入元素,不使用传送门, 和当前元素同级,形成兄弟节点(sibling)
39
45
  */
40
46
  isInsertNode?: boolean;
47
+ /**
48
+ * 监听屏幕大小变化并更新位置
49
+ */
41
50
  monitorWindowResize?: boolean;
42
51
  /**
43
52
  * 当resize时,隐藏trigger
@@ -55,32 +64,38 @@ export interface TriggerProps {
55
64
  * 隐藏时延迟时间 单位:秒
56
65
  */
57
66
  mouseLeaveDelay?: number;
67
+ /**
68
+ * 弹框最多高度,超出显示滚动条
69
+ */
58
70
  maxHeight?: number;
71
+ /**
72
+ * 弹框最小宽度是 root 元素的宽度
73
+ */
59
74
  isMinRootWidth?: boolean;
75
+ /**
76
+ * 弹框最大宽度是 root 元素的宽度
77
+ */
60
78
  isMaxRootWidth?: boolean;
79
+ /**
80
+ * 元素到弹框之间的间距
81
+ */
61
82
  rootToPopupSpacing?: number;
83
+ /**
84
+ * 弹框到边界的间距
85
+ */
62
86
  popupLimitSpacing?: number;
87
+ /**
88
+ * 动画原点方位, horizontal,circle
89
+ */
63
90
  isTransformHorizontalDirection?: boolean;
64
91
  /**
65
92
  * 隐藏箭头
66
93
  */
67
94
  hiddenArrow?: boolean;
68
- /**
69
- * 箭头样式重置
70
- */
71
- arrowClassName?: string;
72
95
  /**
73
96
  * 主体样式, 这里可以定义内容宽度,高度, border等
74
97
  */
75
98
  wrapClassName?: string;
76
- /**
77
- * 内容样式,可以定义内容元素样式
78
- */
79
- innerClassName?: string;
80
- /**
81
- * 对当前Popover close图标, 重置样式
82
- */
83
- closeClassName?: string;
84
99
  /**
85
100
  * visible变化的回调函数,回调函数返回status和name
86
101
  */
@@ -90,6 +105,9 @@ export interface TriggerProps {
90
105
  * 隐藏后的回调函数
91
106
  */
92
107
  onDestroy?: () => void;
108
+ /**
109
+ * 参数为箭头位置信息
110
+ */
93
111
  onArrowStyleChange?: (v: ArrowStyleProps) => void;
94
112
  }
95
113
  interface TriggerStates {
@@ -43,24 +43,20 @@ var Adorn = function Adorn(props) {
43
43
  if (disabled) {
44
44
  return;
45
45
  }
46
- if (!isFocus) {
47
- changeFocusStatus(true);
48
- }
46
+ changeFocusStatus(true);
49
47
  if (onFocus) {
50
48
  onFocus(ev);
51
49
  }
52
- }, [onFocus, isFocus, disabled]);
50
+ }, [onFocus, disabled]);
53
51
  var onBlurCallback = (0, _react.useCallback)(function (ev) {
54
- if (isFocus) {
55
- changeFocusStatus(false);
56
- }
52
+ changeFocusStatus(false);
57
53
  if (disabled) {
58
54
  return;
59
55
  }
60
56
  if (onBlur) {
61
57
  onBlur(ev);
62
58
  }
63
- }, [onBlur, isFocus, disabled]);
59
+ }, [onBlur, disabled]);
64
60
  return /*#__PURE__*/_react.default.createElement("div", {
65
61
  className: (0, _classnames.default)(prefixCls, className, (_a = {}, _a["".concat(prefixCls, "-enter")] = isEnter || isFocus, _a), (_b = {}, _b["".concat(prefixCls, "-focus")] = isFocus, _b), (_c = {}, _c["".concat(prefixCls, "-disabled")] = disabled, _c)),
66
62
  onMouseEnter: onMouseEnterCallback,
@@ -14,6 +14,18 @@ export interface PopoverProps extends Pick<TriggerProps, Exclude<keyof TriggerPr
14
14
  * 是否隐藏close图标
15
15
  */
16
16
  hiddenClose?: boolean;
17
+ /**
18
+ * 箭头 className
19
+ */
20
+ arrowClassName?: string;
21
+ /**
22
+ * close图标 className
23
+ */
24
+ closeClassName?: string;
25
+ /**
26
+ * 内容样式,可以定义内容元素样式
27
+ */
28
+ innerClassName?: string;
17
29
  }
18
30
  export declare type PopoverPlacement = TriggerPlacement;
19
31
  export declare type PopoverTriggerType = TriggerType;
@@ -28,7 +28,13 @@ export interface TriggerProps {
28
28
  * 用于手动控制浮层显隐
29
29
  */
30
30
  visible?: boolean;
31
+ /**
32
+ * 水平位移
33
+ */
31
34
  translateX?: number;
35
+ /**
36
+ * 垂直位移
37
+ */
32
38
  translateY?: number;
33
39
  /**
34
40
  * 用于嵌套多个弹框提示时, 点击别处只隐藏当前元素
@@ -38,6 +44,9 @@ export interface TriggerProps {
38
44
  * 插入元素,不使用传送门, 和当前元素同级,形成兄弟节点(sibling)
39
45
  */
40
46
  isInsertNode?: boolean;
47
+ /**
48
+ * 监听屏幕大小变化并更新位置
49
+ */
41
50
  monitorWindowResize?: boolean;
42
51
  /**
43
52
  * 当resize时,隐藏trigger
@@ -55,32 +64,38 @@ export interface TriggerProps {
55
64
  * 隐藏时延迟时间 单位:秒
56
65
  */
57
66
  mouseLeaveDelay?: number;
67
+ /**
68
+ * 弹框最多高度,超出显示滚动条
69
+ */
58
70
  maxHeight?: number;
71
+ /**
72
+ * 弹框最小宽度是 root 元素的宽度
73
+ */
59
74
  isMinRootWidth?: boolean;
75
+ /**
76
+ * 弹框最大宽度是 root 元素的宽度
77
+ */
60
78
  isMaxRootWidth?: boolean;
79
+ /**
80
+ * 元素到弹框之间的间距
81
+ */
61
82
  rootToPopupSpacing?: number;
83
+ /**
84
+ * 弹框到边界的间距
85
+ */
62
86
  popupLimitSpacing?: number;
87
+ /**
88
+ * 动画原点方位, horizontal,circle
89
+ */
63
90
  isTransformHorizontalDirection?: boolean;
64
91
  /**
65
92
  * 隐藏箭头
66
93
  */
67
94
  hiddenArrow?: boolean;
68
- /**
69
- * 箭头样式重置
70
- */
71
- arrowClassName?: string;
72
95
  /**
73
96
  * 主体样式, 这里可以定义内容宽度,高度, border等
74
97
  */
75
98
  wrapClassName?: string;
76
- /**
77
- * 内容样式,可以定义内容元素样式
78
- */
79
- innerClassName?: string;
80
- /**
81
- * 对当前Popover close图标, 重置样式
82
- */
83
- closeClassName?: string;
84
99
  /**
85
100
  * visible变化的回调函数,回调函数返回status和name
86
101
  */
@@ -90,6 +105,9 @@ export interface TriggerProps {
90
105
  * 隐藏后的回调函数
91
106
  */
92
107
  onDestroy?: () => void;
108
+ /**
109
+ * 参数为箭头位置信息
110
+ */
93
111
  onArrowStyleChange?: (v: ArrowStyleProps) => void;
94
112
  }
95
113
  interface TriggerStates {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobest-ui/components",
3
- "version": "2.6.3-alpha.1",
3
+ "version": "2.6.3",
4
4
  "private": false,
5
5
  "description": "components common ui for React",
6
6
  "main": "lib/index.js",
@@ -52,5 +52,5 @@
52
52
  "dependencies": {
53
53
  "@autobest-ui/utils": "^2.1.0"
54
54
  },
55
- "gitHead": "dd95141b71281f690784d4e990cb689fd970d88b"
55
+ "gitHead": "61c137cce5fd878ad5c1402bfc211e7514d44cba"
56
56
  }