@kids-reporter/draft-renderer 1.0.25 → 1.0.27

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.
@@ -24,13 +24,8 @@ const HeadingForAnnotation = (0, _styledComponents.default)(_articleContent.Head
24
24
  }
25
25
  `;
26
26
  const ListForAnnotation = (0, _styledComponents.default)(_articleContent.List)`
27
- color: #494949;
27
+ color: #575757;
28
28
 
29
- li {
30
- font-size: ${({
31
- theme
32
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '20px' : '16px'};
33
- }
34
29
  margin-bottom: 0px;
35
30
 
36
31
  ${_mediaQuery.mediaQuery.smallOnly} {
@@ -40,12 +35,7 @@ const ListForAnnotation = (0, _styledComponents.default)(_articleContent.List)`
40
35
  }
41
36
  `;
42
37
  const ParagraphForAnnotation = (0, _styledComponents.default)(_articleContent.Paragraph)`
43
- /* overwrite css */
44
- font-size: ${({
45
- theme
46
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '20px' : '16px'};
47
- font-weight: 400;
48
- color: #494949;
38
+ color: #575757;
49
39
 
50
40
  > div[data-block='true'] {
51
41
  margin-bottom: 0px;
@@ -13,10 +13,6 @@ var _articleContent = require("./article-content");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
15
  const ParagraphForImageLink = (0, _styledComponents.default)(_articleContent.Paragraph)`
16
- /* overwrite css */
17
- font-size: ${({
18
- theme
19
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
20
16
  margin: 0;
21
17
  text-align: left;
22
18
  max-width: 100%;
@@ -44,21 +44,11 @@ const ListForInfoBox = (0, _styledComponents.default)(_articleContent.List)`
44
44
 
45
45
  color: #232323;
46
46
  li {
47
- font-size: ${({
48
- theme
49
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '20px' : '16px'};
50
47
  line-height: 1.5;
51
48
  }
52
49
  `;
53
50
  const ParagraphForInfoBox = (0, _styledComponents.default)(_articleContent.Paragraph)`
54
- /* overwrite css */
55
- font-size: ${({
56
- theme
57
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '20px' : '16px'};
58
- font-weight: 400;
59
51
  margin-bottom: 16px;
60
- line-height: 1.5;
61
- color: #232323;
62
52
 
63
53
  &:last-child {
64
54
  margin-bottom: 0px;
@@ -3,20 +3,27 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.blockRenderMap = exports.Paragraph = exports.Heading = void 0;
6
+ exports.blockRenderMap = exports.Paragraph = void 0;
7
7
  var _draftJs = require("draft-js");
8
8
  var _immutable = _interopRequireDefault(require("immutable"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _styledComponents = _interopRequireDefault(require("styled-components"));
11
+ var _mediaQuery = require("../utils/media-query");
11
12
  var _articleContent = require("./article-content");
12
13
  var _jsxRuntime = require("react/jsx-runtime");
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
15
  const Paragraph = exports.Paragraph = (0, _styledComponents.default)(_articleContent.Paragraph)`
15
- text-align: center;
16
- max-width: 750px;
17
- `;
18
- const Heading = exports.Heading = (0, _styledComponents.default)(_articleContent.Heading)`
19
- text-align: center;
16
+ width: 100%;
17
+ max-width: 582px;
18
+ margin: 0 auto;
19
+
20
+ ${_mediaQuery.mediaQuery.desktopAbove} {
21
+ max-width: 608px;
22
+ }
23
+
24
+ ${_mediaQuery.mediaQuery.largeOnly} {
25
+ max-width: 648px;
26
+ }
20
27
  `;
21
28
  const _blockRenderMap = _immutable.default.Map({
22
29
  atomic: {
@@ -25,19 +32,19 @@ const _blockRenderMap = _immutable.default.Map({
25
32
  },
26
33
  'header-two': {
27
34
  element: 'h2',
28
- wrapper: /*#__PURE__*/(0, _jsxRuntime.jsx)(Heading, {})
35
+ wrapper: /*#__PURE__*/(0, _jsxRuntime.jsx)(_articleContent.Heading, {})
29
36
  },
30
37
  'header-three': {
31
38
  element: 'h3',
32
- wrapper: /*#__PURE__*/(0, _jsxRuntime.jsx)(Heading, {})
39
+ wrapper: /*#__PURE__*/(0, _jsxRuntime.jsx)(_articleContent.Heading, {})
33
40
  },
34
41
  'header-four': {
35
42
  element: 'h4',
36
- wrapper: /*#__PURE__*/(0, _jsxRuntime.jsx)(Heading, {})
43
+ wrapper: /*#__PURE__*/(0, _jsxRuntime.jsx)(_articleContent.Heading, {})
37
44
  },
38
45
  'header-five': {
39
46
  element: 'h5',
40
- wrapper: /*#__PURE__*/(0, _jsxRuntime.jsx)(Heading, {})
47
+ wrapper: /*#__PURE__*/(0, _jsxRuntime.jsx)(_articleContent.Heading, {})
41
48
  },
42
49
  'ordered-list-item': {
43
50
  element: 'li',
@@ -44,13 +44,9 @@ const QuoteLeftContainer = _styledComponents.default.blockquote`
44
44
  const QuoteText = _styledComponents.default.p`
45
45
  margin: 0;
46
46
  word-break: break-word;
47
- font-size: ${({
48
- theme
49
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '22px' : '18px'};
50
47
  font-weight: 700;
51
48
  letter-spacing: 0.9px;
52
- line-height: 2;
53
- color: #232323;
49
+ font-size: inherit;
54
50
  `;
55
51
  const SvgBlock = _styledComponents.default.div`
56
52
  svg {
@@ -35,10 +35,6 @@ const DropdownOption = _styledComponents.default.li`
35
35
  const Container = _styledComponents.default.div`
36
36
  width: 100%;
37
37
  overflow: hidden;
38
-
39
- font-size: 18px;
40
- font-weight: 400;
41
- line-height: 1.5;
42
38
  `;
43
39
  const InputBlock = _styledComponents.default.div`
44
40
  display: flex;
@@ -48,14 +44,12 @@ const InputBlock = _styledComponents.default.div`
48
44
  `;
49
45
  const Input = _styledComponents.default.input`
50
46
  background: #ffffff;
51
- font-size: 18px;
52
47
  padding: 12px 0;
53
48
  outline: none;
54
49
  border: none;
55
50
  `;
56
51
  const Label = _styledComponents.default.span`
57
52
  margin-left: 10px;
58
- font-size: 14px;
59
53
  cursor: pointer;
60
54
  `;
61
55
  const Arrow = _styledComponents.default.span`
@@ -21,13 +21,9 @@ const Block = exports.Block = _styledComponents.default.div`
21
21
  display: block;
22
22
  }
23
23
  `;
24
- const Caption = exports.Caption = _styledComponents.default.div`
25
- font-size: ${({
26
- theme
27
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
24
+ const Caption = exports.Caption = _styledComponents.default.p`
28
25
  padding: 10px 0 0 0;
29
26
  margin-top: 5px;
30
- line-height: 28px;
31
27
  text-align: center;
32
28
  color: var(--paletteColor3, #808080);
33
29
  `;
@@ -39,14 +39,10 @@ const Figure = _styledComponents.default.figure`
39
39
  const FigureCaption = _styledComponents.default.figcaption`
40
40
  width: fit-content;
41
41
  max-width: 100%;
42
- font-size: ${({
43
- theme
44
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
45
42
  margin-left: auto;
46
43
  margin-right: auto;
47
44
  color: #575757;
48
45
  letter-spacing: 0.7px;
49
- line-height: 28px;
50
46
  text-align: center;
51
47
  padding: 16px 0 20px 0;
52
48
  border-bottom: 2px solid #c6c6c6;
@@ -41,14 +41,10 @@ const Figure = _styledComponents.default.figure`
41
41
  const FigureCaption = _styledComponents.default.figcaption`
42
42
  width: 100%;
43
43
  max-width: 100%;
44
- font-size: ${({
45
- theme
46
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
47
44
  margin-left: auto;
48
45
  margin-right: auto;
49
46
  color: #575757;
50
47
  letter-spacing: 0.7px;
51
- line-height: 28px;
52
48
  text-align: left;
53
49
  padding: 16px 0 20px 0;
54
50
  border-bottom: 2px solid #c6c6c6;
@@ -50,17 +50,12 @@ const mockup = {
50
50
  }
51
51
  };
52
52
  const Caption = _styledComponents.default.figcaption`
53
- color: #494949;
53
+ color: #575757;
54
54
  &::after {
55
55
  border-color: #c6c6c6;
56
56
  }
57
57
 
58
- line-height: 1.36;
59
58
  letter-spacing: 0.5px;
60
- font-weight: normal;
61
- font-size: ${({
62
- theme
63
- }) => (theme === null || theme === void 0 ? void 0 : theme.fontSizeLevel) === 'large' ? '18px' : '14px'};
64
59
  margin-bottom: 30px;
65
60
  padding: 0 0 20px 0;
66
61
 
@@ -153,6 +153,7 @@ const ImageNumber = _styledComponents.default.span`
153
153
  font-size: 18px;
154
154
  font-weight: 700;
155
155
  line-height: 1.6;
156
+ letter-spacing: 0.9px;
156
157
  color: #232323;
157
158
  `;
158
159
  const ImageTotal = (0, _styledComponents.default)(ImageNumber)`
@@ -5,18 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.mediaQuery = exports.breakpoints = void 0;
7
7
  const breakpoints = exports.breakpoints = {
8
- small: 375,
9
- medium: 768,
8
+ mobile: 375,
9
+ tablet: 768,
10
10
  desktop: 1024,
11
- // TODO: unify breakpoints in twreporter/kids reporter
12
- large: 1440
11
+ hd: 1440
13
12
  };
14
13
  const mediaQuery = exports.mediaQuery = {
15
- smallOnly: `@media (max-width: ${breakpoints.medium - 1}px)`,
16
- mediumAndDesktopOnly: `@media (min-width: ${breakpoints.medium}px) and (max-width: ${breakpoints.large - 1}px)`,
17
- mediumOnly: `@media (min-width: ${breakpoints.medium}px) and (max-width: ${breakpoints.desktop - 1}px)`,
14
+ smallOnly: `@media (max-width: ${breakpoints.tablet - 1}px)`,
15
+ mediumAndDesktopOnly: `@media (min-width: ${breakpoints.tablet}px) and (max-width: ${breakpoints.hd - 1}px)`,
16
+ mediumOnly: `@media (min-width: ${breakpoints.tablet}px) and (max-width: ${breakpoints.desktop - 1}px)`,
18
17
  desktopAbove: `@media (min-width: ${breakpoints.desktop}px)`,
19
- mediumAbove: `@media (min-width: ${breakpoints.medium}px)`,
20
- largeBelow: `@media (max-width: ${breakpoints.large - 1}px)`,
21
- largeOnly: `@media (min-width: ${breakpoints.large}px)`
18
+ mediumAbove: `@media (min-width: ${breakpoints.tablet}px)`,
19
+ largeBelow: `@media (max-width: ${breakpoints.hd - 1}px)`,
20
+ largeOnly: `@media (min-width: ${breakpoints.hd}px)`
22
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kids-reporter/draft-renderer",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {