@kvdbil/components 15.0.54 → 15.0.55
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.
|
@@ -27,21 +27,21 @@
|
|
|
27
27
|
padding: 3rem 1.5rem;
|
|
28
28
|
z-index: 1;
|
|
29
29
|
flex: 1;
|
|
30
|
-
|
|
30
|
+
`,c=o.default.iframe`
|
|
31
31
|
position: absolute;
|
|
32
32
|
width: 100%;
|
|
33
33
|
height: 100%;
|
|
34
34
|
top: 0;
|
|
35
35
|
left: 0;
|
|
36
|
-
|
|
36
|
+
`,$=e=>"number"==typeof e,u=e=>"string"==typeof e,p=o.default.div`
|
|
37
37
|
width: 100%;
|
|
38
38
|
min-height: 440px;
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
justify-content: center;
|
|
42
42
|
|
|
43
|
-
${({$url:e,...t})=>e&&`\n background: url('${e}');\n background-repeat: no-repeat;\n background-size: cover;\n background-position: ${(({$positionX:e,$positionY:t})=>{if(
|
|
44
|
-
`,
|
|
43
|
+
${({$url:e,...t})=>e&&`\n background: url('${e}');\n background-repeat: no-repeat;\n background-size: cover;\n background-position: ${(({$positionX:e,$positionY:t})=>{if($(e)&&$(t))return`${e}% ${t}%`;if(u(e)&&u(t))return`${e} ${t}`;if(e||t)return`${($(e)?`${e}%`:e)||"50%"} ${($(t)?`${t}%`:t)||"50%"}`;return"50% 50%"})(t)};\n `}
|
|
44
|
+
`,h=o.default.div`
|
|
45
45
|
padding-left: 1rem;
|
|
46
46
|
padding-right: 1rem;
|
|
47
47
|
z-index: 2;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
padding-left: 1.5rem;
|
|
51
51
|
padding-right: 1.5rem;
|
|
52
52
|
}
|
|
53
|
-
`,
|
|
53
|
+
`,m=o.default.div`
|
|
54
54
|
${({$centered:e})=>e&&"\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n "}
|
|
55
55
|
|
|
56
56
|
${({$maxWidth:e,$dynamicGutter:t})=>!t&&`\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n max-width: ${e}rem;\n `}
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
margin-top: 3rem;
|
|
72
72
|
|
|
73
73
|
${({$shadow:e,theme:t})=>e&&`box-shadow: ${t.elevations.elevation8};`}
|
|
74
|
-
`;exports.default=({imageProps:t,imageElement:i,videoProps:n,children:r,align:o,direction:d,justify
|
|
74
|
+
`;exports.default=({imageProps:t,imageElement:i,videoProps:n,children:r,align:o,direction:d,justify:$,contentMaxWidth:u=64,heading:y,headingColor:w="dark",subheading:b,button:v,dynamicGutter:j,isLoading:k=!1,contentCentered:q=!1,containerStyle:G,elementShadow:V=!1,childrenNoWrapper:W=!1})=>{const{autoplay:_=0,controls:z=0,disablekb:C=0,end:E,loop:M=0,modestbranding:P=1,start:S=0,showInfo:F=0}=n?.ytConfig||{};return k?e.jsx(l,{"data-testid":"loader"}):e.jsx(a,{style:G,children:n?e.jsx(c,{"data-testid":"hero-video",title:"video-frame",src:`${n.src}?disabledkb=${C}&autoplay=${_}&controls=${z}&loop=${M}&modestbranding=${P}&start=${S}&showInfo=${F}${E?`&end=${E}`:""}`,width:"100%",height:"100%",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):e.jsxs(p,{"data-testid":"hero-image",$positionX:i?void 0:t?.x,$positionY:i?void 0:t?.y,$url:i?void 0:t?.src,children:[i,e.jsxs(h,{children:[(y||b||v)&&e.jsxs(m,{$maxWidth:u,$dynamicGutter:j,$centered:q,children:[y&&e.jsx(f,{as:"h1",$color:w,$shadow:V,children:y}),b&&e.jsx(g,{$color:w,$shadow:V,children:b}),v&&e.jsx(x,{$shadow:V,children:v})]}),r&&e.jsxs(e.Fragment,{children:[!W&&e.jsx(s,{$pointerEvents:n?"none":"auto",$align:o||"flex-start",$direction:d||"column",$justify:$||"flex-start",children:r}),W&&r]})]})]})})};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as a,Fragment as F}from"react/jsx-runtime";import t,{keyframes as I}from"styled-components";import{Display3 as Y,Title as q}from"../../typography/Heading/index.js";import{mq as m}from"../../shared/media-queries.js";const D=t.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
min-height: 440px;
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
|
-
`,
|
|
6
|
+
`,M=I`
|
|
7
7
|
0% {
|
|
8
8
|
background-color:#f5f5f5;
|
|
9
9
|
}
|
|
@@ -14,11 +14,11 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as C}from"
|
|
|
14
14
|
|
|
15
15
|
100% {
|
|
16
16
|
background-color:#f5f5f5;
|
|
17
|
-
}`,
|
|
17
|
+
}`,N=t.div`
|
|
18
18
|
width: 100%;
|
|
19
19
|
height: 440px;
|
|
20
|
-
animation: ${
|
|
21
|
-
`,
|
|
20
|
+
animation: ${M} 2s linear infinite;
|
|
21
|
+
`,P=t.div`
|
|
22
22
|
pointer-events: ${({$pointerEvents:e})=>e};
|
|
23
23
|
display: flex;
|
|
24
24
|
flex-direction: ${({$direction:e})=>e};
|
|
@@ -27,13 +27,13 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as C}from"
|
|
|
27
27
|
padding: 3rem 1.5rem;
|
|
28
28
|
z-index: 1;
|
|
29
29
|
flex: 1;
|
|
30
|
-
`,
|
|
30
|
+
`,T=t.iframe`
|
|
31
31
|
position: absolute;
|
|
32
32
|
width: 100%;
|
|
33
33
|
height: 100%;
|
|
34
34
|
top: 0;
|
|
35
35
|
left: 0;
|
|
36
|
-
`,
|
|
36
|
+
`,d=e=>typeof e=="number",f=e=>typeof e=="string",X=({$positionX:e,$positionY:i})=>{if(d(e)&&d(i))return`${e}% ${i}%`;if(f(e)&&f(i))return`${e} ${i}`;if(e||i){const r=d(e)?`${e}%`:e,n=d(i)?`${i}%`:i;return`${r||"50%"} ${n||"50%"}`}return"50% 50%"},A=t.div`
|
|
37
37
|
width: 100%;
|
|
38
38
|
min-height: 440px;
|
|
39
39
|
display: flex;
|
|
@@ -44,9 +44,9 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as C}from"
|
|
|
44
44
|
background: url('${e}');
|
|
45
45
|
background-repeat: no-repeat;
|
|
46
46
|
background-size: cover;
|
|
47
|
-
background-position: ${
|
|
47
|
+
background-position: ${X(i)};
|
|
48
48
|
`}
|
|
49
|
-
`,
|
|
49
|
+
`,B=t.div`
|
|
50
50
|
padding-left: 1rem;
|
|
51
51
|
padding-right: 1rem;
|
|
52
52
|
z-index: 2;
|
|
@@ -55,7 +55,7 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as C}from"
|
|
|
55
55
|
padding-left: 1.5rem;
|
|
56
56
|
padding-right: 1.5rem;
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`,H=t.div`
|
|
59
59
|
${({$centered:e})=>e&&`
|
|
60
60
|
display: flex;
|
|
61
61
|
flex-direction: column;
|
|
@@ -81,19 +81,19 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as C}from"
|
|
|
81
81
|
margin-right: ${e.laptopVw}vw;
|
|
82
82
|
}
|
|
83
83
|
`}
|
|
84
|
-
`,
|
|
84
|
+
`,J=t(Y)`
|
|
85
85
|
margin: 0;
|
|
86
86
|
color: ${({$color:e,theme:i})=>i.colors.text[e]};
|
|
87
87
|
|
|
88
88
|
${({$shadow:e})=>e&&"text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.2);"}
|
|
89
|
-
`,
|
|
89
|
+
`,L=t(q)`
|
|
90
90
|
margin: 0.25rem 0;
|
|
91
91
|
color: ${({$color:e,theme:i})=>i.colors.text[e]};
|
|
92
92
|
|
|
93
93
|
${({$shadow:e})=>e&&"text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.2);"}
|
|
94
|
-
`,
|
|
94
|
+
`,O=t.div`
|
|
95
95
|
display: inline-block;
|
|
96
96
|
margin-top: 3rem;
|
|
97
97
|
|
|
98
98
|
${({$shadow:e,theme:i})=>e&&`box-shadow: ${i.elevations.elevation8};`}
|
|
99
|
-
`,
|
|
99
|
+
`,K=({imageProps:e,imageElement:i,videoProps:r,children:n,align:u,direction:x,justify:w,contentMaxWidth:b=64,heading:l,headingColor:p="dark",subheading:s,button:$,dynamicGutter:y,isLoading:v=!1,contentCentered:k=!1,containerStyle:j,elementShadow:c=!1,childrenNoWrapper:h=!1})=>{const{autoplay:G=0,controls:V=0,disablekb:W=0,end:g,loop:z=0,modestbranding:E=1,start:S=0,showInfo:C=0}=r?.ytConfig||{};return v?o(N,{"data-testid":"loader"}):o(D,{style:j,children:r?o(T,{"data-testid":"hero-video",title:"video-frame",src:`${r.src}?disabledkb=${W}&autoplay=${G}&controls=${V}&loop=${z}&modestbranding=${E}&start=${S}&showInfo=${C}${g?`&end=${g}`:""}`,width:"100%",height:"100%",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):a(A,{"data-testid":"hero-image",$positionX:i?void 0:e?.x,$positionY:i?void 0:e?.y,$url:i?void 0:e?.src,children:[i,a(B,{children:[(l||s||$)&&a(H,{$maxWidth:b,$dynamicGutter:y,$centered:k,children:[l&&o(J,{as:"h1",$color:p,$shadow:c,children:l}),s&&o(L,{$color:p,$shadow:c,children:s}),$&&o(O,{$shadow:c,children:$})]}),n&&a(F,{children:[!h&&o(P,{$pointerEvents:r?"none":"auto",$align:u||"flex-start",$direction:x||"column",$justify:w||"flex-start",children:n}),h&&n]})]})]})})};export{K as default};
|
package/package.json
CHANGED
package/package.json.tmp
CHANGED
|
@@ -47,6 +47,7 @@ export interface HeroProps {
|
|
|
47
47
|
isLoading?: boolean;
|
|
48
48
|
contentCentered?: boolean;
|
|
49
49
|
elementShadow?: boolean;
|
|
50
|
+
childrenNoWrapper?: boolean;
|
|
50
51
|
}
|
|
51
|
-
declare const Hero: ({ imageProps, imageElement, videoProps, children, align, direction, justify, contentMaxWidth, heading, headingColor, subheading, button, dynamicGutter, isLoading, contentCentered, containerStyle, elementShadow, }: HeroProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
declare const Hero: ({ imageProps, imageElement, videoProps, children, align, direction, justify, contentMaxWidth, heading, headingColor, subheading, button, dynamicGutter, isLoading, contentCentered, containerStyle, elementShadow, childrenNoWrapper, }: HeroProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
53
|
export default Hero;
|