@twreporter/react-components 8.21.0-rc.0 → 8.21.0-rc.10
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 +112 -0
- package/lib/badge/badge.stories.js +7 -13
- package/lib/bookmark-list/stories/bookmark.stories.js +10 -9
- package/lib/button/components/link.js +38 -7
- package/lib/button/index.js +14 -1
- package/lib/button/stories/iconButton.stories.js +19 -22
- package/lib/button/stories/iconWithTextButton.stories.js +21 -24
- package/lib/button/stories/link.stories.js +95 -51
- package/lib/button/stories/menuButton.stories.js +11 -16
- package/lib/button/stories/pillButton.stories.js +38 -41
- package/lib/button/stories/textButton.stories.js +48 -51
- package/lib/button/stories/toggleButton.stories.js +9 -15
- package/lib/button/utils/theme.js +16 -16
- package/lib/card/stories/articleCard.stories.js +20 -18
- package/lib/card/stories/dialog.stories.js +15 -14
- package/lib/checkbox/checkbox.stories.js +10 -16
- package/lib/divider.stories.js +30 -28
- package/lib/empty-state/stories/empty-guide.stories.js +10 -15
- package/lib/icon/stories/arrow.stories.js +38 -42
- package/lib/icon/stories/article.stories.js +1 -9
- package/lib/icon/stories/bookmark.stories.js +30 -35
- package/lib/icon/stories/changeIconColor.stories.js +1 -5
- package/lib/icon/stories/clock.stories.js +1 -9
- package/lib/icon/stories/copy.stories.js +1 -9
- package/lib/icon/stories/cross.stories.js +1 -9
- package/lib/icon/stories/hamburger.stories.js +1 -9
- package/lib/icon/stories/home.stories.js +1 -9
- package/lib/icon/stories/letter.stories.js +1 -9
- package/lib/icon/stories/loading.stories.js +1 -9
- package/lib/icon/stories/member.stories.js +1 -9
- package/lib/icon/stories/printer.stories.js +1 -9
- package/lib/icon/stories/search.stories.js +1 -9
- package/lib/icon/stories/share.stories.js +1 -9
- package/lib/icon/stories/socialMedia.stories.js +1 -9
- package/lib/icon/stories/text.stories.js +1 -9
- package/lib/icon/stories/topic.stories.js +1 -9
- package/lib/input/stories/search-bar.stories.js +12 -17
- package/lib/input/stories/text-field.stories.js +15 -14
- package/lib/input/utils/theme.js +1 -1
- package/lib/listing-page/stories/cardList.stories.js +52 -57
- package/lib/logo/stories/logoFooter.stories.js +1 -7
- package/lib/logo/stories/logoHeader.stories.js +5 -10
- package/lib/logo/stories/logoLoadingFallback.stories.js +1 -7
- package/lib/logo/stories/logoSymbol.stories.js +5 -10
- package/lib/mobile-member-role-card/index.js +95 -57
- package/lib/mobile-member-role-card/stories/member-role-card.stories.js +14 -13
- package/lib/simple-header/simpleHeader.stories.js +3 -9
- package/lib/snack-bar/stories/snackBar.stories.js +18 -20
- package/lib/text/paragraph.js +2 -2
- package/lib/text/stories/headline.stories.js +72 -74
- package/lib/text/stories/paragraph.stories.js +48 -50
- package/lib/title-bar/stories/bar.stories.js +15 -19
- package/lib/title-bar/stories/tab.stories.js +252 -256
- package/package.json +21 -14
package/lib/text/paragraph.js
CHANGED
|
@@ -25,10 +25,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
25
25
|
|
|
26
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
27
|
|
|
28
|
-
var defaultContainer = /*#__PURE__*/_styledComponents["default"].
|
|
28
|
+
var defaultContainer = /*#__PURE__*/_styledComponents["default"].p.withConfig({
|
|
29
29
|
displayName: "paragraph__defaultContainer",
|
|
30
30
|
componentId: "sc-1aejhao-0"
|
|
31
|
-
})(["font-weight:", ";font-family:", ";line-height:150%;display:flex;align-items:center;"], function (props) {
|
|
31
|
+
})(["font-weight:", ";font-family:", ";line-height:150%;display:flex;align-items:center;margin-block-start:0px;margin-block-end:0px;"], function (props) {
|
|
32
32
|
return _font.fontWeight[props.weight];
|
|
33
33
|
}, _font.fontFamily["default"]);
|
|
34
34
|
|
|
@@ -15,6 +15,7 @@ var _enums = require("../enums");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
|
|
18
|
+
/* eslint react/display-name:0 */
|
|
18
19
|
var _default = {
|
|
19
20
|
title: 'Text/Headline',
|
|
20
21
|
component: _headline.H1,
|
|
@@ -25,93 +26,90 @@ var _default = {
|
|
|
25
26
|
exports["default"] = _default;
|
|
26
27
|
var defaultText = '標題「標題」:標題,《標題》標題English標題123標題?';
|
|
27
28
|
var defaultType = _headline.H1.Type.DEFAULT;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
var h1 = {
|
|
30
|
+
args: {
|
|
31
|
+
text: defaultText,
|
|
32
|
+
type: defaultType
|
|
33
|
+
},
|
|
34
|
+
parameters: {
|
|
35
|
+
controls: {
|
|
36
|
+
exclude: ['className']
|
|
37
|
+
}
|
|
38
|
+
}
|
|
31
39
|
};
|
|
32
|
-
|
|
33
40
|
exports.h1 = h1;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
var h2 = {
|
|
42
|
+
render: function render(args) {
|
|
43
|
+
return /*#__PURE__*/_react["default"].createElement(_headline.H2, args);
|
|
44
|
+
},
|
|
45
|
+
args: {
|
|
46
|
+
text: defaultText,
|
|
47
|
+
type: defaultType
|
|
48
|
+
},
|
|
49
|
+
parameters: {
|
|
50
|
+
controls: {
|
|
51
|
+
exclude: ['className']
|
|
52
|
+
}
|
|
41
53
|
}
|
|
42
54
|
};
|
|
43
|
-
|
|
44
|
-
var h2 = function h2(args) {
|
|
45
|
-
return /*#__PURE__*/_react["default"].createElement(_headline.H2, args);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
55
|
exports.h2 = h2;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
var h3 = {
|
|
57
|
+
render: function render(args) {
|
|
58
|
+
return /*#__PURE__*/_react["default"].createElement(_headline.H3, args);
|
|
59
|
+
},
|
|
60
|
+
args: {
|
|
61
|
+
text: defaultText,
|
|
62
|
+
type: defaultType
|
|
63
|
+
},
|
|
64
|
+
parameters: {
|
|
65
|
+
controls: {
|
|
66
|
+
exclude: ['className']
|
|
67
|
+
}
|
|
56
68
|
}
|
|
57
69
|
};
|
|
58
|
-
|
|
59
|
-
var h3 = function h3(args) {
|
|
60
|
-
return /*#__PURE__*/_react["default"].createElement(_headline.H3, args);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
70
|
exports.h3 = h3;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
var h4 = {
|
|
72
|
+
render: function render(args) {
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement(_headline.H4, args);
|
|
74
|
+
},
|
|
75
|
+
args: {
|
|
76
|
+
text: defaultText,
|
|
77
|
+
type: defaultType
|
|
78
|
+
},
|
|
79
|
+
parameters: {
|
|
80
|
+
controls: {
|
|
81
|
+
exclude: ['className']
|
|
82
|
+
}
|
|
71
83
|
}
|
|
72
84
|
};
|
|
73
|
-
|
|
74
|
-
var h4 = function h4(args) {
|
|
75
|
-
return /*#__PURE__*/_react["default"].createElement(_headline.H4, args);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
85
|
exports.h4 = h4;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
var h5 = {
|
|
87
|
+
render: function render(args) {
|
|
88
|
+
return /*#__PURE__*/_react["default"].createElement(_headline.H5, args);
|
|
89
|
+
},
|
|
90
|
+
args: {
|
|
91
|
+
text: defaultText,
|
|
92
|
+
type: defaultType
|
|
93
|
+
},
|
|
94
|
+
parameters: {
|
|
95
|
+
controls: {
|
|
96
|
+
exclude: ['className']
|
|
97
|
+
}
|
|
86
98
|
}
|
|
87
99
|
};
|
|
88
|
-
|
|
89
|
-
var h5 = function h5(args) {
|
|
90
|
-
return /*#__PURE__*/_react["default"].createElement(_headline.H5, args);
|
|
91
|
-
};
|
|
92
|
-
|
|
93
100
|
exports.h5 = h5;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
var h6 = {
|
|
102
|
+
render: function render(args) {
|
|
103
|
+
return /*#__PURE__*/_react["default"].createElement(_headline.H6, args);
|
|
104
|
+
},
|
|
105
|
+
args: {
|
|
106
|
+
text: defaultText,
|
|
107
|
+
type: defaultType
|
|
108
|
+
},
|
|
109
|
+
parameters: {
|
|
110
|
+
controls: {
|
|
111
|
+
exclude: ['className']
|
|
112
|
+
}
|
|
101
113
|
}
|
|
102
114
|
};
|
|
103
|
-
|
|
104
|
-
var h6 = function h6(args) {
|
|
105
|
-
return /*#__PURE__*/_react["default"].createElement(_headline.H6, args);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
exports.h6 = h6;
|
|
109
|
-
h6.args = {
|
|
110
|
-
text: defaultText,
|
|
111
|
-
type: defaultType
|
|
112
|
-
};
|
|
113
|
-
h6.parameters = {
|
|
114
|
-
controls: {
|
|
115
|
-
exclude: ['className']
|
|
116
|
-
}
|
|
117
|
-
};
|
|
115
|
+
exports.h6 = h6;
|
|
@@ -15,6 +15,7 @@ var _enums = require("../enums");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
|
|
18
|
+
/* eslint react/display-name:0 */
|
|
18
19
|
var _default = {
|
|
19
20
|
title: 'Text/Paragraph',
|
|
20
21
|
component: _paragraph.P1,
|
|
@@ -25,63 +26,60 @@ var _default = {
|
|
|
25
26
|
exports["default"] = _default;
|
|
26
27
|
var defaultText = '內文「內文」:內文,《內文》內文English內文123內文?';
|
|
27
28
|
var defaultWeight = _paragraph.P1.Weight.NORMAL;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
var p1 = {
|
|
30
|
+
args: {
|
|
31
|
+
text: defaultText,
|
|
32
|
+
weight: defaultWeight
|
|
33
|
+
},
|
|
34
|
+
parameters: {
|
|
35
|
+
controls: {
|
|
36
|
+
exclude: ['className']
|
|
37
|
+
}
|
|
38
|
+
}
|
|
31
39
|
};
|
|
32
|
-
|
|
33
40
|
exports.p1 = p1;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
var p2 = {
|
|
42
|
+
render: function render(args) {
|
|
43
|
+
return /*#__PURE__*/_react["default"].createElement(_paragraph.P2, args);
|
|
44
|
+
},
|
|
45
|
+
args: {
|
|
46
|
+
text: defaultText,
|
|
47
|
+
weight: defaultWeight
|
|
48
|
+
},
|
|
49
|
+
parameters: {
|
|
50
|
+
controls: {
|
|
51
|
+
exclude: ['className']
|
|
52
|
+
}
|
|
41
53
|
}
|
|
42
54
|
};
|
|
43
|
-
|
|
44
|
-
var p2 = function p2(args) {
|
|
45
|
-
return /*#__PURE__*/_react["default"].createElement(_paragraph.P2, args);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
55
|
exports.p2 = p2;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
var p3 = {
|
|
57
|
+
render: function render(args) {
|
|
58
|
+
return /*#__PURE__*/_react["default"].createElement(_paragraph.P3, args);
|
|
59
|
+
},
|
|
60
|
+
args: {
|
|
61
|
+
text: defaultText,
|
|
62
|
+
weight: defaultWeight
|
|
63
|
+
},
|
|
64
|
+
parameters: {
|
|
65
|
+
controls: {
|
|
66
|
+
exclude: ['className']
|
|
67
|
+
}
|
|
56
68
|
}
|
|
57
69
|
};
|
|
58
|
-
|
|
59
|
-
var p3 = function p3(args) {
|
|
60
|
-
return /*#__PURE__*/_react["default"].createElement(_paragraph.P3, args);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
70
|
exports.p3 = p3;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
var p4 = {
|
|
72
|
+
render: function render(args) {
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement(_paragraph.P4, args);
|
|
74
|
+
},
|
|
75
|
+
args: {
|
|
76
|
+
text: defaultText,
|
|
77
|
+
weight: defaultWeight
|
|
78
|
+
},
|
|
79
|
+
parameters: {
|
|
80
|
+
controls: {
|
|
81
|
+
exclude: ['className']
|
|
82
|
+
}
|
|
71
83
|
}
|
|
72
84
|
};
|
|
73
|
-
|
|
74
|
-
var p4 = function p4(args) {
|
|
75
|
-
return /*#__PURE__*/_react["default"].createElement(_paragraph.P4, args);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
exports.p4 = p4;
|
|
79
|
-
p4.args = {
|
|
80
|
-
text: defaultText,
|
|
81
|
-
weight: defaultWeight
|
|
82
|
-
};
|
|
83
|
-
p4.parameters = {
|
|
84
|
-
controls: {
|
|
85
|
-
exclude: ['className']
|
|
86
|
-
}
|
|
87
|
-
};
|
|
85
|
+
exports.p4 = p4;
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.tagBar = exports["default"] = exports.bookmarkBar = exports.bar = void 0;
|
|
7
7
|
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _bar = _interopRequireDefault(require("../components/bar"));
|
|
11
9
|
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -16,25 +14,23 @@ var _default = {
|
|
|
16
14
|
component: _bar["default"]
|
|
17
15
|
};
|
|
18
16
|
exports["default"] = _default;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
var bar = {
|
|
18
|
+
args: {
|
|
19
|
+
title: '標題',
|
|
20
|
+
subtitle: '副標'
|
|
21
|
+
}
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
var bar = Template.bind({});
|
|
25
23
|
exports.bar = bar;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
var tagBar = {
|
|
25
|
+
args: {
|
|
26
|
+
title: 'Tag'
|
|
27
|
+
}
|
|
29
28
|
};
|
|
30
|
-
var tagBar = Template.bind({});
|
|
31
29
|
exports.tagBar = tagBar;
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
var bookmarkBar = {
|
|
31
|
+
args: {
|
|
32
|
+
title: '我的書籤',
|
|
33
|
+
subtitle: '全部 55'
|
|
34
|
+
}
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
-
exports.bookmarkBar = bookmarkBar;
|
|
37
|
-
bookmarkBar.args = {
|
|
38
|
-
title: '我的書籤',
|
|
39
|
-
subtitle: '全部 55'
|
|
40
|
-
};
|
|
36
|
+
exports.bookmarkBar = bookmarkBar;
|