@twreporter/universal-header 2.4.0-rc.4 → 2.4.0-rc.6
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 +31 -0
- package/lib/components/action-button-item.js +169 -0
- package/lib/components/{action-button.stories.js → action-button-item.stories.js} +20 -18
- package/lib/components/action-button.js +51 -114
- package/lib/components/channels.js +1 -1
- package/lib/components/hamburger-menu.js +63 -60
- package/lib/components/hamburger-menu.stories.js +1 -7
- package/lib/components/header.js +111 -48
- package/lib/components/header.stories.js +17 -16
- package/lib/components/icons.js +44 -12
- package/lib/components/slogan.js +4 -2
- package/lib/components/tab-bar.js +117 -0
- package/lib/components/tab-bar.stories.js +51 -0
- package/lib/constants/action-item-types.js +79 -0
- package/lib/constants/actions.js +3 -3
- package/lib/constants/channels.js +1 -1
- package/lib/constants/prop-types.js +6 -2
- package/lib/containers/header.js +7 -3
- package/lib/utils/links.js +30 -4
- package/lib/utils/theme-old.js +90 -158
- package/lib/utils/theme.js +75 -82
- package/package.json +4 -4
package/lib/utils/theme-old.js
CHANGED
|
@@ -19,255 +19,199 @@ function selectLogoType(theme) {
|
|
|
19
19
|
switch (theme) {
|
|
20
20
|
case _theme["default"].photography:
|
|
21
21
|
case _theme["default"].transparent:
|
|
22
|
-
|
|
23
|
-
return 'white';
|
|
24
|
-
}
|
|
22
|
+
return 'white';
|
|
25
23
|
|
|
26
24
|
default:
|
|
27
|
-
|
|
28
|
-
return 'default';
|
|
29
|
-
}
|
|
25
|
+
return 'default';
|
|
30
26
|
}
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
function selectServiceIcons(theme) {
|
|
34
30
|
switch (theme) {
|
|
35
31
|
case _theme["default"].photography:
|
|
36
|
-
|
|
37
|
-
return _icon.ServiceIcons.photography;
|
|
38
|
-
}
|
|
32
|
+
return _icon.ServiceIcons.photography;
|
|
39
33
|
|
|
40
34
|
case _theme["default"].transparent:
|
|
41
|
-
|
|
42
|
-
return _icon.ServiceIcons.transparent;
|
|
43
|
-
}
|
|
35
|
+
return _icon.ServiceIcons.transparent;
|
|
44
36
|
|
|
45
37
|
case _theme["default"].index:
|
|
46
38
|
case _theme["default"].normal:
|
|
47
39
|
default:
|
|
48
|
-
|
|
49
|
-
return _icon.ServiceIcons.normal;
|
|
50
|
-
}
|
|
40
|
+
return _icon.ServiceIcons.normal;
|
|
51
41
|
}
|
|
52
42
|
}
|
|
53
43
|
|
|
54
44
|
function selectHamburgerServiceIcons(theme) {
|
|
55
45
|
switch (theme) {
|
|
56
46
|
case _theme["default"].photography:
|
|
57
|
-
|
|
58
|
-
return _icon.ServiceIcons.photography;
|
|
59
|
-
}
|
|
47
|
+
return _icon.ServiceIcons.photography;
|
|
60
48
|
|
|
61
49
|
case _theme["default"].transparent:
|
|
62
50
|
case _theme["default"].index:
|
|
63
51
|
case _theme["default"].normal:
|
|
64
52
|
default:
|
|
65
|
-
|
|
66
|
-
return _icon.ServiceIcons.normal;
|
|
67
|
-
}
|
|
53
|
+
return _icon.ServiceIcons.normal;
|
|
68
54
|
}
|
|
69
55
|
}
|
|
70
56
|
|
|
71
57
|
function selectIcons(theme) {
|
|
72
58
|
switch (theme) {
|
|
73
59
|
case _theme["default"].photography:
|
|
74
|
-
|
|
75
|
-
return _icon.Icons.photography;
|
|
76
|
-
}
|
|
60
|
+
return _icon.Icons.photography;
|
|
77
61
|
|
|
78
62
|
case _theme["default"].transparent:
|
|
79
|
-
|
|
80
|
-
return _icon.Icons.transparent;
|
|
81
|
-
}
|
|
63
|
+
return _icon.Icons.transparent;
|
|
82
64
|
|
|
83
65
|
case _theme["default"].index:
|
|
84
66
|
case _theme["default"].normal:
|
|
85
67
|
default:
|
|
86
|
-
|
|
87
|
-
return _icon.Icons.normal;
|
|
88
|
-
}
|
|
68
|
+
return _icon.Icons.normal;
|
|
89
69
|
}
|
|
90
70
|
}
|
|
91
71
|
|
|
92
72
|
function selectChannelTheme(theme) {
|
|
93
73
|
switch (theme) {
|
|
94
74
|
case _theme["default"].photography:
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
};
|
|
103
|
-
}
|
|
75
|
+
return {
|
|
76
|
+
bgColor: _color.colorPhoto.dark,
|
|
77
|
+
fontColor: _color.colorGrayscale.gray600,
|
|
78
|
+
hoverFontColor: _color.colorGrayscale.white,
|
|
79
|
+
hoverBgColor: _colors["default"].gray50,
|
|
80
|
+
borderColor: _colors["default"].gray250
|
|
81
|
+
};
|
|
104
82
|
|
|
105
83
|
case _theme["default"].transparent:
|
|
106
|
-
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
};
|
|
114
|
-
}
|
|
84
|
+
return {
|
|
85
|
+
bgColor: 'transparent',
|
|
86
|
+
fontColor: _color.colorGrayscale.white,
|
|
87
|
+
hoverFontColor: _color.colorGrayscale.gray900,
|
|
88
|
+
hoverBgColor: _color.colorGrayscale.white,
|
|
89
|
+
borderColor: _colors["default"].gray250
|
|
90
|
+
};
|
|
115
91
|
|
|
116
92
|
case _theme["default"].index:
|
|
117
|
-
{
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
};
|
|
125
|
-
}
|
|
93
|
+
return {
|
|
94
|
+
bgColor: _color.colorGrayscale.white,
|
|
95
|
+
fontColor: _color.colorGrayscale.gray600,
|
|
96
|
+
hoverFontColor: _color.colorGrayscale.gray900,
|
|
97
|
+
hoverBgColor: _colors["default"].gray150,
|
|
98
|
+
borderColor: _color.colorGrayscale.gray200
|
|
99
|
+
};
|
|
126
100
|
|
|
127
101
|
case _theme["default"].normal:
|
|
128
102
|
default:
|
|
129
|
-
{
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
};
|
|
137
|
-
}
|
|
103
|
+
return {
|
|
104
|
+
bgColor: _color.colorGrayscale.gray100,
|
|
105
|
+
fontColor: _color.colorGrayscale.gray600,
|
|
106
|
+
hoverFontColor: _color.colorGrayscale.gray900,
|
|
107
|
+
hoverBgColor: _colors["default"].gray150,
|
|
108
|
+
borderColor: _color.colorGrayscale.gray200
|
|
109
|
+
};
|
|
138
110
|
}
|
|
139
111
|
}
|
|
140
112
|
|
|
141
113
|
function selectHeaderTheme(theme) {
|
|
142
114
|
switch (theme) {
|
|
143
115
|
case _theme["default"].photography:
|
|
144
|
-
{
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
};
|
|
149
|
-
}
|
|
116
|
+
return {
|
|
117
|
+
bgColor: _color.colorPhoto.dark,
|
|
118
|
+
borderColor: _colors["default"].gray250
|
|
119
|
+
};
|
|
150
120
|
|
|
151
121
|
case _theme["default"].transparent:
|
|
152
|
-
{
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
};
|
|
157
|
-
}
|
|
122
|
+
return {
|
|
123
|
+
bgColor: _colors["default"].gray150,
|
|
124
|
+
borderColor: _colors["default"].gray250
|
|
125
|
+
};
|
|
158
126
|
|
|
159
127
|
case _theme["default"].index:
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
};
|
|
165
|
-
}
|
|
128
|
+
return {
|
|
129
|
+
bgColor: _color.colorGrayscale.white,
|
|
130
|
+
borderColor: _color.colorGrayscale.gray200
|
|
131
|
+
};
|
|
166
132
|
|
|
167
133
|
case _theme["default"].normal:
|
|
168
134
|
default:
|
|
169
|
-
{
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
};
|
|
174
|
-
}
|
|
135
|
+
return {
|
|
136
|
+
bgColor: _color.colorGrayscale.gray100,
|
|
137
|
+
borderColor: _color.colorGrayscale.gray200
|
|
138
|
+
};
|
|
175
139
|
}
|
|
176
140
|
}
|
|
177
141
|
|
|
178
142
|
function selectActionButtonTheme(theme) {
|
|
179
143
|
switch (theme) {
|
|
180
144
|
case _theme["default"].photography:
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
};
|
|
187
|
-
}
|
|
145
|
+
return {
|
|
146
|
+
color: _color.colorGrayscale.white,
|
|
147
|
+
bgColor: _color.colorSupportive.main,
|
|
148
|
+
hoverBgColor: _colors["default"].brownDark
|
|
149
|
+
};
|
|
188
150
|
|
|
189
151
|
case _theme["default"].transparent:
|
|
190
|
-
{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
};
|
|
196
|
-
}
|
|
152
|
+
return {
|
|
153
|
+
color: _color.colorSupportive.main,
|
|
154
|
+
bgColor: _color.colorGrayscale.white,
|
|
155
|
+
hoverBgColor: _color.colorGrayscale.gray300
|
|
156
|
+
};
|
|
197
157
|
|
|
198
158
|
case _theme["default"].index:
|
|
199
159
|
case _theme["default"].normal:
|
|
200
160
|
default:
|
|
201
|
-
{
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
};
|
|
207
|
-
}
|
|
161
|
+
return {
|
|
162
|
+
color: _color.colorGrayscale.white,
|
|
163
|
+
bgColor: _color.colorBrand.heavy,
|
|
164
|
+
hoverBgColor: _colors["default"].redDark
|
|
165
|
+
};
|
|
208
166
|
}
|
|
209
167
|
}
|
|
210
168
|
|
|
211
169
|
function selectHamburgerMenuTheme(theme) {
|
|
212
170
|
switch (theme) {
|
|
213
171
|
case _theme["default"].photography:
|
|
214
|
-
{
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
};
|
|
218
|
-
}
|
|
172
|
+
return {
|
|
173
|
+
bgColor: _color.colorPhoto.dark
|
|
174
|
+
};
|
|
219
175
|
|
|
220
176
|
case _theme["default"].transparent:
|
|
221
177
|
case _theme["default"].index:
|
|
222
178
|
case _theme["default"].normal:
|
|
223
179
|
default:
|
|
224
|
-
{
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
};
|
|
228
|
-
}
|
|
180
|
+
return {
|
|
181
|
+
bgColor: _color.colorGrayscale.gray100
|
|
182
|
+
};
|
|
229
183
|
}
|
|
230
184
|
}
|
|
231
185
|
|
|
232
186
|
function selectHamburgerServiceTheme(theme) {
|
|
233
187
|
switch (theme) {
|
|
234
188
|
case _theme["default"].photography:
|
|
235
|
-
{
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
};
|
|
239
|
-
}
|
|
189
|
+
return {
|
|
190
|
+
borderColor: _colors["default"].gray450
|
|
191
|
+
};
|
|
240
192
|
|
|
241
193
|
case _theme["default"].transparent:
|
|
242
194
|
case _theme["default"].index:
|
|
243
195
|
case _theme["default"].normal:
|
|
244
196
|
default:
|
|
245
|
-
{
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
};
|
|
249
|
-
}
|
|
197
|
+
return {
|
|
198
|
+
borderColor: _colors["default"].gray250
|
|
199
|
+
};
|
|
250
200
|
}
|
|
251
201
|
}
|
|
252
202
|
|
|
253
203
|
function selectSloganTheme(theme) {
|
|
254
204
|
switch (theme) {
|
|
255
205
|
case _theme["default"].photography:
|
|
256
|
-
|
|
257
|
-
return _color.colorSupportive.main;
|
|
258
|
-
}
|
|
206
|
+
return _color.colorSupportive.main;
|
|
259
207
|
|
|
260
208
|
case _theme["default"].transparent:
|
|
261
|
-
|
|
262
|
-
return _color.colorGrayscale.white;
|
|
263
|
-
}
|
|
209
|
+
return _color.colorGrayscale.white;
|
|
264
210
|
|
|
265
211
|
case _theme["default"].index:
|
|
266
212
|
case _theme["default"].normal:
|
|
267
213
|
default:
|
|
268
|
-
|
|
269
|
-
return _color.colorGrayscale.gray900;
|
|
270
|
-
}
|
|
214
|
+
return _color.colorGrayscale.gray900;
|
|
271
215
|
}
|
|
272
216
|
}
|
|
273
217
|
/*
|
|
@@ -279,51 +223,39 @@ function selectSloganTheme(theme) {
|
|
|
279
223
|
function selectActionButtonHBTheme(theme) {
|
|
280
224
|
switch (theme) {
|
|
281
225
|
case _theme["default"].transparent:
|
|
282
|
-
|
|
283
|
-
return selectActionButtonTheme('normal');
|
|
284
|
-
}
|
|
226
|
+
return selectActionButtonTheme('normal');
|
|
285
227
|
|
|
286
228
|
case _theme["default"].photography:
|
|
287
229
|
case _theme["default"].index:
|
|
288
230
|
case _theme["default"].normal:
|
|
289
231
|
default:
|
|
290
|
-
|
|
291
|
-
return selectActionButtonTheme(theme);
|
|
292
|
-
}
|
|
232
|
+
return selectActionButtonTheme(theme);
|
|
293
233
|
}
|
|
294
234
|
}
|
|
295
235
|
|
|
296
236
|
function selectChannelHBTheme(theme) {
|
|
297
237
|
switch (theme) {
|
|
298
238
|
case _theme["default"].transparent:
|
|
299
|
-
|
|
300
|
-
return selectChannelTheme('normal');
|
|
301
|
-
}
|
|
239
|
+
return selectChannelTheme('normal');
|
|
302
240
|
|
|
303
241
|
case _theme["default"].photography:
|
|
304
242
|
case _theme["default"].index:
|
|
305
243
|
case _theme["default"].normal:
|
|
306
244
|
default:
|
|
307
|
-
|
|
308
|
-
return selectChannelTheme(theme);
|
|
309
|
-
}
|
|
245
|
+
return selectChannelTheme(theme);
|
|
310
246
|
}
|
|
311
247
|
}
|
|
312
248
|
|
|
313
249
|
function selectSloganHBTheme(theme) {
|
|
314
250
|
switch (theme) {
|
|
315
251
|
case _theme["default"].transparent:
|
|
316
|
-
|
|
317
|
-
return selectSloganTheme('normal');
|
|
318
|
-
}
|
|
252
|
+
return selectSloganTheme('normal');
|
|
319
253
|
|
|
320
254
|
case _theme["default"].photography:
|
|
321
255
|
case _theme["default"].index:
|
|
322
256
|
case _theme["default"].normal:
|
|
323
257
|
default:
|
|
324
|
-
|
|
325
|
-
return selectSloganTheme(theme);
|
|
326
|
-
}
|
|
258
|
+
return selectSloganTheme(theme);
|
|
327
259
|
}
|
|
328
260
|
}
|
|
329
261
|
|
package/lib/utils/theme.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.selectHamburgerMenuTheme = exports.selectHamburgerItemTheme = exports.selectHamburgerFooterTheme = exports.selectSloganTheme = exports.selectHeaderTheme = exports.selectLogoType = void 0;
|
|
6
|
+
exports.selectTabBarTheme = exports.selectHamburgerMenuTheme = exports.selectHamburgerItemTheme = exports.selectHamburgerFooterTheme = exports.selectSloganTheme = exports.selectHeaderTheme = exports.selectLogoType = void 0;
|
|
7
7
|
|
|
8
8
|
var _theme = _interopRequireDefault(require("../constants/theme"));
|
|
9
9
|
|
|
@@ -15,14 +15,10 @@ var selectLogoType = function selectLogoType(theme) {
|
|
|
15
15
|
switch (theme) {
|
|
16
16
|
case _theme["default"].photography:
|
|
17
17
|
case _theme["default"].transparent:
|
|
18
|
-
|
|
19
|
-
return 'white';
|
|
20
|
-
}
|
|
18
|
+
return 'white';
|
|
21
19
|
|
|
22
20
|
default:
|
|
23
|
-
|
|
24
|
-
return 'default';
|
|
25
|
-
}
|
|
21
|
+
return 'default';
|
|
26
22
|
}
|
|
27
23
|
};
|
|
28
24
|
|
|
@@ -31,37 +27,29 @@ exports.selectLogoType = selectLogoType;
|
|
|
31
27
|
var selectHeaderTheme = function selectHeaderTheme(theme) {
|
|
32
28
|
switch (theme) {
|
|
33
29
|
case _theme["default"].photography:
|
|
34
|
-
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
}
|
|
30
|
+
return {
|
|
31
|
+
bgColor: _color.colorPhoto.dark,
|
|
32
|
+
topRowBgColor: _color.colorPhoto.dark
|
|
33
|
+
};
|
|
40
34
|
|
|
41
35
|
case _theme["default"].transparent:
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
}
|
|
36
|
+
return {
|
|
37
|
+
bgColor: _color.colorOpacity['black_0.2'],
|
|
38
|
+
topRowBgColor: 'unset'
|
|
39
|
+
};
|
|
48
40
|
|
|
49
41
|
case _theme["default"].index:
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
}
|
|
42
|
+
return {
|
|
43
|
+
bgColor: _color.colorGrayscale.white,
|
|
44
|
+
topRowBgColor: _color.colorGrayscale.white
|
|
45
|
+
};
|
|
56
46
|
|
|
57
47
|
case _theme["default"].normal:
|
|
58
48
|
default:
|
|
59
|
-
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
}
|
|
49
|
+
return {
|
|
50
|
+
bgColor: _color.colorGrayscale.gray100,
|
|
51
|
+
topRowBgColor: _color.colorGrayscale.gray100
|
|
52
|
+
};
|
|
65
53
|
}
|
|
66
54
|
};
|
|
67
55
|
|
|
@@ -71,16 +59,12 @@ var selectSloganTheme = function selectSloganTheme(theme) {
|
|
|
71
59
|
switch (theme) {
|
|
72
60
|
case _theme["default"].photography:
|
|
73
61
|
case _theme["default"].transparent:
|
|
74
|
-
|
|
75
|
-
return _color.colorGrayscale.white;
|
|
76
|
-
}
|
|
62
|
+
return _color.colorGrayscale.white;
|
|
77
63
|
|
|
78
64
|
case _theme["default"].index:
|
|
79
65
|
case _theme["default"].normal:
|
|
80
66
|
default:
|
|
81
|
-
|
|
82
|
-
return _color.colorGrayscale.gray800;
|
|
83
|
-
}
|
|
67
|
+
return _color.colorGrayscale.gray800;
|
|
84
68
|
}
|
|
85
69
|
};
|
|
86
70
|
|
|
@@ -89,29 +73,25 @@ exports.selectSloganTheme = selectSloganTheme;
|
|
|
89
73
|
var selectHamburgerFooterTheme = function selectHamburgerFooterTheme(theme) {
|
|
90
74
|
switch (theme) {
|
|
91
75
|
case _theme["default"].photography:
|
|
92
|
-
{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
};
|
|
100
|
-
}
|
|
76
|
+
return {
|
|
77
|
+
color: _color.colorGrayscale.gray400,
|
|
78
|
+
hoverColor: _color.colorGrayscale.gray400,
|
|
79
|
+
hoverBgColor: _color.colorOpacity['white_0.2'],
|
|
80
|
+
activeColor: _color.colorGrayscale.gray400,
|
|
81
|
+
activeBgColor: _color.colorOpacity['white_0.5']
|
|
82
|
+
};
|
|
101
83
|
|
|
102
84
|
case _theme["default"].transparent:
|
|
103
85
|
case _theme["default"].index:
|
|
104
86
|
case _theme["default"].normal:
|
|
105
87
|
default:
|
|
106
|
-
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
};
|
|
114
|
-
}
|
|
88
|
+
return {
|
|
89
|
+
color: _color.colorGrayscale.gray600,
|
|
90
|
+
hoverColor: _color.colorGrayscale.gray800,
|
|
91
|
+
hoverBgColor: _color.colorGrayscale.gray100,
|
|
92
|
+
activeColor: _color.colorGrayscale.gray800,
|
|
93
|
+
activeBgColor: _color.colorGrayscale.gray200
|
|
94
|
+
};
|
|
115
95
|
}
|
|
116
96
|
};
|
|
117
97
|
|
|
@@ -120,25 +100,21 @@ exports.selectHamburgerFooterTheme = selectHamburgerFooterTheme;
|
|
|
120
100
|
var selectHamburgerItemTheme = function selectHamburgerItemTheme(theme, active) {
|
|
121
101
|
switch (theme) {
|
|
122
102
|
case _theme["default"].photography:
|
|
123
|
-
{
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
};
|
|
129
|
-
}
|
|
103
|
+
return {
|
|
104
|
+
color: active ? _color.colorSupportive.main : _color.colorGrayscale.white,
|
|
105
|
+
hoverBgColor: _color.colorOpacity['white_0.2'],
|
|
106
|
+
activeBgColor: _color.colorOpacity['white_0.5']
|
|
107
|
+
};
|
|
130
108
|
|
|
131
109
|
case _theme["default"].transparent:
|
|
132
110
|
case _theme["default"].index:
|
|
133
111
|
case _theme["default"].normal:
|
|
134
112
|
default:
|
|
135
|
-
{
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
};
|
|
141
|
-
}
|
|
113
|
+
return {
|
|
114
|
+
color: active ? _color.colorBrand.heavy : _color.colorGrayscale.gray800,
|
|
115
|
+
hoverBgColor: _color.colorGrayscale.gray100,
|
|
116
|
+
activeBgColor: _color.colorGrayscale.gray200
|
|
117
|
+
};
|
|
142
118
|
}
|
|
143
119
|
};
|
|
144
120
|
|
|
@@ -147,24 +123,41 @@ exports.selectHamburgerItemTheme = selectHamburgerItemTheme;
|
|
|
147
123
|
var selectHamburgerMenuTheme = function selectHamburgerMenuTheme(theme) {
|
|
148
124
|
switch (theme) {
|
|
149
125
|
case _theme["default"].photography:
|
|
150
|
-
{
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
};
|
|
155
|
-
}
|
|
126
|
+
return {
|
|
127
|
+
bgColor: _color.colorPhoto.dark,
|
|
128
|
+
scrollBarColor: _color.colorOpacity['white_0.8']
|
|
129
|
+
};
|
|
156
130
|
|
|
157
131
|
case _theme["default"].transparent:
|
|
158
132
|
case _theme["default"].index:
|
|
159
133
|
case _theme["default"].normal:
|
|
160
134
|
default:
|
|
161
|
-
{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
};
|
|
166
|
-
}
|
|
135
|
+
return {
|
|
136
|
+
bgColor: _color.colorGrayscale.white,
|
|
137
|
+
scrollBarColor: _color.colorOpacity['black_0.2']
|
|
138
|
+
};
|
|
167
139
|
}
|
|
168
140
|
};
|
|
169
141
|
|
|
170
|
-
exports.selectHamburgerMenuTheme = selectHamburgerMenuTheme;
|
|
142
|
+
exports.selectHamburgerMenuTheme = selectHamburgerMenuTheme;
|
|
143
|
+
|
|
144
|
+
var selectTabBarTheme = function selectTabBarTheme(theme) {
|
|
145
|
+
switch (theme) {
|
|
146
|
+
case _theme["default"].photography:
|
|
147
|
+
return {
|
|
148
|
+
bgColor: _color.colorPhoto.dark,
|
|
149
|
+
borderColor: _color.colorPhoto.heavy
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
case _theme["default"].transparent:
|
|
153
|
+
case _theme["default"].index:
|
|
154
|
+
case _theme["default"].normal:
|
|
155
|
+
default:
|
|
156
|
+
return {
|
|
157
|
+
bgColor: _color.colorGrayscale.gray100,
|
|
158
|
+
borderColor: _color.colorGrayscale.gray300
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
exports.selectTabBarTheme = selectTabBarTheme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/universal-header",
|
|
3
|
-
"version": "2.4.0-rc.
|
|
3
|
+
"version": "2.4.0-rc.6",
|
|
4
4
|
"description": "Universal header of TWReporter sites",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
],
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@twreporter/core": "^1.8.0-rc.
|
|
24
|
-
"@twreporter/react-components": "^8.15.0-rc.
|
|
23
|
+
"@twreporter/core": "^1.8.0-rc.5",
|
|
24
|
+
"@twreporter/react-components": "^8.15.0-rc.6",
|
|
25
25
|
"lodash": "^4.17.11",
|
|
26
26
|
"prop-types": "^15.6.2",
|
|
27
27
|
"querystring": "^0.2.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"@storybook/testing-library": "^0.0.13",
|
|
49
49
|
"babel-loader": "^8.2.5"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "a1da0ea82fa6ec21f620b76bcb6cebac5ca8c519"
|
|
52
52
|
}
|