oolib 2.199.3 → 2.199.4
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/stories/v2/components/cards/CardContent.stories.d.ts +1 -1
- package/dist/stories/v2/components/cards/ListContent.stories.d.ts +1 -1
- package/dist/stories/v2/components/cards/utils/cardArgTypes.d.ts +1 -1
- package/dist/stories/v2/components/cards/utils/cardArgTypes.js +2 -2
- package/dist/stories/v2/components/cards/utils/parseCardArgs.d.ts +4 -4
- package/dist/stories/v2/components/cards/utils/parseCardArgs.js +3 -3
- package/dist/v2/components/cards/CardContent/index.d.ts +2 -2
- package/dist/v2/components/cards/CardContent/index.js +7 -11
- package/package.json +1 -1
|
@@ -77,7 +77,7 @@ export namespace commonCardArgTypes {
|
|
|
77
77
|
let options_1: string[];
|
|
78
78
|
export { options_1 as options };
|
|
79
79
|
}
|
|
80
|
-
export namespace
|
|
80
|
+
export namespace statusTagColorPreset {
|
|
81
81
|
let name_8: string;
|
|
82
82
|
export { name_8 as name };
|
|
83
83
|
let control_8: string;
|
|
@@ -49,8 +49,8 @@ exports.commonCardArgTypes = {
|
|
|
49
49
|
control: 'select',
|
|
50
50
|
options: [undefined, 'primary', 'secondary'],
|
|
51
51
|
},
|
|
52
|
-
|
|
53
|
-
name: "Status Tag
|
|
52
|
+
statusTagColorPreset: {
|
|
53
|
+
name: "Status Tag Color preset",
|
|
54
54
|
control: 'select',
|
|
55
55
|
options: [undefined, 'primary', 'secondary', 'positive', 'inProgress', 'warning', 'negative', 'special', 'grey'],
|
|
56
56
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function parseCardArgs({ cardLabel, title, mediaType, image, video, metaName, metaDate, statusTag, disabled, tagDisplay, highlight, desc,
|
|
1
|
+
export function parseCardArgs({ cardLabel, title, mediaType, image, video, metaName, metaDate, statusTag, disabled, tagDisplay, highlight, desc, statusTagColorPreset }: {
|
|
2
2
|
cardLabel: any;
|
|
3
3
|
title: any;
|
|
4
4
|
mediaType: any;
|
|
@@ -11,7 +11,7 @@ export function parseCardArgs({ cardLabel, title, mediaType, image, video, metaN
|
|
|
11
11
|
tagDisplay: any;
|
|
12
12
|
highlight: any;
|
|
13
13
|
desc: any;
|
|
14
|
-
|
|
14
|
+
statusTagColorPreset: any;
|
|
15
15
|
}): {
|
|
16
16
|
data: {
|
|
17
17
|
title: any;
|
|
@@ -39,10 +39,10 @@ export function parseCardArgs({ cardLabel, title, mediaType, image, video, metaN
|
|
|
39
39
|
title: string;
|
|
40
40
|
cardLabel: string;
|
|
41
41
|
tagDisplay: string;
|
|
42
|
-
|
|
42
|
+
statusTagColorPreset: string;
|
|
43
43
|
desc: string;
|
|
44
44
|
};
|
|
45
45
|
disabled: any;
|
|
46
46
|
highlight: any;
|
|
47
|
-
|
|
47
|
+
statusTagColorPreset: any;
|
|
48
48
|
};
|
|
@@ -22,7 +22,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.parseCardArgs = void 0;
|
|
24
24
|
var parseCardArgs = function (_a) {
|
|
25
|
-
var cardLabel = _a.cardLabel, title = _a.title, mediaType = _a.mediaType, image = _a.image, video = _a.video, metaName = _a.metaName, metaDate = _a.metaDate, statusTag = _a.statusTag, disabled = _a.disabled, tagDisplay = _a.tagDisplay, highlight = _a.highlight, desc = _a.desc,
|
|
25
|
+
var cardLabel = _a.cardLabel, title = _a.title, mediaType = _a.mediaType, image = _a.image, video = _a.video, metaName = _a.metaName, metaDate = _a.metaDate, statusTag = _a.statusTag, disabled = _a.disabled, tagDisplay = _a.tagDisplay, highlight = _a.highlight, desc = _a.desc, statusTagColorPreset = _a.statusTagColorPreset;
|
|
26
26
|
var data = {
|
|
27
27
|
title: title,
|
|
28
28
|
cardLabel: cardLabel,
|
|
@@ -34,14 +34,14 @@ var parseCardArgs = function (_a) {
|
|
|
34
34
|
tagDisplay: tagDisplay,
|
|
35
35
|
desc: desc,
|
|
36
36
|
};
|
|
37
|
-
var config = __assign(__assign(__assign({ title: "title", cardLabel: "cardLabel", tagDisplay: "tagDisplay",
|
|
37
|
+
var config = __assign(__assign(__assign({ title: "title", cardLabel: "cardLabel", tagDisplay: "tagDisplay", statusTagColorPreset: 'statusTagColorPreset', desc: "desc" }, (mediaType === "image" ? { image: "image" } : {})), (mediaType === "video" ? { video: "video" } : {})), { metaBlock: __spreadArray(__spreadArray([], (metaName ? [{ key: "name", valuePath: "name" }] : []), true), (metaDate ? [{ key: "date", valuePath: "date" }] : []), true) });
|
|
38
38
|
return {
|
|
39
39
|
data: data,
|
|
40
40
|
statusTag: statusTag,
|
|
41
41
|
config: config,
|
|
42
42
|
disabled: disabled,
|
|
43
43
|
highlight: highlight,
|
|
44
|
-
|
|
44
|
+
statusTagColorPreset: statusTagColorPreset
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
exports.parseCardArgs = parseCardArgs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function CardContent({ id, data, config, to, onClick, openInNewTab, highlight,
|
|
1
|
+
export function CardContent({ id, data, config, to, onClick, openInNewTab, highlight, statusTagColorPreset }: {
|
|
2
2
|
id: any;
|
|
3
3
|
data: any;
|
|
4
4
|
config: any;
|
|
@@ -6,6 +6,6 @@ export function CardContent({ id, data, config, to, onClick, openInNewTab, highl
|
|
|
6
6
|
onClick: any;
|
|
7
7
|
openInNewTab: any;
|
|
8
8
|
highlight: any;
|
|
9
|
-
|
|
9
|
+
statusTagColorPreset: any;
|
|
10
10
|
}): React.JSX.Element;
|
|
11
11
|
import React from "react";
|
|
@@ -30,13 +30,13 @@ var CardLabelTag = function (_a) {
|
|
|
30
30
|
react_1.default.createElement(Tags_1.TagDisplay, { display: label.toUpperCase(), title: label, XS: true }))) : null;
|
|
31
31
|
};
|
|
32
32
|
var StatusTag = function (_a) {
|
|
33
|
-
var display = _a.display, isEmbedPresent = _a.isEmbedPresent, isHighlightPresent = _a.isHighlightPresent,
|
|
33
|
+
var display = _a.display, isEmbedPresent = _a.isEmbedPresent, isHighlightPresent = _a.isHighlightPresent, statusTagColorPreset = _a.statusTagColorPreset, bothTagsDisplayTogether = _a.bothTagsDisplayTogether;
|
|
34
34
|
return display ? (react_1.default.createElement(styled_2.StyledStatusTagWrapper, { isEmbedPresent: isEmbedPresent, isHighlightPresent: isHighlightPresent, bothTagsDisplayTogether: bothTagsDisplayTogether },
|
|
35
|
-
react_1.default.createElement(Tags_1.TagDisplay, { display: display, title: display, XS: true,
|
|
35
|
+
react_1.default.createElement(Tags_1.TagDisplay, { display: display, title: display, XS: true, colorPreset: statusTagColorPreset || "positive" }))) : null;
|
|
36
36
|
};
|
|
37
37
|
var CardContent = function (_a) {
|
|
38
38
|
var id = _a.id, data = _a.data, config = _a.config, to = _a.to, onClick = _a.onClick, openInNewTab = _a.openInNewTab, highlight = _a.highlight, // primary | secondary
|
|
39
|
-
|
|
39
|
+
statusTagColorPreset = _a.statusTagColorPreset;
|
|
40
40
|
var theme = (0, styled_components_1.useTheme)();
|
|
41
41
|
var localize = (0, utilsOolib_1.useLocale)();
|
|
42
42
|
var parseSpecialSyntax = (theme || {}).parseSpecialSyntax;
|
|
@@ -56,23 +56,19 @@ var CardContent = function (_a) {
|
|
|
56
56
|
react_1.default.createElement(styled_2.StyledCardWrapper, { id: id, highlight: highlight, onClick: onClick ? function (e) { return onClick(e, data); } : undefined },
|
|
57
57
|
react_1.default.createElement("div", null,
|
|
58
58
|
showEmbedSection ? (react_1.default.createElement(styled_2.StyledEmbedSection, null,
|
|
59
|
-
react_1.default.createElement(CardLabelTag, { label: cardLabel, isEmbedPresent: showEmbedSection, isHighlightPresent: highlight,
|
|
59
|
+
react_1.default.createElement(CardLabelTag, { label: cardLabel, isEmbedPresent: showEmbedSection, isHighlightPresent: highlight, statusTagColorPreset: statusTagColorPreset }),
|
|
60
60
|
(0, mediaDataExists_1.imageDataExists)(image) ? (react_1.default.createElement("div", { style: { width: "100%" } }, react_1.default.createElement(ImageInput_1.ImageInput, { value: image, aspectRatio: "5/3", readOnly: true, defaultImageSpread: "cover", enableCaptions: false, disableImageBorder: true }))) : (0, mediaDataExists_1.videoDataExists)(video) ? (react_1.default.createElement("div", { style: { width: "100%", position: 'relative' } },
|
|
61
61
|
react_1.default.createElement(VideoInput_1.default, { value: video, readOnly: true, light: true }),
|
|
62
62
|
react_1.default.createElement("div", { style: { position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' } }))) : (react_1.default.createElement(ImagePlaceholder_1.ImagePlaceholder, { title: title })))) : (react_1.default.createElement(styled_2.StyledCardLabelAndStatusTagWrapper, null,
|
|
63
63
|
react_1.default.createElement(CardLabelTag, { label: cardLabel, isEmbedPresent: showEmbedSection, isHighlightPresent: highlight, bothTagsDisplayTogether: bothTagsDisplayTogether }),
|
|
64
|
-
react_1.default.createElement(StatusTag, { display: tagDisplay, isEmbedPresent: showEmbedSection, isHighlightPresent: highlight,
|
|
64
|
+
react_1.default.createElement(StatusTag, { display: tagDisplay, isEmbedPresent: showEmbedSection, isHighlightPresent: highlight, statusTagColorPreset: statusTagColorPreset, bothTagsDisplayTogether: bothTagsDisplayTogether }))),
|
|
65
65
|
highlight && react_1.default.createElement(styled_2.StyledStarWrapper, { highlight: highlight },
|
|
66
66
|
react_1.default.createElement(HighLightIcon, { size: 18, color: white, weight: "fill", style: { filter: "drop-shadow(0px 2px 8.2px rgba(0, 0, 0, 0.50 ))" } })),
|
|
67
|
-
showEmbedSection && (react_1.default.createElement(StatusTag, { display: tagDisplay, isEmbedPresent: showEmbedSection, isHighlightPresent: highlight,
|
|
67
|
+
showEmbedSection && (react_1.default.createElement(StatusTag, { display: tagDisplay, isEmbedPresent: showEmbedSection, isHighlightPresent: highlight, statusTagColorPreset: statusTagColorPreset })),
|
|
68
68
|
title ? (react_1.default.createElement(styled_2.StyledTitleWrapper, { highlight: highlight, showEmbedSection: showEmbedSection },
|
|
69
69
|
react_1.default.createElement(LineClampWrapper_1.LineClampWrapper, { title: title, noOfLines_M: 6 },
|
|
70
70
|
react_1.default.createElement(styled_1.StyledTitle, { capitalize: true, className: "StyledTitle" }, localize(title))))) : null,
|
|
71
71
|
description ? (react_1.default.createElement(styled_2.StyledDescription, null,
|
|
72
|
-
react_1.default.createElement(LineClampWrapper_1.LineClampWrapper, { title: description, noOfLines_M: 6 }, description))) : null)
|
|
73
|
-
react_1.default.createElement("div", null, (metaBlock === null || metaBlock === void 0 ? void 0 : metaBlock.length) > 0 ? (
|
|
74
|
-
//show only two meta for cardContent
|
|
75
|
-
react_1.default.createElement(styled_2.StyledMetaBlockWrapper, null,
|
|
76
|
-
react_1.default.createElement(MetaBlock_1.default, { data: data, config: metaBlock }))) : null))));
|
|
72
|
+
react_1.default.createElement(LineClampWrapper_1.LineClampWrapper, { title: description, noOfLines_M: 6 }, description))) : null))));
|
|
77
73
|
};
|
|
78
74
|
exports.CardContent = CardContent;
|