umwd-components 0.1.150 → 0.1.152
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/Page.js +6 -0
- package/dist/cjs/components/PictureBarSection.js +55 -0
- package/dist/esm/components/Page.js +6 -0
- package/dist/esm/components/PictureBarSection.js +53 -0
- package/package.json +1 -1
- package/src/components/Footer.js +0 -1
- package/src/components/Page.js +3 -0
- package/src/components/PictureBarSection.tsx +79 -0
- package/src/stories/Page.stories.js +21 -0
|
@@ -20,6 +20,7 @@ var ColumnsSection = require('./ColumnsSection.js');
|
|
|
20
20
|
var material = require('@mui/material');
|
|
21
21
|
var ContactForm = require('./ContactForm.js');
|
|
22
22
|
var PersonaliaSection = require('./PersonaliaSection.js');
|
|
23
|
+
var PictureBarSection = require('./PictureBarSection.js');
|
|
23
24
|
|
|
24
25
|
function blockRenderer(block, index) {
|
|
25
26
|
switch (block.__component) {
|
|
@@ -63,6 +64,11 @@ function blockRenderer(block, index) {
|
|
|
63
64
|
key: index,
|
|
64
65
|
data: block
|
|
65
66
|
});
|
|
67
|
+
case "layout.picture-bar-section":
|
|
68
|
+
return /*#__PURE__*/React.createElement(PictureBarSection.PictureBarSection, {
|
|
69
|
+
key: index,
|
|
70
|
+
data: block
|
|
71
|
+
});
|
|
66
72
|
default:
|
|
67
73
|
return null;
|
|
68
74
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
var React = require('react');
|
|
11
|
+
var material = require('@mui/material');
|
|
12
|
+
var StrapiImage = require('./StrapiImage.js');
|
|
13
|
+
|
|
14
|
+
function PictureBarSection(_ref) {
|
|
15
|
+
let {
|
|
16
|
+
data
|
|
17
|
+
} = _ref;
|
|
18
|
+
const {
|
|
19
|
+
pictures,
|
|
20
|
+
maxWidth = "lg",
|
|
21
|
+
sx = {}
|
|
22
|
+
} = data;
|
|
23
|
+
material.useTheme();
|
|
24
|
+
return /*#__PURE__*/React.createElement(material.Container, {
|
|
25
|
+
maxWidth: maxWidth,
|
|
26
|
+
sx: {
|
|
27
|
+
my: 1,
|
|
28
|
+
...sx
|
|
29
|
+
}
|
|
30
|
+
}, /*#__PURE__*/React.createElement(material.Grid, {
|
|
31
|
+
container: true,
|
|
32
|
+
spacing: 2
|
|
33
|
+
}, /*#__PURE__*/React.createElement(material.Grid, {
|
|
34
|
+
item: true,
|
|
35
|
+
xs: 12
|
|
36
|
+
}, /*#__PURE__*/React.createElement(material.Paper, {
|
|
37
|
+
sx: {
|
|
38
|
+
p: 2
|
|
39
|
+
}
|
|
40
|
+
}, /*#__PURE__*/React.createElement(material.Stack, {
|
|
41
|
+
direction: "row",
|
|
42
|
+
spacing: 2,
|
|
43
|
+
justifyContent: "space-around"
|
|
44
|
+
}, pictures.data && pictures.data.map(picture => /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
|
|
45
|
+
src: picture.url,
|
|
46
|
+
alt: picture.alternativeText,
|
|
47
|
+
width: 200,
|
|
48
|
+
height: 200,
|
|
49
|
+
style: {
|
|
50
|
+
...picture.style
|
|
51
|
+
}
|
|
52
|
+
})))))));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
exports.PictureBarSection = PictureBarSection;
|
|
@@ -16,6 +16,7 @@ import { ColumnsSection } from './ColumnsSection.js';
|
|
|
16
16
|
import { Box } from '@mui/material';
|
|
17
17
|
import ContactForm from './ContactForm.js';
|
|
18
18
|
import { PersonaliaSection } from './PersonaliaSection.js';
|
|
19
|
+
import { PictureBarSection } from './PictureBarSection.js';
|
|
19
20
|
|
|
20
21
|
function blockRenderer(block, index) {
|
|
21
22
|
switch (block.__component) {
|
|
@@ -59,6 +60,11 @@ function blockRenderer(block, index) {
|
|
|
59
60
|
key: index,
|
|
60
61
|
data: block
|
|
61
62
|
});
|
|
63
|
+
case "layout.picture-bar-section":
|
|
64
|
+
return /*#__PURE__*/React__default.createElement(PictureBarSection, {
|
|
65
|
+
key: index,
|
|
66
|
+
data: block
|
|
67
|
+
});
|
|
62
68
|
default:
|
|
63
69
|
return null;
|
|
64
70
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React__default from 'react';
|
|
9
|
+
import { useTheme, Container, Grid, Paper, Stack } from '@mui/material';
|
|
10
|
+
import { StrapiImage } from './StrapiImage.js';
|
|
11
|
+
|
|
12
|
+
function PictureBarSection(_ref) {
|
|
13
|
+
let {
|
|
14
|
+
data
|
|
15
|
+
} = _ref;
|
|
16
|
+
const {
|
|
17
|
+
pictures,
|
|
18
|
+
maxWidth = "lg",
|
|
19
|
+
sx = {}
|
|
20
|
+
} = data;
|
|
21
|
+
useTheme();
|
|
22
|
+
return /*#__PURE__*/React__default.createElement(Container, {
|
|
23
|
+
maxWidth: maxWidth,
|
|
24
|
+
sx: {
|
|
25
|
+
my: 1,
|
|
26
|
+
...sx
|
|
27
|
+
}
|
|
28
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
29
|
+
container: true,
|
|
30
|
+
spacing: 2
|
|
31
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
32
|
+
item: true,
|
|
33
|
+
xs: 12
|
|
34
|
+
}, /*#__PURE__*/React__default.createElement(Paper, {
|
|
35
|
+
sx: {
|
|
36
|
+
p: 2
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
39
|
+
direction: "row",
|
|
40
|
+
spacing: 2,
|
|
41
|
+
justifyContent: "space-around"
|
|
42
|
+
}, pictures.data && pictures.data.map(picture => /*#__PURE__*/React__default.createElement(StrapiImage, {
|
|
43
|
+
src: picture.url,
|
|
44
|
+
alt: picture.alternativeText,
|
|
45
|
+
width: 200,
|
|
46
|
+
height: 200,
|
|
47
|
+
style: {
|
|
48
|
+
...picture.style
|
|
49
|
+
}
|
|
50
|
+
})))))));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { PictureBarSection };
|
package/package.json
CHANGED
package/src/components/Footer.js
CHANGED
package/src/components/Page.js
CHANGED
|
@@ -11,6 +11,7 @@ import { ColumnsSection } from "./ColumnsSection.tsx";
|
|
|
11
11
|
import { Box } from "@mui/material";
|
|
12
12
|
import ContactForm from "./ContactForm.tsx";
|
|
13
13
|
import { PersonaliaSection } from "./PersonaliaSection.tsx";
|
|
14
|
+
import { PictureBarSection } from "./PictureBarSection.tsx";
|
|
14
15
|
|
|
15
16
|
function blockRenderer(block, index) {
|
|
16
17
|
switch (block.__component) {
|
|
@@ -30,6 +31,8 @@ function blockRenderer(block, index) {
|
|
|
30
31
|
return <ColumnsSection key={index} data={block} />;
|
|
31
32
|
case "layout.personalia-section":
|
|
32
33
|
return <PersonaliaSection key={index} data={block} />;
|
|
34
|
+
case "layout.picture-bar-section":
|
|
35
|
+
return <PictureBarSection key={index} data={block} />;
|
|
33
36
|
|
|
34
37
|
default:
|
|
35
38
|
return null;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import {
|
|
5
|
+
Paper,
|
|
6
|
+
Typography,
|
|
7
|
+
Container,
|
|
8
|
+
Grid,
|
|
9
|
+
useTheme,
|
|
10
|
+
Button,
|
|
11
|
+
Stack,
|
|
12
|
+
Tooltip,
|
|
13
|
+
} from "@mui/material";
|
|
14
|
+
import { StrapiImage } from "./StrapiImage.tsx";
|
|
15
|
+
import { Email, LinkedIn } from "@mui/icons-material";
|
|
16
|
+
import { BlockRendererClient } from "./BlockRendererClient.tsx";
|
|
17
|
+
import { type BlocksContent } from "@strapi/blocks-react-renderer";
|
|
18
|
+
import { MuiLink } from "./MuiLink.tsx";
|
|
19
|
+
import { SxProps, Theme } from "@mui/material/styles";
|
|
20
|
+
|
|
21
|
+
type MaxWidth = "xs" | "sm" | "md" | "lg" | "xl" | false | undefined;
|
|
22
|
+
|
|
23
|
+
interface ImageProps {
|
|
24
|
+
id: number;
|
|
25
|
+
url: string;
|
|
26
|
+
alternativeText: string;
|
|
27
|
+
style: React.CSSProperties;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface PictureBarSectionProps {
|
|
33
|
+
id: number;
|
|
34
|
+
__component: string;
|
|
35
|
+
title: string;
|
|
36
|
+
description: string;
|
|
37
|
+
pictures: { data: ImageProps[] };
|
|
38
|
+
maxWidth: MaxWidth;
|
|
39
|
+
sx?: SxProps<Theme>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function PictureBarSection({
|
|
43
|
+
data,
|
|
44
|
+
}: {
|
|
45
|
+
readonly data: PictureBarSectionProps;
|
|
46
|
+
}) {
|
|
47
|
+
const { pictures, maxWidth = "lg", sx = {} } = data;
|
|
48
|
+
|
|
49
|
+
const theme = useTheme();
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<Container maxWidth={maxWidth} sx={{ my: 1, ...sx }}>
|
|
53
|
+
<Grid container spacing={2}>
|
|
54
|
+
<Grid item xs={12}>
|
|
55
|
+
<Paper sx={{ p: 2 }}>
|
|
56
|
+
<Stack
|
|
57
|
+
direction={"row"}
|
|
58
|
+
spacing={2}
|
|
59
|
+
justifyContent={"space-around"}
|
|
60
|
+
>
|
|
61
|
+
{pictures.data &&
|
|
62
|
+
pictures.data.map((picture) => (
|
|
63
|
+
<StrapiImage
|
|
64
|
+
src={picture.url}
|
|
65
|
+
alt={picture.alternativeText}
|
|
66
|
+
width={200}
|
|
67
|
+
height={200}
|
|
68
|
+
style={{
|
|
69
|
+
...picture.style,
|
|
70
|
+
}}
|
|
71
|
+
/>
|
|
72
|
+
))}
|
|
73
|
+
</Stack>
|
|
74
|
+
</Paper>
|
|
75
|
+
</Grid>
|
|
76
|
+
</Grid>
|
|
77
|
+
</Container>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -210,6 +210,27 @@ AMH.args = {
|
|
|
210
210
|
},
|
|
211
211
|
],
|
|
212
212
|
},
|
|
213
|
+
{
|
|
214
|
+
id: 1,
|
|
215
|
+
__component: "layout.picture-bar-section",
|
|
216
|
+
title: "Pictures",
|
|
217
|
+
pictures: [
|
|
218
|
+
{
|
|
219
|
+
id: 1,
|
|
220
|
+
url: "/uploads/CHALLENGER_604_efe6e0309f.png",
|
|
221
|
+
alt: "Challenger 604 Floor Plan",
|
|
222
|
+
width: 1000,
|
|
223
|
+
height: 282,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: 2,
|
|
227
|
+
url: "/uploads/BEECHCRAFT_KING_AIR_200_828251b91c.png",
|
|
228
|
+
alt: "Challenger 604 Floor Plan",
|
|
229
|
+
width: 1000,
|
|
230
|
+
height: 233,
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
},
|
|
213
234
|
{
|
|
214
235
|
id: 2,
|
|
215
236
|
__component: "layout.features-section",
|