@twreporter/react-article-components 1.9.0 → 1.9.1-rc.1

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/components/article-page.js +6 -6
  3. package/lib/components/aside/desktop-tools.js +1 -1
  4. package/lib/components/aside/metadata.js +8 -8
  5. package/lib/components/body/annotation.js +6 -6
  6. package/lib/components/body/audio/control-button.js +7 -7
  7. package/lib/components/body/audio/index.js +4 -4
  8. package/lib/components/body/audio/seek-bar.js +5 -5
  9. package/lib/components/body/blockquote.js +3 -3
  10. package/lib/components/body/brief.js +3 -3
  11. package/lib/components/body/centered-quote.js +4 -4
  12. package/lib/components/body/embedded-code.js +4 -4
  13. package/lib/components/body/headings.js +3 -3
  14. package/lib/components/body/image-diff.js +7 -7
  15. package/lib/components/body/infobox.js +10 -10
  16. package/lib/components/body/multimedia.js +4 -4
  17. package/lib/components/body/paragraph.js +2 -2
  18. package/lib/components/body/slider/index.js +3 -3
  19. package/lib/components/body/slideshow/index.js +5 -5
  20. package/lib/components/donation-box.js +6 -6
  21. package/lib/components/leading/fullscreen.js +7 -7
  22. package/lib/components/leading/normal.js +4 -4
  23. package/lib/components/leading/pink.js +6 -6
  24. package/lib/components/license.js +2 -14
  25. package/lib/components/related/card.js +6 -6
  26. package/lib/components/related/index.js +4 -4
  27. package/lib/components/related/list.js +6 -6
  28. package/lib/components/separation-curve.js +4 -4
  29. package/lib/constants/css.js +6 -6
  30. package/lib/managers/theme-manager.js +45 -47
  31. package/package.json +6 -6
  32. package/lib/constants/color.js +0 -43
@@ -7,7 +7,7 @@ exports["default"] = void 0;
7
7
 
8
8
  var _theme2 = _interopRequireDefault(require("../constants/theme"));
9
9
 
10
- var _color = _interopRequireDefault(require("../constants/color"));
10
+ var _color = require("@twreporter/core/lib/constants/color");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
13
 
@@ -44,38 +44,37 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
44
44
  * @property {ColorSet} base - Base color set
45
45
  */
46
46
  var secondaryColorSet = {
47
- text: _color["default"].brown,
48
- accent: _color["default"].brown,
49
- support: _color["default"].milkTea,
50
- background: _color["default"].lightBrown
47
+ text: _color.colorSupportive.heavy,
48
+ accent: _color.colorSupportive.heavy,
49
+ support: _color.colorSupportive.main,
50
+ background: _color.colorSupportive.pastel
51
51
  };
52
52
  var baseColorSet = {
53
- text: _color["default"].gray90,
54
- lightText: _color["default"].gray80,
53
+ text: _color.colorGrayscale.gray800,
54
+ lightText: _color.colorGrayscale.gray600,
55
55
  button: {
56
56
  text: {
57
- color: _color["default"].gray80
57
+ color: _color.colorGrayscale.gray600
58
58
  },
59
59
  border: {
60
- color: _color["default"].gray80
60
+ color: _color.colorGrayscale.gray600
61
61
  },
62
62
  background: {
63
63
  color: 'initial'
64
64
  },
65
65
  hover: {
66
66
  text: {
67
- color: _color["default"].gray80
67
+ color: _color.colorGrayscale.gray600
68
68
  },
69
69
  border: {
70
- color: _color["default"].gray80
70
+ color: _color.colorGrayscale.gray600
71
71
  },
72
72
  background: {
73
- color: _color["default"].white
73
+ color: _color.colorGrayscale.white
74
74
  }
75
75
  }
76
76
  },
77
- line: _color["default"].gray60,
78
- background: _color["default"].gray20
77
+ background: _color.colorGrayscale.gray100
79
78
  };
