@synerise/ds-alert 0.3.25 → 0.4.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.
- package/CHANGELOG.md +32 -0
- package/dist/Alert.js +9 -10
- package/dist/Alert.styles.js +3 -3
- package/dist/Alert.types.js +1 -0
- package/dist/AlertInfo/AlertInfo.js +11 -17
- package/dist/AlertInfo/AlertInfo.styles.js +1 -1
- package/dist/AlertInfo/AlertInfo.types.js +2 -4
- package/dist/BroadcastBar/BroadcastBar.js +22 -23
- package/dist/BroadcastBar/BroadcastBar.styles.js +1 -1
- package/dist/BroadcastBar/BroadcastBar.types.js +1 -0
- package/dist/ColorSemantic/AlertSemanticColor.js +13 -17
- package/dist/ColorSemantic/AlertSemanticColor.styles.js +6 -6
- package/dist/ColorSemantic/AlertSemanticColor.types.js +1 -0
- package/dist/IconAlert/IconAlert.js +11 -12
- package/dist/IconAlert/IconAlert.types.js +1 -0
- package/dist/InlineAlert/InlineAlert.js +8 -9
- package/dist/InlineAlert/InlineAlert.types.js +1 -0
- package/dist/SectionMessage/SectionMessage.js +19 -20
- package/dist/SectionMessage/SectionMessage.styles.js +5 -5
- package/dist/SectionMessage/SectionMessage.types.js +1 -0
- package/dist/Toast/Toast.js +20 -21
- package/dist/Toast/Toast.styles.js +15 -15
- package/dist/Toast/Toast.types.js +1 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,38 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [0.4.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.4.2...@synerise/ds-alert@0.4.3) (2021-12-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @synerise/ds-alert
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [0.4.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.4.1...@synerise/ds-alert@0.4.2) (2021-11-22)
|
15
|
+
|
16
|
+
**Note:** Version bump only for package @synerise/ds-alert
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
## [0.4.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.3.25...@synerise/ds-alert@0.4.1) (2021-11-09)
|
23
|
+
|
24
|
+
**Note:** Version bump only for package @synerise/ds-alert
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
# [0.4.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.3.25...@synerise/ds-alert@0.4.0) (2021-11-09)
|
31
|
+
|
32
|
+
**Note:** Version bump only for package @synerise/ds-alert
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
6
38
|
## [0.3.25](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.3.24...@synerise/ds-alert@0.3.25) (2021-11-05)
|
7
39
|
|
8
40
|
**Note:** Version bump only for package @synerise/ds-alert
|
package/dist/Alert.js
CHANGED
@@ -2,17 +2,16 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
2
2
|
|
3
3
|
import * as React from 'react';
|
4
4
|
import "./style/index.css";
|
5
|
-
import { Check2M, Close2M, NotificationsM } from '@synerise/ds-icon
|
6
|
-
import Icon from '@synerise/ds-icon';
|
5
|
+
import Icon, { Check2M, Close2M, NotificationsM } from '@synerise/ds-icon';
|
7
6
|
import * as S from './Alert.styles';
|
8
7
|
import InlineAlert from './InlineAlert/InlineAlert';
|
9
8
|
var ICONS = {
|
10
|
-
success: React.createElement(Check2M, null),
|
11
|
-
warning: React.createElement(Check2M, null),
|
12
|
-
error: React.createElement(Close2M, null),
|
13
|
-
info: React.createElement(NotificationsM, null)
|
9
|
+
success: /*#__PURE__*/React.createElement(Check2M, null),
|
10
|
+
warning: /*#__PURE__*/React.createElement(Check2M, null),
|
11
|
+
error: /*#__PURE__*/React.createElement(Close2M, null),
|
12
|
+
info: /*#__PURE__*/React.createElement(NotificationsM, null)
|
14
13
|
};
|
15
|
-
var DEFAULT_ICON = React.createElement(Check2M, null);
|
14
|
+
var DEFAULT_ICON = /*#__PURE__*/React.createElement(Check2M, null);
|
16
15
|
|
17
16
|
var Alert = function Alert(props) {
|
18
17
|
var icon = props.icon,
|
@@ -22,7 +21,7 @@ var Alert = function Alert(props) {
|
|
22
21
|
showMoreLabel = props.showMoreLabel,
|
23
22
|
onShowMore = props.onShowMore;
|
24
23
|
var renderMessage = React.useMemo(function () {
|
25
|
-
return React.createElement(S.AlertContent, null, message && React.createElement(S.AlertMessage, null, message), description && React.createElement(S.AlertDescription, null, description), onShowMore && showMoreLabel && React.createElement(S.AlertShowMore, {
|
24
|
+
return /*#__PURE__*/React.createElement(S.AlertContent, null, message && /*#__PURE__*/React.createElement(S.AlertMessage, null, message), description && /*#__PURE__*/React.createElement(S.AlertDescription, null, description), onShowMore && showMoreLabel && /*#__PURE__*/React.createElement(S.AlertShowMore, {
|
26
25
|
onClick: onShowMore
|
27
26
|
}, showMoreLabel));
|
28
27
|
}, [message, description, showMoreLabel, onShowMore]);
|
@@ -31,9 +30,9 @@ var Alert = function Alert(props) {
|
|
31
30
|
if (ICONS[type]) return ICONS[type];
|
32
31
|
return DEFAULT_ICON;
|
33
32
|
}, [icon, type]);
|
34
|
-
return React.createElement(S.AntdAlert, _extends({}, props, {
|
33
|
+
return /*#__PURE__*/React.createElement(S.AntdAlert, _extends({}, props, {
|
35
34
|
className: "ds-alert",
|
36
|
-
icon: React.createElement(Icon, {
|
35
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
37
36
|
component: renderIcon
|
38
37
|
}),
|
39
38
|
message: renderMessage,
|
package/dist/Alert.styles.js
CHANGED
@@ -7,16 +7,16 @@ var getColor = function getColor(props) {
|
|
7
7
|
var color = props.color,
|
8
8
|
theme = props.theme;
|
9
9
|
var hue = DARKER_COLORS.includes(color) ? '700' : '600';
|
10
|
-
return theme.palette[
|
10
|
+
return theme.palette[color + "-" + hue];
|
11
11
|
};
|
12
12
|
|
13
13
|
export var AntdAlert = styled(function (props) {
|
14
|
-
return React.createElement(Alert, props);
|
14
|
+
return /*#__PURE__*/React.createElement(Alert, props);
|
15
15
|
}).withConfig({
|
16
16
|
displayName: "Alertstyles__AntdAlert",
|
17
17
|
componentId: "k5v82n-0"
|
18
18
|
})(["", ";", ";", ";"], function (props) {
|
19
|
-
return Boolean(props.color) && css(["&&&{box-shadow:0 0 0 1px ", ";background-color:", ";color:", ";.ant-alert-icon{svg{color:", ";fill:", ";}}}"], props.theme.palette[
|
19
|
+
return Boolean(props.color) && css(["&&&{box-shadow:0 0 0 1px ", ";background-color:", ";color:", ";.ant-alert-icon{svg{color:", ";fill:", ";}}}"], props.theme.palette[props.color + "-600"], props.theme.palette[props.color + "-050"], getColor(props), getColor(props), getColor(props));
|
20
20
|
}, function (props) {
|
21
21
|
return (props.mode === 'background' || props.mode === 'clear' || !props.mode) && css(["&&&{box-shadow:none;}"]);
|
22
22
|
}, function (props) {
|
package/dist/Alert.types.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,20 +1,14 @@
|
|
1
|
-
var
|
1
|
+
var _excluded = ["IconComponent"];
|
2
2
|
|
3
|
-
|
3
|
+
var _mapSizeToPx;
|
4
4
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
6
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8
|
-
|
9
7
|
import * as React from 'react';
|
10
|
-
import Icon from '@synerise/ds-icon';
|
11
|
-
import CheckL from '@synerise/ds-icon/dist/icons/L/CheckL';
|
12
|
-
import WarningL from '@synerise/ds-icon/dist/icons/L/WarningL';
|
13
|
-
import WarningXl from '@synerise/ds-icon/dist/icons/XL/WarningXl';
|
14
|
-
import CheckXl from '@synerise/ds-icon/dist/icons/XL/CheckXl';
|
8
|
+
import Icon, { CheckL, WarningL, WarningXl, CheckXl } from '@synerise/ds-icon';
|
15
9
|
import { AlertSize } from './AlertInfo.types';
|
16
10
|
import * as S from './AlertInfo.styles';
|
17
|
-
var mapSizeToPx = (_mapSizeToPx = {},
|
11
|
+
var mapSizeToPx = (_mapSizeToPx = {}, _mapSizeToPx[AlertSize.SMALL] = 48, _mapSizeToPx[AlertSize.MEDIUM] = 96, _mapSizeToPx);
|
18
12
|
|
19
13
|
var AlertInfo = function AlertInfo(_ref) {
|
20
14
|
var _ref$size = _ref.size,
|
@@ -44,21 +38,21 @@ var AlertInfo = function AlertInfo(_ref) {
|
|
44
38
|
|
45
39
|
var _mapTypeToStatus$type = mapTypeToStatus[type],
|
46
40
|
IconComponent = _mapTypeToStatus$type.IconComponent,
|
47
|
-
iconContainerStyles =
|
41
|
+
iconContainerStyles = _objectWithoutPropertiesLoose(_mapTypeToStatus$type, _excluded);
|
48
42
|
|
49
|
-
return React.createElement(S.AlertWrapper, {
|
43
|
+
return /*#__PURE__*/React.createElement(S.AlertWrapper, {
|
50
44
|
mode: mode,
|
51
45
|
className: "ds-alert-info",
|
52
46
|
labelPosition: labelPosition
|
53
|
-
}, React.createElement(S.AlertIconContainer, null, React.createElement(S.StatusIconContainer, iconContainerStyles, React.createElement(Icon, {
|
54
|
-
component: React.createElement(IconComponent, null),
|
47
|
+
}, /*#__PURE__*/React.createElement(S.AlertIconContainer, null, /*#__PURE__*/React.createElement(S.StatusIconContainer, iconContainerStyles, /*#__PURE__*/React.createElement(Icon, {
|
48
|
+
component: /*#__PURE__*/React.createElement(IconComponent, null),
|
55
49
|
size: mapSizeToPx[size]
|
56
|
-
}))), text && React.createElement(S.HeaderWrapper, {
|
50
|
+
}))), text && /*#__PURE__*/React.createElement(S.HeaderWrapper, {
|
57
51
|
size: size,
|
58
52
|
fontSize: fontSize
|
59
|
-
}, text), React.createElement(S.TextWrapper, {
|
53
|
+
}, text), /*#__PURE__*/React.createElement(S.TextWrapper, {
|
60
54
|
labelPosition: labelPosition
|
61
|
-
}, label), button && React.createElement(S.ButtonWrapper, null, button));
|
55
|
+
}, label), button && /*#__PURE__*/React.createElement(S.ButtonWrapper, null, button));
|
62
56
|
};
|
63
57
|
|
64
58
|
export default AlertInfo;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import styled, { css } from 'styled-components';
|
2
|
-
import { IconContainer } from '@synerise/ds-icon
|
2
|
+
import { IconContainer } from '@synerise/ds-icon';
|
3
3
|
import { AlertSize, FontSize } from './AlertInfo.types';
|
4
4
|
var FONT_SIZE_DEFAULT = 14;
|
5
5
|
var mapElementsPosition = {
|
@@ -1,7 +1,5 @@
|
|
1
1
|
var _IconSize, _FontSize;
|
2
2
|
|
3
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
4
|
-
|
5
3
|
export var AlertSize;
|
6
4
|
|
7
5
|
(function (AlertSize) {
|
@@ -9,5 +7,5 @@ export var AlertSize;
|
|
9
7
|
AlertSize["MEDIUM"] = "medium";
|
10
8
|
})(AlertSize || (AlertSize = {}));
|
11
9
|
|
12
|
-
export var IconSize = (_IconSize = {},
|
13
|
-
export var FontSize = (_FontSize = {},
|
10
|
+
export var IconSize = (_IconSize = {}, _IconSize[AlertSize.SMALL] = 48, _IconSize[AlertSize.MEDIUM] = 96, _IconSize);
|
11
|
+
export var FontSize = (_FontSize = {}, _FontSize[AlertSize.SMALL] = 14, _FontSize[AlertSize.MEDIUM] = 18, _FontSize);
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { CloseM, WarningFillM, Check3M, ErrorFillM } from '@synerise/ds-icon
|
3
|
-
import Icon from '@synerise/ds-icon';
|
2
|
+
import Icon, { CloseM, WarningFillM, Check3M, ErrorFillM } from '@synerise/ds-icon';
|
4
3
|
import * as S from './BroadcastBar.styles';
|
5
4
|
var ICONS = {
|
6
|
-
success: React.createElement(Check3M, null),
|
7
|
-
warning: React.createElement(WarningFillM, null),
|
8
|
-
negative: React.createElement(ErrorFillM, null)
|
5
|
+
success: /*#__PURE__*/React.createElement(Check3M, null),
|
6
|
+
warning: /*#__PURE__*/React.createElement(WarningFillM, null),
|
7
|
+
negative: /*#__PURE__*/React.createElement(ErrorFillM, null)
|
9
8
|
};
|
10
|
-
var DEFAULT_ICON = React.createElement(WarningFillM, null);
|
9
|
+
var DEFAULT_ICON = /*#__PURE__*/React.createElement(WarningFillM, null);
|
11
10
|
|
12
11
|
var BroadcastBar = function BroadcastBar(_ref) {
|
13
12
|
var icon = _ref.icon,
|
@@ -22,18 +21,18 @@ var BroadcastBar = function BroadcastBar(_ref) {
|
|
22
21
|
onCloseClick = _ref.onCloseClick,
|
23
22
|
text = _ref.text;
|
24
23
|
var renderMessage = React.useMemo(function () {
|
25
|
-
return React.createElement(S.AlertContent, {
|
24
|
+
return /*#__PURE__*/React.createElement(S.AlertContent, {
|
26
25
|
color: color,
|
27
26
|
withLink: withLink
|
28
|
-
}, React.createElement(S.Text, {
|
27
|
+
}, /*#__PURE__*/React.createElement(S.Text, {
|
29
28
|
color: color
|
30
|
-
}, description && !withEmphasis && React.createElement(S.AlertDescription, {
|
29
|
+
}, description && !withEmphasis && /*#__PURE__*/React.createElement(S.AlertDescription, {
|
31
30
|
color: color
|
32
|
-
}, description), withLink && !withEmphasis && !description && React.createElement(S.LinkWrapper, {
|
31
|
+
}, description), withLink && !withEmphasis && !description && /*#__PURE__*/React.createElement(S.LinkWrapper, {
|
33
32
|
color: color
|
34
|
-
}, React.createElement(S.WrapperText, null, text), React.createElement(S.Link, null, withLink)), withEmphasis && React.createElement(S.EmphasisWrapper, {
|
33
|
+
}, /*#__PURE__*/React.createElement(S.WrapperText, null, text), /*#__PURE__*/React.createElement(S.Link, null, withLink)), withEmphasis && /*#__PURE__*/React.createElement(S.EmphasisWrapper, {
|
35
34
|
color: color
|
36
|
-
}, React.createElement(S.WrapperText, {
|
35
|
+
}, /*#__PURE__*/React.createElement(S.WrapperText, {
|
37
36
|
emphasis: withEmphasis
|
38
37
|
}, text), withEmphasis)));
|
39
38
|
}, [description, withEmphasis, withLink, text, color]);
|
@@ -42,30 +41,30 @@ var BroadcastBar = function BroadcastBar(_ref) {
|
|
42
41
|
if (ICONS[type]) return ICONS[type];
|
43
42
|
return DEFAULT_ICON;
|
44
43
|
}, [icon, type]);
|
45
|
-
return React.createElement(S.Container, {
|
44
|
+
return /*#__PURE__*/React.createElement(S.Container, {
|
46
45
|
color: color
|
47
|
-
}, React.createElement(S.WrapperSectionMessage, {
|
46
|
+
}, /*#__PURE__*/React.createElement(S.WrapperSectionMessage, {
|
48
47
|
color: color
|
49
|
-
}, React.createElement("div", null), React.createElement(S.AllContent, {
|
48
|
+
}, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement(S.AllContent, {
|
50
49
|
close: withClose,
|
51
50
|
color: color
|
52
|
-
}, React.createElement(S.IconWrapper, {
|
51
|
+
}, /*#__PURE__*/React.createElement(S.IconWrapper, {
|
53
52
|
color: color
|
54
|
-
}, React.createElement(Icon, {
|
53
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
55
54
|
component: renderIcon
|
56
|
-
})), renderMessage, React.createElement(S.ButtonWrapper, {
|
55
|
+
})), renderMessage, /*#__PURE__*/React.createElement(S.ButtonWrapper, {
|
57
56
|
color: color
|
58
|
-
}, button && React.createElement(S.BroadcastButton, {
|
57
|
+
}, button && /*#__PURE__*/React.createElement(S.BroadcastButton, {
|
59
58
|
color: color,
|
60
59
|
type: color === 'yellow' ? 'tertiary' : 'tertiary-white',
|
61
60
|
mode: "label"
|
62
|
-
}, textButton))), React.createElement(S.ButtonCloseWrapper, {
|
61
|
+
}, textButton))), /*#__PURE__*/React.createElement(S.ButtonCloseWrapper, {
|
63
62
|
color: color
|
64
|
-
}, withClose && React.createElement(S.IconCloseWrapper, {
|
63
|
+
}, withClose && /*#__PURE__*/React.createElement(S.IconCloseWrapper, {
|
65
64
|
onClick: onCloseClick,
|
66
65
|
color: color
|
67
|
-
}, React.createElement(Icon, {
|
68
|
-
component: React.createElement(CloseM, null)
|
66
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
67
|
+
component: /*#__PURE__*/React.createElement(CloseM, null)
|
69
68
|
})))));
|
70
69
|
};
|
71
70
|
|
@@ -6,7 +6,7 @@ var getColorBackground = function getColorBackground(props) {
|
|
6
6
|
return props.theme.palette['red-500'];
|
7
7
|
}
|
8
8
|
|
9
|
-
return props.theme.palette[
|
9
|
+
return props.theme.palette[props.color + "-600"];
|
10
10
|
};
|
11
11
|
|
12
12
|
var getColorIcon = function getColorIcon(props) {
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,21 +1,17 @@
|
|
1
|
-
import Icon from '@synerise/ds-icon';
|
2
|
-
import { WarningFillM, InfoFillM, Check3M, HelpFillM } from '@synerise/ds-icon/dist/icons';
|
3
1
|
import * as React from 'react';
|
4
|
-
import UserCheckM from '@synerise/ds-icon
|
5
|
-
import UpdateDataM from '@synerise/ds-icon/dist/icons/UpdateDataM';
|
6
|
-
import NotificationsReceiveM from '@synerise/ds-icon/dist/icons/NotificationsReceiveM';
|
2
|
+
import Icon, { UserCheckM, UpdateDataM, WarningFillM, InfoFillM, Check3M, HelpFillM, NotificationsReceiveM } from '@synerise/ds-icon';
|
7
3
|
import * as S from './AlertSemanticColor.styles';
|
8
4
|
var ICONS = {
|
9
|
-
positive: React.createElement(Check3M, null),
|
10
|
-
notice: React.createElement(WarningFillM, null),
|
11
|
-
negative: React.createElement(WarningFillM, null),
|
12
|
-
informative: React.createElement(InfoFillM, null),
|
13
|
-
neutral: React.createElement(HelpFillM, null),
|
14
|
-
supply: React.createElement(UserCheckM, null),
|
15
|
-
service: React.createElement(UpdateDataM, null),
|
16
|
-
entity: React.createElement(NotificationsReceiveM, null)
|
5
|
+
positive: /*#__PURE__*/React.createElement(Check3M, null),
|
6
|
+
notice: /*#__PURE__*/React.createElement(WarningFillM, null),
|
7
|
+
negative: /*#__PURE__*/React.createElement(WarningFillM, null),
|
8
|
+
informative: /*#__PURE__*/React.createElement(InfoFillM, null),
|
9
|
+
neutral: /*#__PURE__*/React.createElement(HelpFillM, null),
|
10
|
+
supply: /*#__PURE__*/React.createElement(UserCheckM, null),
|
11
|
+
service: /*#__PURE__*/React.createElement(UpdateDataM, null),
|
12
|
+
entity: /*#__PURE__*/React.createElement(NotificationsReceiveM, null)
|
17
13
|
};
|
18
|
-
var DEFAULT_ICON = React.createElement(WarningFillM, null);
|
14
|
+
var DEFAULT_ICON = /*#__PURE__*/React.createElement(WarningFillM, null);
|
19
15
|
|
20
16
|
var AlertSemanticColor = function AlertSemanticColor(_ref) {
|
21
17
|
var icon = _ref.icon,
|
@@ -27,13 +23,13 @@ var AlertSemanticColor = function AlertSemanticColor(_ref) {
|
|
27
23
|
if (ICONS[type]) return ICONS[type];
|
28
24
|
return DEFAULT_ICON;
|
29
25
|
}, [icon, type]);
|
30
|
-
return React.createElement(S.Container, {
|
26
|
+
return /*#__PURE__*/React.createElement(S.Container, {
|
31
27
|
mode: mode,
|
32
28
|
color: color
|
33
|
-
}, React.createElement(S.IconWrapper, {
|
29
|
+
}, /*#__PURE__*/React.createElement(S.IconWrapper, {
|
34
30
|
mode: mode,
|
35
31
|
color: color
|
36
|
-
}, React.createElement(Icon, {
|
32
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
37
33
|
component: renderIcon
|
38
34
|
})));
|
39
35
|
};
|
@@ -5,16 +5,16 @@ var getAlertIconColor = function getAlertIconColor(props) {
|
|
5
5
|
return props.theme.palette.white;
|
6
6
|
}
|
7
7
|
|
8
|
-
return props.theme.palette[
|
8
|
+
return props.theme.palette[props.color + "-600"];
|
9
9
|
};
|
10
10
|
|
11
11
|
var getAlertColor = function getAlertColor(props) {
|
12
12
|
if (props.mode === 'background' || props.mode === 'shadow') {
|
13
|
-
return props.theme.palette[
|
13
|
+
return props.theme.palette[props.color + "-600"];
|
14
14
|
}
|
15
15
|
|
16
16
|
if (props.mode === 'background-outline') {
|
17
|
-
return props.theme.palette[
|
17
|
+
return props.theme.palette[props.color + "-050"];
|
18
18
|
}
|
19
19
|
|
20
20
|
return props.theme.palette.white;
|
@@ -28,9 +28,9 @@ export var Container = styled.div.withConfig({
|
|
28
28
|
displayName: "AlertSemanticColorstyles__Container",
|
29
29
|
componentId: "sc-1rxl2y2-1"
|
30
30
|
})(["width:100px;height:100px;align-items:center;justify-content:center;background-color:", ";border:1px solid ", ";border-radius:4px;-webkit-box-shadow:", ";box-shadow:", ";"], getAlertColor, function (props) {
|
31
|
-
return props.mode === 'background-outline' ? props.theme.palette[
|
31
|
+
return props.mode === 'background-outline' ? props.theme.palette[props.color + "-200"] : 'none';
|
32
32
|
}, function (props) {
|
33
|
-
return props.mode === 'shadow' ? "0px 16px 32px 5px "
|
33
|
+
return props.mode === 'shadow' ? "0px 16px 32px 5px " + props.theme.palette["grey-300"] : 'none';
|
34
34
|
}, function (props) {
|
35
|
-
return props.mode === 'shadow' ? "0px 16px 32px 5px "
|
35
|
+
return props.mode === 'shadow' ? "0px 16px 32px 5px " + props.theme.palette["grey-300"] : 'none';
|
36
36
|
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,18 +1,17 @@
|
|
1
|
-
|
1
|
+
var _excluded = ["type", "iconAlert", "message", "withLink", "withEmphasis", "hoverButton", "disabled"];
|
2
2
|
|
3
|
-
function
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
4
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
6
|
|
7
|
-
import { Check2M, WarningFillM, InfoM } from '@synerise/ds-icon
|
7
|
+
import Icon, { Check2M, WarningFillM, InfoM } from '@synerise/ds-icon';
|
8
8
|
import * as React from 'react';
|
9
|
-
import Icon from '@synerise/ds-icon';
|
10
9
|
import * as S from './IconAlert.styles';
|
11
10
|
var ICONS = {
|
12
|
-
success: React.createElement(Check2M, null),
|
13
|
-
alert: React.createElement(WarningFillM, null),
|
14
|
-
warning: React.createElement(WarningFillM, null),
|
15
|
-
info: React.createElement(InfoM, null)
|
11
|
+
success: /*#__PURE__*/React.createElement(Check2M, null),
|
12
|
+
alert: /*#__PURE__*/React.createElement(WarningFillM, null),
|
13
|
+
warning: /*#__PURE__*/React.createElement(WarningFillM, null),
|
14
|
+
info: /*#__PURE__*/React.createElement(InfoM, null)
|
16
15
|
};
|
17
16
|
|
18
17
|
var IconAlert = function IconAlert(_ref) {
|
@@ -24,19 +23,19 @@ var IconAlert = function IconAlert(_ref) {
|
|
24
23
|
withEmphasis = _ref.withEmphasis,
|
25
24
|
hoverButton = _ref.hoverButton,
|
26
25
|
disabled = _ref.disabled,
|
27
|
-
rest =
|
26
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
28
27
|
|
29
28
|
var icon = React.useMemo(function () {
|
30
29
|
return ICONS[type];
|
31
30
|
}, [type]);
|
32
|
-
return React.createElement(S.IconAlertWrapper, _extends({}, rest, {
|
31
|
+
return /*#__PURE__*/React.createElement(S.IconAlertWrapper, _extends({}, rest, {
|
33
32
|
type: type,
|
34
33
|
disabled: disabled,
|
35
34
|
hoverButton: hoverButton,
|
36
35
|
className: "ds-inline-alert"
|
37
|
-
}), iconAlert && React.createElement(Icon, {
|
36
|
+
}), iconAlert && /*#__PURE__*/React.createElement(Icon, {
|
38
37
|
component: icon
|
39
|
-
}), message && React.createElement(S.Message, null, message, withLink && React.createElement(S.LinkWrapper, null, withLink), withEmphasis && !withLink && React.createElement(S.EmphasisWrapper, null, withEmphasis)));
|
38
|
+
}), message && /*#__PURE__*/React.createElement(S.Message, null, message, withLink && /*#__PURE__*/React.createElement(S.LinkWrapper, null, withLink), withEmphasis && !withLink && /*#__PURE__*/React.createElement(S.EmphasisWrapper, null, withEmphasis)));
|
40
39
|
};
|
41
40
|
|
42
41
|
export default IconAlert;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,12 +1,11 @@
|
|
1
|
-
import { Check2M, WarningFillM, InfoM } from '@synerise/ds-icon/dist/icons';
|
2
1
|
import * as React from 'react';
|
3
|
-
import Icon from '@synerise/ds-icon';
|
2
|
+
import Icon, { Check2M, WarningFillM, InfoM } from '@synerise/ds-icon';
|
4
3
|
import * as S from './InlineAlert.styles';
|
5
4
|
var ICONS = {
|
6
|
-
success: React.createElement(Check2M, null),
|
7
|
-
alert: React.createElement(WarningFillM, null),
|
8
|
-
warning: React.createElement(WarningFillM, null),
|
9
|
-
info: React.createElement(InfoM, null)
|
5
|
+
success: /*#__PURE__*/React.createElement(Check2M, null),
|
6
|
+
alert: /*#__PURE__*/React.createElement(WarningFillM, null),
|
7
|
+
warning: /*#__PURE__*/React.createElement(WarningFillM, null),
|
8
|
+
info: /*#__PURE__*/React.createElement(InfoM, null)
|
10
9
|
};
|
11
10
|
|
12
11
|
var InlineAlert = function InlineAlert(_ref) {
|
@@ -16,12 +15,12 @@ var InlineAlert = function InlineAlert(_ref) {
|
|
16
15
|
var icon = React.useMemo(function () {
|
17
16
|
return ICONS[type];
|
18
17
|
}, [type]);
|
19
|
-
return React.createElement(S.InlineAlertWrapper, {
|
18
|
+
return /*#__PURE__*/React.createElement(S.InlineAlertWrapper, {
|
20
19
|
type: type,
|
21
20
|
className: "ds-inline-alert"
|
22
|
-
}, React.createElement(Icon, {
|
21
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
23
22
|
component: icon
|
24
|
-
}), React.createElement(S.Message, null, message));
|
23
|
+
}), /*#__PURE__*/React.createElement(S.Message, null, message));
|
25
24
|
};
|
26
25
|
|
27
26
|
export default InlineAlert;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,18 +1,17 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { CloseM, WarningFillM, UserAddM, Check3M, HelpFillM, UserUpM, UpdateDataM, NotificationsReceiveM } from '@synerise/ds-icon
|
2
|
+
import Icon, { CloseM, WarningFillM, UserAddM, Check3M, HelpFillM, UserUpM, UpdateDataM, NotificationsReceiveM } from '@synerise/ds-icon';
|
3
3
|
import Button from '@synerise/ds-button';
|
4
|
-
import Icon from '@synerise/ds-icon';
|
5
4
|
import * as S from './SectionMessage.styles';
|
6
5
|
var ICONS = {
|
7
|
-
positive: React.createElement(Check3M, null),
|
8
|
-
notice: React.createElement(WarningFillM, null),
|
9
|
-
negative: React.createElement(WarningFillM, null),
|
10
|
-
neutral: React.createElement(HelpFillM, null),
|
11
|
-
supply: React.createElement(UserUpM, null),
|
12
|
-
service: React.createElement(UpdateDataM, null),
|
13
|
-
entity: React.createElement(NotificationsReceiveM, null)
|
6
|
+
positive: /*#__PURE__*/React.createElement(Check3M, null),
|
7
|
+
notice: /*#__PURE__*/React.createElement(WarningFillM, null),
|
8
|
+
negative: /*#__PURE__*/React.createElement(WarningFillM, null),
|
9
|
+
neutral: /*#__PURE__*/React.createElement(HelpFillM, null),
|
10
|
+
supply: /*#__PURE__*/React.createElement(UserUpM, null),
|
11
|
+
service: /*#__PURE__*/React.createElement(UpdateDataM, null),
|
12
|
+
entity: /*#__PURE__*/React.createElement(NotificationsReceiveM, null)
|
14
13
|
};
|
15
|
-
var DEFAULT_ICON = React.createElement(WarningFillM, null);
|
14
|
+
var DEFAULT_ICON = /*#__PURE__*/React.createElement(WarningFillM, null);
|
16
15
|
|
17
16
|
var SectionMessage = function SectionMessage(_ref) {
|
18
17
|
var icon = _ref.icon,
|
@@ -33,9 +32,9 @@ var SectionMessage = function SectionMessage(_ref) {
|
|
33
32
|
customIcon = _ref.customIcon,
|
34
33
|
textButton = _ref.textButton;
|
35
34
|
var renderMessage = React.useMemo(function () {
|
36
|
-
return React.createElement(S.AlertContent, {
|
35
|
+
return /*#__PURE__*/React.createElement(S.AlertContent, {
|
37
36
|
withLink: withLink
|
38
|
-
}, message && React.createElement(S.AlertMessage, null, message), React.createElement(S.Text, null, description && React.createElement(S.AlertDescription, null, description), withLink && React.createElement(S.LinkWrapper, null, withLink), withEmphasis && !withLink && React.createElement(S.EmphasisWrapper, null, withEmphasis)), onShowMore && showMoreLabel && React.createElement(S.AlertShowMore, {
|
37
|
+
}, message && /*#__PURE__*/React.createElement(S.AlertMessage, null, message), /*#__PURE__*/React.createElement(S.Text, null, description && /*#__PURE__*/React.createElement(S.AlertDescription, null, description), withLink && /*#__PURE__*/React.createElement(S.LinkWrapper, null, withLink), withEmphasis && !withLink && /*#__PURE__*/React.createElement(S.EmphasisWrapper, null, withEmphasis)), onShowMore && showMoreLabel && /*#__PURE__*/React.createElement(S.AlertShowMore, {
|
39
38
|
onClick: onShowMore
|
40
39
|
}, showMoreLabel), moreButtons, unorderedList && !moreButtons && unorderedList);
|
41
40
|
}, [message, description, showMoreLabel, onShowMore, moreButtons, withEmphasis, withLink, unorderedList]);
|
@@ -44,21 +43,21 @@ var SectionMessage = function SectionMessage(_ref) {
|
|
44
43
|
if (ICONS[type]) return ICONS[type];
|
45
44
|
return DEFAULT_ICON;
|
46
45
|
}, [icon, type]);
|
47
|
-
return React.createElement(S.Container, {
|
46
|
+
return /*#__PURE__*/React.createElement(S.Container, {
|
48
47
|
color: color,
|
49
48
|
customColor: customColor
|
50
|
-
}, React.createElement(S.WrapperSectionMessage, null, React.createElement(S.AllContent, null, React.createElement(S.IconWrapper, {
|
49
|
+
}, /*#__PURE__*/React.createElement(S.WrapperSectionMessage, null, /*#__PURE__*/React.createElement(S.AllContent, null, /*#__PURE__*/React.createElement(S.IconWrapper, {
|
51
50
|
color: color,
|
52
51
|
customColorIcon: customColorIcon
|
53
|
-
}, customIcon || React.createElement(Icon, {
|
52
|
+
}, customIcon || /*#__PURE__*/React.createElement(Icon, {
|
54
53
|
component: renderIcon
|
55
|
-
})), renderMessage), React.createElement(S.ButtonWrapper, null, newClient && React.createElement(Button, {
|
54
|
+
})), renderMessage), /*#__PURE__*/React.createElement(S.ButtonWrapper, null, newClient && /*#__PURE__*/React.createElement(Button, {
|
56
55
|
type: "ghost",
|
57
56
|
mode: "icon-label"
|
58
|
-
}, React.createElement(Icon, {
|
59
|
-
component: React.createElement(UserAddM, null)
|
60
|
-
}), textButton), withClose && React.createElement(S.IconCloseWrapper, null, React.createElement(Icon, {
|
61
|
-
component: React.createElement(CloseM, null)
|
57
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
58
|
+
component: /*#__PURE__*/React.createElement(UserAddM, null)
|
59
|
+
}), textButton), withClose && /*#__PURE__*/React.createElement(S.IconCloseWrapper, null, /*#__PURE__*/React.createElement(Icon, {
|
60
|
+
component: /*#__PURE__*/React.createElement(CloseM, null)
|
62
61
|
})))));
|
63
62
|
};
|
64
63
|
|
@@ -17,9 +17,9 @@ export var IconWrapper = styled.div.withConfig({
|
|
17
17
|
displayName: "SectionMessagestyles__IconWrapper",
|
18
18
|
componentId: "sc-1kuq4h0-3"
|
19
19
|
})(["margin:10px 12px;display:flex;svg{color:", ";fill:", ";}"], function (props) {
|
20
|
-
return props.customColorIcon ? props.theme.palette[
|
20
|
+
return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : props.theme.palette[props.color + "-600"];
|
21
21
|
}, function (props) {
|
22
|
-
return props.customColorIcon ? props.theme.palette[
|
22
|
+
return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : props.theme.palette[props.color + "-600"];
|
23
23
|
});
|
24
24
|
export var IconCloseWrapper = styled.div.withConfig({
|
25
25
|
displayName: "SectionMessagestyles__IconCloseWrapper",
|
@@ -75,11 +75,11 @@ export var Container = styled.div.withConfig({
|
|
75
75
|
displayName: "SectionMessagestyles__Container",
|
76
76
|
componentId: "sc-1kuq4h0-12"
|
77
77
|
})(["width:100%;align-items:center;justify-content:center;background-color:", ";border:1px solid ", ";border-top:2px solid ", ";border-radius:2px;"], function (props) {
|
78
|
-
return props.customColor ? props.theme.palette[
|
78
|
+
return props.customColor ? props.theme.palette[props.customColor + "-050"] : props.theme.palette[props.color + "-050"];
|
79
79
|
}, function (props) {
|
80
|
-
return props.customColor ? props.theme.palette[
|
80
|
+
return props.customColor ? props.theme.palette[props.customColor + "-200"] : props.theme.palette[props.color + "-200"];
|
81
81
|
}, function (props) {
|
82
|
-
return props.customColor ? props.theme.palette[
|
82
|
+
return props.customColor ? props.theme.palette[props.customColor + "-600"] : props.theme.palette[props.color + "-600"];
|
83
83
|
});
|
84
84
|
export var WrapperSectionMessage = styled.div.withConfig({
|
85
85
|
displayName: "SectionMessagestyles__WrapperSectionMessage",
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/Toast/Toast.js
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { CloseM, WarningFillM, Check3M, HelpFillM, InfoFillM, AngleDownS } from '@synerise/ds-icon
|
3
|
-
import Icon from '@synerise/ds-icon';
|
2
|
+
import Icon, { CloseM, WarningFillM, Check3M, HelpFillM, InfoFillM, AngleDownS } from '@synerise/ds-icon';
|
4
3
|
import * as S from './Toast.styles';
|
5
4
|
var ICONS = {
|
6
|
-
success: React.createElement(Check3M, null),
|
7
|
-
warning: React.createElement(WarningFillM, null),
|
8
|
-
negative: React.createElement(WarningFillM, null),
|
9
|
-
neutral: React.createElement(HelpFillM, null),
|
10
|
-
informative: React.createElement(InfoFillM, null)
|
5
|
+
success: /*#__PURE__*/React.createElement(Check3M, null),
|
6
|
+
warning: /*#__PURE__*/React.createElement(WarningFillM, null),
|
7
|
+
negative: /*#__PURE__*/React.createElement(WarningFillM, null),
|
8
|
+
neutral: /*#__PURE__*/React.createElement(HelpFillM, null),
|
9
|
+
informative: /*#__PURE__*/React.createElement(InfoFillM, null)
|
11
10
|
};
|
12
|
-
var DEFAULT_ICON = React.createElement(WarningFillM, null);
|
11
|
+
var DEFAULT_ICON = /*#__PURE__*/React.createElement(WarningFillM, null);
|
13
12
|
|
14
13
|
var Toast = function Toast(_ref) {
|
15
14
|
var icon = _ref.icon,
|
@@ -31,18 +30,18 @@ var Toast = function Toast(_ref) {
|
|
31
30
|
show = _ref.show,
|
32
31
|
button = _ref.button;
|
33
32
|
var renderMessage = React.useMemo(function () {
|
34
|
-
return React.createElement(S.AlertContent, null, message && React.createElement(S.AlertMessage, {
|
33
|
+
return /*#__PURE__*/React.createElement(S.AlertContent, null, message && /*#__PURE__*/React.createElement(S.AlertMessage, {
|
35
34
|
customColorText: customColorText,
|
36
35
|
color: color
|
37
|
-
}, message), React.createElement(S.Text, {
|
36
|
+
}, message), /*#__PURE__*/React.createElement(S.Text, {
|
38
37
|
customColorText: customColorText,
|
39
38
|
color: color
|
40
|
-
}, description && React.createElement(S.AlertDescription, {
|
39
|
+
}, description && /*#__PURE__*/React.createElement(S.AlertDescription, {
|
41
40
|
expandedContent: expandedContent,
|
42
41
|
button: button,
|
43
42
|
customColorText: customColorText,
|
44
43
|
color: color
|
45
|
-
}, description)), expandedContent && expanded && React.createElement(S.ListWrapper, {
|
44
|
+
}, description)), expandedContent && expanded && /*#__PURE__*/React.createElement(S.ListWrapper, {
|
46
45
|
description: description,
|
47
46
|
visible: expanded
|
48
47
|
}, expandedContent), button);
|
@@ -55,7 +54,7 @@ var Toast = function Toast(_ref) {
|
|
55
54
|
var expandContent = React.useCallback(function () {
|
56
55
|
onExpand && onExpand(!expanded);
|
57
56
|
}, [onExpand, expanded]);
|
58
|
-
return React.createElement(S.Container, {
|
57
|
+
return /*#__PURE__*/React.createElement(S.Container, {
|
59
58
|
expander: expander,
|
60
59
|
expandedContent: expandedContent,
|
61
60
|
withClose: withClose,
|
@@ -63,25 +62,25 @@ var Toast = function Toast(_ref) {
|
|
63
62
|
onCloseClick: onCloseClick,
|
64
63
|
color: color,
|
65
64
|
customColor: customColor
|
66
|
-
}, React.createElement(S.WrapperSectionMessage, null, React.createElement(S.AllContent, null, React.createElement(S.IconWrapper, {
|
65
|
+
}, /*#__PURE__*/React.createElement(S.WrapperSectionMessage, null, /*#__PURE__*/React.createElement(S.AllContent, null, /*#__PURE__*/React.createElement(S.IconWrapper, {
|
67
66
|
colorIcon: colorIcon,
|
68
67
|
customColorIcon: customColorIcon
|
69
|
-
}, customIcon || React.createElement(Icon, {
|
68
|
+
}, customIcon || /*#__PURE__*/React.createElement(Icon, {
|
70
69
|
component: renderIcon
|
71
|
-
})), renderMessage), React.createElement(S.ButtonWrapper, null, expander && React.createElement(S.IconExpanderWrapper, {
|
70
|
+
})), renderMessage), /*#__PURE__*/React.createElement(S.ButtonWrapper, null, expander && /*#__PURE__*/React.createElement(S.IconExpanderWrapper, {
|
72
71
|
onClick: expandContent,
|
73
72
|
expanded: expanded,
|
74
73
|
customColorText: customColorText,
|
75
74
|
color: color
|
76
|
-
}, React.createElement(Icon, {
|
77
|
-
component: React.createElement(AngleDownS, null),
|
75
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
76
|
+
component: /*#__PURE__*/React.createElement(AngleDownS, null),
|
78
77
|
size: 24
|
79
|
-
})), withClose && React.createElement(S.IconCloseWrapper, {
|
78
|
+
})), withClose && /*#__PURE__*/React.createElement(S.IconCloseWrapper, {
|
80
79
|
onClick: onCloseClick,
|
81
80
|
customColorText: customColorText,
|
82
81
|
color: color
|
83
|
-
}, React.createElement(Icon, {
|
84
|
-
component: React.createElement(CloseM, null)
|
82
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
83
|
+
component: /*#__PURE__*/React.createElement(CloseM, null)
|
85
84
|
})))));
|
86
85
|
};
|
87
86
|
|
@@ -45,7 +45,7 @@ var getColorBackground = function getColorBackground(props) {
|
|
45
45
|
return props.theme.palette['red-500'];
|
46
46
|
|
47
47
|
default:
|
48
|
-
return props.theme.palette[
|
48
|
+
return props.theme.palette[props.color + "-600"];
|
49
49
|
}
|
50
50
|
};
|
51
51
|
|
@@ -75,27 +75,27 @@ export var Text = styled.div.withConfig({
|
|
75
75
|
displayName: "Toaststyles__Text",
|
76
76
|
componentId: "q5tn0-2"
|
77
77
|
})(["display:flex;color:", ";"], function (props) {
|
78
|
-
return props.customColorText ? props.theme.palette[
|
78
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
79
79
|
});
|
80
80
|
export var IconWrapper = styled.div.withConfig({
|
81
81
|
displayName: "Toaststyles__IconWrapper",
|
82
82
|
componentId: "q5tn0-3"
|
83
83
|
})(["margin:10px 12px;display:flex;svg{color:", ";fill:", ";}"], function (props) {
|
84
|
-
return props.customColorIcon ? props.theme.palette[
|
84
|
+
return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : getColorIcon;
|
85
85
|
}, function (props) {
|
86
|
-
return props.customColorIcon ? props.theme.palette[
|
86
|
+
return props.customColorIcon ? props.theme.palette[props.customColorIcon + "-600"] : getColorIcon;
|
87
87
|
});
|
88
88
|
export var IconCloseWrapper = styled.div.withConfig({
|
89
89
|
displayName: "Toaststyles__IconCloseWrapper",
|
90
90
|
componentId: "q5tn0-4"
|
91
91
|
})(["margin:3px 5px 2px;cursor:pointer;svg{fill:", ";}"], function (props) {
|
92
|
-
return props.customColorText ? props.theme.palette[
|
92
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
93
93
|
});
|
94
94
|
export var IconExpanderWrapper = styled.div.withConfig({
|
95
95
|
displayName: "Toaststyles__IconExpanderWrapper",
|
96
96
|
componentId: "q5tn0-5"
|
97
97
|
})(["margin:3px 5px 2px;cursor:pointer;svg{fill:", ";transition:transform 0.1s linear;transform:rotateZ(", ");}"], function (props) {
|
98
|
-
return props.customColorText ? props.theme.palette[
|
98
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
99
99
|
}, function (props) {
|
100
100
|
return props.expanded ? '180deg' : '0deg';
|
101
101
|
});
|
@@ -113,7 +113,7 @@ export var NumberWrapper = styled.div.withConfig({
|
|
113
113
|
})(["margin-left:4px;color:inherit;opacity:0.6;cursor:pointer;&:hover{background-image:linear-gradient( to right,", " 20%,rgba(255,255,255,0) 10% );background-color:transparent;background-position:bottom left;background-size:5px 1px;background-repeat:repeat-x;opacity:1;color:", ";}"], function (props) {
|
114
114
|
return props.theme.palette['grey-400'];
|
115
115
|
}, function (props) {
|
116
|
-
return props.customColorText ? props.theme.palette[
|
116
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
117
117
|
});
|
118
118
|
export var ListWrapper = styled.div.withConfig({
|
119
119
|
displayName: "Toaststyles__ListWrapper",
|
@@ -125,7 +125,7 @@ export var IconOrderWrapper = styled.div.withConfig({
|
|
125
125
|
displayName: "Toaststyles__IconOrderWrapper",
|
126
126
|
componentId: "q5tn0-10"
|
127
127
|
})(["display:none;margin:-4px 0;svg{fill:", ";}&:hover{svg{fill:", ";cursor:pointer;}}"], function (props) {
|
128
|
-
return props.customColorText ? props.theme.palette[
|
128
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
129
129
|
}, function (props) {
|
130
130
|
return props.theme.palette['blue-600'];
|
131
131
|
});
|
@@ -133,11 +133,11 @@ export var OrderWrapper = styled.div.withConfig({
|
|
133
133
|
displayName: "Toaststyles__OrderWrapper",
|
134
134
|
componentId: "q5tn0-11"
|
135
135
|
})(["display:flex;color:", ";&:hover{", "{display:block;}", "{background-image:linear-gradient( to right,", " 20%,rgba(255,255,255,0) 10% );background-color:transparent;background-position:bottom left;background-size:5px 1px;background-repeat:repeat-x;opacity:1;color:", ";}}"], function (props) {
|
136
|
-
return props.customColorText ? props.theme.palette[
|
136
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
137
137
|
}, IconOrderWrapper, NumberWrapper, function (props) {
|
138
|
-
return props.customColorText ? props.theme.palette[
|
138
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
139
139
|
}, function (props) {
|
140
|
-
return props.customColorText ? props.theme.palette[
|
140
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
141
141
|
});
|
142
142
|
export var Wrapper = styled.div.withConfig({
|
143
143
|
displayName: "Toaststyles__Wrapper",
|
@@ -157,9 +157,9 @@ export var Container = styled.div.withConfig({
|
|
157
157
|
})(["width:", ";align-items:center;justify-content:center;background-color:", ";border-radius:4px;box-shadow:", ";"], function (props) {
|
158
158
|
return props.expander && props.expandedContent && props.withClose ? '460px' : getWidth(props);
|
159
159
|
}, function (props) {
|
160
|
-
return props.customColor ? props.theme.palette[
|
160
|
+
return props.customColor ? props.theme.palette[props.customColor + "-600"] : getColorBackground(props);
|
161
161
|
}, function (props) {
|
162
|
-
return props.color ? "0px 16px 32px 5px "
|
162
|
+
return props.color ? "0px 16px 32px 5px " + props.theme.palette["grey-200"] : 'none';
|
163
163
|
});
|
164
164
|
export var WrapperSectionMessage = styled.div.withConfig({
|
165
165
|
displayName: "Toaststyles__WrapperSectionMessage",
|
@@ -169,7 +169,7 @@ export var AlertMessage = styled.span.withConfig({
|
|
169
169
|
displayName: "Toaststyles__AlertMessage",
|
170
170
|
componentId: "q5tn0-16"
|
171
171
|
})(["font-size:16px;line-height:1.25;font-weight:500;max-width:400px;overflow:hidden;text-overflow:ellipsis;color:", ";"], function (props) {
|
172
|
-
return props.customColorText ? props.theme.palette[
|
172
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
173
173
|
});
|
174
174
|
export var AlertDescription = styled.span.withConfig({
|
175
175
|
displayName: "Toaststyles__AlertDescription",
|
@@ -177,5 +177,5 @@ export var AlertDescription = styled.span.withConfig({
|
|
177
177
|
})(["display:flex;font-size:13px;line-height:1.39;font-weight:normal;padding:", ";margin-top:2px;color:", ";"], function (props) {
|
178
178
|
return props.button || props.expandedContent ? ' 0 3px 10px 0' : '0px';
|
179
179
|
}, function (props) {
|
180
|
-
return props.customColorText ? props.theme.palette[
|
180
|
+
return props.customColorText ? props.theme.palette[props.customColorText + "-600"] : getColorText(props);
|
181
181
|
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@synerise/ds-alert",
|
3
|
-
"version": "0.3
|
3
|
+
"version": "0.4.3",
|
4
4
|
"description": "Alert UI Component for the Synerise Design System",
|
5
5
|
"license": "ISC",
|
6
6
|
"repository": "Synerise/synerise-design",
|
@@ -32,10 +32,10 @@
|
|
32
32
|
],
|
33
33
|
"types": "dist/index.d.ts",
|
34
34
|
"dependencies": {
|
35
|
-
"@synerise/ds-button": "^0.
|
36
|
-
"@synerise/ds-icon": "^0.
|
37
|
-
"@synerise/ds-typography": "^0.
|
38
|
-
"@synerise/ds-unordered-list": "^0.
|
35
|
+
"@synerise/ds-button": "^0.16.3",
|
36
|
+
"@synerise/ds-icon": "^0.46.2",
|
37
|
+
"@synerise/ds-typography": "^0.12.2",
|
38
|
+
"@synerise/ds-unordered-list": "^0.2.3",
|
39
39
|
"animate.css": "^4.1.1",
|
40
40
|
"react-animate-height": "^2.0.23",
|
41
41
|
"react-mount-animation": "0.0.9"
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"devDependencies": {
|
48
48
|
"@synerise/ds-utils": "^0.19.0"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "a89cd14cdbe25b06949b3b9763e58a080111c160"
|
51
51
|
}
|