@twreporter/react-components 8.17.0-rc.1 → 8.17.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 +304 -784
- package/lib/bookmark-list/bookmarks.js +18 -2
- package/lib/button/components/iconButton.js +7 -5
- package/lib/button/components/iconWithTextButton.js +7 -6
- package/lib/button/components/link.js +84 -0
- package/lib/button/components/pillButton.js +35 -17
- package/lib/button/components/textButton.js +17 -14
- package/lib/button/constants/index.js +2 -15
- package/lib/button/enums/index.js +22 -0
- package/lib/button/index.js +10 -1
- package/lib/button/stories/iconButton.stories.js +10 -8
- package/lib/button/stories/iconWithTextButton.stories.js +4 -4
- package/lib/button/stories/link.stories.js +81 -0
- package/lib/button/stories/pillButton.stories.js +51 -20
- package/lib/button/stories/textButton.stories.js +52 -23
- package/lib/button/utils/size.js +2 -2
- package/lib/button/utils/theme.js +85 -43
- package/lib/card/components/article-card.js +192 -0
- package/lib/card/components/dialog.js +6 -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/checkbox/checkbox.stories.js +39 -0
- package/lib/checkbox/index.js +99 -0
- package/lib/divider.js +8 -2
- package/lib/divider.stories.js +3 -3
- package/lib/empty-state/enums/index.js +12 -0
- package/lib/empty-state/index.js +114 -0
- package/lib/empty-state/stories/empty-guide.stories.js +42 -0
- package/lib/icon/enum/index.js +34 -0
- package/lib/icon/index.js +99 -222
- package/lib/icon/stories/arrow.stories.js +7 -7
- package/lib/icon/stories/article.stories.js +2 -2
- package/lib/icon/stories/bookmark.stories.js +6 -6
- package/lib/icon/stories/clock.stories.js +2 -2
- package/lib/icon/stories/copy.stories.js +2 -2
- package/lib/icon/stories/cross.stories.js +2 -2
- package/lib/icon/stories/hamburger.stories.js +2 -2
- package/lib/icon/stories/home.stories.js +2 -2
- package/lib/icon/stories/letter.stories.js +29 -0
- package/lib/icon/stories/loading.stories.js +2 -2
- package/lib/icon/stories/member.stories.js +2 -2
- package/lib/icon/stories/printer.stories.js +2 -2
- package/lib/icon/stories/search.stories.js +2 -2
- package/lib/icon/stories/share.stories.js +2 -2
- package/lib/icon/stories/socialMedia.stories.js +7 -25
- package/lib/icon/stories/text.stories.js +2 -2
- package/lib/icon/stories/topic.stories.js +2 -2
- package/lib/image-with-fallback.js +141 -0
- package/lib/input/components/search-bar.js +6 -4
- package/lib/input/enums/index.js +11 -0
- package/lib/input/stories/search-bar.stories.js +8 -7
- package/lib/input/utils/theme.js +5 -3
- package/lib/listing-page/components/card-list.js +165 -0
- package/lib/listing-page/components/image.js +3 -0
- package/lib/listing-page/components/list.js +13 -8
- 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 +83 -0
- package/lib/logo/components/logo-header.js +8 -2
- package/lib/logo/components/logo-loading-fallback.js +43 -0
- package/lib/logo/components/logo-symbol.js +9 -2
- package/lib/logo/index.js +10 -1
- package/lib/logo/stories/logoFooter.stories.js +2 -2
- package/lib/logo/stories/logoHeader.stories.js +3 -3
- package/lib/logo/stories/logoLoadingFallback.stories.js +29 -0
- package/lib/logo/stories/logoSymbol.stories.js +3 -3
- package/lib/logo/utils/path.js +5 -0
- package/lib/material-icon.js +53 -0
- package/lib/pagination/index.js +8 -5
- package/lib/shared-enum.js +11 -0
- package/lib/snack-bar/components/snack-bar.js +2 -1
- package/lib/snack-bar/stories/snackBar.stories.js +4 -4
- package/lib/storybook/constants/index.js +27 -0
- package/lib/storybook/utils/get-enum-arg.js +18 -0
- package/lib/text/constants/headline-type.js +5 -24
- package/lib/text/enums/index.js +17 -0
- package/lib/text/headline.js +5 -2
- package/lib/text/paragraph.js +9 -6
- package/lib/text/stories/headline.stories.js +5 -3
- package/lib/text/stories/paragraph.stories.js +5 -3
- package/lib/title-bar/components/bar.js +2 -2
- package/lib/title-bar/components/tab.js +2 -2
- package/package.json +5 -4
- package/lib/bookmark-list/empty-guide.js +0 -81
- package/lib/bookmark-list/stories/empty-guide.stories.js +0 -39
- package/lib/button/constants/size.js +0 -28
- package/lib/button/constants/type.js +0 -28
- package/lib/input/constants/type.js +0 -20
- package/lib/text/constants/font-weight.js +0 -29
- package/lib/text/link.js +0 -87
- package/lib/text/stories/link.stories.js +0 -42
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.changeTextComponent = exports.link = exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _getEnumArg = require("../../storybook/utils/get-enum-arg");
|
|
11
|
+
|
|
12
|
+
var _link = _interopRequireDefault(require("../components/link"));
|
|
13
|
+
|
|
14
|
+
var _paragraph = require("../../text/paragraph");
|
|
15
|
+
|
|
16
|
+
var _headline = require("../../text/headline");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
var _default = {
|
|
21
|
+
title: 'Button/Link',
|
|
22
|
+
component: _link["default"],
|
|
23
|
+
argTypes: {
|
|
24
|
+
type: (0, _getEnumArg.getRadioArg)(_link["default"].Type, _link["default"].Type.DEFAULT),
|
|
25
|
+
// textComponent is only for storybook showcase, not real props
|
|
26
|
+
textComponent: {
|
|
27
|
+
defaultValue: 'P2',
|
|
28
|
+
options: ['not assign', 'P2', 'H4'],
|
|
29
|
+
control: {
|
|
30
|
+
type: 'radio'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports["default"] = _default;
|
|
36
|
+
|
|
37
|
+
var Template = function Template(args) {
|
|
38
|
+
return /*#__PURE__*/_react["default"].createElement(_link["default"], args);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var link = Template.bind({});
|
|
42
|
+
exports.link = link;
|
|
43
|
+
link.args = {
|
|
44
|
+
text: '文字',
|
|
45
|
+
type: _link["default"].Type.DEFAULT,
|
|
46
|
+
link: {
|
|
47
|
+
to: 'https://www.twreporter.org'
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
link.parameters = {
|
|
51
|
+
controls: {
|
|
52
|
+
exclude: ['textComponent']
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var changeTextComponent = function changeTextComponent(args) {
|
|
57
|
+
if (args.textComponent === 'P2') {
|
|
58
|
+
args.TextComponent = _paragraph.P2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (args.textComponent === 'H4') {
|
|
62
|
+
args.TextComponent = _headline.H4;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement(_link["default"], args);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
exports.changeTextComponent = changeTextComponent;
|
|
69
|
+
changeTextComponent.args = {
|
|
70
|
+
text: '文字',
|
|
71
|
+
type: _link["default"].Type.DEFAULT,
|
|
72
|
+
textComponent: 'P2',
|
|
73
|
+
link: {
|
|
74
|
+
to: 'https://www.twreporter.org'
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
changeTextComponent.parameters = {
|
|
78
|
+
controls: {
|
|
79
|
+
exclude: ['TextComponent']
|
|
80
|
+
}
|
|
81
|
+
};
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.toggleIconDisplay = exports.pillButton = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _getEnumArg = require("../../storybook/utils/get-enum-arg");
|
|
11
|
+
|
|
10
12
|
var _pillButton = _interopRequireDefault(require("../components/pillButton"));
|
|
11
13
|
|
|
12
14
|
var _icon = require("../../icon");
|
|
13
15
|
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var _type = require("../constants/type");
|
|
16
|
+
var _enums = require("../enums");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _constants = require("../../storybook/constants");
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
21
|
|
|
@@ -23,9 +23,23 @@ var _default = {
|
|
|
23
23
|
title: 'Button/Pill Button',
|
|
24
24
|
component: _pillButton["default"],
|
|
25
25
|
argTypes: {
|
|
26
|
-
theme:
|
|
27
|
-
type:
|
|
28
|
-
size:
|
|
26
|
+
theme: _constants.THEME_STORYBOOK_ARG_TYPE,
|
|
27
|
+
type: (0, _getEnumArg.getRadioArg)(_enums.Type, _enums.Type.PRIMARY),
|
|
28
|
+
size: _constants.SIZE_STORYBOOK_ARG_TYPE,
|
|
29
|
+
style: (0, _getEnumArg.getRadioArg)(_enums.Style, _enums.Style.BRAND),
|
|
30
|
+
// showLeft & showRight args are only for storybook check
|
|
31
|
+
showLeft: {
|
|
32
|
+
defaultValue: true,
|
|
33
|
+
control: {
|
|
34
|
+
type: 'boolean'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
showRight: {
|
|
38
|
+
defaultValue: true,
|
|
39
|
+
control: {
|
|
40
|
+
type: 'boolean'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
29
43
|
}
|
|
30
44
|
};
|
|
31
45
|
exports["default"] = _default;
|
|
@@ -38,20 +52,37 @@ var pillButton = Template.bind({});
|
|
|
38
52
|
exports.pillButton = pillButton;
|
|
39
53
|
pillButton.args = {
|
|
40
54
|
text: '文字',
|
|
41
|
-
size:
|
|
42
|
-
theme:
|
|
43
|
-
|
|
55
|
+
size: _pillButton["default"].Size.S,
|
|
56
|
+
theme: _pillButton["default"].THEME.normal,
|
|
57
|
+
style: _pillButton["default"].Style.BRAND,
|
|
58
|
+
type: _pillButton["default"].Type.PRIMARY,
|
|
44
59
|
disabled: false
|
|
45
60
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
61
|
+
pillButton.parameters = {
|
|
62
|
+
controls: {
|
|
63
|
+
exclude: ['showLeft', 'showRight']
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var toggleIconDisplay = function toggleIconDisplay(args) {
|
|
68
|
+
args.leftIconComponent = args.showLeft ? /*#__PURE__*/_react["default"].createElement(_icon.Cross, null) : null;
|
|
69
|
+
args.rightIconComponent = args.showRight ? /*#__PURE__*/_react["default"].createElement(_icon.Cross, null) : null;
|
|
70
|
+
return /*#__PURE__*/_react["default"].createElement(_pillButton["default"], args);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
exports.toggleIconDisplay = toggleIconDisplay;
|
|
74
|
+
toggleIconDisplay.args = {
|
|
75
|
+
showLeft: true,
|
|
76
|
+
showRight: true,
|
|
52
77
|
text: '文字',
|
|
53
|
-
size:
|
|
54
|
-
theme:
|
|
55
|
-
|
|
78
|
+
size: _pillButton["default"].Size.S,
|
|
79
|
+
theme: _pillButton["default"].THEME.normal,
|
|
80
|
+
style: _pillButton["default"].Style.BRAND,
|
|
81
|
+
type: _pillButton["default"].Type.PRIMARY,
|
|
56
82
|
disabled: false
|
|
83
|
+
};
|
|
84
|
+
toggleIconDisplay.parameters = {
|
|
85
|
+
controls: {
|
|
86
|
+
exclude: ['leftIconComponent', 'rightIconComponent']
|
|
87
|
+
}
|
|
57
88
|
};
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.toggleIconDisplay = exports.textButton = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _getEnumArg = require("../../storybook/utils/get-enum-arg");
|
|
11
|
+
|
|
10
12
|
var _textButton = _interopRequireDefault(require("../components/textButton"));
|
|
11
13
|
|
|
12
14
|
var _icon = require("../../icon");
|
|
13
15
|
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var _type = require("../constants/type");
|
|
16
|
+
var _enums = require("../enums");
|
|
17
17
|
|
|
18
|
-
var _constants = require("
|
|
18
|
+
var _constants = require("../../storybook/constants");
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
21
|
|
|
@@ -23,15 +23,22 @@ var _default = {
|
|
|
23
23
|
title: 'Button/Text Button',
|
|
24
24
|
component: _textButton["default"],
|
|
25
25
|
argTypes: {
|
|
26
|
-
theme:
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
theme: _constants.THEME_STORYBOOK_ARG_TYPE,
|
|
27
|
+
type: (0, _getEnumArg.getRadioArg)(_enums.Type, _enums.Type.PRIMARY),
|
|
28
|
+
size: _constants.SIZE_STORYBOOK_ARG_TYPE,
|
|
29
|
+
// showLeft & showRight args are only for storybook check
|
|
30
|
+
showLeft: {
|
|
31
|
+
defaultValue: true,
|
|
29
32
|
control: {
|
|
30
|
-
type: '
|
|
33
|
+
type: 'boolean'
|
|
31
34
|
}
|
|
32
35
|
},
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
showRight: {
|
|
37
|
+
defaultValue: true,
|
|
38
|
+
control: {
|
|
39
|
+
type: 'boolean'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
35
42
|
}
|
|
36
43
|
};
|
|
37
44
|
exports["default"] = _default;
|
|
@@ -44,25 +51,47 @@ var textButton = Template.bind({});
|
|
|
44
51
|
exports.textButton = textButton;
|
|
45
52
|
textButton.args = {
|
|
46
53
|
text: '文字',
|
|
47
|
-
size:
|
|
48
|
-
theme:
|
|
49
|
-
type:
|
|
54
|
+
size: _textButton["default"].Size.S,
|
|
55
|
+
theme: _textButton["default"].THEME.normal,
|
|
56
|
+
type: _textButton["default"].Type.PRIMARY,
|
|
50
57
|
active: false,
|
|
51
|
-
disabled: false
|
|
52
|
-
};
|
|
53
|
-
var withArrowIcon = Template.bind({});
|
|
54
|
-
exports.withArrowIcon = withArrowIcon;
|
|
55
|
-
withArrowIcon.args = {
|
|
58
|
+
disabled: false,
|
|
56
59
|
leftIconComponent: /*#__PURE__*/_react["default"].createElement(_icon.Arrow, {
|
|
57
60
|
direction: "left"
|
|
58
61
|
}),
|
|
59
62
|
rightIconComponent: /*#__PURE__*/_react["default"].createElement(_icon.Arrow, {
|
|
60
63
|
direction: "right"
|
|
61
|
-
})
|
|
64
|
+
})
|
|
65
|
+
};
|
|
66
|
+
textButton.parameters = {
|
|
67
|
+
controls: {
|
|
68
|
+
exclude: ['showLeft', 'showRight']
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var toggleIconDisplay = function toggleIconDisplay(args) {
|
|
73
|
+
args.leftIconComponent = args.showLeft ? /*#__PURE__*/_react["default"].createElement(_icon.Arrow, {
|
|
74
|
+
direction: "left"
|
|
75
|
+
}) : null;
|
|
76
|
+
args.rightIconComponent = args.showRight ? /*#__PURE__*/_react["default"].createElement(_icon.Arrow, {
|
|
77
|
+
direction: "right"
|
|
78
|
+
}) : null;
|
|
79
|
+
return /*#__PURE__*/_react["default"].createElement(_textButton["default"], args);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
exports.toggleIconDisplay = toggleIconDisplay;
|
|
83
|
+
toggleIconDisplay.args = {
|
|
84
|
+
showLeft: true,
|
|
85
|
+
showRight: true,
|
|
62
86
|
text: '文字',
|
|
63
|
-
size:
|
|
64
|
-
theme:
|
|
65
|
-
type:
|
|
87
|
+
size: _textButton["default"].Size.S,
|
|
88
|
+
theme: _textButton["default"].THEME.normal,
|
|
89
|
+
type: _textButton["default"].Type.PRIMARY,
|
|
66
90
|
active: false,
|
|
67
91
|
disabled: false
|
|
92
|
+
};
|
|
93
|
+
toggleIconDisplay.parameters = {
|
|
94
|
+
controls: {
|
|
95
|
+
exclude: ['leftIconComponent', 'rightIconComponent']
|
|
96
|
+
}
|
|
68
97
|
};
|
package/lib/button/utils/size.js
CHANGED
|
@@ -10,14 +10,14 @@ var getSizeStyle = function getSizeStyle(size) {
|
|
|
10
10
|
case 'L':
|
|
11
11
|
return {
|
|
12
12
|
iconSize: '24px',
|
|
13
|
-
padding: '8px
|
|
13
|
+
padding: '8px 16px'
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
case 'S':
|
|
17
17
|
default:
|
|
18
18
|
return {
|
|
19
19
|
iconSize: '18px',
|
|
20
|
-
padding: '4px
|
|
20
|
+
padding: '4px 12px'
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
};
|
|
@@ -7,12 +7,12 @@ exports["default"] = exports.getActiveTextButtonTheme = exports.getDisabledTextB
|
|
|
7
7
|
|
|
8
8
|
var _color = require("@twreporter/core/lib/constants/color");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _enums = require("../enums");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _theme = require("@twreporter/core/lib/constants/theme");
|
|
13
13
|
|
|
14
14
|
// @twreporter
|
|
15
|
-
var getFilledPillButtonTheme = function getFilledPillButtonTheme(theme, disabled) {
|
|
15
|
+
var getFilledPillButtonTheme = function getFilledPillButtonTheme(theme, disabled, style) {
|
|
16
16
|
if (disabled) {
|
|
17
17
|
switch (theme) {
|
|
18
18
|
case _theme.THEME.transparent:
|
|
@@ -53,18 +53,39 @@ var getFilledPillButtonTheme = function getFilledPillButtonTheme(theme, disabled
|
|
|
53
53
|
case _theme.THEME.normal:
|
|
54
54
|
case _theme.THEME.index:
|
|
55
55
|
default:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
switch (style) {
|
|
57
|
+
case _enums.Style.DARK:
|
|
58
|
+
return {
|
|
59
|
+
color: _color.colorGrayscale.white,
|
|
60
|
+
bgColor: _color.colorGrayscale.gray800,
|
|
61
|
+
hoverColor: _color.colorGrayscale.white,
|
|
62
|
+
hoverBgColor: _color.colorGrayscale.black
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
case _enums.Style.LIGHT:
|
|
66
|
+
return {
|
|
67
|
+
color: _color.colorGrayscale.gray800,
|
|
68
|
+
bgColor: _color.colorGrayscale.white,
|
|
69
|
+
hoverColor: _color.colorGrayscale.gray800,
|
|
70
|
+
hoverBgColor: _color.colorGrayscale.gray200
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
case _enums.Style.BRAND:
|
|
74
|
+
default:
|
|
75
|
+
return {
|
|
76
|
+
color: _color.colorGrayscale.white,
|
|
77
|
+
bgColor: _color.colorBrand.heavy,
|
|
78
|
+
hoverColor: _color.colorGrayscale.white,
|
|
79
|
+
hoverBgColor: _color.colorBrand.dark
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
62
83
|
}
|
|
63
84
|
};
|
|
64
85
|
|
|
65
86
|
exports.getFilledPillButtonTheme = getFilledPillButtonTheme;
|
|
66
87
|
|
|
67
|
-
var getOutlinePillButtonTheme = function getOutlinePillButtonTheme(theme, disabled) {
|
|
88
|
+
var getOutlinePillButtonTheme = function getOutlinePillButtonTheme(theme, disabled, style) {
|
|
68
89
|
if (disabled) {
|
|
69
90
|
switch (theme) {
|
|
70
91
|
case _theme.THEME.transparent:
|
|
@@ -113,12 +134,33 @@ var getOutlinePillButtonTheme = function getOutlinePillButtonTheme(theme, disabl
|
|
|
113
134
|
case _theme.THEME.normal:
|
|
114
135
|
case _theme.THEME.index:
|
|
115
136
|
default:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
137
|
+
switch (style) {
|
|
138
|
+
case _enums.Style.DARK:
|
|
139
|
+
return {
|
|
140
|
+
color: _color.colorGrayscale.gray800,
|
|
141
|
+
bgColor: _color.colorGrayscale.gray800,
|
|
142
|
+
hoverColor: _color.colorGrayscale.black,
|
|
143
|
+
hoverBgColor: _color.colorGrayscale.black
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
case _enums.Style.LIGHT:
|
|
147
|
+
return {
|
|
148
|
+
color: _color.colorGrayscale.gray800,
|
|
149
|
+
bgColor: _color.colorGrayscale.white,
|
|
150
|
+
hoverColor: _color.colorGrayscale.gray800,
|
|
151
|
+
hoverBgColor: _color.colorGrayscale.gray200
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
case _enums.Style.BRAND:
|
|
155
|
+
default:
|
|
156
|
+
return {
|
|
157
|
+
color: _color.colorBrand.heavy,
|
|
158
|
+
bgColor: _color.colorBrand.heavy,
|
|
159
|
+
hoverColor: _color.colorBrand.dark,
|
|
160
|
+
hoverBgColor: _color.colorBrand.dark
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
122
164
|
}
|
|
123
165
|
};
|
|
124
166
|
|
|
@@ -282,37 +324,37 @@ exports.getIconWithTextButtonTheme = getIconWithTextButtonTheme;
|
|
|
282
324
|
|
|
283
325
|
var getPrimaryTextButtonTheme = function getPrimaryTextButtonTheme(theme) {
|
|
284
326
|
switch (theme) {
|
|
285
|
-
case
|
|
327
|
+
case _theme.TEXT_BUTTON_THEME.photography:
|
|
286
328
|
return {
|
|
287
329
|
color: _color.colorGrayscale.white,
|
|
288
330
|
hoverColor: _color.colorSupportive.main
|
|
289
331
|
};
|
|
290
332
|
|
|
291
|
-
case
|
|
333
|
+
case _theme.TEXT_BUTTON_THEME.transparent:
|
|
292
334
|
return {
|
|
293
335
|
color: _color.colorGrayscale.white,
|
|
294
336
|
hoverColor: _color.colorGrayscale.gray800
|
|
295
337
|
};
|
|
296
338
|
|
|
297
|
-
case
|
|
339
|
+
case _theme.TEXT_BUTTON_THEME.brand:
|
|
298
340
|
return {
|
|
299
341
|
color: _color.colorBrand.heavy,
|
|
300
342
|
hoverColor: _color.colorBrand.dark
|
|
301
343
|
};
|
|
302
344
|
|
|
303
|
-
case
|
|
345
|
+
case _theme.TEXT_BUTTON_THEME.dark:
|
|
304
346
|
return {
|
|
305
347
|
color: _color.colorGrayscale.gray800,
|
|
306
348
|
hoverColor: _color.colorBrand.heavy
|
|
307
349
|
};
|
|
308
350
|
|
|
309
|
-
case
|
|
351
|
+
case _theme.TEXT_BUTTON_THEME.light:
|
|
310
352
|
return {
|
|
311
353
|
color: _color.colorGrayscale.gray600,
|
|
312
354
|
hoverColor: _color.colorGrayscale.gray800
|
|
313
355
|
};
|
|
314
356
|
|
|
315
|
-
case
|
|
357
|
+
case _theme.TEXT_BUTTON_THEME.normal:
|
|
316
358
|
default:
|
|
317
359
|
return {
|
|
318
360
|
color: _color.colorGrayscale.gray800,
|
|
@@ -325,37 +367,37 @@ exports.getPrimaryTextButtonTheme = getPrimaryTextButtonTheme;
|
|
|
325
367
|
|
|
326
368
|
var getSecondaryTextButtonTheme = function getSecondaryTextButtonTheme(theme) {
|
|
327
369
|
switch (theme) {
|
|
328
|
-
case
|
|
370
|
+
case _theme.TEXT_BUTTON_THEME.photography:
|
|
329
371
|
return {
|
|
330
372
|
color: _color.colorGrayscale.gray400,
|
|
331
373
|
hoverColor: _color.colorSupportive.main
|
|
332
374
|
};
|
|
333
375
|
|
|
334
|
-
case
|
|
376
|
+
case _theme.TEXT_BUTTON_THEME.transparent:
|
|
335
377
|
return {
|
|
336
378
|
color: _color.colorGrayscale.gray600,
|
|
337
379
|
hoverColor: _color.colorGrayscale.gray800
|
|
338
380
|
};
|
|
339
381
|
|
|
340
|
-
case
|
|
382
|
+
case _theme.TEXT_BUTTON_THEME.brand:
|
|
341
383
|
return {
|
|
342
384
|
color: _color.colorBrand.heavy,
|
|
343
385
|
hoverColor: _color.colorBrand.dark
|
|
344
386
|
};
|
|
345
387
|
|
|
346
|
-
case
|
|
388
|
+
case _theme.TEXT_BUTTON_THEME.dark:
|
|
347
389
|
return {
|
|
348
390
|
color: _color.colorGrayscale.gray800,
|
|
349
391
|
hoverColor: _color.colorBrand.heavy
|
|
350
392
|
};
|
|
351
393
|
|
|
352
|
-
case
|
|
394
|
+
case _theme.TEXT_BUTTON_THEME.light:
|
|
353
395
|
return {
|
|
354
396
|
color: _color.colorGrayscale.gray600,
|
|
355
397
|
hoverColor: _color.colorGrayscale.gray800
|
|
356
398
|
};
|
|
357
399
|
|
|
358
|
-
case
|
|
400
|
+
case _theme.TEXT_BUTTON_THEME.normal:
|
|
359
401
|
default:
|
|
360
402
|
return {
|
|
361
403
|
color: _color.colorGrayscale.gray600,
|
|
@@ -368,22 +410,22 @@ exports.getSecondaryTextButtonTheme = getSecondaryTextButtonTheme;
|
|
|
368
410
|
|
|
369
411
|
var getDisabledTextButtonTheme = function getDisabledTextButtonTheme(theme) {
|
|
370
412
|
switch (theme) {
|
|
371
|
-
case
|
|
413
|
+
case _theme.TEXT_BUTTON_THEME.photography:
|
|
372
414
|
return {
|
|
373
415
|
color: _color.colorGrayscale.gray600,
|
|
374
416
|
hoverColor: _color.colorGrayscale.gray600
|
|
375
417
|
};
|
|
376
418
|
|
|
377
|
-
case
|
|
419
|
+
case _theme.TEXT_BUTTON_THEME.transparent:
|
|
378
420
|
return {
|
|
379
421
|
color: _color.colorGrayscale.gray200,
|
|
380
422
|
hoverColor: _color.colorGrayscale.gray200
|
|
381
423
|
};
|
|
382
424
|
|
|
383
|
-
case
|
|
384
|
-
case
|
|
385
|
-
case
|
|
386
|
-
case
|
|
425
|
+
case _theme.TEXT_BUTTON_THEME.brand:
|
|
426
|
+
case _theme.TEXT_BUTTON_THEME.dark:
|
|
427
|
+
case _theme.TEXT_BUTTON_THEME.light:
|
|
428
|
+
case _theme.TEXT_BUTTON_THEME.normal:
|
|
387
429
|
default:
|
|
388
430
|
return {
|
|
389
431
|
color: _color.colorGrayscale.gray400,
|
|
@@ -396,37 +438,37 @@ exports.getDisabledTextButtonTheme = getDisabledTextButtonTheme;
|
|
|
396
438
|
|
|
397
439
|
var getActiveTextButtonTheme = function getActiveTextButtonTheme(theme) {
|
|
398
440
|
switch (theme) {
|
|
399
|
-
case
|
|
441
|
+
case _theme.TEXT_BUTTON_THEME.photography:
|
|
400
442
|
return {
|
|
401
443
|
color: _color.colorSupportive.main,
|
|
402
444
|
hoverColor: _color.colorSupportive.main
|
|
403
445
|
};
|
|
404
446
|
|
|
405
|
-
case
|
|
447
|
+
case _theme.TEXT_BUTTON_THEME.transparent:
|
|
406
448
|
return {
|
|
407
449
|
color: _color.colorGrayscale.white,
|
|
408
450
|
hoverColor: _color.colorGrayscale.white
|
|
409
451
|
};
|
|
410
452
|
|
|
411
|
-
case
|
|
453
|
+
case _theme.TEXT_BUTTON_THEME.brand:
|
|
412
454
|
return {
|
|
413
|
-
color: _color.colorBrand.
|
|
455
|
+
color: _color.colorBrand.dark,
|
|
414
456
|
hoverColor: _color.colorBrand.dark
|
|
415
457
|
};
|
|
416
458
|
|
|
417
|
-
case
|
|
459
|
+
case _theme.TEXT_BUTTON_THEME.dark:
|
|
418
460
|
return {
|
|
419
|
-
color: _color.
|
|
461
|
+
color: _color.colorBrand.heavy,
|
|
420
462
|
hoverColor: _color.colorBrand.heavy
|
|
421
463
|
};
|
|
422
464
|
|
|
423
|
-
case
|
|
465
|
+
case _theme.TEXT_BUTTON_THEME.light:
|
|
424
466
|
return {
|
|
425
|
-
color: _color.colorGrayscale.
|
|
467
|
+
color: _color.colorGrayscale.gray800,
|
|
426
468
|
hoverColor: _color.colorGrayscale.gray800
|
|
427
469
|
};
|
|
428
470
|
|
|
429
|
-
case
|
|
471
|
+
case _theme.TEXT_BUTTON_THEME.normal:
|
|
430
472
|
default:
|
|
431
473
|
return {
|
|
432
474
|
color: _color.colorBrand.heavy,
|