80
79
  /**
81
80
  * @class Create a new ThemeManager
@@ -136,79 +135,78 @@ exports["default"] = ThemeManager;
136
135
  _defineProperty(ThemeManager, "colors", {
137
136
  pink: {
138
137
  primary: {
139
- text: _color["default"].blue,
140
- accent: _color["default"].drakPink,
141
- support: _color["default"].pink,
142
- background: _color["default"].lightPink
138
+ text: _color.COLOR_PINK_ARTICLE.blue,
139
+ accent: _color.COLOR_PINK_ARTICLE.drakPink,
140
+ support: _color.COLOR_PINK_ARTICLE.pink,
141
+ background: _color.COLOR_PINK_ARTICLE.lightPink
143
142
  },
144
143
  secondary: secondaryColorSet,
145
144
  base: baseColorSet,
146
145
  toc: {
147
- text: _color["default"].gray70,
148
- accent: _color["default"].darkPink,
149
- support: _color["default"].pink,
150
- background: _color["default"].lightPink
146
+ text: _color.colorGrayscale.gray500,
147
+ accent: _color.COLOR_PINK_ARTICLE.darkPink,
148
+ support: _color.COLOR_PINK_ARTICLE.pink,
149
+ background: _color.COLOR_PINK_ARTICLE.lightPink
151
150
  }
152
151
  },
153
152
  "default": {
154
153
  primary: {
155
- text: _color["default"].brown,
156
- accent: _color["default"].brown,
157
- support: _color["default"].milkTea,
158
- background: _color["default"].gray30
154
+ text: _color.colorSupportive.heavy,
155
+ accent: _color.colorSupportive.heavy,
156
+ support: _color.colorSupportive.main,
157
+ background: _color.colorGrayscale.gray100
159
158
  },
160
159
  secondary: secondaryColorSet,
161
160
  base: _objectSpread(_objectSpread({}, baseColorSet), {}, {
162
- background: _color["default"].gray30
161
+ background: _color.colorGrayscale.gray100
163
162
  }),
164
163
  toc: {
165
- text: _color["default"].gray60,
166
- accent: _color["default"].brown,
167
- support: _color["default"].milkTea,
168
- background: _color["default"].almostWhite
164
+ text: _color.colorGrayscale.gray500,
165
+ accent: _color.colorSupportive.heavy,
166
+ support: _color.colorSupportive.main,
167
+ background: _color.colorGrayscale.white
169
168
  }
170
169
  },
171
170
  photo: {
172
171
  primary: {
173
- text: _color["default"].brown,
174
- accent: _color["default"].brown,
175
- support: _color["default"].milkTea,
176
- background: _color["default"].darkBlue
172
+ text: _color.colorSupportive.heavy,
173
+ accent: _color.colorSupportive.heavy,
174
+ support: _color.colorSupportive.main,
175
+ background: _color.COLOR_PINK_ARTICLE.darkBlue
177
176
  },
178
177
  secondary: secondaryColorSet,
179
178
  base: {
180
- text: _color["default"].notSoWhite,
181
- lightText: _color["default"].gray5,
179
+ text: _color.colorGrayscale.gray300,
180
+ lightText: _color.colorGrayscale.gray600,
182
181
  button: {
183
182
  text: {
184
- color: _color["default"].gray80
183
+ color: _color.colorGrayscale.gray600
185
184
  },
186
185
  border: {
187
- color: _color["default"].gray80
186
+ color: _color.colorGrayscale.gray600
188
187
  },
189
188
  background: {
190
189
  color: 'initial'
191
190
  },
192
191
  hover: {
193
192
  text: {
194
- color: _color["default"].white
193
+ color: _color.colorGrayscale.white
195
194
  },
196
195
  border: {
197
- color: _color["default"].white
196
+ color: _color.colorGrayscale.white
198
197
  },
199
198
  background: {
200
199
  color: 'initial'
201
200
  }
202
201
  }
203
202
  },
204
- line: _color["default"].gray35,
205
- background: _color["default"].darkBlue
203
+ background: _color.COLOR_PINK_ARTICLE.darkBlue
206
204
  },
207
205
  toc: {
208
- text: _color["default"].gray60,
209
- accent: _color["default"].brown,
210
- support: _color["default"].milkTea,
211
- background: _color["default"].almostWhite
206
+ text: _color.colorGrayscale.gray500,
207
+ accent: _color.colorSupportive.heavy,
208
+ support: _color.colorSupportive.main,
209
+ background: _color.colorGrayscale.white
212
210
  }
213
211
  }
214
212
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twreporter/react-article-components",
3
- "version": "1.9.0",
3
+ "version": "1.9.1-rc.1",
4
4
  "description": "The Reporter react article components, which are used in article page",
5
5
  "main": "lib/components/article-page.js",
6
6
  "repository": "https://github.com/twreporter/twreporter-npm-packages.git",
@@ -24,10 +24,10 @@
24
24
  "webpack-dev-server": "^3.7.2"
25
25
  },
26
26
  "dependencies": {
27
- "@twreporter/core": "^1.13.0",
28
- "@twreporter/react-components": "^8.20.1",
29
- "@twreporter/redux": "^7.8.0",
30
- "@twreporter/universal-header": "^2.7.3",
27
+ "@twreporter/core": "^1.13.1-rc.0",
28
+ "@twreporter/react-components": "^8.21.0-rc.1",
29
+ "@twreporter/redux": "^7.8.1-rc.0",
30
+ "@twreporter/universal-header": "^2.7.4-rc.1",
31
31
  "howler": "^2.2.3",
32
32
  "lodash": "^4.17.11",
33
33
  "memoize-one": "^5.0.5",
@@ -40,5 +40,5 @@
40
40
  "files": [
41
41
  "lib"
42
42
  ],
43
- "gitHead": "8a64673c5043887c270b1f56efb71a4c3ca41cdd"
43
+ "gitHead": "aa00452ea5c3557c71865aa121dfa630f84e6a04"
44
44
  }
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- // TODO: remove this constant & use @twreporter/core/lib/constants/color
8
- var _default = {
9
- transparent: 'rgba(0, 0, 0, 0)',
10
- white: '#ffffff',
11
- almostWhite: '#fefefe',
12
- notSoWhite: 'rgba(255, 255, 255, 0.8)',
13
- gray5: 'rgba(255, 255, 255, 0.4)',
14
- gray10: 'rgba(255, 255, 255, 0.2)',
15
- gray20: '#f4f4f4',
16
- gray25: 'rgba(255, 255, 255, 0.08)',
17
- gray30: '#f1f1f1',
18
- gray35: 'rgba(216, 216, 216, 0.2)',
19
- gray40: '#e2e2e2',
20
- gray45: 'rgba(0, 0, 0, 0.08)',
21
- gray50: '#d8d8d8',
22
- gray53: 'rgba(0, 0, 0, 0.13)',
23
- gray55: '#cccccc',
24
- gray60: '#afafaf',
25
- gray70: '#9c9c9c',
26
- gray75: 'rgba(0, 0, 0, 0.5)',
27
- gray80: '#808080',
28
- gray85: '#494949',
29
- gray90: '#404040',
30
- gray95: '#262626',
31
- black: '#000000',
32
- lightBlue: '#2440fb',
33
- blue: '#355ed3',
34
- darkBlue: '#08192d',
35
- lightPink: '#fadaf5',
36
- pink: '#fbafef',
37
- darkPink: '#ef7ede',
38
- paleBrown: 'rgba(166, 122, 68, 0.55)',
39
- lightBrown: '#c9af8e',
40
- brown: '#a67a44',
41
- milkTea: '#d0a67d'
42
- };
43
- exports["default"] = _default;