@universityofmaryland/web-elements-library 1.6.17 → 1.7.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/README.md +1 -1
- package/dist/atomic/animations/brand/card-stack.js +2 -3
- package/dist/atomic/animations/brand/card-stack.js.map +1 -1
- package/dist/atomic/animations/brand/chevron-flow.d.ts +1 -7
- package/dist/atomic/animations/brand/chevron-flow.d.ts.map +1 -1
- package/dist/atomic/animations/brand/chevron-flow.js +82 -159
- package/dist/atomic/animations/brand/chevron-flow.js.map +1 -1
- package/dist/atomic/animations/brand/chevron-scroll.d.ts +1 -4
- package/dist/atomic/animations/brand/chevron-scroll.d.ts.map +1 -1
- package/dist/atomic/animations/brand/chevron-scroll.js +89 -143
- package/dist/atomic/animations/brand/chevron-scroll.js.map +1 -1
- package/dist/atomic/assets/image/caption.d.ts +9 -0
- package/dist/atomic/assets/image/caption.d.ts.map +1 -0
- package/dist/atomic/assets/image/caption.js +166 -0
- package/dist/atomic/assets/image/caption.js.map +1 -0
- package/dist/atomic/assets/image/gif.d.ts.map +1 -1
- package/dist/atomic/assets/image/gif.js +6 -1
- package/dist/atomic/assets/image/gif.js.map +1 -1
- package/dist/atomic/assets/image/index.d.ts +1 -0
- package/dist/atomic/assets/image/index.d.ts.map +1 -1
- package/dist/atomic/assets/image/index.js +2 -0
- package/dist/atomic/assets/image/index.js.map +1 -1
- package/dist/atomic/assets/video/toggle.d.ts.map +1 -1
- package/dist/atomic/assets/video/toggle.js +9 -2
- package/dist/atomic/assets/video/toggle.js.map +1 -1
- package/dist/atomic/buttons/fullscreen.d.ts +1 -0
- package/dist/atomic/buttons/fullscreen.d.ts.map +1 -1
- package/dist/atomic/buttons/fullscreen.js +35 -3
- package/dist/atomic/buttons/fullscreen.js.map +1 -1
- package/dist/atomic/layout/overlay/modal.d.ts +1 -10
- package/dist/atomic/layout/overlay/modal.d.ts.map +1 -1
- package/dist/atomic/layout/overlay/modal.js +28 -44
- package/dist/atomic/layout/overlay/modal.js.map +1 -1
- package/dist/atomic/layout/person/columns.js +2 -3
- package/dist/atomic/layout/person/columns.js.map +1 -1
- package/dist/atomic/text-lockup/date.d.ts +1 -4
- package/dist/atomic/text-lockup/date.d.ts.map +1 -1
- package/dist/atomic/text-lockup/date.js +42 -75
- package/dist/atomic/text-lockup/date.js.map +1 -1
- package/dist/composite/accordion/item.d.ts +3 -16
- package/dist/composite/accordion/item.d.ts.map +1 -1
- package/dist/composite/accordion/item.js +152 -245
- package/dist/composite/accordion/item.js.map +1 -1
- package/dist/composite/card/block.js +2 -3
- package/dist/composite/card/block.js.map +1 -1
- package/dist/composite/card/event-time.js +2 -3
- package/dist/composite/card/event-time.js.map +1 -1
- package/dist/composite/card/list.js +2 -3
- package/dist/composite/card/list.js.map +1 -1
- package/dist/composite/card/overlay/color.js +3 -3
- package/dist/composite/card/overlay/icon.js +3 -3
- package/dist/composite/card/overlay/image.d.ts.map +1 -1
- package/dist/composite/card/overlay/image.js +9 -12
- package/dist/composite/card/overlay/image.js.map +1 -1
- package/dist/composite/card/video/block.js +4 -3
- package/dist/composite/card/video/block.js.map +1 -1
- package/dist/composite/carousel/cards/index.d.ts +1 -8
- package/dist/composite/carousel/cards/index.d.ts.map +1 -1
- package/dist/composite/carousel/cards/index.js +163 -282
- package/dist/composite/carousel/cards/index.js.map +1 -1
- package/dist/composite/carousel/default/index.d.ts +9 -15
- package/dist/composite/carousel/default/index.d.ts.map +1 -1
- package/dist/composite/carousel/default/index.js +78 -129
- package/dist/composite/carousel/default/index.js.map +1 -1
- package/dist/composite/carousel/elements/equal-width-items.d.ts +37 -0
- package/dist/composite/carousel/elements/equal-width-items.d.ts.map +1 -0
- package/dist/composite/carousel/elements/{blocks.js → equal-width-items.js} +157 -227
- package/dist/composite/carousel/elements/equal-width-items.js.map +1 -0
- package/dist/composite/carousel/elements/full-screen.d.ts +3 -2
- package/dist/composite/carousel/elements/full-screen.d.ts.map +1 -1
- package/dist/composite/carousel/elements/full-screen.js +34 -41
- package/dist/composite/carousel/elements/full-screen.js.map +1 -1
- package/dist/composite/carousel/elements/image.d.ts +15 -2
- package/dist/composite/carousel/elements/image.d.ts.map +1 -1
- package/dist/composite/carousel/elements/image.js +176 -151
- package/dist/composite/carousel/elements/image.js.map +1 -1
- package/dist/composite/carousel/elements/index.d.ts +4 -1
- package/dist/composite/carousel/elements/index.d.ts.map +1 -1
- package/dist/composite/carousel/elements/indicator-wrapper.d.ts +13 -0
- package/dist/composite/carousel/elements/indicator-wrapper.d.ts.map +1 -0
- package/dist/composite/carousel/elements/indicator-wrapper.js +67 -0
- package/dist/composite/carousel/elements/indicator-wrapper.js.map +1 -0
- package/dist/composite/carousel/elements/nav-button.d.ts +82 -0
- package/dist/composite/carousel/elements/nav-button.d.ts.map +1 -0
- package/dist/composite/carousel/elements/nav-button.js +164 -0
- package/dist/composite/carousel/elements/nav-button.js.map +1 -0
- package/dist/composite/carousel/elements/overlay.d.ts +3 -2
- package/dist/composite/carousel/elements/overlay.d.ts.map +1 -1
- package/dist/composite/carousel/elements/overlay.js +85 -55
- package/dist/composite/carousel/elements/overlay.js.map +1 -1
- package/dist/composite/carousel/image/multiple.d.ts +2 -7
- package/dist/composite/carousel/image/multiple.d.ts.map +1 -1
- package/dist/composite/carousel/image/multiple.js +85 -150
- package/dist/composite/carousel/image/multiple.js.map +1 -1
- package/dist/composite/carousel/image/standard.d.ts +2 -7
- package/dist/composite/carousel/image/standard.d.ts.map +1 -1
- package/dist/composite/carousel/image/standard.js +148 -262
- package/dist/composite/carousel/image/standard.js.map +1 -1
- package/dist/composite/carousel/thumbnail/index.d.ts +1 -8
- package/dist/composite/carousel/thumbnail/index.d.ts.map +1 -1
- package/dist/composite/carousel/thumbnail/index.js +72 -113
- package/dist/composite/carousel/thumbnail/index.js.map +1 -1
- package/dist/composite/carousel/wide/container.d.ts +21 -20
- package/dist/composite/carousel/wide/container.d.ts.map +1 -1
- package/dist/composite/carousel/wide/container.js +37 -12
- package/dist/composite/carousel/wide/container.js.map +1 -1
- package/dist/composite/carousel/wide/controls.d.ts +5 -10
- package/dist/composite/carousel/wide/controls.d.ts.map +1 -1
- package/dist/composite/carousel/wide/controls.js +24 -94
- package/dist/composite/carousel/wide/controls.js.map +1 -1
- package/dist/composite/carousel/wide/frames.d.ts +18 -10
- package/dist/composite/carousel/wide/frames.d.ts.map +1 -1
- package/dist/composite/carousel/wide/frames.js +60 -78
- package/dist/composite/carousel/wide/frames.js.map +1 -1
- package/dist/composite/carousel/wide/index.d.ts.map +1 -1
- package/dist/composite/carousel/wide/index.js +11 -19
- package/dist/composite/carousel/wide/index.js.map +1 -1
- package/dist/composite/hero/custom/expand.js +3 -4
- package/dist/composite/hero/custom/expand.js.map +1 -1
- package/dist/composite/hero/custom/grid.js +2 -3
- package/dist/composite/hero/custom/grid.js.map +1 -1
- package/dist/composite/hero/custom/video-arrow.js +4 -3
- package/dist/composite/hero/custom/video-arrow.js.map +1 -1
- package/dist/composite/hero/logo.js +3 -3
- package/dist/composite/hero/minimal.js +3 -3
- package/dist/composite/hero/overlay.js +5 -4
- package/dist/composite/hero/overlay.js.map +1 -1
- package/dist/composite/hero/stacked.js +3 -3
- package/dist/composite/hero/standard.js +4 -3
- package/dist/composite/hero/standard.js.map +1 -1
- package/dist/composite/layout/box/logo.d.ts +1 -4
- package/dist/composite/layout/box/logo.d.ts.map +1 -1
- package/dist/composite/layout/box/logo.js +55 -103
- package/dist/composite/layout/box/logo.js.map +1 -1
- package/dist/composite/layout/image/expand.d.ts +1 -4
- package/dist/composite/layout/image/expand.d.ts.map +1 -1
- package/dist/composite/layout/image/expand.js +136 -243
- package/dist/composite/layout/image/expand.js.map +1 -1
- package/dist/composite/layout/scroll-top/index.d.ts +1 -7
- package/dist/composite/layout/scroll-top/index.d.ts.map +1 -1
- package/dist/composite/layout/scroll-top/index.js +65 -77
- package/dist/composite/layout/scroll-top/index.js.map +1 -1
- package/dist/composite/layout/sticky-columns/index.d.ts +2 -2
- package/dist/composite/layout/sticky-columns/index.d.ts.map +1 -1
- package/dist/composite/layout/sticky-columns/index.js +42 -70
- package/dist/composite/layout/sticky-columns/index.js.map +1 -1
- package/dist/composite/media/elements/gif.js +3 -3
- package/dist/composite/media/inline/caption.d.ts +4 -2
- package/dist/composite/media/inline/caption.d.ts.map +1 -1
- package/dist/composite/media/inline/caption.js +56 -67
- package/dist/composite/media/inline/caption.js.map +1 -1
- package/dist/composite/media/inline/index.d.ts +9 -8
- package/dist/composite/media/inline/index.d.ts.map +1 -1
- package/dist/composite/media/inline/standard.d.ts +1 -4
- package/dist/composite/media/inline/standard.d.ts.map +1 -1
- package/dist/composite/media/inline/standard.js +16 -24
- package/dist/composite/media/inline/standard.js.map +1 -1
- package/dist/composite/media/inline/wrapped.d.ts +4 -2
- package/dist/composite/media/inline/wrapped.d.ts.map +1 -1
- package/dist/composite/media/inline/wrapped.js +80 -83
- package/dist/composite/media/inline/wrapped.js.map +1 -1
- package/dist/composite/navigation/utility/alert.js +3 -4
- package/dist/composite/navigation/utility/alert.js.map +1 -1
- package/dist/composite/pathway/_common.js +4 -3
- package/dist/composite/pathway/_common.js.map +1 -1
- package/dist/composite/pathway/hero.js +3 -3
- package/dist/composite/person/bio/full.js +3 -3
- package/dist/composite/person/bio/small.js +2 -3
- package/dist/composite/person/bio/small.js.map +1 -1
- package/dist/composite/person/block.js +2 -3
- package/dist/composite/person/block.js.map +1 -1
- package/dist/composite/person/hero.js +3 -3
- package/dist/composite/person/list.js +2 -3
- package/dist/composite/person/list.js.map +1 -1
- package/dist/composite/person/tabular.js +2 -3
- package/dist/composite/person/tabular.js.map +1 -1
- package/dist/composite/slider/events.d.ts +6 -12
- package/dist/composite/slider/events.d.ts.map +1 -1
- package/dist/composite/slider/events.js +304 -428
- package/dist/composite/slider/events.js.map +1 -1
- package/dist/layout/image.d.ts +5 -10
- package/dist/layout/image.d.ts.map +1 -1
- package/dist/layout/image.js +27 -88
- package/dist/layout/image.js.map +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout.js +2 -2
- package/package.json +6 -6
- package/dist/composite/carousel/elements/blocks.d.ts +0 -42
- package/dist/composite/carousel/elements/blocks.d.ts.map +0 -1
- package/dist/composite/carousel/elements/blocks.js.map +0 -1
- package/dist/composite/carousel/wide/_elementModel.d.ts +0 -18
- package/dist/composite/carousel/wide/_elementModel.d.ts.map +0 -1
- package/dist/composite/carousel/wide/_elementModel.js +0 -29
- package/dist/composite/carousel/wide/_elementModel.js.map +0 -1
|
@@ -1,109 +1,61 @@
|
|
|
1
1
|
import * as token from "@universityofmaryland/web-token-library";
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
const ATTRIBUTE_THEME = "theme";
|
|
5
|
-
const ATTRIBUTE_BORDER = "border";
|
|
6
|
-
const THEME_DARK = "dark";
|
|
7
|
-
const ELEMENT_NAME = "umd-logo-block";
|
|
8
|
-
const ELEMENT_LOGO_BLOCK_CONTAINER = "logo-block-container";
|
|
9
|
-
const ELEMENT_LOGO_BLOCK_ASSET = "logo-block-asset";
|
|
10
|
-
const ELEMENT_LOGO_BLOCK_TEXT = "logo-block-text";
|
|
11
|
-
const IS_THEME_DARK = `[${ATTRIBUTE_THEME}="${THEME_DARK}"]`;
|
|
12
|
-
const IS_BORDER = `[${ATTRIBUTE_BORDER}]`;
|
|
13
|
-
const OVERWRITE_THEME_DARK_ASSET = `.${ELEMENT_LOGO_BLOCK_CONTAINER}${IS_THEME_DARK} .${ELEMENT_LOGO_BLOCK_ASSET}`;
|
|
14
|
-
const OVERWRITE_THEME_DARK_TEXT = `.${ELEMENT_LOGO_BLOCK_CONTAINER}${IS_THEME_DARK} .${ELEMENT_LOGO_BLOCK_TEXT}`;
|
|
15
|
-
const OVERWRITE_BORDER_ASSET = `.${ELEMENT_LOGO_BLOCK_CONTAINER}${IS_BORDER} .${ELEMENT_LOGO_BLOCK_ASSET}`;
|
|
16
|
-
const OVERWRITE_THEME_DARK_BORDER_ASSET = `.${ELEMENT_LOGO_BLOCK_CONTAINER}${IS_THEME_DARK}${IS_BORDER} .${ELEMENT_LOGO_BLOCK_ASSET}`;
|
|
17
|
-
const VariantThemeStyles = `
|
|
18
|
-
${OVERWRITE_THEME_DARK_ASSET} {
|
|
19
|
-
background-color: ${token.color.gray.darker};
|
|
20
|
-
padding: ${token.spacing.xl};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
${OVERWRITE_THEME_DARK_BORDER_ASSET} {
|
|
24
|
-
border: 1px solid ${token.color.gray.dark};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
${OVERWRITE_THEME_DARK_TEXT},
|
|
28
|
-
${OVERWRITE_THEME_DARK_TEXT} * {
|
|
29
|
-
color: ${token.color.white};
|
|
30
|
-
};
|
|
31
|
-
`;
|
|
32
|
-
const VariantBorderStyles = `
|
|
33
|
-
${OVERWRITE_BORDER_ASSET} {
|
|
34
|
-
border: 1px solid ${token.color.gray.light};
|
|
35
|
-
padding: ${token.spacing.xl};
|
|
36
|
-
height: 100%;
|
|
37
|
-
}
|
|
38
|
-
`;
|
|
39
|
-
const TextStyles = `
|
|
40
|
-
.${ELEMENT_LOGO_BLOCK_TEXT},
|
|
41
|
-
.${ELEMENT_LOGO_BLOCK_TEXT} * {
|
|
42
|
-
color: ${token.color.gray.darker};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
${jssToCSS({
|
|
46
|
-
styleObj: {
|
|
47
|
-
[`.${ELEMENT_LOGO_BLOCK_TEXT}`]: typography.sans.min
|
|
48
|
-
}
|
|
49
|
-
})}
|
|
50
|
-
|
|
51
|
-
${jssToCSS({
|
|
52
|
-
styleObj: {
|
|
53
|
-
[`.${ELEMENT_LOGO_BLOCK_TEXT} *`]: typography.sans.min
|
|
54
|
-
}
|
|
55
|
-
})}
|
|
56
|
-
|
|
57
|
-
.${ELEMENT_LOGO_BLOCK_TEXT} a:hover,
|
|
58
|
-
.${ELEMENT_LOGO_BLOCK_TEXT} a:focus {
|
|
59
|
-
text-decoration: underline;
|
|
60
|
-
}
|
|
61
|
-
`;
|
|
62
|
-
const STYLES_LOGO_BLOCK_ELEMENT = `
|
|
63
|
-
.${ELEMENT_LOGO_BLOCK_CONTAINER} {
|
|
64
|
-
container: ${ELEMENT_NAME} / inline-size;
|
|
65
|
-
height: 100%;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.${ELEMENT_LOGO_BLOCK_ASSET} {
|
|
69
|
-
display: flex;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
align-items: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.${ELEMENT_LOGO_BLOCK_ASSET} > * {
|
|
75
|
-
max-height: 50px;
|
|
76
|
-
max-width: 150px;
|
|
77
|
-
display: flex;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.${ELEMENT_LOGO_BLOCK_ASSET} img {
|
|
81
|
-
object-fit: contain;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.${ELEMENT_LOGO_BLOCK_ASSET} + * {
|
|
85
|
-
margin-top: ${token.spacing.min};
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
${TextStyles}
|
|
89
|
-
${VariantBorderStyles}
|
|
90
|
-
${VariantThemeStyles}
|
|
91
|
-
`;
|
|
2
|
+
import * as Styles from "@universityofmaryland/web-styles-library";
|
|
3
|
+
import { ElementBuilder } from "@universityofmaryland/web-builder-library";
|
|
92
4
|
const CreateBoxLogoElement = (element) => {
|
|
93
5
|
const { isThemeDark, image, text, isBordered = false } = element;
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
6
|
+
const createText = () => {
|
|
7
|
+
if (!text) {
|
|
8
|
+
console.warn("CreateBoxLogoElement: text element is not provided");
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return new ElementBuilder(text).withClassName("logo-block-text").styled(Styles.typography.sans.min).withStyles({
|
|
12
|
+
element: {
|
|
13
|
+
color: token.color.gray.darker,
|
|
14
|
+
...isThemeDark && { color: token.color.white },
|
|
15
|
+
"& *": {
|
|
16
|
+
...Styles.typography.sans.min,
|
|
17
|
+
color: token.color.gray.darker,
|
|
18
|
+
...isThemeDark && { color: token.color.white }
|
|
19
|
+
},
|
|
20
|
+
"& a:hover, & a:focus": {
|
|
21
|
+
textDecoration: "underline"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}).build();
|
|
25
|
+
};
|
|
26
|
+
const assetBuilder = new ElementBuilder().withClassName("logo-block-asset").withChild(image).withStyles({
|
|
27
|
+
element: {
|
|
28
|
+
display: "flex",
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
...isBordered && {
|
|
32
|
+
border: `1px solid ${token.color.gray.light}`,
|
|
33
|
+
...isThemeDark && { border: `1px solid ${token.color.gray.dark}` },
|
|
34
|
+
height: "100%"
|
|
35
|
+
},
|
|
36
|
+
...isThemeDark && {
|
|
37
|
+
backgroundColor: token.color.gray.darker
|
|
38
|
+
},
|
|
39
|
+
...(isBordered || isThemeDark) && { padding: token.spacing.xl },
|
|
40
|
+
"& > *": {
|
|
41
|
+
maxHeight: "50px",
|
|
42
|
+
maxWidth: "150px",
|
|
43
|
+
display: "flex"
|
|
44
|
+
},
|
|
45
|
+
"& img": {
|
|
46
|
+
objectFit: "contain"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
siblingAfter: {
|
|
50
|
+
marginTop: token.spacing.min
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return new ElementBuilder().withClassName("logo-block-container").withStyles({
|
|
54
|
+
element: {
|
|
55
|
+
containerType: "inline-size",
|
|
56
|
+
height: "100%"
|
|
57
|
+
}
|
|
58
|
+
}).withChild(assetBuilder).withChild(createText()).build();
|
|
107
59
|
};
|
|
108
60
|
const createCompositeLayoutBoxLogo = CreateBoxLogoElement;
|
|
109
61
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo.js","sources":["../../../../source/composite/layout/box/logo.ts"],"sourcesContent":["import * as token from '@universityofmaryland/web-token-library';\nimport * as
|
|
1
|
+
{"version":3,"file":"logo.js","sources":["../../../../source/composite/layout/box/logo.ts"],"sourcesContent":["import * as token from '@universityofmaryland/web-token-library';\nimport * as Styles from '@universityofmaryland/web-styles-library';\nimport { ElementBuilder } from '@universityofmaryland/web-builder-library';\n\nexport type TypeLogoRequirements = {\n isBordered?: boolean;\n isThemeDark?: boolean;\n image: HTMLElement;\n text?: HTMLElement | null;\n};\n\nconst CreateBoxLogoElement = (element: TypeLogoRequirements) => {\n const { isThemeDark, image, text, isBordered = false } = element;\n\n const createText = () => {\n if (!text) {\n console.warn('CreateBoxLogoElement: text element is not provided');\n return null;\n }\n\n return new ElementBuilder(text)\n .withClassName('logo-block-text')\n .styled(Styles.typography.sans.min)\n .withStyles({\n element: {\n color: token.color.gray.darker,\n ...(isThemeDark && { color: token.color.white }),\n '& *': {\n ...Styles.typography.sans.min,\n color: token.color.gray.darker,\n ...(isThemeDark && { color: token.color.white }),\n },\n '& a:hover, & a:focus': {\n textDecoration: 'underline',\n },\n },\n })\n .build();\n };\n\n const assetBuilder = new ElementBuilder()\n .withClassName('logo-block-asset')\n .withChild(image)\n .withStyles({\n element: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n ...(isBordered && {\n border: `1px solid ${token.color.gray.light}`,\n ...(isThemeDark && { border: `1px solid ${token.color.gray.dark}` }),\n height: '100%',\n }),\n ...(isThemeDark && {\n backgroundColor: token.color.gray.darker,\n }),\n ...((isBordered || isThemeDark) && { padding: token.spacing.xl }),\n '& > *': {\n maxHeight: '50px',\n maxWidth: '150px',\n display: 'flex',\n },\n '& img': {\n objectFit: 'contain',\n },\n },\n siblingAfter: {\n marginTop: token.spacing.min,\n },\n });\n\n return new ElementBuilder()\n .withClassName('logo-block-container')\n .withStyles({\n element: {\n containerType: 'inline-size',\n height: '100%',\n },\n })\n .withChild(assetBuilder)\n .withChild(createText())\n .build();\n};\n\nexport const createCompositeLayoutBoxLogo = CreateBoxLogoElement;\n"],"names":[],"mappings":";;;AAWA,MAAM,uBAAuB,CAAC,YAAkC;AAC9D,QAAM,EAAE,aAAa,OAAO,MAAM,aAAa,UAAU;AAEzD,QAAM,aAAa,MAAM;AACvB,QAAI,CAAC,MAAM;AACT,cAAQ,KAAK,oDAAoD;AACjE,aAAO;AAAA,IACT;AAEA,WAAO,IAAI,eAAe,IAAI,EAC3B,cAAc,iBAAiB,EAC/B,OAAO,OAAO,WAAW,KAAK,GAAG,EACjC,WAAW;AAAA,MACV,SAAS;AAAA,QACP,OAAO,MAAM,MAAM,KAAK;AAAA,QACxB,GAAI,eAAe,EAAE,OAAO,MAAM,MAAM,MAAA;AAAA,QACxC,OAAO;AAAA,UACL,GAAG,OAAO,WAAW,KAAK;AAAA,UAC1B,OAAO,MAAM,MAAM,KAAK;AAAA,UACxB,GAAI,eAAe,EAAE,OAAO,MAAM,MAAM,MAAA;AAAA,QAAM;AAAA,QAEhD,wBAAwB;AAAA,UACtB,gBAAgB;AAAA,QAAA;AAAA,MAClB;AAAA,IACF,CACD,EACA,MAAA;AAAA,EACL;AAEA,QAAM,eAAe,IAAI,eAAA,EACtB,cAAc,kBAAkB,EAChC,UAAU,KAAK,EACf,WAAW;AAAA,IACV,SAAS;AAAA,MACP,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,YAAY;AAAA,MACZ,GAAI,cAAc;AAAA,QAChB,QAAQ,aAAa,MAAM,MAAM,KAAK,KAAK;AAAA,QAC3C,GAAI,eAAe,EAAE,QAAQ,aAAa,MAAM,MAAM,KAAK,IAAI,GAAA;AAAA,QAC/D,QAAQ;AAAA,MAAA;AAAA,MAEV,GAAI,eAAe;AAAA,QACjB,iBAAiB,MAAM,MAAM,KAAK;AAAA,MAAA;AAAA,MAEpC,IAAK,cAAc,gBAAgB,EAAE,SAAS,MAAM,QAAQ,GAAA;AAAA,MAC5D,SAAS;AAAA,QACP,WAAW;AAAA,QACX,UAAU;AAAA,QACV,SAAS;AAAA,MAAA;AAAA,MAEX,SAAS;AAAA,QACP,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAEF,cAAc;AAAA,MACZ,WAAW,MAAM,QAAQ;AAAA,IAAA;AAAA,EAC3B,CACD;AAEH,SAAO,IAAI,eAAA,EACR,cAAc,sBAAsB,EACpC,WAAW;AAAA,IACV,SAAS;AAAA,MACP,eAAe;AAAA,MACf,QAAQ;AAAA,IAAA;AAAA,EACV,CACD,EACA,UAAU,YAAY,EACtB,UAAU,WAAA,CAAY,EACtB,MAAA;AACL;AAEO,MAAM,+BAA+B;"}
|
|
@@ -2,9 +2,6 @@ type TypeLayoutImageExpandProps = {
|
|
|
2
2
|
content: HTMLElement;
|
|
3
3
|
image: HTMLImageElement;
|
|
4
4
|
};
|
|
5
|
-
export declare const createCompositeLayoutImageExpand: (props: TypeLayoutImageExpandProps) =>
|
|
6
|
-
element: HTMLDivElement;
|
|
7
|
-
styles: string;
|
|
8
|
-
};
|
|
5
|
+
export declare const createCompositeLayoutImageExpand: (props: TypeLayoutImageExpandProps) => import('../../../../builder/dist/index.d.ts').ElementModel<HTMLElement>;
|
|
9
6
|
export {};
|
|
10
7
|
//# sourceMappingURL=expand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../../source/composite/layout/image/expand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../../source/composite/layout/image/expand.ts"],"names":[],"mappings":"AAYA,KAAK,0BAA0B,GAAG;IAChC,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AA+NF,eAAO,MAAM,gCAAgC,UA/DJ,0BAA0B,kFA+DK,CAAC"}
|
|
@@ -1,267 +1,165 @@
|
|
|
1
1
|
import * as token from "@universityofmaryland/web-token-library";
|
|
2
2
|
import * as layout from "@universityofmaryland/web-styles-library/layout";
|
|
3
|
-
import {
|
|
3
|
+
import { ElementBuilder } from "@universityofmaryland/web-builder-library";
|
|
4
|
+
import { withViewTimelineAnimation, parsePixelValue } from "@universityofmaryland/web-utilities-library/styles";
|
|
4
5
|
import { isScreenZoomed, isPreferredReducedMotion } from "@universityofmaryland/web-utilities-library/accessibility";
|
|
5
|
-
const
|
|
6
|
-
const ELEMENT_NAME = "umd-layout-image-expand";
|
|
7
|
-
const ELEMENT_EXPLAND_DECLARATION = "layout-image-expand-declaration";
|
|
8
|
-
const ELEMENT_EXPAND_CONTAINER = "layout-image-expand-container";
|
|
9
|
-
const ELEMENT_EXPAND_IMAGE_CONTAINER = "layout-image-expand-image-container";
|
|
10
|
-
const ELEMENT_EXPAND_IMAGE_POSITION = "layout-image-expand-image-position";
|
|
11
|
-
const ELEMENT_EXPAND_IMAGE_SIZE = "layout-image-expand-image-size";
|
|
12
|
-
const ELEMENT_EXPAND_IMAGE_OVERLAY = "layout-image-expand-image-overlay";
|
|
13
|
-
const ELEMENT_EXPAND_TEXT_CONTAINER = "layout-image-expand-text-container";
|
|
14
|
-
const ELEMENT_EXPAND_TEXT_LOCK = "layout-image-expand-text-lock";
|
|
15
|
-
const ELEMENT_EXPAND_TEXT_ANIMATION = "layout-image-expand-text-animation";
|
|
16
|
-
const TextLock = `
|
|
17
|
-
${jssToCSS({
|
|
18
|
-
styleObj: {
|
|
19
|
-
[`.${ELEMENT_EXPAND_TEXT_LOCK}`]: layout.space.horizontal.larger
|
|
20
|
-
}
|
|
21
|
-
})}
|
|
22
|
-
|
|
23
|
-
.${ELEMENT_EXPAND_TEXT_LOCK} {
|
|
24
|
-
display: flex;
|
|
25
|
-
height: 100%;
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
const TextContainer = `
|
|
29
|
-
.${ELEMENT_EXPAND_TEXT_CONTAINER} {
|
|
30
|
-
position: relative;
|
|
31
|
-
padding-top: ${token.spacing.max};
|
|
32
|
-
padding-bottom: ${token.spacing.max};
|
|
33
|
-
height: 100%;
|
|
34
|
-
z-index: 9999;
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
const TextAnimation = `
|
|
38
|
-
.${ELEMENT_EXPAND_TEXT_ANIMATION} {
|
|
39
|
-
width: 100vw;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
43
|
-
@supports (animation-timeline: scroll()) {
|
|
44
|
-
.${ELEMENT_EXPAND_TEXT_ANIMATION} {
|
|
45
|
-
position: absolute;
|
|
46
|
-
top: 0;
|
|
47
|
-
height: 80vh;
|
|
48
|
-
transform: translateY(80vh);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@media (${token.media.queries.tablet.min}) {
|
|
54
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
55
|
-
@supports (animation-timeline: scroll()) {
|
|
56
|
-
.${ELEMENT_EXPAND_TEXT_ANIMATION} {
|
|
57
|
-
transform: translateY(100vh);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
63
|
-
const ImageOverlayContainer = `
|
|
6
|
+
const KEYFRAMES = `
|
|
64
7
|
@keyframes img-overlay {
|
|
65
8
|
from { opacity: 0; }
|
|
66
9
|
to { opacity: 1; }
|
|
67
10
|
}
|
|
68
11
|
|
|
69
|
-
.${ELEMENT_EXPAND_IMAGE_OVERLAY} {
|
|
70
|
-
position: absolute;
|
|
71
|
-
top: 0;
|
|
72
|
-
left: 0;
|
|
73
|
-
height: 100%;
|
|
74
|
-
width: 100%;
|
|
75
|
-
background: rgba(0,0,0,0.65);
|
|
76
|
-
opacity: 1;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
80
|
-
@supports (animation-timeline: scroll()) {
|
|
81
|
-
.${ELEMENT_EXPAND_IMAGE_OVERLAY} {
|
|
82
|
-
opacity: 1;
|
|
83
|
-
animation: img-overlay forwards;
|
|
84
|
-
animation-timeline: view();
|
|
85
|
-
animation-range-start: 70vh;
|
|
86
|
-
animation-range-end: 100vh;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
91
|
-
const ImageSizeContainer = `
|
|
92
12
|
@keyframes img-size {
|
|
93
13
|
to { width: 100%; height: 100vh; }
|
|
94
14
|
}
|
|
95
|
-
|
|
96
|
-
.${ELEMENT_EXPAND_IMAGE_SIZE} {
|
|
97
|
-
overflow: hidden;
|
|
98
|
-
position: relative;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
102
|
-
@supports (animation-timeline: scroll()) {
|
|
103
|
-
.${ELEMENT_EXPAND_IMAGE_SIZE} {
|
|
104
|
-
width: ${token.spacing.maxWidth.smallest};
|
|
105
|
-
height: 70vh;
|
|
106
|
-
animation: img-size ease-in-out forwards;
|
|
107
|
-
animation-timeline: view();
|
|
108
|
-
animation-range-start: cover;
|
|
109
|
-
animation-range-end: 200vh;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@supports not (animation-timeline: scroll()) {
|
|
115
|
-
.${ELEMENT_EXPAND_IMAGE_SIZE} {
|
|
116
|
-
height: 100%;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
@media (prefers-reduced-motion: reduce) {
|
|
121
|
-
.${ELEMENT_EXPAND_IMAGE_SIZE} {
|
|
122
|
-
height: 100%;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
15
|
`;
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
animation-range-end: 200vh;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@supports not (animation-timeline: scroll()) {
|
|
148
|
-
.${ELEMENT_EXPAND_IMAGE_POSITION} {
|
|
149
|
-
height: 100%;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
@media (prefers-reduced-motion: reduce) {
|
|
154
|
-
.${ELEMENT_EXPAND_IMAGE_POSITION} {
|
|
155
|
-
height: 100%;
|
|
16
|
+
const CreateImageContainer = ({ image }) => {
|
|
17
|
+
const imageOverlay = new ElementBuilder().withClassName("layout-image-expand-image-overlay").withStyles({
|
|
18
|
+
element: {
|
|
19
|
+
position: "absolute",
|
|
20
|
+
top: 0,
|
|
21
|
+
left: 0,
|
|
22
|
+
height: "100%",
|
|
23
|
+
width: "100%",
|
|
24
|
+
background: "rgba(0,0,0,0.65)",
|
|
25
|
+
opacity: 1,
|
|
26
|
+
...withViewTimelineAnimation({
|
|
27
|
+
animation: "img-overlay forwards",
|
|
28
|
+
animationTimeline: "view()",
|
|
29
|
+
animationRangeStart: "70vh",
|
|
30
|
+
animationRangeEnd: "100vh"
|
|
31
|
+
})
|
|
156
32
|
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
33
|
+
}).build();
|
|
34
|
+
const imageSize = new ElementBuilder().withClassName("layout-image-expand-image-size").withStyles({
|
|
35
|
+
element: {
|
|
36
|
+
overflow: "hidden",
|
|
37
|
+
position: "relative",
|
|
38
|
+
...withViewTimelineAnimation({
|
|
39
|
+
width: token.spacing.maxWidth.smallest,
|
|
40
|
+
height: "70vh",
|
|
41
|
+
animation: "img-size ease-in-out forwards",
|
|
42
|
+
animationTimeline: "view()",
|
|
43
|
+
animationRangeStart: "cover",
|
|
44
|
+
animationRangeEnd: "200vh"
|
|
45
|
+
}),
|
|
46
|
+
"@supports not (animation-timeline: scroll())": {
|
|
47
|
+
height: "100%"
|
|
48
|
+
},
|
|
49
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
50
|
+
height: "100%"
|
|
51
|
+
},
|
|
52
|
+
"& img": {
|
|
53
|
+
display: "block",
|
|
54
|
+
width: "100%",
|
|
55
|
+
height: "100%",
|
|
56
|
+
objectFit: "cover"
|
|
172
57
|
}
|
|
173
58
|
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
59
|
+
}).withChildren(image, imageOverlay).build();
|
|
60
|
+
const imagePosition = new ElementBuilder().withClassName("layout-image-expand-image-position").withStyles({
|
|
61
|
+
element: {
|
|
62
|
+
width: "100%",
|
|
63
|
+
margin: "0 auto",
|
|
64
|
+
...withViewTimelineAnimation({
|
|
65
|
+
display: "flex",
|
|
66
|
+
justifyContent: "center",
|
|
67
|
+
position: "sticky",
|
|
68
|
+
top: 0,
|
|
69
|
+
animation: "img-position ease-in-out forwards",
|
|
70
|
+
animationTimeline: "view()",
|
|
71
|
+
animationRangeStart: "cover",
|
|
72
|
+
animationRangeEnd: "200vh"
|
|
73
|
+
}),
|
|
74
|
+
"@supports not (animation-timeline: scroll())": {
|
|
75
|
+
height: "100%"
|
|
76
|
+
},
|
|
77
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
78
|
+
height: "100%"
|
|
193
79
|
}
|
|
194
80
|
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
81
|
+
}).withChild(imageSize).build();
|
|
82
|
+
return new ElementBuilder().withClassName("layout-image-expand-image-container").withStyles({
|
|
83
|
+
element: {
|
|
84
|
+
position: "absolute",
|
|
85
|
+
top: 0,
|
|
86
|
+
left: 0,
|
|
87
|
+
width: "100%",
|
|
88
|
+
height: "100%",
|
|
89
|
+
...withViewTimelineAnimation({
|
|
90
|
+
position: "relative"
|
|
91
|
+
})
|
|
204
92
|
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.${ELEMENT_EXPLAND_DECLARATION} img {
|
|
208
|
-
display: block;
|
|
209
|
-
width: 100%;
|
|
210
|
-
height: 100%;
|
|
211
|
-
object-fit: cover;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
${Container}
|
|
215
|
-
${ImageContainer}
|
|
216
|
-
${ImageSizeContainer}
|
|
217
|
-
${ImagePosition}
|
|
218
|
-
${ImageOverlayContainer}
|
|
219
|
-
${TextAnimation}
|
|
220
|
-
${TextContainer}
|
|
221
|
-
${TextLock}
|
|
222
|
-
`;
|
|
223
|
-
const CreateImageContainer = ({ image }) => {
|
|
224
|
-
const imageContainer = document.createElement("div");
|
|
225
|
-
const imagePosition = document.createElement("div");
|
|
226
|
-
const imageSize = document.createElement("div");
|
|
227
|
-
const imageOverlay = document.createElement("div");
|
|
228
|
-
imageOverlay.classList.add(ELEMENT_EXPAND_IMAGE_OVERLAY);
|
|
229
|
-
imageSize.classList.add(ELEMENT_EXPAND_IMAGE_SIZE);
|
|
230
|
-
imageSize.appendChild(image);
|
|
231
|
-
imageSize.appendChild(imageOverlay);
|
|
232
|
-
imagePosition.classList.add(ELEMENT_EXPAND_IMAGE_POSITION);
|
|
233
|
-
imagePosition.appendChild(imageSize);
|
|
234
|
-
imageContainer.appendChild(imagePosition);
|
|
235
|
-
imageContainer.classList.add(ELEMENT_EXPAND_IMAGE_CONTAINER);
|
|
236
|
-
return imageContainer;
|
|
93
|
+
}).withChild(imagePosition).build();
|
|
237
94
|
};
|
|
238
95
|
const CreateTextContainer = ({ content }) => {
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
96
|
+
const textLock = new ElementBuilder().withClassName("layout-image-expand-text-lock").withStyles({
|
|
97
|
+
element: {
|
|
98
|
+
...layout.space.horizontal.larger,
|
|
99
|
+
display: "flex",
|
|
100
|
+
height: "100%"
|
|
101
|
+
}
|
|
102
|
+
}).withChild(content).build();
|
|
103
|
+
const textContainer = new ElementBuilder().withClassName("layout-image-expand-text-container").withStyles({
|
|
104
|
+
element: {
|
|
105
|
+
position: "relative",
|
|
106
|
+
paddingTop: token.spacing.max,
|
|
107
|
+
paddingBottom: token.spacing.max,
|
|
108
|
+
height: "100%",
|
|
109
|
+
zIndex: 9999
|
|
110
|
+
}
|
|
111
|
+
}).withChild(textLock).build();
|
|
112
|
+
return new ElementBuilder().withClassName("layout-image-expand-text-animation").withStyles({
|
|
113
|
+
element: {
|
|
114
|
+
width: "100vw",
|
|
115
|
+
...withViewTimelineAnimation({
|
|
116
|
+
position: "absolute",
|
|
117
|
+
top: 0,
|
|
118
|
+
height: "80vh",
|
|
119
|
+
transform: "translateY(80vh)"
|
|
120
|
+
}),
|
|
121
|
+
[`@media (${token.media.queries.tablet.min})`]: {
|
|
122
|
+
...withViewTimelineAnimation({
|
|
123
|
+
transform: "translateY(100vh)"
|
|
124
|
+
})
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}).withChild(textContainer).build();
|
|
249
128
|
};
|
|
250
129
|
const CreateImageExpandElement = (props) => {
|
|
251
|
-
const
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
const textContainer = CreateTextContainer(props);
|
|
130
|
+
const imageContainerModel = CreateImageContainer(props);
|
|
131
|
+
const textContainerModel = CreateTextContainer(props);
|
|
132
|
+
let containerElement;
|
|
255
133
|
const sizeImageForText = () => {
|
|
256
|
-
const textContainerHeight =
|
|
257
|
-
const imageContainerHeight =
|
|
134
|
+
const textContainerHeight = textContainerModel.element.clientHeight + parsePixelValue(token.spacing["2xl"]) * 2;
|
|
135
|
+
const imageContainerHeight = containerElement.clientHeight;
|
|
258
136
|
if (textContainerHeight > imageContainerHeight) {
|
|
259
|
-
|
|
137
|
+
containerElement.style.minHeight = `${textContainerHeight}px`;
|
|
260
138
|
}
|
|
261
139
|
};
|
|
140
|
+
const containerModel = new ElementBuilder().withClassName("layout-image-expand-container").withStyles({
|
|
141
|
+
element: {
|
|
142
|
+
height: "100%",
|
|
143
|
+
width: "100%",
|
|
144
|
+
position: "relative"
|
|
145
|
+
}
|
|
146
|
+
}).ref((element) => {
|
|
147
|
+
containerElement = element;
|
|
148
|
+
}).withChildren(imageContainerModel, textContainerModel).build();
|
|
149
|
+
const declarationModel = new ElementBuilder().withClassName("layout-image-expand-declaration").withStyles({
|
|
150
|
+
element: {
|
|
151
|
+
containerType: "inline-size",
|
|
152
|
+
overflow: "clip",
|
|
153
|
+
...withViewTimelineAnimation({ height: "180vh" }),
|
|
154
|
+
[`@media (${token.media.queries.tablet.min})`]: {
|
|
155
|
+
...withViewTimelineAnimation({ height: "200vh" })
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}).withChild(containerModel).build();
|
|
159
|
+
declarationModel.styles += KEYFRAMES;
|
|
262
160
|
if (isScreenZoomed() && !isPreferredReducedMotion()) {
|
|
263
|
-
|
|
264
|
-
|
|
161
|
+
textContainerModel.element.style.height = "90vh";
|
|
162
|
+
textContainerModel.element.style.transform = "translateY(0)";
|
|
265
163
|
}
|
|
266
164
|
if (!CSS.supports("animation-timeline", "view()")) {
|
|
267
165
|
setTimeout(() => {
|
|
@@ -269,12 +167,7 @@ const CreateImageExpandElement = (props) => {
|
|
|
269
167
|
}, 1e3);
|
|
270
168
|
window.addEventListener("resize", () => sizeImageForText());
|
|
271
169
|
}
|
|
272
|
-
|
|
273
|
-
container.appendChild(textContainer);
|
|
274
|
-
container.classList.add(ELEMENT_EXPAND_CONTAINER);
|
|
275
|
-
declaration.appendChild(container);
|
|
276
|
-
declaration.classList.add(ELEMENT_EXPLAND_DECLARATION);
|
|
277
|
-
return { element: declaration, styles: STYLES_LAYOUT_IMAGE_EXPAND };
|
|
170
|
+
return declarationModel;
|
|
278
171
|
};
|
|
279
172
|
const createCompositeLayoutImageExpand = CreateImageExpandElement;
|
|
280
173
|
export {
|