@twreporter/react-components 8.15.0-rc.4 → 8.15.0-rc.5
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.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [8.15.0-rc.5](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/react-components@8.15.0-rc.4...@twreporter/react-components@8.15.0-rc.5) (2022-11-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* address defects ([a33aa3b](https://github.com/twreporter/twreporter-npm-packages/commit/a33aa3bf55fd9b1bf5472a4a13de942a9f8757ca))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [8.15.0-rc.4](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/react-components@8.15.0-rc.3...@twreporter/react-components@8.15.0-rc.4) (2022-10-31)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @twreporter/react-components
|
|
@@ -31,6 +31,8 @@ var _templateObject;
|
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
33
|
|
|
34
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
|
+
|
|
34
36
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
35
37
|
|
|
36
38
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -94,11 +96,11 @@ var TextButton = function TextButton(_ref) {
|
|
|
94
96
|
text: text,
|
|
95
97
|
weight: "bold"
|
|
96
98
|
});
|
|
97
|
-
return /*#__PURE__*/_react["default"].createElement(ButtonContainer, {
|
|
99
|
+
return /*#__PURE__*/_react["default"].createElement(ButtonContainer, _extends({
|
|
98
100
|
color: color,
|
|
99
101
|
hoverColor: hoverColor,
|
|
100
102
|
iconSize: iconSize
|
|
101
|
-
}, textJSX, iconComponent);
|
|
103
|
+
}, props), textJSX, iconComponent);
|
|
102
104
|
};
|
|
103
105
|
|
|
104
106
|
TextButton.propTypes = {
|
|
@@ -27,7 +27,7 @@ var _theme2 = require("@twreporter/core/lib/constants/theme");
|
|
|
27
27
|
|
|
28
28
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
29
29
|
|
|
30
|
-
var _excluded = ["placeholder", "theme", "releaseBranch", "onSearch", "onClose"];
|
|
30
|
+
var _excluded = ["placeholder", "theme", "releaseBranch", "onSearch", "onClose", "handleBlur", "autofocus"];
|
|
31
31
|
|
|
32
32
|
var _templateObject, _templateObject2;
|
|
33
33
|
|
|
@@ -80,7 +80,7 @@ var Container = /*#__PURE__*/_styledComponents["default"].form.withConfig({
|
|
|
80
80
|
var Input = /*#__PURE__*/_styledComponents["default"].input.withConfig({
|
|
81
81
|
displayName: "search-bar__Input",
|
|
82
82
|
componentId: "sc-1mjh7mz-2"
|
|
83
|
-
})(["color:", ";margin-right:8px;height:24px;&,&:focus,&:focus-visible{border:none;background-color:transparent;outline:none;}&:focus,&:focus-visible{&::placeholder{color:", ";}}&::placeholder{color:", ";}&::-webkit-search-cancel-button{display:none;}"], function (props) {
|
|
83
|
+
})(["color:", ";margin-right:8px;height:24px;font-size:14px;&,&:focus,&:focus-visible{border:none;background-color:transparent;outline:none;}&:focus,&:focus-visible{&::placeholder{color:", ";}}&::placeholder{color:", ";}&::-webkit-search-cancel-button{display:none;}"], function (props) {
|
|
84
84
|
return props.color;
|
|
85
85
|
}, function (props) {
|
|
86
86
|
return props.focusColor;
|
|
@@ -106,6 +106,10 @@ var SearchBar = function SearchBar(_ref) {
|
|
|
106
106
|
onSearch = _ref$onSearch === void 0 ? defaultFunc : _ref$onSearch,
|
|
107
107
|
_ref$onClose = _ref.onClose,
|
|
108
108
|
onClose = _ref$onClose === void 0 ? defaultFunc : _ref$onClose,
|
|
109
|
+
_ref$handleBlur = _ref.handleBlur,
|
|
110
|
+
handleBlur = _ref$handleBlur === void 0 ? defaultFunc : _ref$handleBlur,
|
|
111
|
+
_ref$autofocus = _ref.autofocus,
|
|
112
|
+
autofocus = _ref$autofocus === void 0 ? true : _ref$autofocus,
|
|
109
113
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
110
114
|
|
|
111
115
|
var _useState = (0, _react.useState)(''),
|
|
@@ -141,6 +145,7 @@ var SearchBar = function SearchBar(_ref) {
|
|
|
141
145
|
|
|
142
146
|
var onBlur = function onBlur() {
|
|
143
147
|
setFocus(false);
|
|
148
|
+
handleBlur();
|
|
144
149
|
};
|
|
145
150
|
|
|
146
151
|
var onSubmit = function onSubmit(e) {
|
|
@@ -166,7 +171,6 @@ var SearchBar = function SearchBar(_ref) {
|
|
|
166
171
|
onSubmit: onSubmit,
|
|
167
172
|
onReset: onReset,
|
|
168
173
|
onFocus: onFocus,
|
|
169
|
-
onBlur: onBlur,
|
|
170
174
|
focus: focus,
|
|
171
175
|
focusBgColor: focusBgColor,
|
|
172
176
|
desktopBgColor: desktopBgColor,
|
|
@@ -181,7 +185,8 @@ var SearchBar = function SearchBar(_ref) {
|
|
|
181
185
|
placeholderColor: placeholderColor,
|
|
182
186
|
value: keywords,
|
|
183
187
|
onChange: onChange,
|
|
184
|
-
|
|
188
|
+
onBlur: onBlur,
|
|
189
|
+
autoFocus: autofocus
|
|
185
190
|
}), /*#__PURE__*/_react["default"].createElement(_button.IconButton, {
|
|
186
191
|
iconComponent: SearchIcon,
|
|
187
192
|
theme: "normal",
|
|
@@ -198,7 +203,9 @@ SearchBar.propTypes = {
|
|
|
198
203
|
theme: _theme2.THEME_PROP_TYPES,
|
|
199
204
|
releaseBranch: _releaseBranch.BRANCH_PROP_TYPES,
|
|
200
205
|
onSearch: _propTypes["default"].func,
|
|
201
|
-
onClose: _propTypes["default"].func
|
|
206
|
+
onClose: _propTypes["default"].func,
|
|
207
|
+
handleBlur: _propTypes["default"].func,
|
|
208
|
+
autofocus: _propTypes["default"].bool
|
|
202
209
|
};
|
|
203
210
|
var _default = SearchBar;
|
|
204
211
|
exports["default"] = _default;
|
|
@@ -15,7 +15,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
15
15
|
|
|
16
16
|
var _headline = require("../../text/headline");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _button = require("../../button");
|
|
19
19
|
|
|
20
20
|
var _divider = _interopRequireDefault(require("../../divider"));
|
|
21
21
|
|
|
@@ -43,8 +43,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
43
43
|
|
|
44
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
45
|
|
|
46
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
47
|
-
|
|
48
46
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
49
47
|
|
|
50
48
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -62,19 +60,22 @@ var tabPropType = _propTypes["default"].shape({
|
|
|
62
60
|
var BarContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
63
61
|
displayName: "tab__BarContainer",
|
|
64
62
|
componentId: "ywb8e-0"
|
|
65
|
-
})(["display:flex;width:100%;flex-direction:column;color:", "
|
|
63
|
+
})(["display:flex;width:100%;flex-direction:column;color:", ";"], _color.colorGrayscale.gray800);
|
|
66
64
|
|
|
67
65
|
var TabItemContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
68
66
|
displayName: "tab__TabItemContainer",
|
|
69
67
|
componentId: "ywb8e-1"
|
|
70
|
-
})(["display:flex;flex-shrink:0;
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
})(["display:flex;flex-shrink:0;margin-right:24px;&:last-child{margin-right:0;}a{text-decoration:none;}"]);
|
|
69
|
+
|
|
70
|
+
var StyledTextButton = /*#__PURE__*/(0, _styledComponents["default"])(_button.TextButton).withConfig({
|
|
71
|
+
displayName: "tab__StyledTextButton",
|
|
72
|
+
componentId: "ywb8e-2"
|
|
73
|
+
})(["padding:16px 0;"]);
|
|
73
74
|
|
|
74
75
|
var MobileTabContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
75
76
|
displayName: "tab__MobileTabContainer",
|
|
76
|
-
componentId: "ywb8e-
|
|
77
|
-
})(["display:flex;overflow:scroll;scrollbar-width:none;&::-webkit-scrollbar{display:none;}-webkit-mask-image:", "
|
|
77
|
+
componentId: "ywb8e-3"
|
|
78
|
+
})(["display:flex;overflow:scroll;scrollbar-width:none;&::-webkit-scrollbar{display:none;}-webkit-mask-image:", ";"], function (props) {
|
|
78
79
|
return props.showGradientMask ? gradientMask : 'none';
|
|
79
80
|
});
|
|
80
81
|
|
|
@@ -87,14 +88,13 @@ var TabItem = function TabItem(_ref) {
|
|
|
87
88
|
link = tab.link,
|
|
88
89
|
isExternal = tab.isExternal,
|
|
89
90
|
isActive = tab.isActive;
|
|
90
|
-
return /*#__PURE__*/_react["default"].createElement(TabItemContainer,
|
|
91
|
-
isActive: isActive
|
|
92
|
-
}, restProps), /*#__PURE__*/_react["default"].createElement(_customizedLink["default"], {
|
|
91
|
+
return /*#__PURE__*/_react["default"].createElement(TabItemContainer, restProps, /*#__PURE__*/_react["default"].createElement(_customizedLink["default"], {
|
|
93
92
|
to: link,
|
|
94
93
|
isExternal: isExternal
|
|
95
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement(StyledTextButton, {
|
|
96
95
|
text: text,
|
|
97
|
-
|
|
96
|
+
active: isActive,
|
|
97
|
+
size: "L"
|
|
98
98
|
})));
|
|
99
99
|
};
|
|
100
100
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/react-components",
|
|
3
|
-
"version": "8.15.0-rc.
|
|
3
|
+
"version": "8.15.0-rc.5",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"repository": "https://github.com/twreporter/twreporter-npm-packages.git",
|
|
6
6
|
"author": "twreporter <developer@twreporter.org>",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"chromatic": "npx chromatic --exit-zero-on-changes"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@twreporter/core": "^1.8.0-rc.
|
|
19
|
-
"@twreporter/redux": "^7.4.1-rc.
|
|
18
|
+
"@twreporter/core": "^1.8.0-rc.5",
|
|
19
|
+
"@twreporter/redux": "^7.4.1-rc.5",
|
|
20
20
|
"fontfaceobserver-es": "^3.3.3",
|
|
21
21
|
"hoist-non-react-statics": "^2.3.1",
|
|
22
22
|
"lodash": "^4.0.0",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"babel-loader": "^8.2.4",
|
|
45
45
|
"chromatic": "^6.5.4"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "bf226b81aae93197d4cad8519a574ef6f85acc9b"
|
|
48
48
|
}
|