@manuscripts/style-guide 3.1.0 → 3.1.3

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.
@@ -75,6 +75,7 @@ var Category;
75
75
  Category["error"] = "error";
76
76
  Category["confirmation"] = "confirmation";
77
77
  Category["warning"] = "warning";
78
+ Category["success"] = "success";
78
79
  })(Category = exports.Category || (exports.Category = {}));
79
80
  const PrimaryAction = (props) => props.isDestructive ? (props.hasForm ? (react_1.default.createElement(Button_1.PrimaryButton, { danger: true, disabled: props.disabled, form: "formDialog", type: "submit" }, props.title)) : (react_1.default.createElement(Button_1.PrimaryButton, { danger: true, disabled: props.disabled, onClick: props.action, autoFocus: true }, props.title))) : props.hasForm ? (react_1.default.createElement(Button_1.PrimaryButton, { disabled: props.disabled, form: "formDialog", type: "submit" }, props.title)) : (react_1.default.createElement(Button_1.PrimaryButton, { disabled: props.disabled, onClick: props.action, autoFocus: true }, props.title));
80
81
  const SecondaryAction = (props) => (react_1.default.createElement(Button_1.SecondaryButton, { disabled: props.disabled, onClick: props.action }, props.title));
@@ -119,6 +120,8 @@ class Dialog extends react_1.default.Component {
119
120
  react_1.default.createElement(icons_1.AttentionRedIcon, null))),
120
121
  category === Category.warning && (react_1.default.createElement(Icon, null,
121
122
  react_1.default.createElement(icons_1.AttentionOrangeIcon, null))),
123
+ category === Category.success && (react_1.default.createElement(Icon, null,
124
+ react_1.default.createElement(icons_1.AttentionGreenIcon, null))),
122
125
  header),
123
126
  react_1.default.createElement(exports.MessageContainer, null,
124
127
  message,
@@ -16,7 +16,7 @@
16
16
  import React from 'react';
17
17
  import styled from 'styled-components';
18
18
  import { ButtonGroup, PrimaryButton, SecondaryButton } from './Button';
19
- import { AttentionOrangeIcon, AttentionRedIcon } from './icons';
19
+ import { AttentionGreenIcon, AttentionOrangeIcon, AttentionRedIcon, } from './icons';
20
20
  import { StyledModal } from './StyledModal';
21
21
  import { TextField } from './TextField';
22
22
  const Icon = styled.div `
@@ -69,6 +69,7 @@ export var Category;
69
69
  Category["error"] = "error";
70
70
  Category["confirmation"] = "confirmation";
71
71
  Category["warning"] = "warning";
72
+ Category["success"] = "success";
72
73
  })(Category || (Category = {}));
73
74
  const PrimaryAction = (props) => props.isDestructive ? (props.hasForm ? (React.createElement(PrimaryButton, { danger: true, disabled: props.disabled, form: "formDialog", type: "submit" }, props.title)) : (React.createElement(PrimaryButton, { danger: true, disabled: props.disabled, onClick: props.action, autoFocus: true }, props.title))) : props.hasForm ? (React.createElement(PrimaryButton, { disabled: props.disabled, form: "formDialog", type: "submit" }, props.title)) : (React.createElement(PrimaryButton, { disabled: props.disabled, onClick: props.action, autoFocus: true }, props.title));
74
75
  const SecondaryAction = (props) => (React.createElement(SecondaryButton, { disabled: props.disabled, onClick: props.action }, props.title));
@@ -113,6 +114,8 @@ export class Dialog extends React.Component {
113
114
  React.createElement(AttentionRedIcon, null))),
114
115
  category === Category.warning && (React.createElement(Icon, null,
115
116
  React.createElement(AttentionOrangeIcon, null))),
117
+ category === Category.success && (React.createElement(Icon, null,
118
+ React.createElement(AttentionGreenIcon, null))),
116
119
  header),
117
120
  React.createElement(MessageContainer, null,
118
121
  message,
@@ -43,7 +43,8 @@ interface DialogProps {
43
43
  export declare enum Category {
44
44
  error = "error",
45
45
  confirmation = "confirmation",
46
- warning = "warning"
46
+ warning = "warning",
47
+ success = "success"
47
48
  }
48
49
  export declare class Dialog extends React.Component<DialogProps, DialogState> {
49
50
  state: DialogState;
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.1.0",
4
+ "version": "3.1.3",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-style-guide",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -39,7 +39,7 @@
39
39
  "prosemirror-commands": "1.7.1",
40
40
  "prosemirror-history": "1.4.1",
41
41
  "prosemirror-keymap": "1.2.3",
42
- "prosemirror-model": "1.25.0",
42
+ "prosemirror-model": "1.25.1",
43
43
  "prosemirror-state": "1.4.3",
44
44
  "prosemirror-view": "1.40.0",
45
45
  "react": "18.3.1",