oolib 2.64.0 → 2.64.2
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.
|
@@ -13,12 +13,12 @@ var themes_1 = require("../../../../themes");
|
|
|
13
13
|
var mixins_1 = require("../../../../themes/mixins");
|
|
14
14
|
var globalVariables_1 = require("../../../../globalStyles/globalVariables");
|
|
15
15
|
/** for lightbox shell */
|
|
16
|
-
exports.StyledOptionsAnimateWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"], ["\n height: ", ";\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"])), function (_a) {
|
|
16
|
+
exports.StyledOptionsAnimateWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"], ["\n height: ", ";\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"])), function (_a) {
|
|
17
17
|
var isOpen = _a.isOpen, openHeight = _a.openHeight;
|
|
18
18
|
return isOpen ? (openHeight ? openHeight + 'px' : 'auto') : 0;
|
|
19
19
|
}, function (_a) {
|
|
20
20
|
var width = _a.width;
|
|
21
|
-
return width + 'px';
|
|
21
|
+
return width ? width + 'px' : '100%';
|
|
22
22
|
}, (0, mixins_1.transition)('height', 'border-width'), globalVariables_1.globalLightboxStyle, function (_a) {
|
|
23
23
|
var isOpen = _a.isOpen;
|
|
24
24
|
return isOpen ? '1px' : 0;
|
|
@@ -19,6 +19,7 @@ var decideLinkCompAndTarget_1 = require("../utils/decideLinkCompAndTarget");
|
|
|
19
19
|
var dontRenderIfBothOnClickAndTo_1 = require("../utils/dontRenderIfBothOnClickAndTo");
|
|
20
20
|
var mediaDataExists_1 = require("../utils/mediaDataExists");
|
|
21
21
|
var parseCardConfig_1 = require("../utils/parseCardConfig");
|
|
22
|
+
var CardPlaceholder_1 = require("../comps/CardPlaceholder");
|
|
22
23
|
// const ErrorEmbedComp = ({ to }) => {
|
|
23
24
|
// return (
|
|
24
25
|
// <ErrorCardEmbedWrapper>
|
|
@@ -65,6 +66,14 @@ var CardEmbed = function (_a) {
|
|
|
65
66
|
(metaBlockData || (externalUrl && to)) && (react_1.default.createElement("div", { style: { paddingTop: "1.7rem" } }, metaBlockData ? (react_1.default.createElement(CardMetaBlock_1.default, { disabled: disabled, value: metaBlockData })) : (externalUrl &&
|
|
66
67
|
to && react_1.default.createElement(styled_2.StyledCardEmbedLink, null, to))))),
|
|
67
68
|
mediaConfigExists && (react_1.default.createElement(styled_2.StyledContentModule2, { disabled: disabled },
|
|
69
|
+
!(0, mediaDataExists_1.imageDataExists)(image) && !(0, mediaDataExists_1.videoDataExists)(video) && (react_1.default.createElement(styled_2.StyledCardEmbedPlaceholderWrapper, null,
|
|
70
|
+
react_1.default.createElement(CardPlaceholder_1.CardPlaceholder, { style: {
|
|
71
|
+
position: "absolute",
|
|
72
|
+
left: "50%",
|
|
73
|
+
transform: "translateX(-50%)",
|
|
74
|
+
height: "100%",
|
|
75
|
+
width: "auto",
|
|
76
|
+
} }))),
|
|
68
77
|
(0, mediaDataExists_1.videoDataExists)(video) && (react_1.default.createElement(styled_2.StyledMediaContainer, null,
|
|
69
78
|
react_1.default.createElement("div", { style: {
|
|
70
79
|
position: "relative",
|
|
@@ -6,4 +6,5 @@ export const StyledCardEmbedAction: import("styled-components").StyledComponent<
|
|
|
6
6
|
export const StyledCardEmbedLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
export const StyledMetaBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
8
|
export const StyledCardEmbedLink: import("styled-components").StyledComponent<(props: any) => import("react").JSX.Element, any, {}, never>;
|
|
9
|
+
export const StyledCardEmbedPlaceholderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
10
|
export const StyledMediaContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -27,35 +27,36 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.StyledMediaContainer = exports.StyledCardEmbedLink = exports.StyledMetaBlock = exports.StyledCardEmbedLabel = exports.StyledCardEmbedAction = exports.StyledContentModule2 = exports.StyledContentModule1 = exports.StyledEmbedCardWrapper = exports.ErrorCardEmbedWrapper = void 0;
|
|
30
|
+
exports.StyledMediaContainer = exports.StyledCardEmbedPlaceholderWrapper = exports.StyledCardEmbedLink = exports.StyledMetaBlock = exports.StyledCardEmbedLabel = exports.StyledCardEmbedAction = exports.StyledContentModule2 = exports.StyledContentModule1 = exports.StyledEmbedCardWrapper = exports.ErrorCardEmbedWrapper = void 0;
|
|
31
31
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
32
|
var themes_1 = require("../../../themes");
|
|
33
33
|
var mixins_1 = require("../../../themes/mixins");
|
|
34
34
|
var Typo_1 = require("../../Typo");
|
|
35
35
|
var styled_1 = require("../styled");
|
|
36
36
|
var greyColor5 = themes_1.colors.greyColor5, white = themes_1.colors.white, greyColor10 = themes_1.colors.greyColor10;
|
|
37
|
-
exports.ErrorCardEmbedWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n
|
|
38
|
-
exports.StyledEmbedCardWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n
|
|
37
|
+
exports.ErrorCardEmbedWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-top: 1rem;\n padding-bottom: 1rem;\n"], ["\n padding-top: 1rem;\n padding-bottom: 1rem;\n"])));
|
|
38
|
+
exports.StyledEmbedCardWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n cursor: pointer;\n position: relative;\n background-color: ", ";\n justify-content: space-between;\n border: 2px solid\n ", ";\n background-color: ", ";\n ", ";\n min-height: 10rem;\n @media (hover: hover) {\n &:hover {\n background-color: ", ";\n ", ";\n }\n }\n"], ["\n display: flex;\n cursor: pointer;\n position: relative;\n background-color: ", ";\n justify-content: space-between;\n border: 2px solid\n ", ";\n background-color: ", ";\n ", ";\n min-height: 10rem;\n @media (hover: hover) {\n &:hover {\n background-color: ", ";\n ", ";\n }\n }\n"])), white, function (_a) {
|
|
39
39
|
var disabled = _a.disabled;
|
|
40
|
-
return disabled ? themes_1.colors.greyColor3 : greyColor5;
|
|
40
|
+
return (disabled ? themes_1.colors.greyColor3 : greyColor5);
|
|
41
41
|
}, function (_a) {
|
|
42
42
|
var disabled = _a.disabled;
|
|
43
43
|
return disabled && themes_1.colors.greyColor3;
|
|
44
|
-
}, (0, mixins_1.transition)(
|
|
44
|
+
}, (0, mixins_1.transition)("background-color"), greyColor5, function (_a) {
|
|
45
45
|
var disabled = _a.disabled;
|
|
46
|
-
return !disabled && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n
|
|
46
|
+
return !disabled && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n #CardPlaceholder {\n opacity: 1;\n }\n "], ["\n ", ";\n #CardPlaceholder {\n opacity: 1;\n }\n "])), styled_1.CSSTitleAnimationOnHover);
|
|
47
47
|
});
|
|
48
|
-
exports.StyledContentModule1 = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n
|
|
48
|
+
exports.StyledContentModule1 = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n /* align-items: center; */\n flex-direction: column;\n padding: 2rem;\n max-width: 80%;\n /* border-right: ", " */\n"], ["\n display: flex;\n /* align-items: center; */\n flex-direction: column;\n padding: 2rem;\n max-width: 80%;\n /* border-right: ", " */\n"])), function (_a) {
|
|
49
49
|
var error = _a.error;
|
|
50
|
-
return !error ? "2px solid ".concat(greyColor10) :
|
|
50
|
+
return !error ? "2px solid ".concat(greyColor10) : "none";
|
|
51
51
|
});
|
|
52
|
-
exports.StyledContentModule2 = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n
|
|
52
|
+
exports.StyledContentModule2 = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n min-width: 0; // IMP: hack to get this div to not bleed out of parent flex container\n width: 10rem;\n opacity: ", ";\n"], ["\n min-width: 0; // IMP: hack to get this div to not bleed out of parent flex container\n width: 10rem;\n opacity: ", ";\n"])), function (_a) {
|
|
53
53
|
var disabled = _a.disabled;
|
|
54
|
-
return disabled ? 0.4 : 1;
|
|
54
|
+
return (disabled ? 0.4 : 1);
|
|
55
55
|
});
|
|
56
|
-
exports.StyledCardEmbedAction = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n
|
|
57
|
-
exports.StyledCardEmbedLabel = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n
|
|
58
|
-
exports.StyledMetaBlock = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n
|
|
59
|
-
exports.StyledCardEmbedLink = (0, styled_components_1.default)(Typo_1.SANS_2)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n
|
|
60
|
-
exports.
|
|
61
|
-
|
|
56
|
+
exports.StyledCardEmbedAction = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n"], ["\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
57
|
+
exports.StyledCardEmbedLabel = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n padding-bottom: 0.5rem;\n"], ["\n padding-bottom: 0.5rem;\n"])));
|
|
58
|
+
exports.StyledMetaBlock = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n padding: 0;\n"], ["\n padding: 0;\n"])));
|
|
59
|
+
exports.StyledCardEmbedLink = (0, styled_components_1.default)(Typo_1.SANS_2)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n width: 100%;\n align-self: flex-start;\n ", "\n color: ", ";\n"], ["\n width: 100%;\n align-self: flex-start;\n ", "\n color: ", ";\n"])), (0, mixins_1.clampText)(1), themes_1.colors.greyColor80);
|
|
60
|
+
exports.StyledCardEmbedPlaceholderWrapper = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n overflow: hidden;\n height: 100%;\n width: 100%;\n position: relative;\n"], ["\n overflow: hidden;\n height: 100%;\n width: 100%;\n position: relative;\n"])));
|
|
61
|
+
exports.StyledMediaContainer = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n text-align: center;\n background-color: ", ";\n"], ["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n text-align: center;\n background-color: ", ";\n"])), greyColor5);
|
|
62
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
|