@vitality-ds/components 5.4.0 → 5.5.0
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/dist/Button/primitives/styles/BaseButton.styles.js +43 -1
- package/dist/Callout/components/CalloutDescription/styles/BaseCalloutDescription.styles.js +24 -1
- package/dist/Callout/constants.js +32 -0
- package/dist/Callout/hooks/useCalloutContent.js +6 -2
- package/dist/Callout/index.js +52 -14
- package/dist/Callout/styled.js +3 -1
- package/dist/Callout/styles/BaseCallout.styles.js +57 -1
- package/dist/Callout/styles/BaseCalloutActions.styles.js +10 -1
- package/dist/Callout/styles/BaseCalloutIconContainer.styles.js +12 -0
- package/dist/Callout/styles/BaseCalloutTitleContainer.styles.js +10 -0
- package/dist/Spinner/styles/BaseSpinnerCircle.styles.js +6 -0
- package/dist/components/src/Button/logic.d.ts +12 -12
- package/dist/components/src/Button/primitives/styled.d.ts +2 -0
- package/dist/components/src/Button/primitives/styles/BaseButton.styles.d.ts +2 -0
- package/dist/components/src/Callout/components/CalloutDescription/styled.d.ts +7 -0
- package/dist/components/src/Callout/components/CalloutDescription/styles/BaseCalloutDescription.styles.d.ts +7 -0
- package/dist/components/src/Callout/components/CalloutDescription/types.d.ts +3 -1
- package/dist/components/src/Callout/styled.d.ts +826 -6
- package/dist/components/src/Callout/styles/BaseCallout.styles.d.ts +8 -0
- package/dist/components/src/Callout/styles/BaseCalloutActions.styles.d.ts +16 -1
- package/dist/components/src/Callout/styles/BaseCalloutIconContainer.styles.d.ts +396 -0
- package/dist/components/src/Callout/styles/BaseCalloutTitleContainer.styles.d.ts +8 -0
- package/dist/components/src/Callout/types.d.ts +4 -0
- package/dist/components/src/Link/styled.d.ts +2 -0
- package/dist/components/src/Spinner/styled.d.ts +6 -0
- package/dist/components/src/Spinner/styles/BaseSpinnerCircle.styles.d.ts +6 -0
- package/dist/esm/Button/primitives/styles/BaseButton.styles.js +43 -1
- package/dist/esm/Callout/components/CalloutDescription/styles/BaseCalloutDescription.styles.js +24 -1
- package/dist/esm/Callout/constants.js +33 -1
- package/dist/esm/Callout/hooks/useCalloutContent.js +6 -2
- package/dist/esm/Callout/index.js +53 -15
- package/dist/esm/Callout/styled.js +2 -0
- package/dist/esm/Callout/styles/BaseCallout.styles.js +57 -1
- package/dist/esm/Callout/styles/BaseCalloutActions.styles.js +10 -1
- package/dist/esm/Callout/styles/BaseCalloutIconContainer.styles.js +7 -0
- package/dist/esm/Callout/styles/BaseCalloutTitleContainer.styles.js +9 -0
- package/dist/esm/Spinner/styles/BaseSpinnerCircle.styles.js +6 -0
- package/dist/icons/src/Icon/styled.d.ts +3 -0
- package/dist/icons/src/Icon/styles/BaseIcon.styles.d.ts +3 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -58,7 +58,9 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
58
58
|
critical: {},
|
|
59
59
|
success: {},
|
|
60
60
|
warning: {},
|
|
61
|
-
info: {}
|
|
61
|
+
info: {},
|
|
62
|
+
brand: {},
|
|
63
|
+
accent: {}
|
|
62
64
|
},
|
|
63
65
|
/**
|
|
64
66
|
* The size of the button
|
|
@@ -110,6 +112,14 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
110
112
|
color: "info",
|
|
111
113
|
variant: "subtle",
|
|
112
114
|
css: (0, _helpers.getSubtleVariant)("info")
|
|
115
|
+
}, {
|
|
116
|
+
color: "brand",
|
|
117
|
+
variant: "subtle",
|
|
118
|
+
css: (0, _helpers.getSubtleVariant)("brand")
|
|
119
|
+
}, {
|
|
120
|
+
color: "accent",
|
|
121
|
+
variant: "subtle",
|
|
122
|
+
css: (0, _helpers.getSubtleVariant)("accent")
|
|
113
123
|
},
|
|
114
124
|
/**
|
|
115
125
|
* OnSurface Variants
|
|
@@ -141,6 +151,14 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
141
151
|
color: "info",
|
|
142
152
|
variant: "onSurface",
|
|
143
153
|
css: (0, _helpers.getOnSurfaceVariant)("info")
|
|
154
|
+
}, {
|
|
155
|
+
color: "brand",
|
|
156
|
+
variant: "onSurface",
|
|
157
|
+
css: (0, _helpers.getOnSurfaceVariant)("brand")
|
|
158
|
+
}, {
|
|
159
|
+
color: "accent",
|
|
160
|
+
variant: "onSurface",
|
|
161
|
+
css: (0, _helpers.getOnSurfaceVariant)("accent")
|
|
144
162
|
},
|
|
145
163
|
/**
|
|
146
164
|
* Ghost Variants
|
|
@@ -169,6 +187,14 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
169
187
|
color: "info",
|
|
170
188
|
variant: "ghost",
|
|
171
189
|
css: (0, _helpers.getGhostVariant)("info")
|
|
190
|
+
}, {
|
|
191
|
+
color: "brand",
|
|
192
|
+
variant: "ghost",
|
|
193
|
+
css: (0, _helpers.getGhostVariant)("brand")
|
|
194
|
+
}, {
|
|
195
|
+
color: "accent",
|
|
196
|
+
variant: "ghost",
|
|
197
|
+
css: (0, _helpers.getGhostVariant)("accent")
|
|
172
198
|
},
|
|
173
199
|
/**
|
|
174
200
|
* Link Variants
|
|
@@ -197,6 +223,14 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
197
223
|
color: "info",
|
|
198
224
|
variant: "link",
|
|
199
225
|
css: (0, _helpers.getLinkVariant)("info")
|
|
226
|
+
}, {
|
|
227
|
+
color: "brand",
|
|
228
|
+
variant: "link",
|
|
229
|
+
css: (0, _helpers.getLinkVariant)("brand")
|
|
230
|
+
}, {
|
|
231
|
+
color: "accent",
|
|
232
|
+
variant: "link",
|
|
233
|
+
css: (0, _helpers.getLinkVariant)("accent")
|
|
200
234
|
},
|
|
201
235
|
/**
|
|
202
236
|
* Solid Variants
|
|
@@ -225,5 +259,13 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
225
259
|
color: "info",
|
|
226
260
|
variant: "solid",
|
|
227
261
|
css: (0, _helpers.getColorVariant)("info")
|
|
262
|
+
}, {
|
|
263
|
+
color: "brand",
|
|
264
|
+
variant: "solid",
|
|
265
|
+
css: (0, _helpers.getColorVariant)("brand")
|
|
266
|
+
}, {
|
|
267
|
+
color: "accent",
|
|
268
|
+
variant: "solid",
|
|
269
|
+
css: (0, _helpers.getColorVariant)("accent")
|
|
228
270
|
}]
|
|
229
271
|
});
|
|
@@ -20,13 +20,20 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
20
20
|
fontWeight: "$caption",
|
|
21
21
|
lineHeight: "$caption"
|
|
22
22
|
},
|
|
23
|
+
blockCompact: {
|
|
24
|
+
display: "inline"
|
|
25
|
+
},
|
|
23
26
|
"default": {}
|
|
24
27
|
},
|
|
25
28
|
severity: {
|
|
26
29
|
info: (0, _helpers.getTextColorVariant)("info"),
|
|
27
30
|
critical: (0, _helpers.getTextColorVariant)("critical"),
|
|
28
31
|
success: (0, _helpers.getTextColorVariant)("success"),
|
|
29
|
-
warning: (0, _helpers.getTextColorVariant)("warning")
|
|
32
|
+
warning: (0, _helpers.getTextColorVariant)("warning"),
|
|
33
|
+
accent: (0, _helpers.getTextColorVariant)("accent"),
|
|
34
|
+
brand: (0, _helpers.getTextColorVariant)("brand"),
|
|
35
|
+
primary: (0, _helpers.getTextColorVariant)("primary"),
|
|
36
|
+
neutral: (0, _helpers.getTextColorVariant)("neutral")
|
|
30
37
|
},
|
|
31
38
|
hideTitle: {
|
|
32
39
|
"true": {}
|
|
@@ -55,5 +62,21 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
55
62
|
size: "compact",
|
|
56
63
|
severity: "warning",
|
|
57
64
|
css: (0, _helpers.getCompactTextColorVariant)("warning")
|
|
65
|
+
}, {
|
|
66
|
+
size: "compact",
|
|
67
|
+
severity: "accent",
|
|
68
|
+
css: (0, _helpers.getCompactTextColorVariant)("accent")
|
|
69
|
+
}, {
|
|
70
|
+
size: "compact",
|
|
71
|
+
severity: "brand",
|
|
72
|
+
css: (0, _helpers.getCompactTextColorVariant)("brand")
|
|
73
|
+
}, {
|
|
74
|
+
size: "compact",
|
|
75
|
+
severity: "primary",
|
|
76
|
+
css: (0, _helpers.getCompactTextColorVariant)("primary")
|
|
77
|
+
}, {
|
|
78
|
+
size: "compact",
|
|
79
|
+
severity: "neutral",
|
|
80
|
+
css: (0, _helpers.getCompactTextColorVariant)("neutral")
|
|
58
81
|
}]
|
|
59
82
|
});
|
|
@@ -10,25 +10,57 @@ var DEFAULT_CONTENT = exports.DEFAULT_CONTENT = {
|
|
|
10
10
|
success: {
|
|
11
11
|
icon: _icons.Completed,
|
|
12
12
|
title: "Success",
|
|
13
|
+
titleColor: "$colors$success10",
|
|
13
14
|
spinnerColor: "success",
|
|
14
15
|
iconColor: "success"
|
|
15
16
|
},
|
|
16
17
|
info: {
|
|
17
18
|
icon: _icons.Info,
|
|
18
19
|
title: "Information",
|
|
20
|
+
titleColor: "$colors$info10",
|
|
19
21
|
spinnerColor: "info",
|
|
20
22
|
iconColor: "info"
|
|
21
23
|
},
|
|
22
24
|
warning: {
|
|
23
25
|
icon: _icons.Alert,
|
|
24
26
|
title: "Warning",
|
|
27
|
+
titleColor: "$colors$warning10",
|
|
25
28
|
spinnerColor: "warning",
|
|
26
29
|
iconColor: "warning"
|
|
27
30
|
},
|
|
28
31
|
critical: {
|
|
29
32
|
icon: _icons.Error,
|
|
30
33
|
title: "Critical",
|
|
34
|
+
titleColor: "$colors$critical10",
|
|
31
35
|
spinnerColor: "critical",
|
|
32
36
|
iconColor: "critical"
|
|
37
|
+
},
|
|
38
|
+
accent: {
|
|
39
|
+
icon: _icons.Info,
|
|
40
|
+
title: "Information",
|
|
41
|
+
titleColor: "$colors$accent10",
|
|
42
|
+
spinnerColor: "accent",
|
|
43
|
+
iconColor: "accent"
|
|
44
|
+
},
|
|
45
|
+
brand: {
|
|
46
|
+
icon: _icons.GentuLogo,
|
|
47
|
+
title: "Brand",
|
|
48
|
+
titleColor: "$colors$brand10",
|
|
49
|
+
spinnerColor: "brand",
|
|
50
|
+
iconColor: "brand"
|
|
51
|
+
},
|
|
52
|
+
primary: {
|
|
53
|
+
icon: _icons.Info,
|
|
54
|
+
title: "Information",
|
|
55
|
+
titleColor: "$colors$primary10",
|
|
56
|
+
spinnerColor: "primary",
|
|
57
|
+
iconColor: "primary"
|
|
58
|
+
},
|
|
59
|
+
neutral: {
|
|
60
|
+
icon: _icons.Info,
|
|
61
|
+
title: "Information",
|
|
62
|
+
titleColor: "$colors$neutral12",
|
|
63
|
+
spinnerColor: "neutral",
|
|
64
|
+
iconColor: "lowContrast"
|
|
33
65
|
}
|
|
34
66
|
};
|
|
@@ -12,18 +12,22 @@ var useCalloutContent = function useCalloutContent(_ref) {
|
|
|
12
12
|
icon = _ref.icon;
|
|
13
13
|
var _getDefaultContent = (0, _logic.getDefaultContent)(severity),
|
|
14
14
|
defaultTitle = _getDefaultContent.title,
|
|
15
|
+
titleColor = _getDefaultContent.titleColor,
|
|
15
16
|
defaultIcon = _getDefaultContent.icon,
|
|
16
17
|
iconColor = _getDefaultContent.iconColor,
|
|
17
18
|
spinnerColor = _getDefaultContent.spinnerColor;
|
|
18
|
-
var
|
|
19
|
+
var isCompactLayout = size === "compact" || size === "blockCompact";
|
|
20
|
+
var iconSize = isCompactLayout ? "sm" : "md";
|
|
19
21
|
var titleToDisplay = title || defaultTitle;
|
|
20
22
|
var iconToDisplay = icon || defaultIcon;
|
|
21
23
|
return {
|
|
22
24
|
titleToDisplay: titleToDisplay,
|
|
25
|
+
titleColor: titleColor,
|
|
23
26
|
iconToDisplay: iconToDisplay,
|
|
24
27
|
iconColor: iconColor,
|
|
25
28
|
spinnerColor: spinnerColor,
|
|
26
|
-
iconSize: iconSize
|
|
29
|
+
iconSize: iconSize,
|
|
30
|
+
isCompactLayout: isCompactLayout
|
|
27
31
|
};
|
|
28
32
|
};
|
|
29
33
|
var _default = exports["default"] = useCalloutContent;
|
package/dist/Callout/index.js
CHANGED
|
@@ -33,37 +33,75 @@ function Callout(_ref) {
|
|
|
33
33
|
icon: icon
|
|
34
34
|
}),
|
|
35
35
|
titleToDisplay = _useCalloutContent.titleToDisplay,
|
|
36
|
+
titleColor = _useCalloutContent.titleColor,
|
|
36
37
|
iconToDisplay = _useCalloutContent.iconToDisplay,
|
|
37
38
|
iconColor = _useCalloutContent.iconColor,
|
|
38
39
|
spinnerColor = _useCalloutContent.spinnerColor,
|
|
39
|
-
iconSize = _useCalloutContent.iconSize
|
|
40
|
+
iconSize = _useCalloutContent.iconSize,
|
|
41
|
+
isCompactLayout = _useCalloutContent.isCompactLayout;
|
|
40
42
|
var IconComponent = iconToDisplay;
|
|
41
43
|
var commonButtonProps = {
|
|
42
44
|
color: severity,
|
|
43
45
|
spinnerColor: spinnerColor,
|
|
44
46
|
size: "compact"
|
|
45
47
|
};
|
|
48
|
+
var getTitleContent = function getTitleContent() {
|
|
49
|
+
if (hideTitle) {
|
|
50
|
+
return /*#__PURE__*/_react["default"].createElement(_CalloutDescription["default"], {
|
|
51
|
+
hideTitle: hideTitle,
|
|
52
|
+
size: size,
|
|
53
|
+
severity: severity,
|
|
54
|
+
content: description
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (size === "compact") {
|
|
58
|
+
return /*#__PURE__*/_react["default"].createElement(_CalloutDescription["default"], {
|
|
59
|
+
hideTitle: hideTitle,
|
|
60
|
+
size: size,
|
|
61
|
+
severity: severity,
|
|
62
|
+
content: description
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (size === "blockCompact") {
|
|
66
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
67
|
+
color: titleColor,
|
|
68
|
+
variant: "display200"
|
|
69
|
+
}, titleToDisplay), /*#__PURE__*/_react["default"].createElement(_CalloutDescription["default"], {
|
|
70
|
+
hideTitle: hideTitle,
|
|
71
|
+
size: size,
|
|
72
|
+
severity: severity,
|
|
73
|
+
content: description
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
return /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
77
|
+
color: titleColor,
|
|
78
|
+
variant: "display300"
|
|
79
|
+
}, titleToDisplay);
|
|
80
|
+
};
|
|
81
|
+
var getIconContent = function getIconContent() {
|
|
82
|
+
if (size === "blockCompact") {
|
|
83
|
+
return /*#__PURE__*/_react["default"].createElement(_styled.BaseCalloutIconContainer, null, /*#__PURE__*/_react["default"].createElement(IconComponent, {
|
|
84
|
+
size: iconSize,
|
|
85
|
+
color: iconColor
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
return /*#__PURE__*/_react["default"].createElement(IconComponent, {
|
|
89
|
+
size: iconSize,
|
|
90
|
+
color: iconColor
|
|
91
|
+
});
|
|
92
|
+
};
|
|
46
93
|
return /*#__PURE__*/_react["default"].createElement(_styled.BaseCallout, {
|
|
47
94
|
role: "alert",
|
|
48
95
|
size: size,
|
|
49
96
|
severity: severity
|
|
50
97
|
}, /*#__PURE__*/_react["default"].createElement(_styled.BaseCalloutTitleContainer, {
|
|
51
98
|
size: size
|
|
52
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
53
|
-
size: iconSize,
|
|
54
|
-
color: iconColor
|
|
55
|
-
}), hideTitle || size === "compact" ? /*#__PURE__*/_react["default"].createElement(_CalloutDescription["default"], {
|
|
56
|
-
hideTitle: hideTitle,
|
|
57
|
-
size: size,
|
|
99
|
+
}, getIconContent(), getTitleContent()), !isCompactLayout && !hideTitle && /*#__PURE__*/_react["default"].createElement(_CalloutDescription["default"], {
|
|
58
100
|
severity: severity,
|
|
59
101
|
content: description
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, titleToDisplay)), size !== "compact" && !hideTitle && /*#__PURE__*/_react["default"].createElement(_CalloutDescription["default"], {
|
|
64
|
-
severity: severity,
|
|
65
|
-
content: description
|
|
66
|
-
}), actions && size !== "compact" && /*#__PURE__*/_react["default"].createElement(_styled.BaseCalloutActions, null, secondary && /*#__PURE__*/_react["default"].createElement(_primitives["default"], (0, _extends2["default"])({
|
|
102
|
+
}), actions && size !== "compact" && /*#__PURE__*/_react["default"].createElement(_styled.BaseCalloutActions, {
|
|
103
|
+
size: size
|
|
104
|
+
}, secondary && /*#__PURE__*/_react["default"].createElement(_primitives["default"], (0, _extends2["default"])({
|
|
67
105
|
onClick: secondary.onClick,
|
|
68
106
|
variant: "ghost",
|
|
69
107
|
iconRight: secondary.icon,
|
package/dist/Callout/styled.js
CHANGED
|
@@ -4,11 +4,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.BaseCalloutTitleContainer = exports.BaseCalloutActions = exports.BaseCallout = void 0;
|
|
7
|
+
exports.BaseCalloutTitleContainer = exports.BaseCalloutIconContainer = exports.BaseCalloutActions = exports.BaseCallout = void 0;
|
|
8
8
|
var _system = require("@vitality-ds/system");
|
|
9
9
|
var _BaseCallout = _interopRequireDefault(require("./styles/BaseCallout.styles"));
|
|
10
10
|
var _BaseCalloutActions = _interopRequireDefault(require("./styles/BaseCalloutActions.styles"));
|
|
11
|
+
var _BaseCalloutIconContainer = _interopRequireDefault(require("./styles/BaseCalloutIconContainer.styles"));
|
|
11
12
|
var _BaseCalloutTitleContainer = _interopRequireDefault(require("./styles/BaseCalloutTitleContainer.styles"));
|
|
12
13
|
var BaseCallout = exports.BaseCallout = (0, _system.styled)("div", _BaseCallout["default"]);
|
|
13
14
|
var BaseCalloutActions = exports.BaseCalloutActions = (0, _system.styled)("div", _BaseCalloutActions["default"]);
|
|
15
|
+
var BaseCalloutIconContainer = exports.BaseCalloutIconContainer = (0, _system.styled)("div", _BaseCalloutIconContainer["default"]);
|
|
14
16
|
var BaseCalloutTitleContainer = exports.BaseCalloutTitleContainer = (0, _system.styled)("div", _BaseCalloutTitleContainer["default"]);
|
|
@@ -20,13 +20,21 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
20
20
|
info: {},
|
|
21
21
|
warning: {},
|
|
22
22
|
critical: {},
|
|
23
|
-
success: {}
|
|
23
|
+
success: {},
|
|
24
|
+
accent: {},
|
|
25
|
+
brand: {},
|
|
26
|
+
primary: {},
|
|
27
|
+
neutral: {}
|
|
24
28
|
},
|
|
25
29
|
size: {
|
|
26
30
|
compact: {
|
|
27
31
|
backgroundColor: "transparent",
|
|
28
32
|
padding: 0
|
|
29
33
|
},
|
|
34
|
+
blockCompact: {
|
|
35
|
+
flexDirection: "row",
|
|
36
|
+
padding: "$sm"
|
|
37
|
+
},
|
|
30
38
|
"default": {}
|
|
31
39
|
}
|
|
32
40
|
},
|
|
@@ -46,5 +54,53 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
46
54
|
size: "default",
|
|
47
55
|
severity: "critical",
|
|
48
56
|
css: (0, _helpers.getColorVariant)("critical")
|
|
57
|
+
}, {
|
|
58
|
+
size: "default",
|
|
59
|
+
severity: "accent",
|
|
60
|
+
css: (0, _helpers.getColorVariant)("accent")
|
|
61
|
+
}, {
|
|
62
|
+
size: "default",
|
|
63
|
+
severity: "brand",
|
|
64
|
+
css: (0, _helpers.getColorVariant)("brand")
|
|
65
|
+
}, {
|
|
66
|
+
size: "default",
|
|
67
|
+
severity: "primary",
|
|
68
|
+
css: (0, _helpers.getColorVariant)("primary")
|
|
69
|
+
}, {
|
|
70
|
+
size: "default",
|
|
71
|
+
severity: "neutral",
|
|
72
|
+
css: (0, _helpers.getColorVariant)("neutral")
|
|
73
|
+
}, {
|
|
74
|
+
size: "blockCompact",
|
|
75
|
+
severity: "warning",
|
|
76
|
+
css: (0, _helpers.getColorVariant)("warning")
|
|
77
|
+
}, {
|
|
78
|
+
size: "blockCompact",
|
|
79
|
+
severity: "success",
|
|
80
|
+
css: (0, _helpers.getColorVariant)("success")
|
|
81
|
+
}, {
|
|
82
|
+
size: "blockCompact",
|
|
83
|
+
severity: "info",
|
|
84
|
+
css: (0, _helpers.getColorVariant)("info")
|
|
85
|
+
}, {
|
|
86
|
+
size: "blockCompact",
|
|
87
|
+
severity: "critical",
|
|
88
|
+
css: (0, _helpers.getColorVariant)("critical")
|
|
89
|
+
}, {
|
|
90
|
+
size: "blockCompact",
|
|
91
|
+
severity: "accent",
|
|
92
|
+
css: (0, _helpers.getColorVariant)("accent")
|
|
93
|
+
}, {
|
|
94
|
+
size: "blockCompact",
|
|
95
|
+
severity: "brand",
|
|
96
|
+
css: (0, _helpers.getColorVariant)("brand")
|
|
97
|
+
}, {
|
|
98
|
+
size: "blockCompact",
|
|
99
|
+
severity: "primary",
|
|
100
|
+
css: (0, _helpers.getColorVariant)("primary")
|
|
101
|
+
}, {
|
|
102
|
+
size: "blockCompact",
|
|
103
|
+
severity: "neutral",
|
|
104
|
+
css: (0, _helpers.getColorVariant)("neutral")
|
|
49
105
|
}]
|
|
50
106
|
});
|
|
@@ -10,5 +10,14 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
10
10
|
display: "flex",
|
|
11
11
|
flex: 1,
|
|
12
12
|
alignItems: "flex-start",
|
|
13
|
-
justifyContent: "flex-end"
|
|
13
|
+
justifyContent: "flex-end",
|
|
14
|
+
variants: {
|
|
15
|
+
size: {
|
|
16
|
+
blockCompact: {
|
|
17
|
+
flexGrow: 0
|
|
18
|
+
},
|
|
19
|
+
compact: {},
|
|
20
|
+
"default": {}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
14
23
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _system = require("@vitality-ds/system");
|
|
8
|
+
// Adjust alignment of inline text with the icon in blockCompact mode
|
|
9
|
+
var _default = exports["default"] = (0, _system.css)({
|
|
10
|
+
display: "flex",
|
|
11
|
+
marginTop: "0.15rem"
|
|
12
|
+
});
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
9
|
var _system = require("@vitality-ds/system");
|
|
10
|
+
var _styled = require("../../Typography/styled");
|
|
11
|
+
var _styled2 = require("../components/CalloutDescription/styled");
|
|
8
12
|
var _default = exports["default"] = (0, _system.css)({
|
|
9
13
|
display: "flex",
|
|
10
14
|
flex: 1,
|
|
@@ -18,6 +22,12 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
18
22
|
compact: {
|
|
19
23
|
gap: "$sm"
|
|
20
24
|
},
|
|
25
|
+
blockCompact: {
|
|
26
|
+
gap: "$sm",
|
|
27
|
+
"& div": (0, _defineProperty2["default"])({}, "& > ".concat(_styled.BaseTypography, ", & > ").concat(_styled2.BaseCalloutDescription), {
|
|
28
|
+
marginRight: "$sm"
|
|
29
|
+
})
|
|
30
|
+
},
|
|
21
31
|
"default": {}
|
|
22
32
|
}
|
|
23
33
|
}
|
|
@@ -36,6 +36,12 @@ var _default = exports["default"] = (0, _system.css)({
|
|
|
36
36
|
},
|
|
37
37
|
warning: {
|
|
38
38
|
stroke: (0, _system.getColorScaleValueByUseCase)("warning", text.onSolidBackgrounds)
|
|
39
|
+
},
|
|
40
|
+
accent: {
|
|
41
|
+
stroke: (0, _system.getColorScaleValueByUseCase)("accent", text.onSolidBackgrounds)
|
|
42
|
+
},
|
|
43
|
+
brand: {
|
|
44
|
+
stroke: (0, _system.getColorScaleValueByUseCase)("brand", text.onSolidBackgrounds)
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Appearances } from "./types";
|
|
2
2
|
export declare const getAppearance: (appearance: keyof Appearances) => {
|
|
3
|
-
color: "neutral" | "primary" | "success" | "info" | "warning" | "critical" | ({
|
|
4
|
-
"@bp1"?: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
5
|
-
"@bp2"?: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
6
|
-
"@bp3"?: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
7
|
-
"@initial"?: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
3
|
+
color: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand" | ({
|
|
4
|
+
"@bp1"?: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
5
|
+
"@bp2"?: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
6
|
+
"@bp3"?: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
7
|
+
"@initial"?: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
8
8
|
} & {
|
|
9
|
-
[x: string]: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
9
|
+
[x: string]: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
10
10
|
});
|
|
11
11
|
variant: "link" | "subtle" | "solid" | "onSurface" | "ghost" | ({
|
|
12
12
|
"@bp1"?: "link" | "subtle" | "solid" | "onSurface" | "ghost";
|
|
@@ -16,12 +16,12 @@ export declare const getAppearance: (appearance: keyof Appearances) => {
|
|
|
16
16
|
} & {
|
|
17
17
|
[x: string]: "link" | "subtle" | "solid" | "onSurface" | "ghost";
|
|
18
18
|
});
|
|
19
|
-
spinnerColor: "neutral" | "primary" | "success" | "info" | "warning" | "critical" | ({
|
|
20
|
-
"@bp1"?: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
21
|
-
"@bp2"?: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
22
|
-
"@bp3"?: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
23
|
-
"@initial"?: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
19
|
+
spinnerColor: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand" | ({
|
|
20
|
+
"@bp1"?: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
21
|
+
"@bp2"?: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
22
|
+
"@bp3"?: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
23
|
+
"@initial"?: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
24
24
|
} & {
|
|
25
|
-
[x: string]: "neutral" | "primary" | "success" | "info" | "warning" | "critical";
|
|
25
|
+
[x: string]: "neutral" | "primary" | "accent" | "success" | "info" | "warning" | "critical" | "brand";
|
|
26
26
|
});
|
|
27
27
|
};
|
|
@@ -12,6 +12,9 @@ export declare const BaseCalloutDescription: import("@stitches/react/types/style
|
|
|
12
12
|
fontWeight: string;
|
|
13
13
|
lineHeight: string;
|
|
14
14
|
};
|
|
15
|
+
blockCompact: {
|
|
16
|
+
display: string;
|
|
17
|
+
};
|
|
15
18
|
default: {};
|
|
16
19
|
};
|
|
17
20
|
severity: {
|
|
@@ -19,6 +22,10 @@ export declare const BaseCalloutDescription: import("@stitches/react/types/style
|
|
|
19
22
|
critical: import("@vitality-ds/system").CSS;
|
|
20
23
|
success: import("@vitality-ds/system").CSS;
|
|
21
24
|
warning: import("@vitality-ds/system").CSS;
|
|
25
|
+
accent: import("@vitality-ds/system").CSS;
|
|
26
|
+
brand: import("@vitality-ds/system").CSS;
|
|
27
|
+
primary: import("@vitality-ds/system").CSS;
|
|
28
|
+
neutral: import("@vitality-ds/system").CSS;
|
|
22
29
|
};
|
|
23
30
|
hideTitle: {
|
|
24
31
|
true: {};
|
|
@@ -12,6 +12,9 @@ declare const _default: import("@stitches/react/types/styled-component").CssComp
|
|
|
12
12
|
fontWeight: string;
|
|
13
13
|
lineHeight: string;
|
|
14
14
|
};
|
|
15
|
+
blockCompact: {
|
|
16
|
+
display: string;
|
|
17
|
+
};
|
|
15
18
|
default: {};
|
|
16
19
|
};
|
|
17
20
|
severity: {
|
|
@@ -19,6 +22,10 @@ declare const _default: import("@stitches/react/types/styled-component").CssComp
|
|
|
19
22
|
critical: import("@vitality-ds/system").CSS;
|
|
20
23
|
success: import("@vitality-ds/system").CSS;
|
|
21
24
|
warning: import("@vitality-ds/system").CSS;
|
|
25
|
+
accent: import("@vitality-ds/system").CSS;
|
|
26
|
+
brand: import("@vitality-ds/system").CSS;
|
|
27
|
+
primary: import("@vitality-ds/system").CSS;
|
|
28
|
+
neutral: import("@vitality-ds/system").CSS;
|
|
22
29
|
};
|
|
23
30
|
hideTitle: {
|
|
24
31
|
true: {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from "@vitality-ds/system";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { BaseCalloutDescription } from "./styled";
|
|
4
|
-
|
|
4
|
+
declare type BaseDescriptionProps = VariantProps<typeof BaseCalloutDescription>;
|
|
5
|
+
export declare type CalloutDescriptionProps = BaseDescriptionProps & {
|
|
5
6
|
content: React.ReactNode;
|
|
6
7
|
};
|
|
8
|
+
export {};
|