umwd-components 0.1.111 → 0.1.112
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/cjs/components/BulletList.js +43 -0
- package/dist/cjs/components/Button.js +45 -0
- package/dist/cjs/components/ColumnsSection.js +69 -0
- package/dist/cjs/components/ContactForm.js +223 -0
- package/dist/cjs/components/FeaturesSection.js +100 -0
- package/dist/cjs/components/FleetSection.js +153 -0
- package/dist/cjs/components/Footer.js +211 -0
- package/dist/cjs/components/HeroSection.js +100 -0
- package/dist/cjs/components/IconSection.js +67 -0
- package/dist/cjs/components/MuiLink.js +24 -0
- package/dist/cjs/components/NavBar.js +307 -0
- package/dist/cjs/components/Page.js +88 -0
- package/dist/cjs/components/PersonaliaSection.js +96 -0
- package/dist/cjs/components/Stack.js +37 -0
- package/dist/cjs/components/StrapiImage.js +33 -0
- package/dist/cjs/components/TextImageSection.js +94 -0
- package/dist/cjs/components/WebsitePlaceholder.js +129 -0
- package/dist/cjs/components/WhatsAppClickToChatButton.js +78 -0
- package/dist/cjs/index.js +31 -0
- package/dist/cjs/lib/AmbulanceIcon.js +45 -0
- package/dist/cjs/lib/getIcon.js +97 -0
- package/dist/cjs/lib/utils.js +57 -0
- package/dist/esm/components/BulletList.js +39 -0
- package/dist/esm/components/Button.js +41 -0
- package/dist/esm/components/ColumnsSection.js +67 -0
- package/dist/esm/components/ContactForm.js +219 -0
- package/dist/esm/components/FeaturesSection.js +98 -0
- package/dist/esm/components/FleetSection.js +151 -0
- package/dist/esm/components/Footer.js +207 -0
- package/dist/esm/components/HeroSection.js +98 -0
- package/dist/esm/components/IconSection.js +65 -0
- package/dist/esm/components/MuiLink.js +22 -0
- package/dist/esm/components/NavBar.js +303 -0
- package/dist/esm/components/Page.js +84 -0
- package/dist/esm/components/PersonaliaSection.js +94 -0
- package/dist/esm/components/Stack.js +33 -0
- package/dist/esm/components/StrapiImage.js +31 -0
- package/dist/esm/components/TextImageSection.js +90 -0
- package/dist/esm/components/WebsitePlaceholder.js +125 -0
- package/dist/esm/components/WhatsAppClickToChatButton.js +74 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/lib/AmbulanceIcon.js +22 -0
- package/dist/esm/lib/getIcon.js +93 -0
- package/dist/esm/lib/utils.js +53 -0
- package/package.json +1 -1
- package/src/components/PersonaliaSection.tsx +8 -8
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var React = require('react');
|
|
13
|
+
var PropTypes = require('prop-types');
|
|
14
|
+
var material = require('@mui/material');
|
|
15
|
+
var FiberManualRecordIcon = require('@mui/icons-material/FiberManualRecord');
|
|
16
|
+
|
|
17
|
+
function BulletList(_ref) {
|
|
18
|
+
let {
|
|
19
|
+
bullets,
|
|
20
|
+
bulletSVG
|
|
21
|
+
} = _ref;
|
|
22
|
+
console.log("bulletSVG2", bulletSVG);
|
|
23
|
+
return /*#__PURE__*/React.createElement(material.Stack, {
|
|
24
|
+
spacing: 2
|
|
25
|
+
}, bullets.map((bullet, index) => /*#__PURE__*/React.createElement(material.Typography, {
|
|
26
|
+
key: index,
|
|
27
|
+
sx: {
|
|
28
|
+
verticalAlign: "center",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
justifyContent: "flex-start",
|
|
31
|
+
display: "inline-flex"
|
|
32
|
+
}
|
|
33
|
+
}, bulletSVG ? /*#__PURE__*/React.createElement(material.SvgIcon, {
|
|
34
|
+
sx: {
|
|
35
|
+
mr: 1
|
|
36
|
+
}
|
|
37
|
+
}, bulletSVG) : /*#__PURE__*/React.createElement(FiberManualRecordIcon, null), bullet)));
|
|
38
|
+
}
|
|
39
|
+
BulletList.propTypes = {
|
|
40
|
+
bullets: PropTypes.arrayOf(PropTypes.string).isRequired
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
exports.default = BulletList;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
10
|
+
|
|
11
|
+
var React = require('react');
|
|
12
|
+
var PropTypes = require('prop-types');
|
|
13
|
+
|
|
14
|
+
function Button(_ref) {
|
|
15
|
+
let {
|
|
16
|
+
label,
|
|
17
|
+
backgroundColor = "red",
|
|
18
|
+
size = "md",
|
|
19
|
+
onClick
|
|
20
|
+
} = _ref;
|
|
21
|
+
let scale = 1;
|
|
22
|
+
if (size === "sm") {
|
|
23
|
+
scale = 0.75;
|
|
24
|
+
}
|
|
25
|
+
if (size === "lg") {
|
|
26
|
+
scale = 1.25;
|
|
27
|
+
}
|
|
28
|
+
const style = {
|
|
29
|
+
backgroundColor,
|
|
30
|
+
padding: "".concat(0.5 * scale, "rem ").concat(1 * scale, "rem"),
|
|
31
|
+
border: "none"
|
|
32
|
+
};
|
|
33
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
34
|
+
style: style,
|
|
35
|
+
onClick: onClick
|
|
36
|
+
}, label);
|
|
37
|
+
}
|
|
38
|
+
Button.propTypes = {
|
|
39
|
+
label: PropTypes.string,
|
|
40
|
+
backgroundColor: PropTypes.string,
|
|
41
|
+
size: PropTypes.oneOf(["sm", "md", "lg"]),
|
|
42
|
+
onClick: PropTypes.func
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
exports.default = Button;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var material = require('@mui/material');
|
|
11
|
+
var getIcon = require('../lib/getIcon.js');
|
|
12
|
+
|
|
13
|
+
function ColumnsSection(_ref) {
|
|
14
|
+
let {
|
|
15
|
+
data
|
|
16
|
+
} = _ref;
|
|
17
|
+
const {
|
|
18
|
+
column,
|
|
19
|
+
maxWidth
|
|
20
|
+
} = data;
|
|
21
|
+
|
|
22
|
+
// TODO make suitable for multiple column layouts
|
|
23
|
+
|
|
24
|
+
return /*#__PURE__*/React.createElement(material.Container, {
|
|
25
|
+
maxWidth: maxWidth || "lg",
|
|
26
|
+
sx: {
|
|
27
|
+
my: 1
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/React.createElement(material.Grid, {
|
|
30
|
+
container: true,
|
|
31
|
+
spacing: 2
|
|
32
|
+
}, column.map(column => {
|
|
33
|
+
const Icon = getIcon.default(column.icon);
|
|
34
|
+
return /*#__PURE__*/React.createElement(material.Grid, {
|
|
35
|
+
item: true,
|
|
36
|
+
xs: 12,
|
|
37
|
+
md: 6,
|
|
38
|
+
key: column.id
|
|
39
|
+
}, /*#__PURE__*/React.createElement(material.Paper, {
|
|
40
|
+
sx: {
|
|
41
|
+
p: 2,
|
|
42
|
+
height: "100%"
|
|
43
|
+
}
|
|
44
|
+
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
45
|
+
variant: "h5",
|
|
46
|
+
sx: {
|
|
47
|
+
mb: 2,
|
|
48
|
+
display: "flex",
|
|
49
|
+
justifyContent: "flex-start",
|
|
50
|
+
alignItems: "center"
|
|
51
|
+
}
|
|
52
|
+
}, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
|
|
53
|
+
sx: {
|
|
54
|
+
mr: 2,
|
|
55
|
+
mt: 0.2,
|
|
56
|
+
width: "50px",
|
|
57
|
+
height: "50px",
|
|
58
|
+
fill: "currentColor",
|
|
59
|
+
stroke: "none"
|
|
60
|
+
}
|
|
61
|
+
}), column.heading), /*#__PURE__*/React.createElement(material.Typography, {
|
|
62
|
+
variant: "body2",
|
|
63
|
+
color: "text.secondary",
|
|
64
|
+
component: "div"
|
|
65
|
+
}, column.text)));
|
|
66
|
+
})));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
exports.ColumnsSection = ColumnsSection;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var React = require('react');
|
|
13
|
+
var material = require('@mui/material');
|
|
14
|
+
var isEmail = require('validator/lib/isEmail');
|
|
15
|
+
|
|
16
|
+
function ContactForm(_ref) {
|
|
17
|
+
let {
|
|
18
|
+
data
|
|
19
|
+
} = _ref;
|
|
20
|
+
const {
|
|
21
|
+
maxWidth
|
|
22
|
+
} = data;
|
|
23
|
+
const [formValues, setFormValues] = React.useState({
|
|
24
|
+
name: "",
|
|
25
|
+
email: "",
|
|
26
|
+
subject: "",
|
|
27
|
+
message: ""
|
|
28
|
+
});
|
|
29
|
+
const [formErrors, setFormErrors] = React.useState({});
|
|
30
|
+
|
|
31
|
+
// Setting button text on form submission
|
|
32
|
+
React.useState("Send");
|
|
33
|
+
|
|
34
|
+
// Setting success or failure messages states
|
|
35
|
+
const [showSuccessMessage, setShowSuccessMessage] = React.useState(false);
|
|
36
|
+
const [showFailureMessage, setShowFailureMessage] = React.useState(false);
|
|
37
|
+
const handleChange = e => {
|
|
38
|
+
const {
|
|
39
|
+
name,
|
|
40
|
+
value
|
|
41
|
+
} = e.target;
|
|
42
|
+
setFormValues({
|
|
43
|
+
...formValues,
|
|
44
|
+
[name]: value
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const handleBlur = e => {
|
|
48
|
+
const {
|
|
49
|
+
name
|
|
50
|
+
} = e.target;
|
|
51
|
+
const errors = validate(formValues);
|
|
52
|
+
if (errors[name]) {
|
|
53
|
+
setFormErrors(prevErrors => ({
|
|
54
|
+
...prevErrors,
|
|
55
|
+
[name]: errors[name]
|
|
56
|
+
}));
|
|
57
|
+
} else {
|
|
58
|
+
setFormErrors(prevErrors => {
|
|
59
|
+
const updatedErrors = {
|
|
60
|
+
...prevErrors
|
|
61
|
+
};
|
|
62
|
+
delete updatedErrors[name];
|
|
63
|
+
return updatedErrors;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const handleClear = () => {
|
|
68
|
+
setFormValues({
|
|
69
|
+
name: "",
|
|
70
|
+
email: "",
|
|
71
|
+
subject: "",
|
|
72
|
+
message: ""
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/* const handleSendCallback = () => {
|
|
77
|
+
console.log("Send callback");
|
|
78
|
+
}; */
|
|
79
|
+
|
|
80
|
+
const handleSubmit = async e => {
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
let isValidForm = validate(formValues);
|
|
83
|
+
console.log("isValidForm", isValidForm);
|
|
84
|
+
if (Object.keys(isValidForm).length === 0) {
|
|
85
|
+
const res = await fetch("/api/sendgrid", {
|
|
86
|
+
body: JSON.stringify({
|
|
87
|
+
email: formValues.email,
|
|
88
|
+
fullname: formValues.name,
|
|
89
|
+
subject: formValues.subject,
|
|
90
|
+
message: formValues.message
|
|
91
|
+
}),
|
|
92
|
+
headers: {
|
|
93
|
+
"Content-Type": "application/json"
|
|
94
|
+
},
|
|
95
|
+
method: "POST"
|
|
96
|
+
});
|
|
97
|
+
const {
|
|
98
|
+
error
|
|
99
|
+
} = await res.json();
|
|
100
|
+
if (error) {
|
|
101
|
+
setShowFailureMessage(true);
|
|
102
|
+
console.log(error);
|
|
103
|
+
return;
|
|
104
|
+
} else {
|
|
105
|
+
setShowSuccessMessage(true);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const validate = values => {
|
|
110
|
+
console.log("values from validate", values);
|
|
111
|
+
let errors = {};
|
|
112
|
+
if (values.name === "") {
|
|
113
|
+
errors.name = "Name is required";
|
|
114
|
+
}
|
|
115
|
+
if (values.email === "") {
|
|
116
|
+
errors.email = "Email is required";
|
|
117
|
+
} else if (!isEmail(values.email)) {
|
|
118
|
+
errors.email = "Invalid email";
|
|
119
|
+
}
|
|
120
|
+
if (values.subject === "") {
|
|
121
|
+
errors.subject = "Subject is required";
|
|
122
|
+
}
|
|
123
|
+
if (values.message === "") {
|
|
124
|
+
errors.message = "Message is required";
|
|
125
|
+
}
|
|
126
|
+
console.log("errors from validate", errors);
|
|
127
|
+
return errors;
|
|
128
|
+
};
|
|
129
|
+
return /*#__PURE__*/React.createElement(material.Container, {
|
|
130
|
+
maxWidth: maxWidth ? maxWidth : "lg",
|
|
131
|
+
sx: {
|
|
132
|
+
my: 1
|
|
133
|
+
}
|
|
134
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
135
|
+
spacing: 2,
|
|
136
|
+
sx: {
|
|
137
|
+
width: "100%"
|
|
138
|
+
}
|
|
139
|
+
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
140
|
+
variant: "h6",
|
|
141
|
+
align: "center"
|
|
142
|
+
}, "Write us"), /*#__PURE__*/React.createElement(material.Typography, {
|
|
143
|
+
variant: "body1",
|
|
144
|
+
align: "center"
|
|
145
|
+
}, "We're open for any suggestion or just to have a chat"), showSuccessMessage && /*#__PURE__*/React.createElement(material.Paper, {
|
|
146
|
+
sx: {
|
|
147
|
+
p: 2
|
|
148
|
+
}
|
|
149
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
150
|
+
spacing: 2
|
|
151
|
+
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
152
|
+
variant: "h6"
|
|
153
|
+
}, "Thank you!"), /*#__PURE__*/React.createElement(material.Typography, null, "Your e-mail has been successfully sent!"))), showFailureMessage && /*#__PURE__*/React.createElement(material.Paper, {
|
|
154
|
+
sx: {
|
|
155
|
+
p: 2
|
|
156
|
+
}
|
|
157
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
158
|
+
spacing: 2
|
|
159
|
+
}, /*#__PURE__*/React.createElement(material.Typography, null, "I am sorry, something went wrong, you could email me directly on info@jellepaulus.nl"), /*#__PURE__*/React.createElement(material.Button, {
|
|
160
|
+
variant: "contained"
|
|
161
|
+
}, "try again")))), !showSuccessMessage && !showFailureMessage && /*#__PURE__*/React.createElement(material.Paper, {
|
|
162
|
+
sx: {
|
|
163
|
+
p: 2
|
|
164
|
+
}
|
|
165
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
166
|
+
spacing: 2
|
|
167
|
+
}, /*#__PURE__*/React.createElement(material.TextField, {
|
|
168
|
+
id: "name",
|
|
169
|
+
name: "name",
|
|
170
|
+
label: "Name",
|
|
171
|
+
value: formValues.name,
|
|
172
|
+
variant: "outlined",
|
|
173
|
+
onBlur: handleBlur,
|
|
174
|
+
onChange: handleChange,
|
|
175
|
+
error: formErrors.name != undefined ? true : false,
|
|
176
|
+
helperText: formErrors.name
|
|
177
|
+
}), /*#__PURE__*/React.createElement(material.TextField, {
|
|
178
|
+
id: "email",
|
|
179
|
+
name: "email",
|
|
180
|
+
label: "Email",
|
|
181
|
+
value: formValues.email,
|
|
182
|
+
variant: "outlined",
|
|
183
|
+
onBlur: handleBlur,
|
|
184
|
+
onChange: handleChange,
|
|
185
|
+
error: formErrors.email != undefined ? true : false,
|
|
186
|
+
helperText: formErrors.email
|
|
187
|
+
}), /*#__PURE__*/React.createElement(material.TextField, {
|
|
188
|
+
id: "subject",
|
|
189
|
+
name: "subject",
|
|
190
|
+
label: "Subject",
|
|
191
|
+
value: formValues.subject,
|
|
192
|
+
variant: "outlined",
|
|
193
|
+
onBlur: handleBlur,
|
|
194
|
+
onChange: handleChange,
|
|
195
|
+
error: formErrors.subject != undefined,
|
|
196
|
+
helperText: formErrors.subject
|
|
197
|
+
}), /*#__PURE__*/React.createElement(material.TextField, {
|
|
198
|
+
id: "message",
|
|
199
|
+
name: "message",
|
|
200
|
+
label: "Message",
|
|
201
|
+
value: formValues.message,
|
|
202
|
+
variant: "outlined",
|
|
203
|
+
multiline: true,
|
|
204
|
+
minRows: 5,
|
|
205
|
+
onBlur: handleBlur,
|
|
206
|
+
onChange: handleChange,
|
|
207
|
+
error: formErrors.message != undefined,
|
|
208
|
+
helperText: formErrors.message
|
|
209
|
+
}), /*#__PURE__*/React.createElement(material.Stack, {
|
|
210
|
+
direction: "row",
|
|
211
|
+
spacing: 2,
|
|
212
|
+
justifyContent: "end"
|
|
213
|
+
}, /*#__PURE__*/React.createElement(material.Button, {
|
|
214
|
+
variant: "outlined",
|
|
215
|
+
color: "primary",
|
|
216
|
+
onClick: handleClear
|
|
217
|
+
}, "Clear"), /*#__PURE__*/React.createElement(material.Button, {
|
|
218
|
+
variant: "contained",
|
|
219
|
+
onClick: handleSubmit
|
|
220
|
+
}, "Send")))));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
exports.default = ContactForm;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var material = require('@mui/material');
|
|
11
|
+
var getIcon = require('../lib/getIcon.js');
|
|
12
|
+
|
|
13
|
+
function FeatureSection(_ref) {
|
|
14
|
+
let {
|
|
15
|
+
data
|
|
16
|
+
} = _ref;
|
|
17
|
+
const {
|
|
18
|
+
feature,
|
|
19
|
+
maxWidth
|
|
20
|
+
} = data;
|
|
21
|
+
const theme = material.useTheme();
|
|
22
|
+
return /*#__PURE__*/React.createElement(material.Container, {
|
|
23
|
+
maxWidth: maxWidth || "lg",
|
|
24
|
+
sx: {
|
|
25
|
+
my: 1
|
|
26
|
+
}
|
|
27
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
28
|
+
spacing: 2,
|
|
29
|
+
direction: "row",
|
|
30
|
+
justifyContent: "stretch",
|
|
31
|
+
flexWrap: "wrap",
|
|
32
|
+
sx: {
|
|
33
|
+
width: "100%",
|
|
34
|
+
[theme.breakpoints.up("xs")]: {
|
|
35
|
+
flexDirection: "column"
|
|
36
|
+
},
|
|
37
|
+
[theme.breakpoints.up("sm")]: {
|
|
38
|
+
flexDirection: "row"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
useFlexGap: true
|
|
42
|
+
}, feature.map(feature => {
|
|
43
|
+
const Icon = getIcon.default(feature.icon);
|
|
44
|
+
return /*#__PURE__*/React.createElement(material.Card, {
|
|
45
|
+
key: feature.id,
|
|
46
|
+
sx: {
|
|
47
|
+
display: "flex",
|
|
48
|
+
flexDirection: "column",
|
|
49
|
+
justifyContent: "space-between",
|
|
50
|
+
flex: 1,
|
|
51
|
+
minWidth: 275
|
|
52
|
+
}
|
|
53
|
+
}, /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.Box, {
|
|
54
|
+
sx: {
|
|
55
|
+
height: 140,
|
|
56
|
+
display: "grid",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
justifyContent: "center"
|
|
59
|
+
}
|
|
60
|
+
}, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
|
|
61
|
+
sx: {
|
|
62
|
+
mr: 2,
|
|
63
|
+
mt: 0.2,
|
|
64
|
+
width: "75px",
|
|
65
|
+
height: "75px",
|
|
66
|
+
fill: "none",
|
|
67
|
+
stroke: "currentColor",
|
|
68
|
+
strokeWidth: 0.5
|
|
69
|
+
}
|
|
70
|
+
})), /*#__PURE__*/React.createElement(material.Typography, {
|
|
71
|
+
variant: "h5",
|
|
72
|
+
align: "center",
|
|
73
|
+
component: "div",
|
|
74
|
+
sx: {
|
|
75
|
+
mb: 2
|
|
76
|
+
}
|
|
77
|
+
}, feature.heading), /*#__PURE__*/React.createElement(material.Typography, {
|
|
78
|
+
variant: "h6",
|
|
79
|
+
align: "center",
|
|
80
|
+
component: "div",
|
|
81
|
+
sx: {
|
|
82
|
+
mb: 2
|
|
83
|
+
}
|
|
84
|
+
}, feature.subHeading.substring(0, 50)), /*#__PURE__*/React.createElement(material.Typography, {
|
|
85
|
+
variant: "body2",
|
|
86
|
+
color: "text.secondary",
|
|
87
|
+
component: "div"
|
|
88
|
+
}, feature.subHeading)), /*#__PURE__*/React.createElement(material.CardActions, {
|
|
89
|
+
sx: {
|
|
90
|
+
mb: 0
|
|
91
|
+
}
|
|
92
|
+
}, /*#__PURE__*/React.createElement(material.Button, {
|
|
93
|
+
size: "small"
|
|
94
|
+
}, "Contact"), /*#__PURE__*/React.createElement(material.Button, {
|
|
95
|
+
size: "small"
|
|
96
|
+
}, "Learn More")));
|
|
97
|
+
})));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
exports.FeatureSection = FeatureSection;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* UMWD-Components
|
|
3
|
+
* @copyright Jelle Paulus
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var material = require('@mui/material');
|
|
11
|
+
var StrapiImage = require('./StrapiImage.js');
|
|
12
|
+
var RadarIcon = require('@mui/icons-material/Radar');
|
|
13
|
+
var SpeedIcon = require('@mui/icons-material/Speed');
|
|
14
|
+
var HeightIcon = require('@mui/icons-material/Height');
|
|
15
|
+
|
|
16
|
+
function FleetSection(_ref) {
|
|
17
|
+
let {
|
|
18
|
+
data
|
|
19
|
+
} = _ref;
|
|
20
|
+
const {
|
|
21
|
+
airplane,
|
|
22
|
+
maxWidth
|
|
23
|
+
} = data;
|
|
24
|
+
const theme = material.useTheme();
|
|
25
|
+
return /*#__PURE__*/React.createElement(material.Container, {
|
|
26
|
+
maxWidth: maxWidth || "lg",
|
|
27
|
+
sx: {
|
|
28
|
+
my: 1
|
|
29
|
+
}
|
|
30
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
31
|
+
spacing: 2,
|
|
32
|
+
direction: "row",
|
|
33
|
+
justifyContent: "stretch",
|
|
34
|
+
flexWrap: "wrap",
|
|
35
|
+
sx: {
|
|
36
|
+
width: "100%",
|
|
37
|
+
[theme.breakpoints.up("xs")]: {
|
|
38
|
+
flexDirection: "column"
|
|
39
|
+
},
|
|
40
|
+
[theme.breakpoints.up("sm")]: {
|
|
41
|
+
flexDirection: "row"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
useFlexGap: true
|
|
45
|
+
}, airplane.map(airplane => /*#__PURE__*/React.createElement(material.Card, {
|
|
46
|
+
key: airplane.id,
|
|
47
|
+
sx: {
|
|
48
|
+
display: "flex",
|
|
49
|
+
flexDirection: "column",
|
|
50
|
+
justifyContent: "space-between",
|
|
51
|
+
flex: 1,
|
|
52
|
+
minWidth: 275
|
|
53
|
+
}
|
|
54
|
+
}, /*#__PURE__*/React.createElement(material.CardHeader, {
|
|
55
|
+
title: airplane.name,
|
|
56
|
+
subheader: airplane.description
|
|
57
|
+
}), /*#__PURE__*/React.createElement(material.CardMedia, {
|
|
58
|
+
sx: {
|
|
59
|
+
p: 1,
|
|
60
|
+
flex: 1
|
|
61
|
+
}
|
|
62
|
+
}, /*#__PURE__*/React.createElement(material.Paper, {
|
|
63
|
+
sx: {
|
|
64
|
+
p: 1,
|
|
65
|
+
py: "4rem",
|
|
66
|
+
position: "relative",
|
|
67
|
+
display: "grid",
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
justifyContent: "center",
|
|
70
|
+
height: "100%"
|
|
71
|
+
},
|
|
72
|
+
variant: "outlined"
|
|
73
|
+
}, airplane.floorplan !== null && /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
|
|
74
|
+
src: airplane.floorplan.url,
|
|
75
|
+
alt: airplane.floorplan.alternativeText,
|
|
76
|
+
width: airplane.floorplan.width,
|
|
77
|
+
height: airplane.floorplan.height,
|
|
78
|
+
style: {
|
|
79
|
+
objectFit: "contain",
|
|
80
|
+
width: "100%",
|
|
81
|
+
height: "100%"
|
|
82
|
+
}
|
|
83
|
+
}), /*#__PURE__*/React.createElement(material.Box, {
|
|
84
|
+
sx: {
|
|
85
|
+
position: "absolute",
|
|
86
|
+
right: "1rem",
|
|
87
|
+
bottom: "1rem"
|
|
88
|
+
}
|
|
89
|
+
}, /*#__PURE__*/React.createElement(material.Typography, {
|
|
90
|
+
variant: "body2",
|
|
91
|
+
color: "text.secondary",
|
|
92
|
+
align: "right"
|
|
93
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Cabin Dimensions:"), " ", /*#__PURE__*/React.createElement("strong", null, "H"), " ", airplane.cabinHeight, " m ", /*#__PURE__*/React.createElement("strong", null, "W"), " ", airplane.cabinWidth, " m ", /*#__PURE__*/React.createElement("strong", null, "L"), " ", airplane.cabinLength, " m")))), /*#__PURE__*/React.createElement(material.CardContent, {
|
|
94
|
+
sx: {}
|
|
95
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
96
|
+
direction: "row",
|
|
97
|
+
spacing: 1,
|
|
98
|
+
flexWrap: "wrap",
|
|
99
|
+
useFlexGap: true
|
|
100
|
+
}, /*#__PURE__*/React.createElement(material.Chip, {
|
|
101
|
+
label: "Range: ".concat(airplane.range, " km"),
|
|
102
|
+
variant: "filled",
|
|
103
|
+
color: "primary",
|
|
104
|
+
icon: /*#__PURE__*/React.createElement(RadarIcon, null)
|
|
105
|
+
}), /*#__PURE__*/React.createElement(material.Chip, {
|
|
106
|
+
label: "Speed: ".concat(airplane.speed, " km/h"),
|
|
107
|
+
variant: "filled",
|
|
108
|
+
color: "primary",
|
|
109
|
+
icon: /*#__PURE__*/React.createElement(SpeedIcon, null)
|
|
110
|
+
}), /*#__PURE__*/React.createElement(material.Chip, {
|
|
111
|
+
label: "Ceiling: ".concat(airplane.ceiling, " ft"),
|
|
112
|
+
variant: "filled",
|
|
113
|
+
color: "primary",
|
|
114
|
+
icon: /*#__PURE__*/React.createElement(HeightIcon, null)
|
|
115
|
+
})))))));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
{
|
|
120
|
+
id: 1,
|
|
121
|
+
__component: "layout.fleet-section",
|
|
122
|
+
title: "Fleet",
|
|
123
|
+
description: "Description of our fleet",
|
|
124
|
+
airplane: [
|
|
125
|
+
{
|
|
126
|
+
id: 1,
|
|
127
|
+
name: "CHALLENGER 604",
|
|
128
|
+
description:
|
|
129
|
+
"Bombardier Challenger 604. Is our best long-range jet and can be equipped with an intensive care unit for one critical care patient or the option to carry 2 stable patients. ",
|
|
130
|
+
range: "7408",
|
|
131
|
+
speed: "854",
|
|
132
|
+
ceiling: "41000",
|
|
133
|
+
cabinHeight: 1.83,
|
|
134
|
+
cabinWidth: 2.11,
|
|
135
|
+
cabinLength: 8.66,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: 2,
|
|
139
|
+
name: "BEECHCRAFT KING AIR 200",
|
|
140
|
+
description:
|
|
141
|
+
"A twin turboprop aircraft with pressurized cabin. Is our best air ambulance for Europe and North Africa. It is equipped with a single stretcher for one stable ICU patient.",
|
|
142
|
+
range: "2200",
|
|
143
|
+
speed: "500",
|
|
144
|
+
ceiling: "35000",
|
|
145
|
+
cabinHeight: 1.46,
|
|
146
|
+
cabinWidth: 1.37,
|
|
147
|
+
cabinLength: 5.08,
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
exports.FleetSection = FleetSection;
|