oolib 2.121.1 → 2.122.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/components/cards/CardContent/index.js +13 -5
- package/dist/components/cards/CardContent/styled.d.ts +2 -0
- package/dist/components/cards/CardContent/styled.js +16 -5
- package/dist/components/cards/utils/parseCardConfig.d.ts +1 -0
- package/dist/components/cards/utils/parseCardConfig.js +2 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +1 -0
- package/dist/stories/cards/CardContent.stories.d.ts +13 -0
- package/dist/stories/cards/utils/cardArgTypes.d.ts +52 -31
- package/dist/stories/cards/utils/cardArgTypes.js +9 -0
- package/dist/stories/cards/utils/parseCardArgs.d.ts +4 -1
- package/dist/stories/cards/utils/parseCardArgs.js +3 -2
- package/dist/themes/typo.js +1 -0
- package/dist/utilsOolib/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -21,23 +21,30 @@ var mediaDataExists_1 = require("../utils/mediaDataExists");
|
|
|
21
21
|
var styled_2 = require("./styled");
|
|
22
22
|
var CardPlaceholder_1 = require("../comps/CardPlaceholder");
|
|
23
23
|
var ImageInput_1 = require("../../ImageInput");
|
|
24
|
+
var icons_1 = require("../../../icons");
|
|
25
|
+
var Tags_1 = require("../../Tags");
|
|
26
|
+
var CrownSimple = icons_1.icons.CrownSimple;
|
|
24
27
|
var CardContent = function (_a) {
|
|
28
|
+
var _b, _c;
|
|
25
29
|
var id = _a.id, data = _a.data, config = _a.config, to = _a.to, onClick = _a.onClick, openInNewTab = _a.openInNewTab, actions = _a.actions;
|
|
26
30
|
var theme = (0, styled_components_1.useTheme)();
|
|
27
31
|
var parseSpecialSyntax = (theme || {}).parseSpecialSyntax;
|
|
28
32
|
var showEmbedSection = !!((config === null || config === void 0 ? void 0 : config.image) || (config === null || config === void 0 ? void 0 : config.video));
|
|
29
|
-
var
|
|
33
|
+
var _d = (0, parseCardConfig_1.parseCardConfig)({
|
|
30
34
|
config: config,
|
|
31
35
|
data: data,
|
|
32
36
|
parseSpecialSyntax: parseSpecialSyntax
|
|
33
|
-
}), cardLabel =
|
|
37
|
+
}), cardLabel = _d.cardLabel, title = _d.title, video = _d.video, image = _d.image, metaBlock = _d.metaBlock, tagDisplay = _d.tagDisplay, variant = _d.variant;
|
|
34
38
|
var dontRenderRes = (0, dontRenderIfBothOnClickAndTo_1.dontRenderIfBothOnClickAndTo)({ onClick: onClick, to: to });
|
|
35
39
|
if (dontRenderRes)
|
|
36
40
|
return dontRenderRes;
|
|
37
|
-
var
|
|
41
|
+
var _e = (0, decideLinkCompAndTarget_1.decideLinkCompAndTarget)({ to: to, openInNewTab: openInNewTab }), LinkComp = _e.LinkComp, target = _e.target, externalUrl = _e.externalUrl;
|
|
38
42
|
return (react_1.default.createElement(LinkComp, { target: target, href: (0, injectHttps_1.injectHttps)(to), to: to },
|
|
39
|
-
react_1.default.createElement(styled_2.StyledCardWrapper, { id: id, onClick: onClick ? function (e) { return onClick(e, data); } : undefined },
|
|
40
|
-
react_1.default.createElement(styled_2.
|
|
43
|
+
react_1.default.createElement(styled_2.StyledCardWrapper, { id: id, variant: variant, onClick: onClick ? function (e) { return onClick(e, data); } : undefined },
|
|
44
|
+
(variant === "success") && react_1.default.createElement(styled_2.StyledCrownWrapper, null,
|
|
45
|
+
react_1.default.createElement(styled_2.StyledCrown, null,
|
|
46
|
+
react_1.default.createElement(CrownSimple, { size: 24 }))),
|
|
47
|
+
react_1.default.createElement(styled_2.StyledUpperSection, { variant: variant },
|
|
41
48
|
react_1.default.createElement(styled_2.StyledContainer1, null,
|
|
42
49
|
cardLabel ? (react_1.default.createElement("div", { title: cardLabel, style: {
|
|
43
50
|
display: "flex",
|
|
@@ -55,6 +62,7 @@ var CardContent = function (_a) {
|
|
|
55
62
|
react_1.default.createElement(LineClampWrapper_1.LineClampWrapper, { noOfLines_M: 6, title: title },
|
|
56
63
|
react_1.default.createElement(styled_1.StyledTitle, { capitalize: true, className: "StyledTitle" },
|
|
57
64
|
react_1.default.createElement(styled_1.StyledTitleSpan, { className: "StyledTitleSpan" }, title))))) : null),
|
|
65
|
+
tagDisplay && react_1.default.createElement(Tags_1.TagLink, { display: Array.isArray(tagDisplay.data) ? (_b = tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data[0]) === null || _b === void 0 ? void 0 : _b.display : tagDisplay, to: (tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.collectionId) ? "/published-page/".concat(tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.collectionId, "?id=").concat((_c = tagDisplay === null || tagDisplay === void 0 ? void 0 : tagDisplay.data[0]) === null || _c === void 0 ? void 0 : _c._id) : "#", color: "green" }),
|
|
58
66
|
(metaBlock === null || metaBlock === void 0 ? void 0 : metaBlock.length) > 0 ? (react_1.default.createElement(MetaBlock_1.default, { data: data, config: metaBlock }) //show only two meta for cardContent
|
|
59
67
|
) : null),
|
|
60
68
|
showEmbedSection && (react_1.default.createElement(styled_2.StyledEmbedSection, null,
|
|
@@ -3,3 +3,5 @@ export const StyledMetaBlock: import("styled-components").StyledComponent<"div",
|
|
|
3
3
|
export const StyledEmbedSection: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export const StyledCardWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export const StyledUpperSection: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export const StyledCrownWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export const StyledCrown: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -27,16 +27,27 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.StyledUpperSection = exports.StyledCardWrapper = exports.StyledEmbedSection = exports.StyledMetaBlock = exports.StyledContainer1 = void 0;
|
|
30
|
+
exports.StyledCrown = exports.StyledCrownWrapper = exports.StyledUpperSection = exports.StyledCardWrapper = exports.StyledEmbedSection = exports.StyledMetaBlock = exports.StyledContainer1 = void 0;
|
|
31
31
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
32
|
var colors_1 = require("../../../themes/colors");
|
|
33
33
|
var transitions_1 = require("../../../themes/mixins/transitions");
|
|
34
34
|
var styled_1 = require("../styled");
|
|
35
|
-
var greyColor5 = colors_1.colors.greyColor5, white = colors_1.colors.white;
|
|
35
|
+
var greyColor5 = colors_1.colors.greyColor5, white = colors_1.colors.white, invertGreen = colors_1.colors.invertGreen;
|
|
36
36
|
var flexColumn = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
37
37
|
exports.StyledContainer1 = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n gap: 1rem;\n"], ["\n ", "\n gap: 1rem;\n"])), flexColumn);
|
|
38
38
|
exports.StyledMetaBlock = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n gap: 0.5em;\n"], ["\n display: flex;\n gap: 0.5em;\n"])));
|
|
39
39
|
exports.StyledEmbedSection = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 100px;\n display: flex;\n align-items: center;\n overflow: hidden;\n width: 100%;\n"], ["\n height: 100px;\n display: flex;\n align-items: center;\n overflow: hidden;\n width: 100%;\n"])));
|
|
40
|
-
exports.StyledCardWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 100%;\n border: 2px solid ", ";\n background-color: ", "
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
exports.StyledCardWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 100%;\n border: 2px solid ", ";\n background-color: ", "; \n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n ", "\n\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n ", ";\n #CardPlaceholder {\n opacity: 1;\n }\n }\n"], ["\n height: 100%;\n border: 2px solid ", ";\n background-color: ", "; \n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n ", "\n\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n ", ";\n #CardPlaceholder {\n opacity: 1;\n }\n }\n"])), greyColor5, function (_a) {
|
|
41
|
+
var variant = _a.variant;
|
|
42
|
+
return variant === "success" ? colors_1.colors.lightGreen : greyColor5;
|
|
43
|
+
}, (0, transitions_1.transition)("background-color"), white, styled_1.CSSTitleAnimationOnHover);
|
|
44
|
+
exports.StyledUpperSection = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n /* height: 100%; */\n flex-grow: 1;\n justify-content: space-between;\n padding: 2rem;\n ", "\n gap: ", ";\n padding-top: ", ";\n"], ["\n /* height: 100%; */\n flex-grow: 1;\n justify-content: space-between;\n padding: 2rem;\n ", "\n gap: ", ";\n padding-top: ", ";\n"])), flexColumn, function (_a) {
|
|
45
|
+
var variant = _a.variant;
|
|
46
|
+
return variant === "success" ? '2rem' : '3rem';
|
|
47
|
+
}, function (_a) {
|
|
48
|
+
var variant = _a.variant;
|
|
49
|
+
return variant === "success" ? "1rem" : "2rem";
|
|
50
|
+
});
|
|
51
|
+
exports.StyledCrownWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 100%;\n display: flex; \n justify-content: flex-end\n"], ["\n width: 100%;\n display: flex; \n justify-content: flex-end\n"])));
|
|
52
|
+
exports.StyledCrown = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n width: max-content;\n background-color: ", ";\n padding: 1rem;\n"], ["\n width: max-content;\n background-color: ", ";\n padding: 1rem;\n"])), invertGreen);
|
|
53
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
@@ -18,10 +18,12 @@ var parseCardConfig = function (_a) {
|
|
|
18
18
|
var tagDisplay = config.tagDisplay && (0, getVal_1.getVal)(data, config.tagDisplay);
|
|
19
19
|
var image = config.image && (0, getVal_1.getVal)(data, ((_b = config.image) === null || _b === void 0 ? void 0 : _b.valuePath) || config.image); // cuz image config could be either `image: <valuePath>` or `image: { valuePath: <valuePath>, aspectRatio: <aspectRatio> }`
|
|
20
20
|
var imageAspectRatio = (_c = config.image) === null || _c === void 0 ? void 0 : _c.aspectRatio;
|
|
21
|
+
var variant = (config.variant && Array.isArray((0, getVal_1.getVal)(data, config.variant)) && (0, getVal_1.getVal)(data, config.variant).length > 0) ? "success" : typeof config.variant === "string" ? config.variant : undefined;
|
|
21
22
|
return {
|
|
22
23
|
title: title,
|
|
23
24
|
titleOptional: titleOptional,
|
|
24
25
|
desc: desc,
|
|
26
|
+
variant: variant,
|
|
25
27
|
cardLabel: cardLabel,
|
|
26
28
|
video: video,
|
|
27
29
|
image: image,
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -109,6 +109,7 @@ export namespace icons {
|
|
|
109
109
|
export { SquareHalf };
|
|
110
110
|
export { SquareHalfBottom };
|
|
111
111
|
export { MagicWand };
|
|
112
|
+
export { CrownSimple };
|
|
112
113
|
export { OkeGoogleIcon };
|
|
113
114
|
export { LetterH };
|
|
114
115
|
export { IndexIcon };
|
|
@@ -278,6 +279,7 @@ import { SlackLogo } from 'phosphor-react';
|
|
|
278
279
|
import { SquareHalf } from 'phosphor-react';
|
|
279
280
|
import { SquareHalfBottom } from 'phosphor-react';
|
|
280
281
|
import { MagicWand } from 'phosphor-react';
|
|
282
|
+
import { CrownSimple } from 'phosphor-react';
|
|
281
283
|
import { OkeGoogleIcon } from "./custom";
|
|
282
284
|
import { LetterH } from "./custom";
|
|
283
285
|
import { IndexIcon } from "./custom";
|
package/dist/icons/index.js
CHANGED
|
@@ -114,6 +114,7 @@ exports.icons = {
|
|
|
114
114
|
SquareHalf: phosphor_react_1.SquareHalf,
|
|
115
115
|
SquareHalfBottom: phosphor_react_1.SquareHalfBottom,
|
|
116
116
|
MagicWand: phosphor_react_1.MagicWand,
|
|
117
|
+
CrownSimple: phosphor_react_1.CrownSimple,
|
|
117
118
|
//custom
|
|
118
119
|
OkeGoogleIcon: custom_1.OkeGoogleIcon,
|
|
119
120
|
LetterH: custom_1.LetterH,
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
2
|
let title: string;
|
|
3
3
|
let argTypes: {
|
|
4
|
+
tagDisplay: {
|
|
5
|
+
name: string;
|
|
6
|
+
control: {
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
variant: {
|
|
11
|
+
name: string;
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
options: string[];
|
|
16
|
+
};
|
|
4
17
|
actions: {
|
|
5
18
|
name: string;
|
|
6
19
|
control: {
|
|
@@ -81,7 +81,7 @@ export namespace cardContentArgs {
|
|
|
81
81
|
let actions: boolean;
|
|
82
82
|
}
|
|
83
83
|
export namespace cardContentArgTypes {
|
|
84
|
-
export namespace
|
|
84
|
+
export namespace tagDisplay {
|
|
85
85
|
let name_8: string;
|
|
86
86
|
export { name_8 as name };
|
|
87
87
|
export namespace control_8 {
|
|
@@ -89,15 +89,7 @@ export namespace cardContentArgTypes {
|
|
|
89
89
|
}
|
|
90
90
|
export { control_8 as control };
|
|
91
91
|
}
|
|
92
|
-
export
|
|
93
|
-
}
|
|
94
|
-
export namespace listContentArgs {
|
|
95
|
-
export let statusTag: any;
|
|
96
|
-
let actions_2: boolean;
|
|
97
|
-
export { actions_2 as actions };
|
|
98
|
-
}
|
|
99
|
-
export namespace listContentArgTypes {
|
|
100
|
-
export namespace statusTag_1 {
|
|
92
|
+
export namespace variant {
|
|
101
93
|
let name_9: string;
|
|
102
94
|
export { name_9 as name };
|
|
103
95
|
export namespace control_9 {
|
|
@@ -105,9 +97,10 @@ export namespace listContentArgTypes {
|
|
|
105
97
|
export { type_1 as type };
|
|
106
98
|
}
|
|
107
99
|
export { control_9 as control };
|
|
100
|
+
let options_1: string[];
|
|
101
|
+
export { options_1 as options };
|
|
108
102
|
}
|
|
109
|
-
export
|
|
110
|
-
export namespace actions_3 {
|
|
103
|
+
export namespace actions_1 {
|
|
111
104
|
let name_10: string;
|
|
112
105
|
export { name_10 as name };
|
|
113
106
|
export namespace control_10 {
|
|
@@ -116,6 +109,33 @@ export namespace listContentArgTypes {
|
|
|
116
109
|
}
|
|
117
110
|
export { control_10 as control };
|
|
118
111
|
}
|
|
112
|
+
export { actions_1 as actions };
|
|
113
|
+
}
|
|
114
|
+
export namespace listContentArgs {
|
|
115
|
+
export let statusTag: any;
|
|
116
|
+
let actions_2: boolean;
|
|
117
|
+
export { actions_2 as actions };
|
|
118
|
+
}
|
|
119
|
+
export namespace listContentArgTypes {
|
|
120
|
+
export namespace statusTag_1 {
|
|
121
|
+
let name_11: string;
|
|
122
|
+
export { name_11 as name };
|
|
123
|
+
export namespace control_11 {
|
|
124
|
+
let type_3: string;
|
|
125
|
+
export { type_3 as type };
|
|
126
|
+
}
|
|
127
|
+
export { control_11 as control };
|
|
128
|
+
}
|
|
129
|
+
export { statusTag_1 as statusTag };
|
|
130
|
+
export namespace actions_3 {
|
|
131
|
+
let name_12: string;
|
|
132
|
+
export { name_12 as name };
|
|
133
|
+
export namespace control_12 {
|
|
134
|
+
let type_4: string;
|
|
135
|
+
export { type_4 as type };
|
|
136
|
+
}
|
|
137
|
+
export { control_12 as control };
|
|
138
|
+
}
|
|
119
139
|
export { actions_3 as actions };
|
|
120
140
|
}
|
|
121
141
|
export namespace cardEmbedArgs {
|
|
@@ -123,15 +143,16 @@ export namespace cardEmbedArgs {
|
|
|
123
143
|
}
|
|
124
144
|
export namespace cardEmbedArgTypes {
|
|
125
145
|
export namespace disabled_1 {
|
|
126
|
-
let
|
|
127
|
-
export {
|
|
128
|
-
let
|
|
129
|
-
export {
|
|
146
|
+
let name_13: string;
|
|
147
|
+
export { name_13 as name };
|
|
148
|
+
let control_13: string;
|
|
149
|
+
export { control_13 as control };
|
|
130
150
|
}
|
|
131
151
|
export { disabled_1 as disabled };
|
|
132
152
|
}
|
|
133
153
|
export namespace cardProfileArgs {
|
|
134
|
-
|
|
154
|
+
let tagDisplay_1: any;
|
|
155
|
+
export { tagDisplay_1 as tagDisplay };
|
|
135
156
|
let image_2: string;
|
|
136
157
|
export { image_2 as image };
|
|
137
158
|
let title_2: string;
|
|
@@ -144,18 +165,18 @@ export namespace cardProfileArgs {
|
|
|
144
165
|
export { metaName_2 as metaName };
|
|
145
166
|
}
|
|
146
167
|
export namespace cardProfileArgTypes {
|
|
147
|
-
export namespace
|
|
148
|
-
let
|
|
149
|
-
export {
|
|
150
|
-
let
|
|
151
|
-
export {
|
|
168
|
+
export namespace tagDisplay_2 {
|
|
169
|
+
let name_14: string;
|
|
170
|
+
export { name_14 as name };
|
|
171
|
+
let control_14: string;
|
|
172
|
+
export { control_14 as control };
|
|
152
173
|
}
|
|
153
|
-
export {
|
|
174
|
+
export { tagDisplay_2 as tagDisplay };
|
|
154
175
|
export namespace image_3 {
|
|
155
|
-
let
|
|
156
|
-
export {
|
|
157
|
-
let
|
|
158
|
-
export {
|
|
176
|
+
let name_15: string;
|
|
177
|
+
export { name_15 as name };
|
|
178
|
+
let control_15: string;
|
|
179
|
+
export { control_15 as control };
|
|
159
180
|
}
|
|
160
181
|
export { image_3 as image };
|
|
161
182
|
}
|
|
@@ -173,10 +194,10 @@ export namespace listProfileArgs {
|
|
|
173
194
|
}
|
|
174
195
|
export namespace listProfileArgTypes {
|
|
175
196
|
export namespace image_5 {
|
|
176
|
-
let
|
|
177
|
-
export {
|
|
178
|
-
let
|
|
179
|
-
export {
|
|
197
|
+
let name_16: string;
|
|
198
|
+
export { name_16 as name };
|
|
199
|
+
let control_16: string;
|
|
200
|
+
export { control_16 as control };
|
|
180
201
|
}
|
|
181
202
|
export { image_5 as image };
|
|
182
203
|
}
|
|
@@ -53,6 +53,15 @@ exports.cardContentArgs = {
|
|
|
53
53
|
actions: false
|
|
54
54
|
};
|
|
55
55
|
exports.cardContentArgTypes = {
|
|
56
|
+
tagDisplay: {
|
|
57
|
+
name: "Status Tag",
|
|
58
|
+
control: { type: "text" },
|
|
59
|
+
},
|
|
60
|
+
variant: {
|
|
61
|
+
name: "Variant",
|
|
62
|
+
control: { type: "select" },
|
|
63
|
+
options: ["success", undefined]
|
|
64
|
+
},
|
|
56
65
|
actions: {
|
|
57
66
|
name: "Actions",
|
|
58
67
|
control: { type: "boolean" },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function parseCardArgs({ cardLabel, title, mediaType, image, video, metaText, metaName, metaDate, actions: _actions, statusTag, disabled, tagDisplay }: {
|
|
1
|
+
export function parseCardArgs({ cardLabel, title, mediaType, image, video, metaText, metaName, metaDate, actions: _actions, statusTag, disabled, tagDisplay, variant, }: {
|
|
2
2
|
cardLabel: any;
|
|
3
3
|
title: any;
|
|
4
4
|
mediaType: any;
|
|
@@ -11,10 +11,12 @@ export function parseCardArgs({ cardLabel, title, mediaType, image, video, metaT
|
|
|
11
11
|
statusTag: any;
|
|
12
12
|
disabled: any;
|
|
13
13
|
tagDisplay: any;
|
|
14
|
+
variant: any;
|
|
14
15
|
}): {
|
|
15
16
|
data: {
|
|
16
17
|
title: any;
|
|
17
18
|
cardLabel: any;
|
|
19
|
+
variant: any;
|
|
18
20
|
image: {
|
|
19
21
|
publicUrl: any;
|
|
20
22
|
}[];
|
|
@@ -41,6 +43,7 @@ export function parseCardArgs({ cardLabel, title, mediaType, image, video, metaT
|
|
|
41
43
|
title: string;
|
|
42
44
|
cardLabel: string;
|
|
43
45
|
tagDisplay: string;
|
|
46
|
+
variant: any;
|
|
44
47
|
};
|
|
45
48
|
disabled: any;
|
|
46
49
|
};
|
|
@@ -22,10 +22,11 @@ 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, metaText = _a.metaText, metaName = _a.metaName, metaDate = _a.metaDate, _actions = _a.actions, statusTag = _a.statusTag, disabled = _a.disabled, tagDisplay = _a.tagDisplay;
|
|
25
|
+
var cardLabel = _a.cardLabel, title = _a.title, mediaType = _a.mediaType, image = _a.image, video = _a.video, metaText = _a.metaText, metaName = _a.metaName, metaDate = _a.metaDate, _actions = _a.actions, statusTag = _a.statusTag, disabled = _a.disabled, tagDisplay = _a.tagDisplay, variant = _a.variant;
|
|
26
26
|
var data = {
|
|
27
27
|
title: title,
|
|
28
28
|
cardLabel: cardLabel,
|
|
29
|
+
variant: variant,
|
|
29
30
|
image: image && [{ publicUrl: image }],
|
|
30
31
|
video: video && [{ publicUrl: video }],
|
|
31
32
|
text: metaText || undefined,
|
|
@@ -33,7 +34,7 @@ var parseCardArgs = function (_a) {
|
|
|
33
34
|
date: metaDate || undefined,
|
|
34
35
|
tagDisplay: tagDisplay,
|
|
35
36
|
};
|
|
36
|
-
var config = __assign(__assign(__assign({ title: "title", cardLabel: "cardLabel", tagDisplay: "tagDisplay" }, (mediaType === "image" ? { image: "image" } : {})), (mediaType === "video" ? { video: "video" } : {})), { metaBlock: __spreadArray(__spreadArray(__spreadArray([], (metaText ? [{ key: "text", valuePath: "text" }] : []), true), (metaName ? [{ key: "name", valuePath: "name" }] : []), true), (metaDate ? [{ key: "date", valuePath: "date" }] : []), true) });
|
|
37
|
+
var config = __assign(__assign(__assign({ title: "title", cardLabel: "cardLabel", tagDisplay: "tagDisplay", variant: variant }, (mediaType === "image" ? { image: "image" } : {})), (mediaType === "video" ? { video: "video" } : {})), { metaBlock: __spreadArray(__spreadArray(__spreadArray([], (metaText ? [{ key: "text", valuePath: "text" }] : []), true), (metaName ? [{ key: "name", valuePath: "name" }] : []), true), (metaDate ? [{ key: "date", valuePath: "date" }] : []), true) });
|
|
37
38
|
var actions = !_actions
|
|
38
39
|
? undefined
|
|
39
40
|
: [
|
package/dist/themes/typo.js
CHANGED
|
@@ -21,6 +21,7 @@ var msW = function (n) {
|
|
|
21
21
|
};
|
|
22
22
|
return (0, modularscale_js_1.default)(n, modularscale);
|
|
23
23
|
};
|
|
24
|
+
//replace with new fonts here.
|
|
24
25
|
var serif = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: 'noto_serif', 'noto_sans_devanagari', 'noto_sans_gu',\n 'noto_sans_te', 'noto_sans_kn', 'noto_sans_or', sans-serif;\n"], ["\n font-family: 'noto_serif', 'noto_sans_devanagari', 'noto_sans_gu',\n 'noto_sans_te', 'noto_sans_kn', 'noto_sans_or', sans-serif;\n"])));
|
|
25
26
|
var sansSerif = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-family: 'noto_sans', 'noto_sans_devanagari', 'noto_sans_gu',\n 'noto_sans_te', 'noto_sans_kn', 'noto_sans_or', sans-serif;\n"], ["\n font-family: 'noto_sans', 'noto_sans_devanagari', 'noto_sans_gu',\n 'noto_sans_te', 'noto_sans_kn', 'noto_sans_or', sans-serif;\n"
|
|
26
27
|
// const serif = css`
|
|
@@ -12,7 +12,7 @@ import { ColorsType } from '../themes/colors';
|
|
|
12
12
|
* @param {ReactNode} value - The value to be localized
|
|
13
13
|
* @return {ReactNode} The localized value
|
|
14
14
|
*/
|
|
15
|
-
export declare const useLocale: () => (value: ReactNode) => ReactNode;
|
|
15
|
+
export declare const useLocale: () => ((value: ReactNode) => ReactNode);
|
|
16
16
|
/**
|
|
17
17
|
* Returns the primary color at 10% opacity from the provided colors object or falls back to a default primary color
|
|
18
18
|
*
|