@manuscripts/style-guide 0.31.27 → 0.31.28-LEAN-1796

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.
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /*!
3
+ * © 2019 Atypon Systems LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ var __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.KeywordsList = void 0;
22
+ const react_1 = __importDefault(require("react"));
23
+ const styled_components_1 = __importDefault(require("styled-components"));
24
+ const KeywordsListContainer = styled_components_1.default.div `
25
+ margin: ${(props) => props.theme.grid.unit * 4}px 0;
26
+ `;
27
+ const KeywordsTitle = styled_components_1.default.h1 `
28
+ color: ${(props) => props.theme.colors.text.primary};
29
+ font-family: ${(props) => props.theme.font.family.sans};
30
+ font-size: ${(props) => props.theme.font.size.small};
31
+ font-style: italic;
32
+ font-weight: ${(props) => props.theme.font.weight.normal} !important;
33
+ line-height: ${(props) => props.theme.font.lineHeight.normal};
34
+ margin: 0 0 ${(props) => props.theme.grid.unit}px;
35
+ padding: 0;
36
+ `;
37
+ const KeywordItem = styled_components_1.default.div `
38
+ display: inline-block;
39
+ color: ${(props) => props.theme.colors.text.primary};
40
+ background-color: ${(props) => props.theme.colors.background.keyword.default};
41
+ font-family: ${(props) => props.theme.font.family.sans};
42
+ font-size: ${(props) => props.theme.font.size.normal};
43
+ line-height: ${(props) => props.theme.font.lineHeight.normal};
44
+ margin-right: ${(props) => props.theme.grid.unit}px;
45
+ margin-bottom: ${(props) => props.theme.grid.unit}px;
46
+ padding: ${(props) => props.theme.grid.unit}px;
47
+ border: 1px solid ${(props) => props.theme.colors.border.keyword.default};
48
+ border-radius: 6px;
49
+
50
+ &:hover {
51
+ background-color: ${(props) => props.theme.colors.background.keyword.hover};
52
+ border-color: ${(props) => props.theme.colors.border.keyword.hover};
53
+ }
54
+
55
+ &.selected {
56
+ background-color: ${(props) => props.theme.colors.background.keyword.selected};
57
+ border-color: ${(props) => props.theme.colors.border.keyword.selected};
58
+ }
59
+ `;
60
+ const KeywordsList = ({ keywords }) => (react_1.default.createElement(KeywordsListContainer, null,
61
+ react_1.default.createElement(KeywordsTitle, null, "Keywords"),
62
+ keywords.map((keyword) => (react_1.default.createElement(KeywordItem, { key: keyword._id }, keyword.name)))));
63
+ exports.KeywordsList = KeywordsList;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /*!
3
+ * © 2019 Atypon Systems LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ __exportStar(require("./KeywordsList"), exports);
@@ -143,6 +143,8 @@ exports.NoteBodyContainer = styled_components_1.default.div `
143
143
  ${(props) => borderStyle(props.theme.colors.border.secondary)};
144
144
  ${(props) => (props.isNew || props.isSelected) &&
145
145
  borderStyle(props.theme.colors.border.primary)}
146
+ ${(props) => props.isSelected &&
147
+ `background: ${props.theme.colors.background.selected};`}
146
148
 
147
149
  .tooltip {
148
150
  border-radius: 6px;
package/dist/cjs/index.js CHANGED
@@ -62,6 +62,7 @@ __exportStar(require("./components/Inspector"), exports);
62
62
  __exportStar(require("./components/InspectorSection"), exports);
63
63
  __exportStar(require("./components/Badge"), exports);
64
64
  __exportStar(require("./components/NavDropdown"), exports);
65
+ __exportStar(require("./components/KeywordsList"), exports);
65
66
  var PdfPreview_1 = require("./components/PdfPreview");
66
67
  Object.defineProperty(exports, "PdfPreview", { enumerable: true, get: function () { return __importDefault(PdfPreview_1).default; } });
67
68
  __exportStar(require("./components/SubmissionInspector"), exports);
@@ -0,0 +1,56 @@
1
+ /*!
2
+ * © 2019 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import React from 'react';
17
+ import styled from 'styled-components';
18
+ const KeywordsListContainer = styled.div `
19
+ margin: ${(props) => props.theme.grid.unit * 4}px 0;
20
+ `;
21
+ const KeywordsTitle = styled.h1 `
22
+ color: ${(props) => props.theme.colors.text.primary};
23
+ font-family: ${(props) => props.theme.font.family.sans};
24
+ font-size: ${(props) => props.theme.font.size.small};
25
+ font-style: italic;
26
+ font-weight: ${(props) => props.theme.font.weight.normal} !important;
27
+ line-height: ${(props) => props.theme.font.lineHeight.normal};
28
+ margin: 0 0 ${(props) => props.theme.grid.unit}px;
29
+ padding: 0;
30
+ `;
31
+ const KeywordItem = styled.div `
32
+ display: inline-block;
33
+ color: ${(props) => props.theme.colors.text.primary};
34
+ background-color: ${(props) => props.theme.colors.background.keyword.default};
35
+ font-family: ${(props) => props.theme.font.family.sans};
36
+ font-size: ${(props) => props.theme.font.size.normal};
37
+ line-height: ${(props) => props.theme.font.lineHeight.normal};
38
+ margin-right: ${(props) => props.theme.grid.unit}px;
39
+ margin-bottom: ${(props) => props.theme.grid.unit}px;
40
+ padding: ${(props) => props.theme.grid.unit}px;
41
+ border: 1px solid ${(props) => props.theme.colors.border.keyword.default};
42
+ border-radius: 6px;
43
+
44
+ &:hover {
45
+ background-color: ${(props) => props.theme.colors.background.keyword.hover};
46
+ border-color: ${(props) => props.theme.colors.border.keyword.hover};
47
+ }
48
+
49
+ &.selected {
50
+ background-color: ${(props) => props.theme.colors.background.keyword.selected};
51
+ border-color: ${(props) => props.theme.colors.border.keyword.selected};
52
+ }
53
+ `;
54
+ export const KeywordsList = ({ keywords }) => (React.createElement(KeywordsListContainer, null,
55
+ React.createElement(KeywordsTitle, null, "Keywords"),
56
+ keywords.map((keyword) => (React.createElement(KeywordItem, { key: keyword._id }, keyword.name)))));
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * © 2019 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './KeywordsList';
@@ -118,6 +118,8 @@ export const NoteBodyContainer = styled.div `
118
118
  ${(props) => borderStyle(props.theme.colors.border.secondary)};
119
119
  ${(props) => (props.isNew || props.isSelected) &&
120
120
  borderStyle(props.theme.colors.border.primary)}
121
+ ${(props) => props.isSelected &&
122
+ `background: ${props.theme.colors.background.selected};`}
121
123
 
122
124
  .tooltip {
123
125
  border-radius: 6px;
package/dist/es/index.js CHANGED
@@ -46,6 +46,7 @@ export * from './components/Inspector';
46
46
  export * from './components/InspectorSection';
47
47
  export * from './components/Badge';
48
48
  export * from './components/NavDropdown';
49
+ export * from './components/KeywordsList';
49
50
  export { default as PdfPreview } from './components/PdfPreview';
50
51
  export * from './components/SubmissionInspector';
51
52
  export * from './components/Dropdown';
@@ -0,0 +1,22 @@
1
+ /*!
2
+ * © 2019 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Keyword } from '@manuscripts/manuscripts-json-schema';
17
+ import React from 'react';
18
+ interface Props {
19
+ keywords: Keyword[];
20
+ }
21
+ export declare const KeywordsList: React.FunctionComponent<Props>;
22
+ export {};
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * © 2019 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './KeywordsList';
@@ -47,6 +47,7 @@ export * from './components/Inspector';
47
47
  export * from './components/InspectorSection';
48
48
  export * from './components/Badge';
49
49
  export * from './components/NavDropdown';
50
+ export * from './components/KeywordsList';
50
51
  export { default as PdfPreview } from './components/PdfPreview';
51
52
  export * from './components/SubmissionInspector';
52
53
  export * from './components/Dropdown';
@@ -72,12 +72,20 @@ interface Variations {
72
72
  secondary: string;
73
73
  tertiary: string;
74
74
  fifth?: string;
75
+ selected?: string;
75
76
  }
76
77
  interface Background {
77
78
  dark: string;
79
+ keyword: Keyword;
80
+ }
81
+ interface Keyword {
82
+ default: string;
83
+ hover: string;
84
+ selected: string;
78
85
  }
79
86
  interface Border {
80
87
  field: States;
88
+ keyword: Keyword;
81
89
  }
82
90
  interface Brand {
83
91
  dark: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/style-guide",
3
3
  "description": "Shared components for Manuscripts applications",
4
- "version": "0.31.27",
4
+ "version": "0.31.28-LEAN-1796",
5
5
  "repository": "gitlab:atypon-opensource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",