@twreporter/react-components 8.16.1-rc.1 → 8.17.0-rc.0
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 +38 -0
- package/lib/badge/badge.stories.js +32 -0
- package/lib/badge/index.js +59 -0
- package/lib/button/components/textButton.js +8 -4
- package/lib/button/components/toggleButton.js +91 -0
- package/lib/button/index.js +10 -1
- package/lib/button/stories/textButton.stories.js +4 -1
- package/lib/button/stories/toggleButton.stories.js +38 -0
- package/lib/icon/index.js +8 -5
- package/lib/simple-header/index.js +27 -0
- package/lib/simple-header/simpleHeader.stories.js +26 -0
- package/lib/text/headline.js +38 -117
- package/lib/text/paragraph.js +36 -74
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
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.17.0-rc.0](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/react-components@8.16.1-rc.1...@twreporter/react-components@8.17.0-rc.0) (2023-03-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* add badge storybook ([6e9fe23](https://github.com/twreporter/twreporter-npm-packages/commit/6e9fe2340c68948c9ad75345fe0fe77fead16153))
|
|
12
|
+
* add disable to toggle ([ab57603](https://github.com/twreporter/twreporter-npm-packages/commit/ab5760396e957dd723cc2936bc20fe07fe0a6fb9))
|
|
13
|
+
* add icon position & color set to text button ([38cda1c](https://github.com/twreporter/twreporter-npm-packages/commit/38cda1cf43291fa6b59cafac4c4a594f33102885))
|
|
14
|
+
* add prop to header ([978d2a7](https://github.com/twreporter/twreporter-npm-packages/commit/978d2a758537f6bfba98390c4bbfb1cff0b09e19))
|
|
15
|
+
* add rest props ([25ca8eb](https://github.com/twreporter/twreporter-npm-packages/commit/25ca8eba3f865dbbfd5394a6e03d1d1bc5349e41))
|
|
16
|
+
* add simple header ([54fa27a](https://github.com/twreporter/twreporter-npm-packages/commit/54fa27a2a24fe63b896357638f4bb1e388a38592))
|
|
17
|
+
* center p ([9f80c1b](https://github.com/twreporter/twreporter-npm-packages/commit/9f80c1b6c0e541c892a5d728df0635e054733141))
|
|
18
|
+
* fix badge color issue ([7df7316](https://github.com/twreporter/twreporter-npm-packages/commit/7df731601bf03da1dfb1ff6ba3af3a6dfd6eb493))
|
|
19
|
+
* fix color issue of text button ([3f27a81](https://github.com/twreporter/twreporter-npm-packages/commit/3f27a81b8794c2ea493d8ffbff41d055ff6f6a8a))
|
|
20
|
+
* fix headline naming ([e7c14c7](https://github.com/twreporter/twreporter-npm-packages/commit/e7c14c73636f27de9681600a8b6bf27741f9d28b))
|
|
21
|
+
* fix icon issue of text button ([018e609](https://github.com/twreporter/twreporter-npm-packages/commit/018e6094c2e27cc79162b17e0d93dd276009825f))
|
|
22
|
+
* fix toggle & add storybook ([400ab71](https://github.com/twreporter/twreporter-npm-packages/commit/400ab71146ebed19e24bab9be6e5c663922101f3))
|
|
23
|
+
* fix toggle size ([58ffa04](https://github.com/twreporter/twreporter-npm-packages/commit/58ffa0410c6f569bf650445507613a72f573c6ce))
|
|
24
|
+
* fix toggle style ([4cfe224](https://github.com/twreporter/twreporter-npm-packages/commit/4cfe22485956ecb2cfef297d5a71c41b0cafdbc7))
|
|
25
|
+
* fix toggle style ([c997bbe](https://github.com/twreporter/twreporter-npm-packages/commit/c997bbeb97bf96b478b9da598da02c4a4fbb9f87))
|
|
26
|
+
* fix toggle text color ([a4b7471](https://github.com/twreporter/twreporter-npm-packages/commit/a4b7471d6789f07a41215a6a83618f9875cffb2b))
|
|
27
|
+
* refactor headerline, paragraph with hoc ([9a30a36](https://github.com/twreporter/twreporter-npm-packages/commit/9a30a367c2f4b2734da4e2bd95aa7f71464fb5a9))
|
|
28
|
+
* refine a little bit ([4b6cfcd](https://github.com/twreporter/twreporter-npm-packages/commit/4b6cfcda60d25a7934c0a5feb5478c4b8dab1337))
|
|
29
|
+
* remove badge storybook category ([0fea1f5](https://github.com/twreporter/twreporter-npm-packages/commit/0fea1f56ab151afc4e8e96e61aa2b4e5a31b3a25))
|
|
30
|
+
* remove checkbox ([ccfb810](https://github.com/twreporter/twreporter-npm-packages/commit/ccfb81045cfc1ee5896a9b61e7dc17a5e7d6c466))
|
|
31
|
+
* remove unnecessary folder ([e9fdc17](https://github.com/twreporter/twreporter-npm-packages/commit/e9fdc170cf48d0cf852ecca57671545aaa923bb8))
|
|
32
|
+
* rename toggle label prop ([1b79fa6](https://github.com/twreporter/twreporter-npm-packages/commit/1b79fa63d7098f1d348ee4cf500be6a21e36ca3b))
|
|
33
|
+
* simplify return of paragraph ([3f9efd5](https://github.com/twreporter/twreporter-npm-packages/commit/3f9efd5f3d2bb1e5233607e09ae74567bf148a1f))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* add badge, toggle, checkbox ([bdf2b16](https://github.com/twreporter/twreporter-npm-packages/commit/bdf2b1687789db61540d5b060890eefffcd34b2a))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## [8.16.1-rc.1](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/react-components@8.16.1-rc.0...@twreporter/react-components@8.16.1-rc.1) (2023-03-07)
|
|
7
45
|
|
|
8
46
|
**Note:** Version bump only for package @twreporter/react-components
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.badge = exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _ = _interopRequireDefault(require("."));
|
|
11
|
+
|
|
12
|
+
var _color = require("@twreporter/core/lib/constants/color");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
title: 'Badge',
|
|
18
|
+
component: _["default"]
|
|
19
|
+
};
|
|
20
|
+
exports["default"] = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement(_["default"], args);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var badge = Template.bind({});
|
|
27
|
+
exports.badge = badge;
|
|
28
|
+
badge.args = {
|
|
29
|
+
text: '不定期',
|
|
30
|
+
textColor: _color.colorBrand.heavy,
|
|
31
|
+
backgroundColor: 'white'
|
|
32
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Badge = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _paragraph = require("../text/paragraph");
|
|
15
|
+
|
|
16
|
+
var _excluded = ["text", "textColor", "backgroundColor"];
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
var Container = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
27
|
+
displayName: "badge__Container",
|
|
28
|
+
componentId: "sc-1mnvxli-0"
|
|
29
|
+
})(["background:", ";padding:2px 4px;width:fit-content;"], function (props) {
|
|
30
|
+
return props.backgroundColor;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var Badge = function Badge(_ref) {
|
|
34
|
+
var _ref$text = _ref.text,
|
|
35
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
36
|
+
_ref$textColor = _ref.textColor,
|
|
37
|
+
textColor = _ref$textColor === void 0 ? 'black' : _ref$textColor,
|
|
38
|
+
_ref$backgroundColor = _ref.backgroundColor,
|
|
39
|
+
backgroundColor = _ref$backgroundColor === void 0 ? 'white' : _ref$backgroundColor,
|
|
40
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
+
|
|
42
|
+
return /*#__PURE__*/_react["default"].createElement(Container, _extends({
|
|
43
|
+
backgroundColor: backgroundColor
|
|
44
|
+
}, props), /*#__PURE__*/_react["default"].createElement(_paragraph.P2, {
|
|
45
|
+
text: text,
|
|
46
|
+
style: {
|
|
47
|
+
color: textColor
|
|
48
|
+
}
|
|
49
|
+
}));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.Badge = Badge;
|
|
53
|
+
Badge.propTypes = {
|
|
54
|
+
text: _propTypes["default"].string.isRequired,
|
|
55
|
+
textColor: _propTypes["default"].string,
|
|
56
|
+
backgroundColor: _propTypes["default"].string
|
|
57
|
+
};
|
|
58
|
+
var _default = Badge;
|
|
59
|
+
exports["default"] = _default;
|
|
@@ -25,7 +25,7 @@ var _mediaQuery = _interopRequireDefault(require("@twreporter/core/lib/utils/med
|
|
|
25
25
|
|
|
26
26
|
var _theme2 = require("@twreporter/core/lib/constants/theme");
|
|
27
27
|
|
|
28
|
-
var _excluded = ["text", "
|
|
28
|
+
var _excluded = ["text", "leftIconComponent", "rightIconComponent", "size", "theme", "type", "active", "disabled"];
|
|
29
29
|
|
|
30
30
|
var _templateObject;
|
|
31
31
|
|
|
@@ -59,7 +59,10 @@ var ButtonContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
|
59
59
|
var TextButton = function TextButton(_ref) {
|
|
60
60
|
var _ref$text = _ref.text,
|
|
61
61
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
62
|
-
|
|
62
|
+
_ref$leftIconComponen = _ref.leftIconComponent,
|
|
63
|
+
leftIconComponent = _ref$leftIconComponen === void 0 ? null : _ref$leftIconComponen,
|
|
64
|
+
_ref$rightIconCompone = _ref.rightIconComponent,
|
|
65
|
+
rightIconComponent = _ref$rightIconCompone === void 0 ? null : _ref$rightIconCompone,
|
|
63
66
|
_ref$size = _ref.size,
|
|
64
67
|
size = _ref$size === void 0 ? _size2.SIZE.S : _ref$size,
|
|
65
68
|
_ref$theme = _ref.theme,
|
|
@@ -100,11 +103,12 @@ var TextButton = function TextButton(_ref) {
|
|
|
100
103
|
color: color,
|
|
101
104
|
hoverColor: hoverColor,
|
|
102
105
|
iconSize: iconSize
|
|
103
|
-
}, props), textJSX,
|
|
106
|
+
}, props), leftIconComponent, textJSX, rightIconComponent);
|
|
104
107
|
};
|
|
105
108
|
|
|
106
109
|
TextButton.propTypes = {
|
|
107
|
-
|
|
110
|
+
leftIconComponent: _propTypes["default"].element,
|
|
111
|
+
rightIconComponent: _propTypes["default"].element,
|
|
108
112
|
text: _propTypes["default"].string,
|
|
109
113
|
size: _size2.SIZE_PROP_TYPES,
|
|
110
114
|
theme: _theme2.THEME_PROP_TYPES,
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _color = require("@twreporter/core/lib/constants/color");
|
|
15
|
+
|
|
16
|
+
var _paragraph = require("../../text/paragraph");
|
|
17
|
+
|
|
18
|
+
var _excluded = ["value", "labelOn", "labelOff", "disabled", "onChange"];
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
var Container = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
27
|
+
displayName: "toggleButton__Container",
|
|
28
|
+
componentId: "sc-183g3tk-0"
|
|
29
|
+
})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:42px;"]);
|
|
30
|
+
|
|
31
|
+
var Label = /*#__PURE__*/_styledComponents["default"].label.withConfig({
|
|
32
|
+
displayName: "toggleButton__Label",
|
|
33
|
+
componentId: "sc-183g3tk-1"
|
|
34
|
+
})(["display:flex;align-items:center;gap:10px;cursor:pointer;"]);
|
|
35
|
+
|
|
36
|
+
var Switch = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
37
|
+
displayName: "toggleButton__Switch",
|
|
38
|
+
componentId: "sc-183g3tk-2"
|
|
39
|
+
})(["position:relative;width:40px;height:20px;background:", ";border-radius:20px;padding:0px;transition:100ms ease-in-out;&:before{transition:100ms ease-in-out;content:'';position:absolute;width:16px;height:16px;border-radius:20px;top:50%;left:2px;background:white;transform:translate(0,-50%);}"], function (props) {
|
|
40
|
+
return props.disabled ? _color.colorGrayscale.gray400 : _color.colorGrayscale.gray600;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
var Input = /*#__PURE__*/_styledComponents["default"].input.withConfig({
|
|
44
|
+
displayName: "toggleButton__Input",
|
|
45
|
+
componentId: "sc-183g3tk-3"
|
|
46
|
+
})(["opacity:0;position:absolute;&:checked + ", "{background:", ";&:before{transform:translate(20px,-50%);}}"], Switch, function (props) {
|
|
47
|
+
return props.disabled ? _color.colorGrayscale.gray400 : _color.colorBrand.heavy;
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
var ToggleButton = function ToggleButton(_ref) {
|
|
51
|
+
var _ref$value = _ref.value,
|
|
52
|
+
value = _ref$value === void 0 ? false : _ref$value,
|
|
53
|
+
_ref$labelOn = _ref.labelOn,
|
|
54
|
+
labelOn = _ref$labelOn === void 0 ? '' : _ref$labelOn,
|
|
55
|
+
_ref$labelOff = _ref.labelOff,
|
|
56
|
+
labelOff = _ref$labelOff === void 0 ? '' : _ref$labelOff,
|
|
57
|
+
_ref$disabled = _ref.disabled,
|
|
58
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
59
|
+
_ref$onChange = _ref.onChange,
|
|
60
|
+
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
61
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
62
|
+
|
|
63
|
+
var handleChange = function handleChange(e) {
|
|
64
|
+
onChange && onChange();
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return /*#__PURE__*/_react["default"].createElement(Container, null, /*#__PURE__*/_react["default"].createElement(_paragraph.P2, {
|
|
68
|
+
text: value ? labelOn : labelOff,
|
|
69
|
+
style: {
|
|
70
|
+
color: _color.colorGrayscale.gray600,
|
|
71
|
+
whiteSpace: 'nowrap'
|
|
72
|
+
}
|
|
73
|
+
}), /*#__PURE__*/_react["default"].createElement(Label, props, /*#__PURE__*/_react["default"].createElement(Input, {
|
|
74
|
+
type: "checkbox",
|
|
75
|
+
disabled: disabled,
|
|
76
|
+
checked: value,
|
|
77
|
+
onChange: handleChange
|
|
78
|
+
}), /*#__PURE__*/_react["default"].createElement(Switch, {
|
|
79
|
+
disabled: disabled
|
|
80
|
+
})));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
ToggleButton.propTypes = {
|
|
84
|
+
value: _propTypes["default"].bool.isRequired,
|
|
85
|
+
labelOn: _propTypes["default"].string,
|
|
86
|
+
labelOff: _propTypes["default"].string,
|
|
87
|
+
disabled: _propTypes["default"].bool,
|
|
88
|
+
onChange: _propTypes["default"].func.isRequired
|
|
89
|
+
};
|
|
90
|
+
var _default = ToggleButton;
|
|
91
|
+
exports["default"] = _default;
|
package/lib/button/index.js
CHANGED
|
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "TextButton", {
|
|
|
27
27
|
return _textButton["default"];
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "ToggleButton", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _toggleButton["default"];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
30
36
|
exports["default"] = void 0;
|
|
31
37
|
|
|
32
38
|
var _pillButton = _interopRequireDefault(require("./components/pillButton"));
|
|
@@ -37,12 +43,15 @@ var _iconWithTextButton = _interopRequireDefault(require("./components/iconWithT
|
|
|
37
43
|
|
|
38
44
|
var _textButton = _interopRequireDefault(require("./components/textButton"));
|
|
39
45
|
|
|
46
|
+
var _toggleButton = _interopRequireDefault(require("./components/toggleButton"));
|
|
47
|
+
|
|
40
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
41
49
|
|
|
42
50
|
var _default = {
|
|
43
51
|
PillButton: _pillButton["default"],
|
|
44
52
|
IconButton: _iconButton["default"],
|
|
45
53
|
IconWithTextButton: _iconWithTextButton["default"],
|
|
46
|
-
TextButton: _textButton["default"]
|
|
54
|
+
TextButton: _textButton["default"],
|
|
55
|
+
ToggleButton: _toggleButton["default"]
|
|
47
56
|
};
|
|
48
57
|
exports["default"] = _default;
|
|
@@ -47,7 +47,10 @@ textButton.args = {
|
|
|
47
47
|
var withArrowIcon = Template.bind({});
|
|
48
48
|
exports.withArrowIcon = withArrowIcon;
|
|
49
49
|
withArrowIcon.args = {
|
|
50
|
-
|
|
50
|
+
leftIconComponent: /*#__PURE__*/_react["default"].createElement(_icon.Arrow, {
|
|
51
|
+
direction: "left"
|
|
52
|
+
}),
|
|
53
|
+
rightIconComponent: /*#__PURE__*/_react["default"].createElement(_icon.Arrow, {
|
|
51
54
|
direction: "right"
|
|
52
55
|
}),
|
|
53
56
|
text: '文字',
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toggleButton = exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _toggleButton = _interopRequireDefault(require("../components/toggleButton"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
title: 'Button/Toggle Button',
|
|
16
|
+
component: _toggleButton["default"],
|
|
17
|
+
argTypes: {
|
|
18
|
+
value: {
|
|
19
|
+
defaultValue: false,
|
|
20
|
+
options: [true, false]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports["default"] = _default;
|
|
25
|
+
|
|
26
|
+
var Template = function Template(args) {
|
|
27
|
+
return /*#__PURE__*/_react["default"].createElement(_toggleButton["default"], args);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var toggleButton = Template.bind({});
|
|
31
|
+
exports.toggleButton = toggleButton;
|
|
32
|
+
toggleButton.args = {
|
|
33
|
+
value: false,
|
|
34
|
+
labelOn: '已訂閱',
|
|
35
|
+
labelOff: '未訂閱',
|
|
36
|
+
disabled: false,
|
|
37
|
+
onChange: function onChange() {}
|
|
38
|
+
};
|
package/lib/icon/index.js
CHANGED
|
@@ -14,7 +14,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
14
14
|
var _releaseBranch = require("@twreporter/core/lib/constants/release-branch");
|
|
15
15
|
|
|
16
16
|
var _excluded = ["filename", "releaseBranch"],
|
|
17
|
-
_excluded2 = ["
|
|
17
|
+
_excluded2 = ["direction", "releaseBranch"],
|
|
18
|
+
_excluded3 = ["mediaType"];
|
|
18
19
|
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
20
21
|
|
|
@@ -56,12 +57,14 @@ Icon.propTypes = {
|
|
|
56
57
|
var Arrow = function Arrow(_ref2) {
|
|
57
58
|
var _ref2$direction = _ref2.direction,
|
|
58
59
|
direction = _ref2$direction === void 0 ? 'right' : _ref2$direction,
|
|
59
|
-
releaseBranch = _ref2.releaseBranch
|
|
60
|
+
releaseBranch = _ref2.releaseBranch,
|
|
61
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
62
|
+
|
|
60
63
|
var filename = "arrow_".concat(direction);
|
|
61
|
-
return /*#__PURE__*/_react["default"].createElement(Icon, {
|
|
64
|
+
return /*#__PURE__*/_react["default"].createElement(Icon, _extends({
|
|
62
65
|
filename: filename,
|
|
63
66
|
releaseBranch: releaseBranch
|
|
64
|
-
});
|
|
67
|
+
}, props));
|
|
65
68
|
};
|
|
66
69
|
|
|
67
70
|
exports.Arrow = Arrow;
|
|
@@ -298,7 +301,7 @@ Line.propTypes = {
|
|
|
298
301
|
|
|
299
302
|
var SocialMedia = function SocialMedia(_ref4) {
|
|
300
303
|
var mediaType = _ref4.mediaType,
|
|
301
|
-
args = _objectWithoutProperties(_ref4,
|
|
304
|
+
args = _objectWithoutProperties(_ref4, _excluded3);
|
|
302
305
|
|
|
303
306
|
return /*#__PURE__*/_react["default"].createElement(Icon, _extends({
|
|
304
307
|
filename: mediaType
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.SimpleHeader = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
|
|
12
|
+
var _logo = require("../logo");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var HeaderContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
17
|
+
displayName: "simple-header__HeaderContainer",
|
|
18
|
+
componentId: "sc-4xugf-0"
|
|
19
|
+
})(["display:flex;flex-direction:row;justify-content:center;padding:16px 24px;"]);
|
|
20
|
+
|
|
21
|
+
var SimpleHeader = function SimpleHeader(props) {
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement(HeaderContainer, props, /*#__PURE__*/_react["default"].createElement(_logo.LogoHeader, null));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.SimpleHeader = SimpleHeader;
|
|
26
|
+
var _default = SimpleHeader;
|
|
27
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.simpleHeader = exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _ = _interopRequireDefault(require("."));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
title: 'Header/Simple Header',
|
|
16
|
+
component: _["default"]
|
|
17
|
+
};
|
|
18
|
+
exports["default"] = _default;
|
|
19
|
+
|
|
20
|
+
var Template = function Template(args) {
|
|
21
|
+
return /*#__PURE__*/_react["default"].createElement(_["default"], args);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var simpleHeader = Template.bind({});
|
|
25
|
+
exports.simpleHeader = simpleHeader;
|
|
26
|
+
simpleHeader.args = {};
|
package/lib/text/headline.js
CHANGED
|
@@ -17,10 +17,18 @@ var _mediaQuery = _interopRequireDefault(require("@twreporter/core/lib/utils/med
|
|
|
17
17
|
|
|
18
18
|
var _font = require("@twreporter/core/lib/constants/font");
|
|
19
19
|
|
|
20
|
+
var _excluded = ["text", "type", "className"];
|
|
21
|
+
|
|
20
22
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
25
|
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
24
32
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
25
33
|
|
|
26
34
|
var DefaultContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
@@ -65,131 +73,44 @@ var H6Container = /*#__PURE__*/(0, _styledComponents["default"])(DefaultContaine
|
|
|
65
73
|
return props.fontFamily;
|
|
66
74
|
}, _mediaQuery["default"].tabletAndBelow(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: 14px;\n "]))));
|
|
67
75
|
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
var withContainer = function withContainer(HeadlineContainer) {
|
|
77
|
+
var headline = function headline(_ref) {
|
|
78
|
+
var _ref$text = _ref.text,
|
|
79
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
80
|
+
_ref$type = _ref.type,
|
|
81
|
+
type = _ref$type === void 0 ? _headlineType.TYPE["default"] : _ref$type,
|
|
82
|
+
_ref$className = _ref.className,
|
|
83
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
84
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
85
|
+
|
|
86
|
+
var fontFamily = _headlineType.TYPE_FONT_FAMILY[type];
|
|
87
|
+
return /*#__PURE__*/_react["default"].createElement(HeadlineContainer, _extends({
|
|
88
|
+
fontFamily: fontFamily,
|
|
89
|
+
className: className
|
|
90
|
+
}, props), text);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
headline.displayName = 'headline';
|
|
94
|
+
headline.propTypes = {
|
|
95
|
+
text: _propTypes["default"].string,
|
|
96
|
+
type: _headlineType.TYPE_PROP_TYPES,
|
|
97
|
+
className: _propTypes["default"].string
|
|
98
|
+
};
|
|
99
|
+
return headline;
|
|
80
100
|
};
|
|
81
101
|
|
|
102
|
+
var H1 = withContainer(H1Container);
|
|
82
103
|
exports.H1 = H1;
|
|
83
|
-
|
|
84
|
-
text: _propTypes["default"].string,
|
|
85
|
-
type: _headlineType.TYPE_PROP_TYPES,
|
|
86
|
-
className: _propTypes["default"].string
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
var H2 = function H2(_ref2) {
|
|
90
|
-
var _ref2$text = _ref2.text,
|
|
91
|
-
text = _ref2$text === void 0 ? '' : _ref2$text,
|
|
92
|
-
_ref2$type = _ref2.type,
|
|
93
|
-
type = _ref2$type === void 0 ? _headlineType.TYPE["default"] : _ref2$type,
|
|
94
|
-
_ref2$className = _ref2.className,
|
|
95
|
-
className = _ref2$className === void 0 ? '' : _ref2$className;
|
|
96
|
-
var fontFamily = _headlineType.TYPE_FONT_FAMILY[type];
|
|
97
|
-
return /*#__PURE__*/_react["default"].createElement(H2Container, {
|
|
98
|
-
fontFamily: fontFamily,
|
|
99
|
-
className: className
|
|
100
|
-
}, text);
|
|
101
|
-
};
|
|
102
|
-
|
|
104
|
+
var H2 = withContainer(H2Container);
|
|
103
105
|
exports.H2 = H2;
|
|
104
|
-
|
|
105
|
-
text: _propTypes["default"].string,
|
|
106
|
-
type: _headlineType.TYPE_PROP_TYPES,
|
|
107
|
-
className: _propTypes["default"].string
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
var H3 = function H3(_ref3) {
|
|
111
|
-
var _ref3$text = _ref3.text,
|
|
112
|
-
text = _ref3$text === void 0 ? '' : _ref3$text,
|
|
113
|
-
_ref3$type = _ref3.type,
|
|
114
|
-
type = _ref3$type === void 0 ? _headlineType.TYPE["default"] : _ref3$type,
|
|
115
|
-
_ref3$className = _ref3.className,
|
|
116
|
-
className = _ref3$className === void 0 ? '' : _ref3$className;
|
|
117
|
-
var fontFamily = _headlineType.TYPE_FONT_FAMILY[type];
|
|
118
|
-
return /*#__PURE__*/_react["default"].createElement(H3Container, {
|
|
119
|
-
fontFamily: fontFamily,
|
|
120
|
-
className: className
|
|
121
|
-
}, text);
|
|
122
|
-
};
|
|
123
|
-
|
|
106
|
+
var H3 = withContainer(H3Container);
|
|
124
107
|
exports.H3 = H3;
|
|
125
|
-
|
|
126
|
-
text: _propTypes["default"].string,
|
|
127
|
-
type: _headlineType.TYPE_PROP_TYPES,
|
|
128
|
-
className: _propTypes["default"].string
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
var H4 = function H4(_ref4) {
|
|
132
|
-
var _ref4$text = _ref4.text,
|
|
133
|
-
text = _ref4$text === void 0 ? '' : _ref4$text,
|
|
134
|
-
_ref4$type = _ref4.type,
|
|
135
|
-
type = _ref4$type === void 0 ? _headlineType.TYPE["default"] : _ref4$type,
|
|
136
|
-
_ref4$className = _ref4.className,
|
|
137
|
-
className = _ref4$className === void 0 ? '' : _ref4$className;
|
|
138
|
-
var fontFamily = _headlineType.TYPE_FONT_FAMILY[type];
|
|
139
|
-
return /*#__PURE__*/_react["default"].createElement(H4Container, {
|
|
140
|
-
fontFamily: fontFamily,
|
|
141
|
-
className: className
|
|
142
|
-
}, text);
|
|
143
|
-
};
|
|
144
|
-
|
|
108
|
+
var H4 = withContainer(H4Container);
|
|
145
109
|
exports.H4 = H4;
|
|
146
|
-
|
|
147
|
-
text: _propTypes["default"].string,
|
|
148
|
-
type: _headlineType.TYPE_PROP_TYPES,
|
|
149
|
-
className: _propTypes["default"].string
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
var H5 = function H5(_ref5) {
|
|
153
|
-
var _ref5$text = _ref5.text,
|
|
154
|
-
text = _ref5$text === void 0 ? '' : _ref5$text,
|
|
155
|
-
_ref5$type = _ref5.type,
|
|
156
|
-
type = _ref5$type === void 0 ? _headlineType.TYPE["default"] : _ref5$type,
|
|
157
|
-
_ref5$className = _ref5.className,
|
|
158
|
-
className = _ref5$className === void 0 ? '' : _ref5$className;
|
|
159
|
-
var fontFamily = _headlineType.TYPE_FONT_FAMILY[type];
|
|
160
|
-
return /*#__PURE__*/_react["default"].createElement(H5Container, {
|
|
161
|
-
fontFamily: fontFamily,
|
|
162
|
-
className: className
|
|
163
|
-
}, text);
|
|
164
|
-
};
|
|
165
|
-
|
|
110
|
+
var H5 = withContainer(H5Container);
|
|
166
111
|
exports.H5 = H5;
|
|
167
|
-
|
|
168
|
-
text: _propTypes["default"].string,
|
|
169
|
-
type: _headlineType.TYPE_PROP_TYPES,
|
|
170
|
-
className: _propTypes["default"].string
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
var H6 = function H6(_ref6) {
|
|
174
|
-
var _ref6$text = _ref6.text,
|
|
175
|
-
text = _ref6$text === void 0 ? '' : _ref6$text,
|
|
176
|
-
_ref6$type = _ref6.type,
|
|
177
|
-
type = _ref6$type === void 0 ? _headlineType.TYPE["default"] : _ref6$type,
|
|
178
|
-
_ref6$className = _ref6.className,
|
|
179
|
-
className = _ref6$className === void 0 ? '' : _ref6$className;
|
|
180
|
-
var fontFamily = _headlineType.TYPE_FONT_FAMILY[type];
|
|
181
|
-
return /*#__PURE__*/_react["default"].createElement(H6Container, {
|
|
182
|
-
fontFamily: fontFamily,
|
|
183
|
-
className: className
|
|
184
|
-
}, text);
|
|
185
|
-
};
|
|
186
|
-
|
|
112
|
+
var H6 = withContainer(H6Container);
|
|
187
113
|
exports.H6 = H6;
|
|
188
|
-
H6.propTypes = {
|
|
189
|
-
text: _propTypes["default"].string,
|
|
190
|
-
type: _headlineType.TYPE_PROP_TYPES,
|
|
191
|
-
className: _propTypes["default"].string
|
|
192
|
-
};
|
|
193
114
|
var _default = {
|
|
194
115
|
H1: H1,
|
|
195
116
|
H2: H2,
|
package/lib/text/paragraph.js
CHANGED
|
@@ -15,12 +15,20 @@ var _fontWeight = require("./constants/font-weight");
|
|
|
15
15
|
|
|
16
16
|
var _font = require("@twreporter/core/lib/constants/font");
|
|
17
17
|
|
|
18
|
+
var _excluded = ["text", "weight", "className"];
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
20
28
|
var defaultContainer = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
|
21
29
|
displayName: "paragraph__defaultContainer",
|
|
22
30
|
componentId: "sc-1aejhao-0"
|
|
23
|
-
})(["font-weight:", ";font-family:", ";line-height:150%;"], function (props) {
|
|
31
|
+
})(["font-weight:", ";font-family:", ";line-height:150%;display:flex;align-items:center;"], function (props) {
|
|
24
32
|
return _font.fontWeight[props.weight];
|
|
25
33
|
}, _font.fontFamily["default"]);
|
|
26
34
|
|
|
@@ -41,85 +49,39 @@ var P4Container = /*#__PURE__*/(0, _styledComponents["default"])(defaultContaine
|
|
|
41
49
|
componentId: "sc-1aejhao-4"
|
|
42
50
|
})(["font-size:10px;"]);
|
|
43
51
|
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
var withContainer = function withContainer(ParagraphContainer) {
|
|
53
|
+
var paragraph = function paragraph(_ref) {
|
|
54
|
+
var _ref$text = _ref.text,
|
|
55
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
56
|
+
_ref$weight = _ref.weight,
|
|
57
|
+
weight = _ref$weight === void 0 ? _fontWeight.WEIGHT.normal : _ref$weight,
|
|
58
|
+
_ref$className = _ref.className,
|
|
59
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
60
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
61
|
+
|
|
62
|
+
return /*#__PURE__*/_react["default"].createElement(ParagraphContainer, _extends({
|
|
63
|
+
weight: weight,
|
|
64
|
+
className: className
|
|
65
|
+
}, props), text);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
paragraph.displayName = 'paragraph';
|
|
69
|
+
paragraph.propTypes = {
|
|
70
|
+
text: _propTypes["default"].string,
|
|
71
|
+
weight: _fontWeight.WEIGHT_PROP_TYPES,
|
|
72
|
+
className: _propTypes["default"].string
|
|
73
|
+
};
|
|
74
|
+
return paragraph;
|
|
55
75
|
};
|
|
56
76
|
|
|
77
|
+
var P1 = withContainer(P1Container);
|
|
57
78
|
exports.P1 = P1;
|
|
58
|
-
|
|
59
|
-
text: _propTypes["default"].string,
|
|
60
|
-
weight: _fontWeight.WEIGHT_PROP_TYPES,
|
|
61
|
-
className: _propTypes["default"].string
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
var P2 = function P2(_ref2) {
|
|
65
|
-
var _ref2$text = _ref2.text,
|
|
66
|
-
text = _ref2$text === void 0 ? '' : _ref2$text,
|
|
67
|
-
_ref2$weight = _ref2.weight,
|
|
68
|
-
weight = _ref2$weight === void 0 ? _fontWeight.WEIGHT.normal : _ref2$weight,
|
|
69
|
-
_ref2$className = _ref2.className,
|
|
70
|
-
className = _ref2$className === void 0 ? '' : _ref2$className;
|
|
71
|
-
return /*#__PURE__*/_react["default"].createElement(P2Container, {
|
|
72
|
-
weight: weight,
|
|
73
|
-
className: className
|
|
74
|
-
}, text);
|
|
75
|
-
};
|
|
76
|
-
|
|
79
|
+
var P2 = withContainer(P2Container);
|
|
77
80
|
exports.P2 = P2;
|
|
78
|
-
|
|
79
|
-
text: _propTypes["default"].string,
|
|
80
|
-
weight: _fontWeight.WEIGHT_PROP_TYPES,
|
|
81
|
-
className: _propTypes["default"].string
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
var P3 = function P3(_ref3) {
|
|
85
|
-
var _ref3$text = _ref3.text,
|
|
86
|
-
text = _ref3$text === void 0 ? '' : _ref3$text,
|
|
87
|
-
_ref3$weight = _ref3.weight,
|
|
88
|
-
weight = _ref3$weight === void 0 ? _fontWeight.WEIGHT.normal : _ref3$weight,
|
|
89
|
-
_ref3$className = _ref3.className,
|
|
90
|
-
className = _ref3$className === void 0 ? '' : _ref3$className;
|
|
91
|
-
return /*#__PURE__*/_react["default"].createElement(P3Container, {
|
|
92
|
-
weight: weight,
|
|
93
|
-
className: className
|
|
94
|
-
}, text);
|
|
95
|
-
};
|
|
96
|
-
|
|
81
|
+
var P3 = withContainer(P3Container);
|
|
97
82
|
exports.P3 = P3;
|
|
98
|
-
|
|
99
|
-
text: _propTypes["default"].string,
|
|
100
|
-
weight: _fontWeight.WEIGHT_PROP_TYPES,
|
|
101
|
-
className: _propTypes["default"].string
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
var P4 = function P4(_ref4) {
|
|
105
|
-
var _ref4$text = _ref4.text,
|
|
106
|
-
text = _ref4$text === void 0 ? '' : _ref4$text,
|
|
107
|
-
_ref4$weight = _ref4.weight,
|
|
108
|
-
weight = _ref4$weight === void 0 ? _fontWeight.WEIGHT.normal : _ref4$weight,
|
|
109
|
-
_ref4$className = _ref4.className,
|
|
110
|
-
className = _ref4$className === void 0 ? '' : _ref4$className;
|
|
111
|
-
return /*#__PURE__*/_react["default"].createElement(P4Container, {
|
|
112
|
-
weight: weight,
|
|
113
|
-
className: className
|
|
114
|
-
}, text);
|
|
115
|
-
};
|
|
116
|
-
|
|
83
|
+
var P4 = withContainer(P4Container);
|
|
117
84
|
exports.P4 = P4;
|
|
118
|
-
P4.propTypes = {
|
|
119
|
-
text: _propTypes["default"].string,
|
|
120
|
-
weight: _fontWeight.WEIGHT_PROP_TYPES,
|
|
121
|
-
className: _propTypes["default"].string
|
|
122
|
-
};
|
|
123
85
|
var _default = {
|
|
124
86
|
P1: P1,
|
|
125
87
|
P2: P2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/react-components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.17.0-rc.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"repository": "https://github.com/twreporter/twreporter-npm-packages.git",
|
|
6
6
|
"author": "twreporter <developer@twreporter.org>",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"babel-loader": "^8.2.4",
|
|
45
45
|
"chromatic": "^6.5.4"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "3047acc88fedab0ebaf202df0901d2871b0644c2"
|
|
48
48
|
}
|