umwd-components 0.1.413 → 0.1.415
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/node_modules/base64-js/index.js +1 -1
- package/dist/node_modules/ieee754/index.js +1 -1
- package/dist/src/components/e-commerce/checkout/CheckoutForm.js +1 -1
- package/dist/src/components/page-elements/HeroSectionV2.js +7 -0
- package/dist/src/components/page-elements/Page.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/page-elements/HeroSectionV2.d.ts +25 -0
- package/package.json +1 -1
- package/src/components/e-commerce/checkout/CheckoutForm.tsx +2 -0
- package/src/components/page-elements/HeroSection.tsx +2 -0
- package/src/components/page-elements/HeroSectionV2.tsx +104 -0
- package/src/components/page-elements/Page.tsx +2 -1
- package/dist/src/components/page-elements/HeroSection.js +0 -7
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StrapiImageProps } from "../../types/StrapiImageProps";
|
|
3
|
+
import { MaxWidth } from "../../types/MaxWidth";
|
|
4
|
+
import { SxProps, Theme } from "@mui/material/styles";
|
|
5
|
+
interface LinkProps {
|
|
6
|
+
id: number;
|
|
7
|
+
url: string;
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
interface HeroSectionProps {
|
|
11
|
+
data: {
|
|
12
|
+
id: number;
|
|
13
|
+
__component: string;
|
|
14
|
+
heading: string;
|
|
15
|
+
subHeading: string;
|
|
16
|
+
bgImage?: StrapiImageProps;
|
|
17
|
+
logoImage?: StrapiImageProps;
|
|
18
|
+
link: LinkProps;
|
|
19
|
+
maxWidth?: MaxWidth;
|
|
20
|
+
sx?: SxProps<Theme>;
|
|
21
|
+
glass?: boolean;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare function HeroSection({ data }: Readonly<HeroSectionProps>): React.JSX.Element;
|
|
25
|
+
export {};
|
package/package.json
CHANGED
|
@@ -72,6 +72,8 @@ function CheckoutForm({ shopUrl = "/shop" }: CheckoutFormProps) {
|
|
|
72
72
|
const orderUuid = searchParams.get("order");
|
|
73
73
|
if (orderUuid) {
|
|
74
74
|
setActiveStep(4);
|
|
75
|
+
// important, on production the cookies are not properly handled by the context
|
|
76
|
+
localStorage.removeItem("cart");
|
|
75
77
|
dispatch({ type: "SET_ITEMS", payload: [] });
|
|
76
78
|
}
|
|
77
79
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
|
|
6
|
+
import Box from "@mui/material/Box";
|
|
7
|
+
import Container from "@mui/material/Container";
|
|
8
|
+
import Paper from "@mui/material/Paper";
|
|
9
|
+
import Typography from "@mui/material/Typography";
|
|
10
|
+
import Button from "@mui/material/Button";
|
|
11
|
+
import Stack from "@mui/material/Stack";
|
|
12
|
+
|
|
13
|
+
import { StrapiImage } from "../StrapiImage";
|
|
14
|
+
import { StrapiImageProps } from "../../types/StrapiImageProps";
|
|
15
|
+
import { MaxWidth } from "../../types/MaxWidth";
|
|
16
|
+
import { setOpacity } from "../../lib/utils";
|
|
17
|
+
import { SxProps, Theme, useTheme } from "@mui/material/styles";
|
|
18
|
+
|
|
19
|
+
interface LinkProps {
|
|
20
|
+
id: number;
|
|
21
|
+
url: string;
|
|
22
|
+
text: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface HeroSectionProps {
|
|
26
|
+
data: {
|
|
27
|
+
id: number;
|
|
28
|
+
__component: string;
|
|
29
|
+
heading: string;
|
|
30
|
+
subHeading: string;
|
|
31
|
+
bgImage?: StrapiImageProps;
|
|
32
|
+
logoImage?: StrapiImageProps;
|
|
33
|
+
link: LinkProps;
|
|
34
|
+
maxWidth?: MaxWidth;
|
|
35
|
+
sx?: SxProps<Theme>;
|
|
36
|
+
glass?: boolean;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function HeroSection({ data }: Readonly<HeroSectionProps>) {
|
|
41
|
+
const {
|
|
42
|
+
heading,
|
|
43
|
+
subHeading,
|
|
44
|
+
bgImage,
|
|
45
|
+
logoImage,
|
|
46
|
+
link,
|
|
47
|
+
maxWidth,
|
|
48
|
+
sx = {},
|
|
49
|
+
glass = false,
|
|
50
|
+
} = data;
|
|
51
|
+
|
|
52
|
+
const theme = useTheme();
|
|
53
|
+
|
|
54
|
+
// const glassColor = setOpacity(theme.palette.background.paper, 0.1);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<Container maxWidth={maxWidth || "lg"} sx={{ zIndex: 1 }}>
|
|
58
|
+
<Paper
|
|
59
|
+
sx={[
|
|
60
|
+
{ padding: 5 },
|
|
61
|
+
bgImage?.url !== undefined && {
|
|
62
|
+
backgroundImage: `url(${process.env.NEXT_PUBLIC_STRAPI_URL}${bgImage.url})`,
|
|
63
|
+
backgroundSize: "cover",
|
|
64
|
+
backgroundRepeat: "no-repeat",
|
|
65
|
+
backgroundPosition: "center",
|
|
66
|
+
},
|
|
67
|
+
]}
|
|
68
|
+
>
|
|
69
|
+
<Stack spacing={3} alignItems="center" justifyContent="center">
|
|
70
|
+
{logoImage && logoImage.url !== null && (
|
|
71
|
+
<StrapiImage
|
|
72
|
+
id={logoImage.id?.toString()}
|
|
73
|
+
alternativeText={logoImage.alternativeText || "logoImage"}
|
|
74
|
+
height={logoImage.height || 100}
|
|
75
|
+
url={logoImage.url}
|
|
76
|
+
width={logoImage.width || 100}
|
|
77
|
+
style={{
|
|
78
|
+
objectFit: "contain",
|
|
79
|
+
filter: "invert(1)",
|
|
80
|
+
}}
|
|
81
|
+
/>
|
|
82
|
+
)}
|
|
83
|
+
|
|
84
|
+
<Typography variant="h2" align="center" component={"h1"}>
|
|
85
|
+
{heading}
|
|
86
|
+
</Typography>
|
|
87
|
+
<Typography variant="h4" align="center" component={"h2"}>
|
|
88
|
+
{subHeading}
|
|
89
|
+
</Typography>
|
|
90
|
+
{link && link.url && (
|
|
91
|
+
<Link href={link.url}>
|
|
92
|
+
<Button
|
|
93
|
+
variant="contained"
|
|
94
|
+
sx={{ width: "100%", fontSize: "1.5rem" }}
|
|
95
|
+
>
|
|
96
|
+
{link.text}
|
|
97
|
+
</Button>
|
|
98
|
+
</Link>
|
|
99
|
+
)}
|
|
100
|
+
</Stack>
|
|
101
|
+
</Paper>
|
|
102
|
+
</Container>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextImageSection } from "./TextImageSection";
|
|
3
|
-
import { HeroSection } from "./HeroSection";
|
|
3
|
+
//import { HeroSection } from "./HeroSection";
|
|
4
|
+
import { HeroSection } from "./HeroSectionV2";
|
|
4
5
|
import { FeatureSection } from "./FeaturesSection";
|
|
5
6
|
import { FleetSection } from "./FleetSection";
|
|
6
7
|
import { IconSection } from "./IconSection";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
/*
|
|
3
|
-
* UMWD-Components
|
|
4
|
-
* @copyright Jelle Paulus
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import i from"next/link";import r from"@mui/material/Box";import a from"@mui/material/Container";import n from"@mui/material/Paper";import o from"@mui/material/Typography";import l from"@mui/material/Button";import m from"@mui/material/Stack";import{StrapiImage as s}from"../StrapiImage.js";import{setOpacity as c}from"../../lib/utils.js";import{useTheme as d}from"@mui/material/styles";function p(p){var g,u,h=p.data,x=h.heading,f=h.subHeading,v=h.bgImage,b=h.logoImage,y=h.link,E=h.maxWidth,w=h.sx,j=void 0===w?{}:w,I=h.glass,k=void 0!==I&&I,C=d();return t.createElement("header",{style:{position:"relative",padding:0,margin:0}},t.createElement(r,{sx:e({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",minHeight:"600px",py:6},j)},v&&v.url&&t.createElement(s,{id:null===(g=v.id)||void 0===g?void 0:g.toString(),alternativeText:"Background",style:{position:"absolute",inset:0,objectFit:"cover",width:"100%",height:"100%"},height:v.height||1080,url:v.url,width:v.width||1920}),t.createElement(a,{maxWidth:E||"lg",sx:{my:1,zIndex:1}},t.createElement(n,{sx:{px:2,py:7,backdropFilter:"blur(3px)",backgroundColor:c(C.palette.background.paper,k?.1:1),border:k?"1px solid rgba(255, 255, 255, 0.15)":"none"}},t.createElement(m,{spacing:5,alignItems:"center",justifyContent:"center"},b&&null!==b.url&&t.createElement(r,{className:"manipulator",sx:{position:"relative",mt:"-100px",width:"100%",zIndex:-1,display:"flex",justifyContent:"center",alignItems:"center",img:{objectFit:"contain",width:"100%",height:"100%"}}},t.createElement(s,{id:null===(u=b.id)||void 0===u?void 0:u.toString(),alternativeText:b.alternativeText||"logoImage",height:b.height||100,url:b.url,width:b.width||100,style:{objectFit:"contain"}})),t.createElement(o,{variant:"h2",align:"center",component:"h1"},x),t.createElement(r,{className:"spacer",sx:{display:"none"}}),t.createElement(o,{variant:"h4",align:"center",component:"h2"},f),y&&y.url&&t.createElement(i,{href:y.url},t.createElement(l,{variant:"contained",sx:{width:"100%",fontSize:"1.5rem"}},y.text)))))))}export{p as HeroSection};
|