@manuscripts/style-guide 3.5.17 → 3.5.19

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/README.md CHANGED
@@ -8,7 +8,7 @@ React components for Manuscripts applications.
8
8
  import { PrimaryButton } from '@manuscripts/style-guide'
9
9
 
10
10
  const Example: React.FunctionComponent<{
11
- handleClick: React.MouseEventHandler<HTMLButtonElement>
11
+ handleClick: React.MouseEventHandler<HTMLButtonElement>
12
12
  }> = ({ handleClick }) => (
13
13
  <div>
14
14
  <PrimaryButton onClick={handleClick}>Done</PrimaryButton>
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Badge = void 0;
6
+ exports.IconWrapper = exports.ErrorBadge = exports.WarningBadge = exports.Badge = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const Badge = ({ variant = 'default', label, width, size = 'md', }) => {
@@ -32,3 +32,30 @@ const BadgeContainer = styled_components_1.default.div `
32
32
  min-width: max-content;
33
33
  text-transform: capitalize;
34
34
  `;
35
+ exports.WarningBadge = styled_components_1.default.div `
36
+ position: absolute;
37
+ top: -6px;
38
+ right: -6px;
39
+ background-color: #fe8f1f;
40
+ color: white;
41
+ border-radius: 50%;
42
+ min-width: 14px;
43
+ height: 14px;
44
+ font-family: 'Lato', sans-serif;
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: space-around;
48
+ font-size: 9px;
49
+ font-weight: 400;
50
+ line-height: 1;
51
+ z-index: 10;
52
+ `;
53
+ exports.ErrorBadge = (0, styled_components_1.default)(exports.WarningBadge) `
54
+ background-color: #f35143;
55
+ `;
56
+ exports.IconWrapper = styled_components_1.default.span `
57
+ position: relative;
58
+ display: inline-flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ `;
@@ -25,3 +25,30 @@ const BadgeContainer = styled.div `
25
25
  min-width: max-content;
26
26
  text-transform: capitalize;
27
27
  `;
28
+ export const WarningBadge = styled.div `
29
+ position: absolute;
30
+ top: -6px;
31
+ right: -6px;
32
+ background-color: #fe8f1f;
33
+ color: white;
34
+ border-radius: 50%;
35
+ min-width: 14px;
36
+ height: 14px;
37
+ font-family: 'Lato', sans-serif;
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: space-around;
41
+ font-size: 9px;
42
+ font-weight: 400;
43
+ line-height: 1;
44
+ z-index: 10;
45
+ `;
46
+ export const ErrorBadge = styled(WarningBadge) `
47
+ background-color: #f35143;
48
+ `;
49
+ export const IconWrapper = styled.span `
50
+ position: relative;
51
+ display: inline-flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ `;
@@ -23,4 +23,7 @@ interface BadgeProps {
23
23
  size?: BadgeSize;
24
24
  }
25
25
  export declare const Badge: React.FC<BadgeProps>;
26
+ export declare const WarningBadge: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
27
+ export declare const ErrorBadge: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
28
+ export declare const IconWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
26
29
  export {};
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": "3.5.17",
4
+ "version": "3.5.19",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",