umwd-components 0.1.28 → 0.1.29

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.
@@ -0,0 +1,173 @@
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 material = require('@mui/material');
12
+ var Link = require('next/link');
13
+ var Image = require('next/image');
14
+ var PropTypes = require('prop-types');
15
+
16
+ Footer.propTypes = {
17
+ site_title: PropTypes.string.isRequired,
18
+ site_logo: PropTypes.string,
19
+ company_name: PropTypes.string.isRequired,
20
+ parent_company_name: PropTypes.string,
21
+ company_address: PropTypes.shape({
22
+ street: PropTypes.string,
23
+ street_number: PropTypes.string,
24
+ street_number_addition: PropTypes.string,
25
+ postal_code: PropTypes.string,
26
+ city: PropTypes.string
27
+ }),
28
+ CoC_number: PropTypes.string.isRequired,
29
+ VAT_number: PropTypes.string.isRequired,
30
+ company_socials: PropTypes.arrayOf(PropTypes.shape({
31
+ name: PropTypes.string.isRequired,
32
+ url: PropTypes.string.isRequired,
33
+ icon: PropTypes.elementType
34
+ })),
35
+ disclaimer_link: PropTypes.string,
36
+ privacypolicy_link: PropTypes.string
37
+ };
38
+ function Footer({
39
+ site_title,
40
+ site_logo,
41
+ company_name,
42
+ parent_company_name,
43
+ company_address,
44
+ CoC_number,
45
+ VAT_number,
46
+ company_socials,
47
+ disclaimer_link,
48
+ privacypolicy_link
49
+ }) {
50
+ return /*#__PURE__*/React.createElement(material.AppBar, {
51
+ position: "relative"
52
+ }, /*#__PURE__*/React.createElement(material.Container, {
53
+ maxWidth: "xl"
54
+ }, /*#__PURE__*/React.createElement(material.Toolbar, {
55
+ disableGutters: true
56
+ }, /*#__PURE__*/React.createElement(material.Grid, {
57
+ container: true,
58
+ sx: {
59
+ p: 2
60
+ },
61
+ spacing: 2
62
+ }, /*#__PURE__*/React.createElement(material.Grid, {
63
+ item: true,
64
+ xs: 12,
65
+ sm: 4,
66
+ align: "center"
67
+ }, /*#__PURE__*/React.createElement(Link, {
68
+ href: "/"
69
+ }, /*#__PURE__*/React.createElement(material.Box, {
70
+ sx: {
71
+ display: {
72
+ xs: "none",
73
+ md: "flex"
74
+ },
75
+ cursor: "pointer",
76
+ flexDirection: "column",
77
+ alignItems: "center",
78
+ justifyContent: "center"
79
+ }
80
+ }, /*#__PURE__*/React.createElement(material.Typography, {
81
+ variant: "h6"
82
+ }, site_title), site_logo && /*#__PURE__*/React.createElement(material.Box, null, /*#__PURE__*/React.createElement(Image, {
83
+ src: site_logo,
84
+ width: 64,
85
+ height: 64,
86
+ alt: "site logo"
87
+ }))))), /*#__PURE__*/React.createElement(material.Grid, {
88
+ item: true,
89
+ xs: 12,
90
+ sm: 4,
91
+ align: "center"
92
+ }, /*#__PURE__*/React.createElement(material.Typography, {
93
+ variant: "h6"
94
+ }, "Contact Information"), /*#__PURE__*/React.createElement(material.Typography, {
95
+ variant: "h6"
96
+ }, company_name), parent_company_name && /*#__PURE__*/React.createElement(material.Typography, {
97
+ variant: "h6"
98
+ }, "By ", parent_company_name), company_address && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(material.Typography, {
99
+ variant: "body1"
100
+ }, company_address.street, " ", company_address.street_number, " ", company_address.street_number_addition && company_address.street_number_addition), /*#__PURE__*/React.createElement(material.Typography, {
101
+ variant: "body1"
102
+ }, company_address.postal_code, " ", company_address.city)), /*#__PURE__*/React.createElement(material.Typography, {
103
+ variant: "body1"
104
+ }, "CoC: ", CoC_number), /*#__PURE__*/React.createElement(material.Typography, {
105
+ variant: "body1"
106
+ }, "VAT: ", VAT_number), /*#__PURE__*/React.createElement(material.Typography, {
107
+ variant: "body1"
108
+ }), /*#__PURE__*/React.createElement(material.Typography, {
109
+ variant: "body1"
110
+ })), /*#__PURE__*/React.createElement(material.Grid, {
111
+ item: true,
112
+ xs: 12,
113
+ sm: 4,
114
+ align: "center"
115
+ }, /*#__PURE__*/React.createElement(material.Typography, {
116
+ variant: "h6"
117
+ }, "Socials"), company_socials && /*#__PURE__*/React.createElement(material.Stack, {
118
+ spacing: 2,
119
+ sx: {
120
+ width: "min-content",
121
+ color: "primary.contrastText"
122
+ }
123
+ }, company_socials.map((company_social, index) => {
124
+ if (company_social.url === undefined || company_social.icon === undefined) {
125
+ return /*#__PURE__*/React.createElement(material.IconButton, {
126
+ color: "inherit",
127
+ href: company_social.url
128
+ }, company_social.icon);
129
+ }
130
+ }))), /*#__PURE__*/React.createElement(material.Grid, {
131
+ item: true,
132
+ xs: 12
133
+ }, /*#__PURE__*/React.createElement(material.Divider, null)), disclaimer_link && /*#__PURE__*/React.createElement(material.Grid, {
134
+ item: true,
135
+ xs: 12,
136
+ sm: 4,
137
+ sx: {
138
+ display: "flex",
139
+ justifyContent: "center",
140
+ alignItems: "center"
141
+ }
142
+ }, /*#__PURE__*/React.createElement(Link, {
143
+ href: disclaimer_link
144
+ }, /*#__PURE__*/React.createElement(material.Typography, {
145
+ variant: "body1"
146
+ }, "Disclaimer"))), privacypolicy_link && /*#__PURE__*/React.createElement(material.Grid, {
147
+ item: true,
148
+ xs: 12,
149
+ sm: 4,
150
+ sx: {
151
+ display: "flex",
152
+ justifyContent: "center",
153
+ alignItems: "center"
154
+ }
155
+ }, /*#__PURE__*/React.createElement(Link, {
156
+ href: privacypolicy_link
157
+ }, /*#__PURE__*/React.createElement(material.Typography, {
158
+ variant: "body1"
159
+ }, "Privacy Policy"))), /*#__PURE__*/React.createElement(material.Grid, {
160
+ item: true,
161
+ xs: 12
162
+ }, /*#__PURE__*/React.createElement(material.Divider, null)), /*#__PURE__*/React.createElement(material.Grid, {
163
+ item: true,
164
+ xs: 12,
165
+ sx: {
166
+ display: "flex",
167
+ justifyContent: "center",
168
+ alignItems: "center"
169
+ }
170
+ }, /*#__PURE__*/React.createElement(material.Typography, null, "Made possible by Atelier Paulus"))))));
171
+ }
172
+
173
+ exports.default = Footer;
package/dist/cjs/index.js CHANGED
@@ -13,6 +13,7 @@ var Stack = require('./components/Stack.js');
13
13
  var NavBar = require('./components/NavBar.js');
