@twreporter/react-components 8.17.0-rc.2 → 8.17.0-rc.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.
- package/CHANGELOG.md +28 -0
- package/lib/button/components/pillButton.js +2 -2
- package/lib/button/components/textButton.js +5 -3
- package/lib/button/constants/index.js +2 -15
- package/lib/button/stories/pillButton.stories.js +2 -2
- package/lib/button/stories/textButton.stories.js +50 -15
- package/lib/button/utils/theme.js +24 -26
- package/lib/card/components/article-card.js +173 -0
- package/lib/card/components/dialog.js +5 -3
- package/lib/card/index.js +10 -1
- package/lib/card/stories/articleCard.stories.js +55 -0
- package/lib/card/stories/dialog.stories.js +7 -2
- package/lib/image-with-fallback.js +141 -0
- package/lib/listing-page/components/card-list.js +171 -0
- package/lib/listing-page/components/image.js +3 -0
- package/lib/listing-page/components/list.js +6 -4
- package/lib/listing-page/constants/prop-types.js +25 -0
- package/lib/listing-page/index.js +10 -1
- package/lib/listing-page/stories/cardList.stories.js +72 -0
- package/lib/logo/components/logo-loading-fallback.js +43 -0
- package/lib/logo/index.js +10 -1
- package/lib/logo/stories/logoLoadingFallback.stories.js +29 -0
- package/lib/logo/utils/path.js +5 -0
- package/lib/pagination/index.js +8 -5
- package/package.json +4 -4
- package/lib/button/constants/size.js +0 -28
package/lib/logo/utils/path.js
CHANGED
package/lib/pagination/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var _concat = _interopRequireDefault(require("lodash/concat"));
|
|
|
25
25
|
|
|
26
26
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
27
27
|
|
|
28
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
28
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
31
|
|
|
@@ -97,13 +97,16 @@ var styles = {
|
|
|
97
97
|
},
|
|
98
98
|
prevNextBtnPadding: [0, 20, 2, 20],
|
|
99
99
|
ellipsisBoxPadding: [10, 6, 10, 6],
|
|
100
|
-
containerMargin:
|
|
100
|
+
containerMargin: {
|
|
101
|
+
"default": [64, 'auto', 120, 'auto'],
|
|
102
|
+
mobile: [32, 'auto', 64, 'auto']
|
|
103
|
+
}
|
|
101
104
|
};
|
|
102
105
|
|
|
103
106
|
var PaginationContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
104
107
|
displayName: "pagination__PaginationContainer",
|
|
105
108
|
componentId: "sc-17bqftr-0"
|
|
106
|
-
})(["margin:", ";text-align:center;height:", "px;", ""], (0, _css.arrayToCssShorthand)(styles.containerMargin), styles.btnBoxSize.mobile, _mediaQuery["default"].tabletAndAbove(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n "])), styles.btnBoxSize.desktop));
|
|
109
|
+
})(["margin:", ";text-align:center;height:", "px;", " ", ""], (0, _css.arrayToCssShorthand)(styles.containerMargin["default"]), styles.btnBoxSize.mobile, _mediaQuery["default"].tabletAndAbove(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", "px;\n "])), styles.btnBoxSize.desktop), _mediaQuery["default"].mobileOnly(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: ", ";\n "])), (0, _css.arrayToCssShorthand)(styles.containerMargin.mobile)));
|
|
107
110
|
|
|
108
111
|
var Boxes = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
109
112
|
displayName: "pagination__Boxes",
|
|
@@ -122,13 +125,13 @@ var PageNumberBox = /*#__PURE__*/(0, _styledComponents["default"])(Box).withConf
|
|
|
122
125
|
return props.isCurrent ? _color["default"].brown : 'transparent';
|
|
123
126
|
}, function (props) {
|
|
124
127
|
return props.isCurrent ? _color["default"].white : _color["default"].brown;
|
|
125
|
-
}, _mediaQuery["default"].mobileOnly(
|
|
128
|
+
}, _mediaQuery["default"].mobileOnly(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: ", ";\n "])), function (props) {
|
|
126
129
|
return props.isCurrent ? '' : 'none';
|
|
127
130
|
}));
|
|
128
131
|
var EllipsisBox = /*#__PURE__*/(0, _styledComponents["default"])(Box).withConfig({
|
|
129
132
|
displayName: "pagination__EllipsisBox",
|
|
130
133
|
componentId: "sc-17bqftr-4"
|
|
131
|
-
})(["cursor:default;padding:", ";", ""], (0, _css.arrayToCssShorthand)(styles.ellipsisBoxPadding), _mediaQuery["default"].mobileOnly(
|
|
134
|
+
})(["cursor:default;padding:", ";", ""], (0, _css.arrayToCssShorthand)(styles.ellipsisBoxPadding), _mediaQuery["default"].mobileOnly(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: none;\n "]))));
|
|
132
135
|
var PrevNextBtn = /*#__PURE__*/(0, _styledComponents["default"])(Box).withConfig({
|
|
133
136
|
displayName: "pagination__PrevNextBtn",
|
|
134
137
|
componentId: "sc-17bqftr-5"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/react-components",
|
|
3
|
-
"version": "8.17.0-rc.
|
|
3
|
+
"version": "8.17.0-rc.3",
|
|
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.3-rc.
|
|
19
|
-
"@twreporter/redux": "^7.5.1-rc.
|
|
18
|
+
"@twreporter/core": "^1.8.3-rc.2",
|
|
19
|
+
"@twreporter/redux": "^7.5.1-rc.2",
|
|
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": "278cbf7be48ece22befc99d4900a835f9f13c911"
|
|
48
48
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SIZE_STORYBOOK_ARG_TYPE = exports.SIZE_PROP_TYPES = exports.SIZE = void 0;
|
|
7
|
-
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
|
-
var SIZE = {
|
|
13
|
-
S: 'S',
|
|
14
|
-
L: 'L'
|
|
15
|
-
};
|
|
16
|
-
exports.SIZE = SIZE;
|
|
17
|
-
|
|
18
|
-
var SIZE_PROP_TYPES = _propTypes["default"].oneOf([SIZE.S, SIZE.L]);
|
|
19
|
-
|
|
20
|
-
exports.SIZE_PROP_TYPES = SIZE_PROP_TYPES;
|
|
21
|
-
var SIZE_STORYBOOK_ARG_TYPE = {
|
|
22
|
-
defaultValue: SIZE.S,
|
|
23
|
-
options: [SIZE.S, SIZE.L],
|
|
24
|
-
control: {
|
|
25
|
-
type: 'radio'
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
exports.SIZE_STORYBOOK_ARG_TYPE = SIZE_STORYBOOK_ARG_TYPE;
|