@twreporter/universal-header 2.2.0-rc.10 → 2.2.0-rc.11
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
|
+
# [2.2.0-rc.11](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/universal-header@2.2.0-rc.10...@twreporter/universal-header@2.2.0-rc.11) (2021-10-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **universal-header:** fix ui defect ([a1592da](https://github.com/twreporter/twreporter-npm-packages/commit/a1592da85a0f3f9e38fe86b0f5ef86a8a1c83ba6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [2.2.0-rc.10](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/universal-header@2.2.0-rc.9...@twreporter/universal-header@2.2.0-rc.10) (2021-10-07)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @twreporter/universal-header
|
|
@@ -105,15 +105,17 @@ var ActionsContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig(
|
|
|
105
105
|
var ActionContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
106
106
|
displayName: "action-button__ActionContainer",
|
|
107
107
|
componentId: "sc-4wc24t-1"
|
|
108
|
-
})(["transition:opacity 0.1s;transition-delay:300ms;opacity:", ";margin:", ";width:100%;&:first-child{margin-top:0;margin-left:0;}a,a:link,a:visited{color:", ";font-size:", ";font-weight:", ";", " ", "}"], function (props) {
|
|
108
|
+
})(["transition:opacity 0.1s;transition-delay:300ms;opacity:", ";pointer-events:", ";margin:", ";width:100%;&:first-child{margin-top:0;margin-left:0;}a,a:link,a:visited{color:", ";font-size:", ";font-weight:", ";", " ", "}"], function (props) {
|
|
109
109
|
return props.isActive ? 1 : 0;
|
|
110
|
+
}, function (props) {
|
|
111
|
+
return props.isActive ? 'auto' : 'none';
|
|
110
112
|
}, function (props) {
|
|
111
113
|
return (0, _css.arrayToCssShorthand)(styles.itemMargin[props.direction]);
|
|
112
114
|
}, function (props) {
|
|
113
115
|
return props.color || _colors["default"].white;
|
|
114
|
-
}, styles.fontSize.desktop, _fonts["default"].weight.bold, _mediaQuery["default"].tabletOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), function (props) {
|
|
116
|
+
}, styles.fontSize.desktop, _fonts["default"].weight.bold, _mediaQuery["default"].tabletOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: default;\n font-size: ", ";\n "])), function (props) {
|
|
115
117
|
return styles.fontSize.tablet[props.direction];
|
|
116
|
-
}), _mediaQuery["default"].mobileOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), function (props) {
|
|
118
|
+
}), _mediaQuery["default"].mobileOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: default;\n font-size: ", ";\n "])), function (props) {
|
|
117
119
|
return styles.fontSize.mobile[props.direction];
|
|
118
120
|
}));
|
|
119
121
|
|
|
@@ -33,12 +33,16 @@ var _dropDownMenu = _interopRequireDefault(require("./drop-down-menu"));
|
|
|
33
33
|
|
|
34
34
|
var _customizedLink = _interopRequireDefault(require("./customized-link"));
|
|
35
35
|
|
|
36
|
+
var _mediaQuery = _interopRequireDefault(require("@twreporter/core/lib/utils/media-query"));
|
|
37
|
+
|
|
36
38
|
var _css = require("@twreporter/core/lib/utils/css");
|
|
37
39
|
|
|
38
40
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
39
41
|
|
|
40
42
|
var _map = _interopRequireDefault(require("lodash/map"));
|
|
41
43
|
|
|
44
|
+
var _templateObject;
|
|
45
|
+
|
|
42
46
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
47
|
|
|
44
48
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -81,6 +85,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
81
85
|
|
|
82
86
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
83
87
|
|
|
88
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
89
|
+
|
|
84
90
|
var _ = {
|
|
85
91
|
get: _get["default"],
|
|
86
92
|
map: _map["default"]
|
|
@@ -149,7 +155,7 @@ var List = /*#__PURE__*/_styledComponents["default"].ul.withConfig({
|
|
|
149
155
|
var ListItem = /*#__PURE__*/_styledComponents["default"].li.withConfig({
|
|
150
156
|
displayName: "channels__ListItem",
|
|
151
157
|
componentId: "nu2llv-3"
|
|
152
|
-
})(["display:flex;flex-direction:", ";position:relative;width:", ";height:100%;font-size:", ";letter-spacing:0.5px;
|
|
158
|
+
})(["display:flex;flex-direction:", ";position:relative;width:", ";height:100%;font-size:", ";letter-spacing:0.5px;margin:", ";flex:1;text-shadow:", ";border-style:solid;border-color:inherit;border-width:", ";&:first-child{border-width:", ";}&::after{", "}a,a:link,a:visited{display:flex;justify-content:space-between;align-items:center;font-size:", ";font-weight:", ";padding:", ";width:100%;color:", ";border:0;line-height:18px;&:hover{background-color:", ";color:", ";}", "}"], function (props) {
|
|
153
159
|
return props.direction;
|
|
154
160
|
}, function (props) {
|
|
155
161
|
return styles.itemWidth[props.direction];
|
|
@@ -169,7 +175,7 @@ var ListItem = /*#__PURE__*/_styledComponents["default"].li.withConfig({
|
|
|
169
175
|
return props.hoverBgColor;
|
|
170
176
|
}, function (props) {
|
|
171
177
|
return props.hoverFontColor;
|
|
172
|
-
});
|
|
178
|
+
}, _mediaQuery["default"].tabletAndBelow(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: default;\n "]))));
|
|
173
179
|
|
|
174
180
|
var ShowOnHover = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
175
181
|
displayName: "channels__ShowOnHover",
|
|
@@ -66,7 +66,7 @@ var styles = {
|
|
|
66
66
|
var IconContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
67
67
|
displayName: "hamburger-icons__IconContainer",
|
|
68
68
|
componentId: "sc-11ma9zq-0"
|
|
69
|
-
})(["height:", "px;width:", "px;display:flex;justify-content:center;align-items:center;margin-right:17px;a{display:flex;}", ""], styles.iconHeight.mobile, styles.iconWidth.mobile, _mediaQuery["default"].tabletOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n width: ", "px;\n margin-right: 25px;\n "])), styles.iconHeight.tablet, styles.iconWidth.tablet));
|
|
69
|
+
})(["height:", "px;width:", "px;display:flex;justify-content:center;align-items:center;margin-right:17px;a{display:flex;cursor:default;}", ""], styles.iconHeight.mobile, styles.iconWidth.mobile, _mediaQuery["default"].tabletOnly(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n width: ", "px;\n margin-right: 25px;\n "])), styles.iconHeight.tablet, styles.iconWidth.tablet));
|
|
70
70
|
|
|
71
71
|
var IconsContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
72
72
|
displayName: "hamburger-icons__IconsContainer",
|
|
@@ -35,7 +35,7 @@ var _mediaQuery = _interopRequireDefault(require("@twreporter/core/lib/utils/med
|
|
|
35
35
|
|
|
36
36
|
var _css = require("@twreporter/core/lib/utils/css");
|
|
37
37
|
|
|
38
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
38
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
39
39
|
|
|
40
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
41
41
|
|
|
@@ -81,6 +81,12 @@ var styles = {
|
|
|
81
81
|
// px
|
|
82
82
|
tablet: [24, 30, 24, 50] // px
|
|
83
83
|
|
|
84
|
+
},
|
|
85
|
+
hamburgerPadding: {
|
|
86
|
+
mobile: [24],
|
|
87
|
+
// px
|
|
88
|
+
tablet: [24, 30] // px
|
|
89
|
+
|
|
84
90
|
},
|
|
85
91
|
logoHeight: {
|
|
86
92
|
mobile: 26,
|
|
@@ -151,7 +157,7 @@ var HamburgerContainer = /*#__PURE__*/_styledComponents["default"].div.withConfi
|
|
|
151
157
|
var Hamburger = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
152
158
|
displayName: "mobile-header__Hamburger",
|
|
153
159
|
componentId: "sc-1vxvz2u-7"
|
|
154
|
-
})(["display:flex;
|
|
160
|
+
})(["display:flex;position:absolute;right:0;padding:", ";", ""], (0, _css.arrayToCssShorthand)(styles.hamburgerPadding.mobile), _mediaQuery["default"].tabletOnly(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: ", ";\n "])), (0, _css.arrayToCssShorthand)(styles.hamburgerPadding.tablet)));
|
|
155
161
|
|
|
156
162
|
var MobileHeader = /*#__PURE__*/function (_React$PureComponent) {
|
|
157
163
|
_inherits(MobileHeader, _React$PureComponent);
|
package/lib/components/slogan.js
CHANGED
|
@@ -32,7 +32,7 @@ var style = {
|
|
|
32
32
|
var SloganContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
33
33
|
displayName: "slogan__SloganContainer",
|
|
34
34
|
componentId: "sc-1eoofl8-0"
|
|
35
|
-
})(["color:", ";font-size:", ";font-family:", ";display:flex;align-items:center;"], function (props) {
|
|
35
|
+
})(["color:", ";font-size:", ";font-family:", ";display:flex;align-items:center;cursor:default;"], function (props) {
|
|
36
36
|
return props.color || _colors["default"].grayDark;
|
|
37
37
|
}, style.fontSize.desktop, _fonts["default"].family.serif);
|
|
38
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/universal-header",
|
|
3
|
-
"version": "2.2.0-rc.
|
|
3
|
+
"version": "2.2.0-rc.11",
|
|
4
4
|
"description": "Universal header of TWReporter sites",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"files": [
|
|
35
35
|
"lib"
|
|
36
36
|
],
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "cd8c03706d5166c885eeae58f4745064333bdda6"
|
|
38
38
|
}
|