14
14
  var TextImageBlock = require('./components/TextImageBlock.js');
15
15
  var Page = require('./components/Page.js');
16
+ var Footer = require('./components/Footer.js');
16
17
 
17
18
 
18
19
 
@@ -23,3 +24,4 @@ exports.Stack = Stack.default;
23
24
  exports.NavBar = NavBar.default;
24
25
  exports.TextImageBlock = TextImageBlock.default;
25
26
  exports.Page = Page.default;
27
+ exports.Footer = Footer.default;
@@ -0,0 +1,169 @@
1
+ /*
2
+ * UMWD-Components
3
+ * @copyright Jelle Paulus
4
+ * @license MIT
5
+ */
6
+
7
+ import { AppBar, Container, Toolbar, Grid, Box, Typography, Stack, IconButton, Divider } from '@mui/material';
8
+ import Link from 'next/link';
9
+ import Image from 'next/image';
10
+ import PropTypes from 'prop-types';
11
+
12
+ Footer.propTypes = {
13
+ site_title: PropTypes.string.isRequired,
14
+ site_logo: PropTypes.string,
15
+ company_name: PropTypes.string.isRequired,
16
+ parent_company_name: PropTypes.string,
17
+ company_address: PropTypes.shape({
18
+ street: PropTypes.string,
19
+ street_number: PropTypes.string,
20
+ street_number_addition: PropTypes.string,
21
+ postal_code: PropTypes.string,
22
+ city: PropTypes.string
23
+ }),
24
+ CoC_number: PropTypes.string.isRequired,
25
+ VAT_number: PropTypes.string.isRequired,
26
+ company_socials: PropTypes.arrayOf(PropTypes.shape({
27
+ name: PropTypes.string.isRequired,
28
+ url: PropTypes.string.isRequired,
29
+ icon: PropTypes.elementType
30
+ })),
31
+ disclaimer_link: PropTypes.string,
32
+ privacypolicy_link: PropTypes.string
33
+ };
34
+ function Footer({
35
+ site_title,
36
+ site_logo,
37
+ company_name,
38
+ parent_company_name,
39
+ company_address,
40
+ CoC_number,
41
+ VAT_number,
42
+ company_socials,
43
+ disclaimer_link,
44
+ privacypolicy_link
45
+ }) {
46
+ return /*#__PURE__*/React.createElement(AppBar, {
47
+ position: "relative"
48
+ }, /*#__PURE__*/React.createElement(Container, {
49
+ maxWidth: "xl"
50
+ }, /*#__PURE__*/React.createElement(Toolbar, {
51
+ disableGutters: true
52
+ }, /*#__PURE__*/React.createElement(Grid, {
53
+ container: true,
54
+ sx: {
55
+ p: 2
56
+ },
57
+ spacing: 2
58
+ }, /*#__PURE__*/React.createElement(Grid, {
59
+ item: true,
60
+ xs: 12,
61
+ sm: 4,
62
+ align: "center"
63
+ }, /*#__PURE__*/React.createElement(Link, {
64
+ href: "/"
65
+ }, /*#__PURE__*/React.createElement(Box, {
66
+ sx: {
67
+ display: {
68
+ xs: "none",
69
+ md: "flex"
70
+ },
71
+ cursor: "pointer",
72
+ flexDirection: "column",
73
+ alignItems: "center",
74
+ justifyContent: "center"
75
+ }
76
+ }, /*#__PURE__*/React.createElement(Typography, {
77
+ variant: "h6"
78
+ }, site_title), site_logo && /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Image, {
79
+ src: site_logo,
80
+ width: 64,
81
+ height: 64,
82
+ alt: "site logo"
83
+ }))))), /*#__PURE__*/React.createElement(Grid, {
84
+ item: true,
85
+ xs: 12,
86
+ sm: 4,
87
+ align: "center"
88
+ }, /*#__PURE__*/React.createElement(Typography, {
89
+ variant: "h6"
90
+ }, "Contact Information"), /*#__PURE__*/React.createElement(Typography, {
91
+ variant: "h6"
92
+ }, company_name), parent_company_name && /*#__PURE__*/React.createElement(Typography, {
93
+ variant: "h6"
94
+ }, "By ", parent_company_name), company_address && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Typography, {
95
+ variant: "body1"
96
+ }, company_address.street, " ", company_address.street_number, " ", company_address.street_number_addition && company_address.street_number_addition), /*#__PURE__*/React.createElement(Typography, {
97
+ variant: "body1"
98
+ }, company_address.postal_code, " ", company_address.city)), /*#__PURE__*/React.createElement(Typography, {
99
+ variant: "body1"
100
+ }, "CoC: ", CoC_number), /*#__PURE__*/React.createElement(Typography, {
101
+ variant: "body1"
102
+ }, "VAT: ", VAT_number), /*#__PURE__*/React.createElement(Typography, {
103
+ variant: "body1"
104
+ }), /*#__PURE__*/React.createElement(Typography, {
105
+ variant: "body1"
106
+ })), /*#__PURE__*/React.createElement(Grid, {
107
+ item: true,
108
+ xs: 12,
109
+ sm: 4,
110
+ align: "center"
111
+ }, /*#__PURE__*/React.createElement(Typography, {
112
+ variant: "h6"
113
+ }, "Socials"), company_socials && /*#__PURE__*/React.createElement(Stack, {
114
+ spacing: 2,
115
+ sx: {
116
+ width: "min-content",
117
+ color: "primary.contrastText"
118
+ }
119
+ }, company_socials.map((company_social, index) => {
120
+ if (company_social.url === undefined || company_social.icon === undefined) {
121
+ return /*#__PURE__*/React.createElement(IconButton, {
122
+ color: "inherit",
123
+ href: company_social.url
124
+ }, company_social.icon);
125
+ }
126
+ }))), /*#__PURE__*/React.createElement(Grid, {
127
+ item: true,
128
+ xs: 12
129
+ }, /*#__PURE__*/React.createElement(Divider, null)), disclaimer_link && /*#__PURE__*/React.createElement(Grid, {
130
+ item: true,
131
+ xs: 12,
132
+ sm: 4,
133
+ sx: {
134
+ display: "flex",
135
+ justifyContent: "center",
136
+ alignItems: "center"
137
+ }
138
+ }, /*#__PURE__*/React.createElement(Link, {
139
+ href: disclaimer_link
140
+ }, /*#__PURE__*/React.createElement(Typography, {
141
+ variant: "body1"
142
+ }, "Disclaimer"))), privacypolicy_link && /*#__PURE__*/React.createElement(Grid, {
143
+ item: true,
144
+ xs: 12,
145
+ sm: 4,
146
+ sx: {
147
+ display: "flex",
148
+ justifyContent: "center",
149
+ alignItems: "center"
150
+ }
151
+ }, /*#__PURE__*/React.createElement(Link, {
152
+ href: privacypolicy_link
153
+ }, /*#__PURE__*/React.createElement(Typography, {
154
+ variant: "body1"
155
+ }, "Privacy Policy"))), /*#__PURE__*/React.createElement(Grid, {
156
+ item: true,
157
+ xs: 12
158
+ }, /*#__PURE__*/React.createElement(Divider, null)), /*#__PURE__*/React.createElement(Grid, {
159
+ item: true,
160
+ xs: 12,
161
+ sx: {
162
+ display: "flex",
163
+ justifyContent: "center",
164
+ alignItems: "center"
165
+ }
166
+ }, /*#__PURE__*/React.createElement(Typography, null, "Made possible by Atelier Paulus"))))));
167
+ }
168
+
169
+ export { Footer as default };
package/dist/esm/index.js CHANGED
@@ -11,3 +11,4 @@ export { default as Stack } from './components/Stack.js';
11
11
  export { default as NavBar } from './components/NavBar.js';
12
12
  export { default as TextImageBlock } from './components/TextImageBlock.js';
13
13
  export { default as Page } from './components/Page.js';
14
+ export { default as Footer } from './components/Footer.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/index.js CHANGED
@@ -6,3 +6,4 @@ export { default as Stack } from "./components/Stack";
6
6
  export { default as NavBar } from "./components/NavBar";
7
7
  export { default as TextImageBlock } from "./components/TextImageBlock";
8
8
  export { default as Page } from "./components/Page";
9
+ export { default as Footer } from "./components/Footer";