umwd-components 0.1.28 → 0.1.30

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