oolib 2.153.0 → 2.154.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.d.ts +0 -11
- package/dist/components/cards/CardContent/index.js +144 -76
- package/dist/components/cards/CardContent/styled.d.ts +0 -7
- package/dist/components/cards/CardContent/styled.js +60 -53
- package/dist/components/cards/ListContent/index.d.ts +0 -12
- package/dist/components/cards/ListContent/index.js +172 -87
- package/dist/components/cards/ListContent/styled.d.ts +0 -7
- package/dist/components/cards/ListContent/styled.js +71 -26
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/stories/Oolib/components/TagLink.stories.js +1 -3
- package/dist/stories/Oolib/components/cards/CardContent.stories.d.ts +0 -73
- package/dist/stories/Oolib/components/cards/CardContent.stories.js +35 -35
- package/dist/stories/Oolib/components/cards/ListContent.stories.d.ts +0 -75
- package/dist/stories/Oolib/components/cards/ListContent.stories.js +38 -38
- package/dist/stories/v2/components/ImagePlaceHolder.stories.d.ts +19 -0
- package/dist/stories/v2/components/ImagePlaceHolder.stories.js +35 -0
- package/dist/stories/v2/components/cards/ListContent.stories.d.ts +72 -0
- package/dist/stories/v2/components/cards/ListContent.stories.js +54 -0
- package/dist/stories/v2/components/cards/utils/cardArgTypes.d.ts +18 -0
- package/dist/stories/v2/components/cards/utils/cardArgTypes.js +11 -1
- package/dist/v2/components/Divider/index.d.ts +2 -0
- package/dist/v2/components/Divider/index.js +19 -0
- package/dist/v2/components/ImagePlaceholder/index.d.ts +4 -1
- package/dist/v2/components/ImagePlaceholder/index.js +44 -4
- package/dist/v2/components/ImagePlaceholder/styled.js +9 -3
- package/dist/v2/components/MetaBlock/index.js +16 -9
- package/dist/v2/components/Tags/Comps/TagDisplay/styled.js +2 -2
- package/dist/v2/components/cards/ListContent/index.d.ts +12 -0
- package/dist/v2/components/cards/ListContent/index.js +83 -0
- package/dist/v2/components/cards/ListContent/styled.d.ts +13 -0
- package/dist/v2/components/cards/ListContent/styled.js +56 -0
- package/package.json +1 -1
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export function CardContent({ id, data, config, to, onClick, openInNewTab, actions, highlight }: {
|
|
2
|
-
id: any;
|
|
3
|
-
data: any;
|
|
4
|
-
config: any;
|
|
5
|
-
to: any;
|
|
6
|
-
onClick: any;
|
|
7
|
-
openInNewTab: any;
|
|
8
|
-
actions: any;
|
|
9
|
-
highlight: any;
|
|
10
|
-
}): React.JSX.Element;
|
|
11
|
-
import React from "react";
|
|
@@ -1,76 +1,144 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
1
|
+
// import React from "react";
|
|
2
|
+
// import { useTheme } from "styled-components";
|
|
3
|
+
// import { injectHttps } from "../../../utils/injectHttps";
|
|
4
|
+
// import { getPrimaryColorText, useLocale } from "../../../utilsOolib";
|
|
5
|
+
// import { ActionMenu } from "../../ActionMenu";
|
|
6
|
+
// import { LABEL } from "../../Typo";
|
|
7
|
+
// import VideoInput from "../../VideoInput";
|
|
8
|
+
// import MetaBlock from "../../MetaBlock";
|
|
9
|
+
// import { LineClampWrapper } from "../comps/LineClampWrapper";
|
|
10
|
+
// import { StyledTitle, StyledTitleSpan } from "../styled";
|
|
11
|
+
// import { decideLinkCompAndTarget } from "../utils/decideLinkCompAndTarget";
|
|
12
|
+
// import { dontRenderIfBothOnClickAndTo } from "../utils/dontRenderIfBothOnClickAndTo";
|
|
13
|
+
// import { parseCardConfig } from "../utils/parseCardConfig";
|
|
14
|
+
// import {imageDataExists, videoDataExists} from '../utils/mediaDataExists'
|
|
15
|
+
// import {
|
|
16
|
+
// StyledCardWrapper,
|
|
17
|
+
// StyledContainer1,
|
|
18
|
+
// StyledCrown,
|
|
19
|
+
// StyledCrownWrapper,
|
|
20
|
+
// StyledEmbedSection,
|
|
21
|
+
// StyledUpperSection,
|
|
22
|
+
// } from "./styled";
|
|
23
|
+
// import {CardPlaceholder} from '../comps/CardPlaceholder'
|
|
24
|
+
// import { ImageInput } from "../../ImageInput";
|
|
25
|
+
// import { icons } from "../../../icons"
|
|
26
|
+
// import { TagDisplay, TagLink } from "../../Tags";
|
|
27
|
+
// const { CrownSimple } = icons;
|
|
28
|
+
// export const CardContent = ({
|
|
29
|
+
// id,
|
|
30
|
+
// data,
|
|
31
|
+
// config,
|
|
32
|
+
// to,
|
|
33
|
+
// onClick,
|
|
34
|
+
// openInNewTab,
|
|
35
|
+
// actions,
|
|
36
|
+
// highlight
|
|
37
|
+
// }) => {
|
|
38
|
+
// const theme = useTheme();
|
|
39
|
+
// const localize = useLocale();
|
|
40
|
+
// const { parseSpecialSyntax } = theme || {};
|
|
41
|
+
// const showEmbedSection = !!(config?.image || config?.video);
|
|
42
|
+
// const { cardLabel, title, video, image, metaBlock, tagDisplay } =
|
|
43
|
+
// parseCardConfig({
|
|
44
|
+
// config,
|
|
45
|
+
// data,
|
|
46
|
+
// parseSpecialSyntax
|
|
47
|
+
// });
|
|
48
|
+
// let dontRenderRes = dontRenderIfBothOnClickAndTo({onClick, to});
|
|
49
|
+
// if(dontRenderRes) return dontRenderRes
|
|
50
|
+
// const {LinkComp, target, externalUrl } = decideLinkCompAndTarget({to, openInNewTab})
|
|
51
|
+
// return (
|
|
52
|
+
// <LinkComp
|
|
53
|
+
// target={target}
|
|
54
|
+
// href={injectHttps(to)}
|
|
55
|
+
// to={to}
|
|
56
|
+
// >
|
|
57
|
+
// <StyledCardWrapper
|
|
58
|
+
// id={id}
|
|
59
|
+
// highlight={highlight}
|
|
60
|
+
// onClick={onClick ? e => onClick(e,data) : undefined}
|
|
61
|
+
// /** imp to pass data cuz its used by some on okf eg. LinkOrEmbedModal*/
|
|
62
|
+
// >
|
|
63
|
+
// {highlight && <StyledCrownWrapper>
|
|
64
|
+
// <StyledCrown>
|
|
65
|
+
// <CrownSimple size={24}/>
|
|
66
|
+
// </StyledCrown>
|
|
67
|
+
// </StyledCrownWrapper>}
|
|
68
|
+
// <StyledUpperSection highlight={highlight}>
|
|
69
|
+
// <StyledContainer1>
|
|
70
|
+
// {cardLabel ? (
|
|
71
|
+
// <div
|
|
72
|
+
// title={cardLabel}
|
|
73
|
+
// style={{
|
|
74
|
+
// display: "flex",
|
|
75
|
+
// gap: "2rem",
|
|
76
|
+
// justifyContent: "space-between",
|
|
77
|
+
// }}
|
|
78
|
+
// >
|
|
79
|
+
// <LABEL
|
|
80
|
+
// style={{
|
|
81
|
+
// textOverflow: "ellipsis",
|
|
82
|
+
// overflow: "hidden",
|
|
83
|
+
// whiteSpace: "nowrap",
|
|
84
|
+
// }}
|
|
85
|
+
// color={getPrimaryColorText(theme?.colors)}
|
|
86
|
+
// >
|
|
87
|
+
// {cardLabel}
|
|
88
|
+
// </LABEL>
|
|
89
|
+
// <div style={{ marginTop: "-1rem", marginRight: "-1rem" }}>
|
|
90
|
+
// {actions && <ActionMenu actions={actions} />}
|
|
91
|
+
// </div>
|
|
92
|
+
// </div>
|
|
93
|
+
// ) : null}
|
|
94
|
+
// {title ? (
|
|
95
|
+
// <div style={{ display: "flex", alignItems: "end", gap: ".5rem" }}>
|
|
96
|
+
// {" "}
|
|
97
|
+
// <LineClampWrapper noOfLines_M={6} title={title}>
|
|
98
|
+
// <StyledTitle capitalize className="StyledTitle">
|
|
99
|
+
// <StyledTitleSpan className="StyledTitleSpan">
|
|
100
|
+
// {localize(title)}
|
|
101
|
+
// </StyledTitleSpan>
|
|
102
|
+
// </StyledTitle>
|
|
103
|
+
// </LineClampWrapper>
|
|
104
|
+
// </div>
|
|
105
|
+
// ) : null}
|
|
106
|
+
// </StyledContainer1>
|
|
107
|
+
// {/* {((Array.isArray(tagDisplay?.data) && tagDisplay?.data?.length > 0) || typeof tagDisplay === "string") && <TagDisplay display={Array.isArray(tagDisplay?.data) ? tagDisplay?.data[0]?.display : tagDisplay} to={tagDisplay?.collectionId ? `/published-page/${tagDisplay?.collectionId}?id=${tagDisplay?.data[0]?._id}` : "#"} color="green"/>} */}
|
|
108
|
+
// {tagDisplay && <TagDisplay display={tagDisplay} color="green"/>}
|
|
109
|
+
// {metaBlock?.length > 0 ? (
|
|
110
|
+
// <MetaBlock data={data} config={metaBlock} /> //show only two meta for cardContent
|
|
111
|
+
// ) : null}
|
|
112
|
+
// </StyledUpperSection>
|
|
113
|
+
// {showEmbedSection && (
|
|
114
|
+
// <StyledEmbedSection>
|
|
115
|
+
// {!imageDataExists(image) && !videoDataExists(video) &&
|
|
116
|
+
// <CardPlaceholder/>
|
|
117
|
+
// }
|
|
118
|
+
// {imageDataExists(image) && (
|
|
119
|
+
// <div style={{ width: "100%" }}>
|
|
120
|
+
// {
|
|
121
|
+
// <ImageInput
|
|
122
|
+
// value={image}
|
|
123
|
+
// aspectRatio={"5/3"}
|
|
124
|
+
// readOnly={true}
|
|
125
|
+
// defaultImageSpread={"cover"} //meaning if a spread is not defined in image data, it will fallback to this.
|
|
126
|
+
// enableCaptions={false}
|
|
127
|
+
// disableImageBorder={true}
|
|
128
|
+
// />
|
|
129
|
+
// }
|
|
130
|
+
// </div>
|
|
131
|
+
// )}
|
|
132
|
+
// {videoDataExists(video) && !imageDataExists(image) ? (
|
|
133
|
+
// <div style={{ width: "100%", position: 'relative' }}>
|
|
134
|
+
// <VideoInput value={video} readOnly={true} light={true} />
|
|
135
|
+
// {/**below div ensures the video is not clickable */}
|
|
136
|
+
// <div style={{position: 'absolute', top: 0, left: 0, width: '100%', height: '100%'}}/>
|
|
137
|
+
// </div>
|
|
138
|
+
// ) : null}
|
|
139
|
+
// </StyledEmbedSection>
|
|
140
|
+
// )}
|
|
141
|
+
// </StyledCardWrapper>
|
|
142
|
+
// </LinkComp>
|
|
143
|
+
// );
|
|
144
|
+
// };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const StyledContainer1: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
export const StyledMetaBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export const StyledEmbedSection: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export const StyledCardWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
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>;
|
|
@@ -1,53 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
// import styled, { css } from "styled-components";
|
|
2
|
+
// import { colors } from "../../../themes/colors";
|
|
3
|
+
// import { transition } from "../../../themes/mixins/transitions";
|
|
4
|
+
// import { CSSTitleAnimationOnHover } from "../styled";
|
|
5
|
+
// const { greyColor5, white, invertGreen } = colors;
|
|
6
|
+
// const flexColumn = css`
|
|
7
|
+
// display: flex;
|
|
8
|
+
// flex-direction: column;
|
|
9
|
+
// `;
|
|
10
|
+
// export const StyledContainer1 = styled.div`
|
|
11
|
+
// ${flexColumn}
|
|
12
|
+
// gap: 1rem;
|
|
13
|
+
// `;
|
|
14
|
+
// export const StyledMetaBlock = styled.div`
|
|
15
|
+
// display: flex;
|
|
16
|
+
// gap: 0.5em;
|
|
17
|
+
// `;
|
|
18
|
+
// export const StyledEmbedSection = styled.div`
|
|
19
|
+
// height: 100px;
|
|
20
|
+
// display: flex;
|
|
21
|
+
// align-items: center;
|
|
22
|
+
// overflow: hidden;
|
|
23
|
+
// width: 100%;
|
|
24
|
+
// `;
|
|
25
|
+
// export const StyledCardWrapper = styled.div`
|
|
26
|
+
// height: 100%;
|
|
27
|
+
// border: 2px solid ${greyColor5};
|
|
28
|
+
// background-color: ${({ highlight }) => highlight ? colors.lightGreen : greyColor5 };
|
|
29
|
+
// display: flex;
|
|
30
|
+
// flex-direction: column;
|
|
31
|
+
// justify-content: space-between;
|
|
32
|
+
// ${transition("background-color")}
|
|
33
|
+
// cursor: pointer;
|
|
34
|
+
// &:hover {
|
|
35
|
+
// background-color: ${white};
|
|
36
|
+
// ${CSSTitleAnimationOnHover};
|
|
37
|
+
// #CardPlaceholder {
|
|
38
|
+
// opacity: 1;
|
|
39
|
+
// }
|
|
40
|
+
// }
|
|
41
|
+
// `;
|
|
42
|
+
// export const StyledUpperSection = styled.div`
|
|
43
|
+
// /* height: 100%; */
|
|
44
|
+
// flex-grow: 1;
|
|
45
|
+
// justify-content: space-between;
|
|
46
|
+
// padding: 2rem;
|
|
47
|
+
// ${flexColumn}
|
|
48
|
+
// gap: ${({ highlight }) => highlight ? '2rem' : '3rem'};
|
|
49
|
+
// padding-top: ${({ highlight }) => highlight ? "1rem" : "2rem"};
|
|
50
|
+
// `;
|
|
51
|
+
// export const StyledCrownWrapper = styled.div`
|
|
52
|
+
// width: 100%;
|
|
53
|
+
// display: flex;
|
|
54
|
+
// justify-content: flex-end
|
|
55
|
+
// `;
|
|
56
|
+
// export const StyledCrown = styled.div`
|
|
57
|
+
// width: max-content;
|
|
58
|
+
// background-color: ${invertGreen};
|
|
59
|
+
// padding: 1rem;
|
|
60
|
+
// `
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export function ListContent({ id, data, config, to, onClick, openInNewTab, actions, statusTag, variant, }: {
|
|
2
|
-
id: any;
|
|
3
|
-
data: any;
|
|
4
|
-
config: any;
|
|
5
|
-
to: any;
|
|
6
|
-
onClick: any;
|
|
7
|
-
openInNewTab: any;
|
|
8
|
-
actions: any;
|
|
9
|
-
statusTag: any;
|
|
10
|
-
variant?: string;
|
|
11
|
-
}): React.JSX.Element;
|
|
12
|
-
import React from "react";
|