assui 3.0.58 → 3.0.60

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.
@@ -94,11 +94,11 @@ var KeepTab = function KeepTab(props) {
94
94
  var count = item === null || item === void 0 ? void 0 : item.count;
95
95
  if (count) {
96
96
  return __assign(__assign({}, item), {
97
- label: /*#__PURE__*/React.createElement(Badge, __assign({
98
- className: "tab-badge",
99
- count: count,
100
- offset: [16, -9]
101
- }, badgeProps), /*#__PURE__*/React.createElement("span", null, item.label))
97
+ label: /*#__PURE__*/React.createElement("div", {
98
+ className: "tab-badge"
99
+ }, /*#__PURE__*/React.createElement("div", null, item.label), /*#__PURE__*/React.createElement(Badge, __assign({
100
+ count: count
101
+ }, badgeProps)))
102
102
  });
103
103
  }
104
104
  return item;
@@ -1084,3 +1084,17 @@
1084
1084
  opacity: 0;
1085
1085
  }
1086
1086
  }
1087
+ .tab-badge {
1088
+ position: relative;
1089
+ }
1090
+ .tab-badge .ant-badge {
1091
+ position: absolute;
1092
+ top: -10px;
1093
+ left: calc(100% - 4px);
1094
+ transform: scale(0.8);
1095
+ transform-origin: left bottom;
1096
+ }
1097
+ .tab-badge .ant-badge-count {
1098
+ padding: 0 6px;
1099
+ background-color: #dc4946;
1100
+ }
@@ -1,2 +1 @@
1
- import 'antd/lib/tabs/style';
2
- import 'antd/lib/badge/style';
1
+ import './index.less';
@@ -1,2 +1 @@
1
- import "antd/es/tabs/style";
2
- import "antd/es/badge/style";
1
+ import './index.less';
@@ -1,2 +1,21 @@
1
1
  @import '~antd/lib/tabs/style/index.less';
2
2
  @import '~antd/lib/badge/style/index.less';
3
+
4
+ @color_dc4946: #dc4946;
5
+
6
+ .tab-badge {
7
+ position: relative;
8
+
9
+ .@{ant-prefix}-badge {
10
+ position: absolute;
11
+ top: -10px;
12
+ left: calc(100% - 4px);
13
+ transform: scale(0.8);
14
+ transform-origin: left bottom;
15
+ }
16
+
17
+ .@{ant-prefix}-badge-count {
18
+ padding: 0 6px;
19
+ background-color: @color_dc4946;
20
+ }
21
+ }
@@ -72,8 +72,10 @@ var LabelDatePicker = function LabelDatePicker(props) {
72
72
  value = _b[0],
73
73
  onChangeValue = _b[1];
74
74
  useClickAway(function () {
75
+ if (focus) {
76
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
77
+ }
75
78
  onFocus(false);
76
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
77
79
  }, containerRef);
78
80
  var onStartChange = function onStartChange(startInterval) {
79
81
  onChangeValue(__assign(__assign({}, value), {
@@ -137,11 +137,11 @@ var KeepTab = function KeepTab(props) {
137
137
  var count = item === null || item === void 0 ? void 0 : item.count;
138
138
  if (count) {
139
139
  return __assign(__assign({}, item), {
140
- label: React.createElement(badge_1["default"], __assign({
141
- className: "tab-badge",
142
- count: count,
143
- offset: [16, -9]
144
- }, badgeProps), React.createElement("span", null, item.label))
140
+ label: React.createElement("div", {
141
+ className: "tab-badge"
142
+ }, React.createElement("div", null, item.label), React.createElement(badge_1["default"], __assign({
143
+ count: count
144
+ }, badgeProps)))
145
145
  });
146
146
  }
147
147
  return item;
@@ -1084,3 +1084,17 @@
1084
1084
  opacity: 0;
1085
1085
  }
1086
1086
  }
1087
+ .tab-badge {
1088
+ position: relative;
1089
+ }
1090
+ .tab-badge .ant-badge {
1091
+ position: absolute;
1092
+ top: -10px;
1093
+ left: calc(100% - 4px);
1094
+ transform: scale(0.8);
1095
+ transform-origin: left bottom;
1096
+ }
1097
+ .tab-badge .ant-badge-count {
1098
+ padding: 0 6px;
1099
+ background-color: #dc4946;
1100
+ }
@@ -1,2 +1 @@
1
- import 'antd/lib/tabs/style';
2
- import 'antd/lib/badge/style';
1
+ import './index.less';
@@ -3,5 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- require("antd/lib/tabs/style");
7
- require("antd/lib/badge/style");
6
+ require("./index.less");
@@ -1,2 +1,21 @@
1
1
  @import '~antd/lib/tabs/style/index.less';
2
2
  @import '~antd/lib/badge/style/index.less';
3
+
4
+ @color_dc4946: #dc4946;
5
+
6
+ .tab-badge {
7
+ position: relative;
8
+
9
+ .@{ant-prefix}-badge {
10
+ position: absolute;
11
+ top: -10px;
12
+ left: calc(100% - 4px);
13
+ transform: scale(0.8);
14
+ transform-origin: left bottom;
15
+ }
16
+
17
+ .@{ant-prefix}-badge-count {
18
+ padding: 0 6px;
19
+ background-color: @color_dc4946;
20
+ }
21
+ }
@@ -82,8 +82,10 @@ var LabelDatePicker = function LabelDatePicker(props) {
82
82
  value = _b[0],
83
83
  onChangeValue = _b[1];
84
84
  (0, useClickAway_1["default"])(function () {
85
+ if (focus) {
86
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
87
+ }
85
88
  onFocus(false);
86
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
87
89
  }, containerRef);
88
90
  var onStartChange = function onStartChange(startInterval) {
89
91
  onChangeValue(__assign(__assign({}, value), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "3.0.58",
3
+ "version": "3.0.60",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -80,5 +80,5 @@
80
80
  "node": ">=10.0.0"
81
81
  },
82
82
  "license": "MIT",
83
- "gitHead": "d592c40079a4bd02c53cd0d96e7c3c67da62bafd"
83
+ "gitHead": "2e4d37f6020ad2a2732c690a230105719fc3745a"
84
84
  }