umwd-components 0.1.62 → 0.1.63
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 +5 -5
- package/dist/cjs/components/TextImageSection.js +78 -0
- package/dist/cjs/index.js +2 -2
- package/dist/esm/components/Page.js +5 -5
- package/dist/esm/components/TextImageSection.js +74 -0
- package/dist/esm/index.js +1 -1
- package/next.config.js +15 -12
- package/package.json +1 -1
- package/src/index.js +1 -1
- package/src/stories/Page.stories.js +1 -1
|
@@ -9,10 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
|
12
|
-
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
12
|
var React = require('react');
|
|
14
13
|
var PropTypes = require('prop-types');
|
|
15
|
-
var
|
|
14
|
+
var TextImageSection = require('./TextImageSection.js');
|
|
16
15
|
var HeroSection = require('./HeroSection.js');
|
|
17
16
|
var FeaturesSection = require('./FeaturesSection.js');
|
|
18
17
|
|
|
@@ -29,9 +28,10 @@ function blockRenderer(block) {
|
|
|
29
28
|
data: block
|
|
30
29
|
});
|
|
31
30
|
case "layout.text-image-section":
|
|
32
|
-
return /*#__PURE__*/React.createElement(
|
|
33
|
-
key: block.id
|
|
34
|
-
|
|
31
|
+
return /*#__PURE__*/React.createElement(TextImageSection.default, {
|
|
32
|
+
key: block.id,
|
|
33
|
+
data: block
|
|
34
|
+
});
|
|
35
35
|
default:
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 muiMarkdown = require('mui-markdown');
|
|
15
|
+
var StrapiImage = require('./StrapiImage.js');
|
|
16
|
+
|
|
17
|
+
function TextImageSection(_ref) {
|
|
18
|
+
let {
|
|
19
|
+
data
|
|
20
|
+
} = _ref;
|
|
21
|
+
const {
|
|
22
|
+
title,
|
|
23
|
+
text,
|
|
24
|
+
image,
|
|
25
|
+
reverse = false,
|
|
26
|
+
maxWidth
|
|
27
|
+
} = data;
|
|
28
|
+
|
|
29
|
+
/* TODO Text_content should deal with linebreaks,
|
|
30
|
+
reading up upon mui-markdown docs is advised */
|
|
31
|
+
|
|
32
|
+
return /*#__PURE__*/React.createElement(material.Container, {
|
|
33
|
+
maxWidth: maxWidth,
|
|
34
|
+
sx: {
|
|
35
|
+
my: 1
|
|
36
|
+
}
|
|
37
|
+
}, /*#__PURE__*/React.createElement(material.Paper, {
|
|
38
|
+
sx: {
|
|
39
|
+
p: 2
|
|
40
|
+
}
|
|
41
|
+
}, title && /*#__PURE__*/React.createElement(material.Typography, {
|
|
42
|
+
variant: "h1",
|
|
43
|
+
textAlign: "center",
|
|
44
|
+
width: "100%",
|
|
45
|
+
sx: {
|
|
46
|
+
pb: 2
|
|
47
|
+
}
|
|
48
|
+
}, title), /*#__PURE__*/React.createElement(material.Stack, {
|
|
49
|
+
spacing: 2,
|
|
50
|
+
direction: reverse ? "row-reverse" : "row"
|
|
51
|
+
}, (image === null || image === void 0 ? void 0 : image.url) !== undefined && /*#__PURE__*/React.createElement(material.Box, {
|
|
52
|
+
sx: {
|
|
53
|
+
width: text !== null && text !== undefined ? "50%" : "100%",
|
|
54
|
+
height: "100%",
|
|
55
|
+
overflow: "hidden",
|
|
56
|
+
display: "flex",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
justifyContent: "center"
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
|
|
61
|
+
alt: image.alt,
|
|
62
|
+
style: {},
|
|
63
|
+
height: image.height,
|
|
64
|
+
src: image.url,
|
|
65
|
+
width: image.width
|
|
66
|
+
})), text !== null && text !== undefined && /*#__PURE__*/React.createElement(material.Box, {
|
|
67
|
+
sx: {
|
|
68
|
+
width: (image === null || image === void 0 ? void 0 : image.url) !== null && (image === null || image === void 0 ? void 0 : image.url) !== undefined ? "50%" : "100%",
|
|
69
|
+
height: "100%",
|
|
70
|
+
overflow: "hidden",
|
|
71
|
+
display: "flex",
|
|
72
|
+
alignItems: "center",
|
|
73
|
+
justifyContent: "center"
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement(muiMarkdown.MuiMarkdown, null, text)))));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
exports.default = TextImageSection;
|
package/dist/cjs/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
var Button = require('./components/Button.js');
|
|
10
10
|
var Stack = require('./components/Stack.js');
|
|
11
11
|
var NavBar = require('./components/NavBar.js');
|
|
12
|
-
var
|
|
12
|
+
var TextImageSection = require('./components/TextImageSection.js');
|
|
13
13
|
var Page = require('./components/Page.js');
|
|
14
14
|
var Footer = require('./components/Footer.js');
|
|
15
15
|
var ContactForm = require('./components/ContactForm.js');
|
|
@@ -21,7 +21,7 @@ var BulletList = require('./components/BulletList.js');
|
|
|
21
21
|
exports.Button = Button.default;
|
|
22
22
|
exports.Stack = Stack.default;
|
|
23
23
|
exports.NavBar = NavBar.default;
|
|
24
|
-
exports.
|
|
24
|
+
exports.TextImageSection = TextImageSection.default;
|
|
25
25
|
exports.Page = Page.default;
|
|
26
26
|
exports.Footer = Footer.default;
|
|
27
27
|
exports.ContactForm = ContactForm.default;
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
8
|
import React from 'react';
|
|
10
9
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
10
|
+
import TextImageSection from './TextImageSection.js';
|
|
12
11
|
import { HeroSection } from './HeroSection.js';
|
|
13
12
|
import { FeatureSection } from './FeaturesSection.js';
|
|
14
13
|
|
|
@@ -25,9 +24,10 @@ function blockRenderer(block) {
|
|
|
25
24
|
data: block
|
|
26
25
|
});
|
|
27
26
|
case "layout.text-image-section":
|
|
28
|
-
return /*#__PURE__*/React.createElement(
|
|
29
|
-
key: block.id
|
|
30
|
-
|
|
27
|
+
return /*#__PURE__*/React.createElement(TextImageSection, {
|
|
28
|
+
key: block.id,
|
|
29
|
+
data: block
|
|
30
|
+
});
|
|
31
31
|
default:
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Container, Paper, Typography, Stack, Box } from '@mui/material';
|
|
10
|
+
import { MuiMarkdown } from 'mui-markdown';
|
|
11
|
+
import { StrapiImage } from './StrapiImage.js';
|
|
12
|
+
|
|
13
|
+
function TextImageSection(_ref) {
|
|
14
|
+
let {
|
|
15
|
+
data
|
|
16
|
+
} = _ref;
|
|
17
|
+
const {
|
|
18
|
+
title,
|
|
19
|
+
text,
|
|
20
|
+
image,
|
|
21
|
+
reverse = false,
|
|
22
|
+
maxWidth
|
|
23
|
+
} = data;
|
|
24
|
+
|
|
25
|
+
/* TODO Text_content should deal with linebreaks,
|
|
26
|
+
reading up upon mui-markdown docs is advised */
|
|
27
|
+
|
|
28
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
29
|
+
maxWidth: maxWidth,
|
|
30
|
+
sx: {
|
|
31
|
+
my: 1
|
|
32
|
+
}
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Paper, {
|
|
34
|
+
sx: {
|
|
35
|
+
p: 2
|
|
36
|
+
}
|
|
37
|
+
}, title && /*#__PURE__*/React.createElement(Typography, {
|
|
38
|
+
variant: "h1",
|
|
39
|
+
textAlign: "center",
|
|
40
|
+
width: "100%",
|
|
41
|
+
sx: {
|
|
42
|
+
pb: 2
|
|
43
|
+
}
|
|
44
|
+
}, title), /*#__PURE__*/React.createElement(Stack, {
|
|
45
|
+
spacing: 2,
|
|
46
|
+
direction: reverse ? "row-reverse" : "row"
|
|
47
|
+
}, (image === null || image === void 0 ? void 0 : image.url) !== undefined && /*#__PURE__*/React.createElement(Box, {
|
|
48
|
+
sx: {
|
|
49
|
+
width: text !== null && text !== undefined ? "50%" : "100%",
|
|
50
|
+
height: "100%",
|
|
51
|
+
overflow: "hidden",
|
|
52
|
+
display: "flex",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
justifyContent: "center"
|
|
55
|
+
}
|
|
56
|
+
}, /*#__PURE__*/React.createElement(StrapiImage, {
|
|
57
|
+
alt: image.alt,
|
|
58
|
+
style: {},
|
|
59
|
+
height: image.height,
|
|
60
|
+
src: image.url,
|
|
61
|
+
width: image.width
|
|
62
|
+
})), text !== null && text !== undefined && /*#__PURE__*/React.createElement(Box, {
|
|
63
|
+
sx: {
|
|
64
|
+
width: (image === null || image === void 0 ? void 0 : image.url) !== null && (image === null || image === void 0 ? void 0 : image.url) !== undefined ? "50%" : "100%",
|
|
65
|
+
height: "100%",
|
|
66
|
+
overflow: "hidden",
|
|
67
|
+
display: "flex",
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
justifyContent: "center"
|
|
70
|
+
}
|
|
71
|
+
}, /*#__PURE__*/React.createElement(MuiMarkdown, null, text)))));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { TextImageSection as default };
|
package/dist/esm/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
export { default as Button } from './components/Button.js';
|
|
8
8
|
export { default as Stack } from './components/Stack.js';
|
|
9
9
|
export { default as NavBar } from './components/NavBar.js';
|
|
10
|
-
export { default as
|
|
10
|
+
export { default as TextImageSection } from './components/TextImageSection.js';
|
|
11
11
|
export { default as Page } from './components/Page.js';
|
|
12
12
|
export { default as Footer } from './components/Footer.js';
|
|
13
13
|
export { default as ContactForm } from './components/ContactForm.js';
|
package/next.config.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
/** @type {import('next').NextConfig} */
|
|
4
4
|
const nextConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
/* config options here */
|
|
6
|
+
images: {
|
|
7
|
+
remotePatterns: [
|
|
8
|
+
{
|
|
9
|
+
protocol: "https",
|
|
10
|
+
hostname: "www.google.com",
|
|
11
|
+
pathname: "/images/**",
|
|
12
|
+
},
|
|
13
|
+
{ hostname: "localhost", port: "1337" },
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
module.exports = nextConfig;
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
export { default as Button } from "./components/Button";
|
|
8
8
|
export { default as Stack } from "./components/Stack";
|
|
9
9
|
export { default as NavBar } from "./components/NavBar";
|
|
10
|
-
export { default as
|
|
10
|
+
export { default as TextImageSection } from "./components/TextImageSection.tsx";
|
|
11
11
|
export { default as Page } from "./components/Page";
|
|
12
12
|
export { default as Footer } from "./components/Footer";
|
|
13
13
|
export { default as ContactForm } from "./components/ContactForm";
|