umwd-components 0.1.88 → 0.1.90

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.
@@ -9,18 +9,17 @@
9
9
  var React = require('react');
10
10
  var material = require('@mui/material');
11
11
  var getIcon = require('../lib/getIcon.js');
12
- var LocalShippingIcon = require('@mui/icons-material/LocalShipping');
13
12
 
14
13
  function ColumnsSection(_ref) {
15
14
  let {
16
15
  data
17
16
  } = _ref;
18
17
  const {
19
- column
18
+ column,
19
+ maxWidth
20
20
  } = data;
21
- console.log(LocalShippingIcon);
22
21
  return /*#__PURE__*/React.createElement(material.Container, {
23
- maxWidth: "lg",
22
+ maxWidth: maxWidth || "lg",
24
23
  sx: {
25
24
  my: 1
26
25
  }
@@ -35,20 +34,17 @@ function ColumnsSection(_ref) {
35
34
  useFlexGap: true
36
35
  }, column.map(column => {
37
36
  const Icon = getIcon.default(column.icon);
38
- return /*#__PURE__*/React.createElement(material.Card, {
39
- key: column.id,
37
+ return /*#__PURE__*/React.createElement(material.Paper, {
40
38
  sx: {
41
- display: "flex",
42
- flexDirection: "column",
43
- justifyContent: "space-between",
44
- flex: 1,
45
- minWidth: "350px"
39
+ p: 2
46
40
  }
47
- }, /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.Typography, {
41
+ }, /*#__PURE__*/React.createElement(material.Typography, {
48
42
  variant: "h5",
49
- component: "div",
50
43
  sx: {
51
- mb: 2
44
+ mb: 2,
45
+ display: "flex",
46
+ justifyContent: "flex-start",
47
+ alignItems: "center"
52
48
  }
53
49
  }, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
54
50
  sx: {
@@ -63,7 +59,7 @@ function ColumnsSection(_ref) {
63
59
  variant: "body2",
64
60
  color: "text.secondary",
65
61
  component: "div"
66
- }, column.text)));
62
+ }, column.text));
67
63
  })));
68
64
  }
69
65
 
@@ -15,10 +15,12 @@ function FeatureSection(_ref) {
15
15
  data
16
16
  } = _ref;
17
17
  const {
18
- feature
18
+ feature,
19
+ maxWidth
19
20
  } = data;
21
+ const theme = material.useTheme();
20
22
  return /*#__PURE__*/React.createElement(material.Container, {
21
- maxWidth: "lg",
23
+ maxWidth: maxWidth || "lg",
22
24
  sx: {
23
25
  my: 1
24
26
  }
@@ -28,7 +30,13 @@ function FeatureSection(_ref) {
28
30
  justifyContent: "stretch",
29
31
  flexWrap: "wrap",
30
32
  sx: {
31
- width: "100%"
33
+ width: "100%",
34
+ [theme.breakpoints.up("xs")]: {
35
+ flexDirection: "column"
36
+ },
37
+ [theme.breakpoints.up("sm")]: {
38
+ flexDirection: "row"
39
+ }
32
40
  },
33
41
  useFlexGap: true
34
42
  }, feature.map(feature => {
@@ -40,9 +48,9 @@ function FeatureSection(_ref) {
40
48
  flexDirection: "column",
41
49
  justifyContent: "space-between",
42
50
  flex: 1,
43
- minWidth: "350px"
51
+ minWidth: 275
44
52
  }
45
- }, /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.CardMedia, {
53
+ }, /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.Box, {
46
54
  sx: {
47
55
  height: 140,
48
56
  display: "grid",
@@ -18,10 +18,12 @@ function FleetSection(_ref) {
18
18
  data
19
19
  } = _ref;
20
20
  const {
21
- airplane
21
+ airplane,
22
+ maxWidth
22
23
  } = data;
24
+ const theme = material.useTheme();
23
25
  return /*#__PURE__*/React.createElement(material.Container, {
24
- maxWidth: "lg",
26
+ maxWidth: maxWidth || "lg",
25
27
  sx: {
26
28
  my: 1
27
29
  }
@@ -31,7 +33,13 @@ function FleetSection(_ref) {
31
33
  justifyContent: "stretch",
32
34
  flexWrap: "wrap",
33
35
  sx: {
34
- width: "100%"
36
+ width: "100%",
37
+ [theme.breakpoints.up("xs")]: {
38
+ flexDirection: "column"
39
+ },
40
+ [theme.breakpoints.up("sm")]: {
41
+ flexDirection: "row"
42
+ }
35
43
  },
36
44
  useFlexGap: true
37
45
  }, airplane.map(airplane => /*#__PURE__*/React.createElement(material.Card, {
@@ -41,7 +49,7 @@ function FleetSection(_ref) {
41
49
  flexDirection: "column",
42
50
  justifyContent: "space-between",
43
51
  flex: 1,
44
- minWidth: "350px"
52
+ minWidth: 275
45
53
  }
46
54
  }, /*#__PURE__*/React.createElement(material.CardHeader, {
47
55
  title: airplane.name,
@@ -13,6 +13,7 @@ var React = require('react');
13
13
  var material = require('@mui/material');
14
14
  var Link = require('next/link');
15
15
  var Image = require('next/image');
16
+ var getIcon = require('../lib/getIcon.js');
16
17
  var PropTypes = require('prop-types');
17
18
 
18
19
  Footer.propTypes = {
@@ -143,11 +144,17 @@ function Footer(_ref) {
143
144
  color: "primary.contrastText"
144
145
  }
145
146
  }, company_socials.map((company_social, index) => {
147
+ const Icon = getIcon.default(company_social.icon);
146
148
  return /*#__PURE__*/React.createElement(material.IconButton, {
147
149
  key: index,
148
150
  color: "inherit",
149
151
  href: company_social.url
150
- }, company_social.icon);
152
+ }, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
153
+ sx: {
154
+ mr: 2,
155
+ mt: 0.2
156
+ }
157
+ }));
151
158
  })))), /*#__PURE__*/React.createElement(material.Grid, {
152
159
  item: true,
153
160
  xs: 12
@@ -42,6 +42,7 @@ function TextImageSection(_ref) {
42
42
  /* TODO Text_content should deal with linebreaks,
43
43
  reading up upon mui-markdown docs is advised */
44
44
 
45
+ const theme = material.useTheme();
45
46
  return /*#__PURE__*/React.createElement(material.Container, {
46
47
  maxWidth: maxWidth || "lg",
47
48
  sx: {
@@ -60,10 +61,17 @@ function TextImageSection(_ref) {
60
61
  }
61
62
  }, title), /*#__PURE__*/React.createElement(material.Stack, {
62
63
  spacing: 2,
63
- direction: reverse ? "row-reverse" : "row"
64
+ direction: reverse ? "row-reverse" : "row",
65
+ gap: 2,
66
+ sx: {
67
+ width: "100%",
68
+ [theme.breakpoints.down("sm")]: {
69
+ flexDirection: "column"
70
+ }
71
+ }
64
72
  }, (image === null || image === void 0 ? void 0 : image.url) !== undefined && /*#__PURE__*/React.createElement(material.Box, {
65
73
  sx: {
66
- width: text !== null && text !== undefined ? "50%" : "100%",
74
+ minWidth: 275,
67
75
  height: "100%",
68
76
  overflow: "hidden",
69
77
  display: "flex",
@@ -77,7 +85,10 @@ function TextImageSection(_ref) {
77
85
  src: image.url
78
86
  })), text !== null && text !== undefined && /*#__PURE__*/React.createElement(material.Box, {
79
87
  sx: {
80
- width: (image === null || image === void 0 ? void 0 : image.url) !== null && (image === null || image === void 0 ? void 0 : image.url) !== undefined ? "50%" : "100%",
88
+ /* width:
89
+ image?.url !== null && image?.url !== undefined
90
+ ? "50%"
91
+ : "100%", */
81
92
  height: "100%",
82
93
  overflow: "hidden",
83
94
  display: "flex",
@@ -29,6 +29,11 @@ var MasksIcon = require('@mui/icons-material/Masks');
29
29
  var BoltIcon = require('@mui/icons-material/Bolt');
30
30
  var BedIcon = require('@mui/icons-material/Bed');
31
31
  var AmbulanceIcon = require('./AmbulanceIcon.js');
32
+ var LinkedInIcon = require('@mui/icons-material/LinkedIn');
33
+ var FaceBookIcon = require('@mui/icons-material/Facebook');
34
+ var TwitterIcon = require('@mui/icons-material/Twitter');
35
+ var LocalShippingIcon = require('@mui/icons-material/LocalShipping');
36
+ var InstagramIcon = require('@mui/icons-material/Instagram');
32
37
 
33
38
  function getIcon(icon) {
34
39
  switch (icon) {
@@ -74,6 +79,16 @@ function getIcon(icon) {
74
79
  return BedIcon;
75
80
  case "AmbulanceIcon":
76
81
  return AmbulanceIcon.default;
82
+ case "LinkedInIcon":
83
+ return LinkedInIcon;
84
+ case "FaceBookIcon":
85
+ return FaceBookIcon;
86
+ case "TwitterIcon":
87
+ return TwitterIcon;
88
+ case "LocalShippingIcon":
89
+ return LocalShippingIcon;
90
+ case "InstagramIcon":
91
+ return InstagramIcon;
77
92
  default:
78
93
  return null;
79
94
  }
@@ -5,20 +5,19 @@
5
5
  */
6
6
 
7
7
  import React__default from 'react';
8
- import { Container, Stack, Card, CardContent, Typography } from '@mui/material';
8
+ import { Container, Stack, Paper, Typography } from '@mui/material';
9
9
  import getIcon from '../lib/getIcon.js';
10
- import LocalShippingIcon from '@mui/icons-material/LocalShipping';
11
10
 
12
11
  function ColumnsSection(_ref) {
13
12
  let {
14
13
  data
15
14
  } = _ref;
16
15
  const {
17
- column
16
+ column,
17
+ maxWidth
18
18
  } = data;
19
- console.log(LocalShippingIcon);
20
19
  return /*#__PURE__*/React__default.createElement(Container, {
21
- maxWidth: "lg",
20
+ maxWidth: maxWidth || "lg",
22
21
  sx: {
23
22
  my: 1
24
23
  }
@@ -33,20 +32,17 @@ function ColumnsSection(_ref) {
33
32
  useFlexGap: true
34
33
  }, column.map(column => {
35
34
  const Icon = getIcon(column.icon);
36
- return /*#__PURE__*/React__default.createElement(Card, {
37
- key: column.id,
35
+ return /*#__PURE__*/React__default.createElement(Paper, {
38
36
  sx: {
39
- display: "flex",
40
- flexDirection: "column",
41
- justifyContent: "space-between",
42
- flex: 1,
43
- minWidth: "350px"
37
+ p: 2
44
38
  }
45
- }, /*#__PURE__*/React__default.createElement(CardContent, null, /*#__PURE__*/React__default.createElement(Typography, {
39
+ }, /*#__PURE__*/React__default.createElement(Typography, {
46
40
  variant: "h5",
47
- component: "div",
48
41
  sx: {
49
- mb: 2
42
+ mb: 2,
43
+ display: "flex",
44
+ justifyContent: "flex-start",
45
+ alignItems: "center"
50
46
  }
51
47
  }, Icon !== null && /*#__PURE__*/React__default.createElement(Icon, {
52
48
  sx: {
@@ -61,7 +57,7 @@ function ColumnsSection(_ref) {
61
57
  variant: "body2",
62
58
  color: "text.secondary",
63
59
  component: "div"
64
- }, column.text)));
60
+ }, column.text));
65
61
  })));
66
62
  }
67
63
 
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import React__default from 'react';
8
- import { Container, Stack, Card, CardContent, CardMedia, Typography, CardActions, Button } from '@mui/material';
8
+ import { useTheme, Container, Stack, Card, CardContent, Box, Typography, CardActions, Button } from '@mui/material';
9
9
  import getIcon from '../lib/getIcon.js';
10
10
 
11
11
  function FeatureSection(_ref) {
@@ -13,10 +13,12 @@ function FeatureSection(_ref) {
13
13
  data
14
14
  } = _ref;
15
15
  const {
16
- feature
16
+ feature,
17
+ maxWidth
17
18
  } = data;
19
+ const theme = useTheme();
18
20
  return /*#__PURE__*/React__default.createElement(Container, {
19
- maxWidth: "lg",
21
+ maxWidth: maxWidth || "lg",
20
22
  sx: {
21
23
  my: 1
22
24
  }
@@ -26,7 +28,13 @@ function FeatureSection(_ref) {
26
28
  justifyContent: "stretch",
27
29
  flexWrap: "wrap",
28
30
  sx: {
29
- width: "100%"
31
+ width: "100%",
32
+ [theme.breakpoints.up("xs")]: {
33
+ flexDirection: "column"
34
+ },
35
+ [theme.breakpoints.up("sm")]: {
36
+ flexDirection: "row"
37
+ }
30
38
  },
31
39
  useFlexGap: true
32
40
  }, feature.map(feature => {
@@ -38,9 +46,9 @@ function FeatureSection(_ref) {
38
46
  flexDirection: "column",
39
47
  justifyContent: "space-between",
40
48
  flex: 1,
41
- minWidth: "350px"
49
+ minWidth: 275
42
50
  }
43
- }, /*#__PURE__*/React__default.createElement(CardContent, null, /*#__PURE__*/React__default.createElement(CardMedia, {
51
+ }, /*#__PURE__*/React__default.createElement(CardContent, null, /*#__PURE__*/React__default.createElement(Box, {
44
52
  sx: {
45
53
  height: 140,
46
54
  display: "grid",
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import React__default from 'react';
8
- import { Container, Stack, Card, CardHeader, CardMedia, Paper, Box, Typography, CardContent, Chip } from '@mui/material';
8
+ import { useTheme, Container, Stack, Card, CardHeader, CardMedia, Paper, Box, Typography, CardContent, Chip } from '@mui/material';
9
9
  import { StrapiImage } from './StrapiImage.js';
10
10
  import RadarIcon from '@mui/icons-material/Radar';
11
11
  import SpeedIcon from '@mui/icons-material/Speed';
@@ -16,10 +16,12 @@ function FleetSection(_ref) {
16
16
  data
17
17
  } = _ref;
18
18
  const {
19
- airplane
19
+ airplane,
20
+ maxWidth
20
21
  } = data;
22
+ const theme = useTheme();
21
23
  return /*#__PURE__*/React__default.createElement(Container, {
22
- maxWidth: "lg",
24
+ maxWidth: maxWidth || "lg",
23
25
  sx: {
24
26
  my: 1
25
27
  }
@@ -29,7 +31,13 @@ function FleetSection(_ref) {
29
31
  justifyContent: "stretch",
30
32
  flexWrap: "wrap",
31
33
  sx: {
32
- width: "100%"
34
+ width: "100%",
35
+ [theme.breakpoints.up("xs")]: {
36
+ flexDirection: "column"
37
+ },
38
+ [theme.breakpoints.up("sm")]: {
39
+ flexDirection: "row"
40
+ }
33
41
  },
34
42
  useFlexGap: true
35
43
  }, airplane.map(airplane => /*#__PURE__*/React__default.createElement(Card, {
@@ -39,7 +47,7 @@ function FleetSection(_ref) {
39
47
  flexDirection: "column",
40
48
  justifyContent: "space-between",
41
49
  flex: 1,
42
- minWidth: "350px"
50
+ minWidth: 275
43
51
  }
44
52
  }, /*#__PURE__*/React__default.createElement(CardHeader, {
45
53
  title: airplane.name,
@@ -9,6 +9,7 @@ import React__default from 'react';
9
9
  import { useTheme, AppBar, Container, Toolbar, Grid, Link, Box, Typography, Stack, IconButton, Divider } from '@mui/material';
10
10
  import Link$1 from 'next/link';
11
11
  import Image from 'next/image';
12
+ import getIcon from '../lib/getIcon.js';
12
13
  import PropTypes from 'prop-types';
13
14
 
14
15
  Footer.propTypes = {
@@ -139,11 +140,17 @@ function Footer(_ref) {
139
140
  color: "primary.contrastText"
140
141
  }
141
142
  }, company_socials.map((company_social, index) => {
143
+ const Icon = getIcon(company_social.icon);
142
144
  return /*#__PURE__*/React__default.createElement(IconButton, {
143
145
  key: index,
144
146
  color: "inherit",
145
147
  href: company_social.url
146
- }, company_social.icon);
148
+ }, Icon !== null && /*#__PURE__*/React__default.createElement(Icon, {
149
+ sx: {
150
+ mr: 2,
151
+ mt: 0.2
152
+ }
153
+ }));
147
154
  })))), /*#__PURE__*/React__default.createElement(Grid, {
148
155
  item: true,
149
156
  xs: 12
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import React__default from 'react';
9
- import { Container, Paper, Typography, Stack, Box } from '@mui/material';
9
+ import { useTheme, Container, Paper, Typography, Stack, Box } from '@mui/material';
10
10
  import { StrapiImage } from './StrapiImage.js';
11
11
 
12
12
  const MuiMarkdown = /*#__PURE__*/React__default.lazy(() => import( /* webpackChunkName: "mui-markdown" */'mui-markdown'));
@@ -38,6 +38,7 @@ function TextImageSection(_ref) {
38
38
  /* TODO Text_content should deal with linebreaks,
39
39
  reading up upon mui-markdown docs is advised */
40
40
 
41
+ const theme = useTheme();
41
42
  return /*#__PURE__*/React__default.createElement(Container, {
42
43
  maxWidth: maxWidth || "lg",
43
44
  sx: {
@@ -56,10 +57,17 @@ function TextImageSection(_ref) {
56
57
  }
57
58
  }, title), /*#__PURE__*/React__default.createElement(Stack, {
58
59
  spacing: 2,
59
- direction: reverse ? "row-reverse" : "row"
60
+ direction: reverse ? "row-reverse" : "row",
61
+ gap: 2,
62
+ sx: {
63
+ width: "100%",
64
+ [theme.breakpoints.down("sm")]: {
65
+ flexDirection: "column"
66
+ }
67
+ }
60
68
  }, (image === null || image === void 0 ? void 0 : image.url) !== undefined && /*#__PURE__*/React__default.createElement(Box, {
61
69
  sx: {
62
- width: text !== null && text !== undefined ? "50%" : "100%",
70
+ minWidth: 275,
63
71
  height: "100%",
64
72
  overflow: "hidden",
65
73
  display: "flex",
@@ -73,7 +81,10 @@ function TextImageSection(_ref) {
73
81
  src: image.url
74
82
  })), text !== null && text !== undefined && /*#__PURE__*/React__default.createElement(Box, {
75
83
  sx: {
76
- width: (image === null || image === void 0 ? void 0 : image.url) !== null && (image === null || image === void 0 ? void 0 : image.url) !== undefined ? "50%" : "100%",
84
+ /* width:
85
+ image?.url !== null && image?.url !== undefined
86
+ ? "50%"
87
+ : "100%", */
77
88
  height: "100%",
78
89
  overflow: "hidden",
79
90
  display: "flex",
@@ -25,6 +25,11 @@ import MasksIcon from '@mui/icons-material/Masks';
25
25
  import BoltIcon from '@mui/icons-material/Bolt';
26
26
  import BedIcon from '@mui/icons-material/Bed';
27
27
  import AmbulanceIcon from './AmbulanceIcon.js';
28
+ import LinkedInIcon from '@mui/icons-material/LinkedIn';
29
+ import FaceBookIcon from '@mui/icons-material/Facebook';
30
+ import TwitterIcon from '@mui/icons-material/Twitter';
31
+ import LocalShippingIcon from '@mui/icons-material/LocalShipping';
32
+ import InstagramIcon from '@mui/icons-material/Instagram';
28
33
 
29
34
  function getIcon(icon) {
30
35
  switch (icon) {
@@ -70,6 +75,16 @@ function getIcon(icon) {
70
75
  return BedIcon;
71
76
  case "AmbulanceIcon":
72
77
  return AmbulanceIcon;
78
+ case "LinkedInIcon":
79
+ return LinkedInIcon;
80
+ case "FaceBookIcon":
81
+ return FaceBookIcon;
82
+ case "TwitterIcon":
83
+ return TwitterIcon;
84
+ case "LocalShippingIcon":
85
+ return LocalShippingIcon;
86
+ case "InstagramIcon":
87
+ return InstagramIcon;
73
88
  default:
74
89
  return null;
75
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.88",
3
+ "version": "0.1.90",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1,7 +1,13 @@
1
1
  import React from "react";
2
- import { Stack, Card, CardContent, Typography, Container } from "@mui/material";
2
+ import {
3
+ Stack,
4
+ Card,
5
+ CardContent,
6
+ Typography,
7
+ Container,
8
+ Paper,
9
+ } from "@mui/material";
3
10
  import getIcon from "../lib/getIcon.ts";
4
- import LocalShippingIcon from "@mui/icons-material/LocalShipping";
5
11
 
6
12
  interface ColumnProps {
7
13
  id: number;
@@ -16,6 +22,7 @@ interface ColumnsSectionProps {
16
22
  title: string;
17
23
  description: string;
18
24
  column: ColumnProps[];
25
+ maxWidth: any;
19
26
  }
20
27
 
21
28
  export function ColumnsSection({
@@ -23,11 +30,10 @@ export function ColumnsSection({
23
30
  }: {
24
31
  readonly data: ColumnsSectionProps;
25
32
  }) {
26
- const { column } = data;
33
+ const { column, maxWidth } = data;
27
34
 
28
- console.log(LocalShippingIcon);
29
35
  return (
30
- <Container maxWidth="lg" sx={{ my: 1 }}>
36
+ <Container maxWidth={maxWidth || "lg"} sx={{ my: 1 }}>
31
37
  <Stack
32
38
  spacing={2}
33
39
  direction="row"
@@ -39,41 +45,38 @@ export function ColumnsSection({
39
45
  {column.map((column) => {
40
46
  const Icon = getIcon(column.icon) as React.ElementType | null;
41
47
  return (
42
- <Card
43
- key={column.id}
44
- sx={{
45
- display: "flex",
46
- flexDirection: "column",
47
- justifyContent: "space-between",
48
- flex: 1,
49
- minWidth: "350px",
50
- }}
51
- >
52
- <CardContent>
53
- <Typography variant="h5" component="div" sx={{ mb: 2 }}>
54
- {Icon !== null && (
55
- <Icon
56
- sx={{
57
- mr: 2,
58
- mt: 0.2,
59
- width: "50px",
60
- height: "50px",
61
- fill: "currentColor",
62
- stroke: "none",
63
- }}
64
- />
65
- )}
66
- {column.heading}
67
- </Typography>
68
- <Typography
69
- variant="body2"
70
- color="text.secondary"
71
- component="div"
72
- >
73
- {column.text}
74
- </Typography>
75
- </CardContent>
76
- </Card>
48
+ <Paper sx={{ p: 2 }}>
49
+ <Typography
50
+ variant="h5"
51
+ sx={{
52
+ mb: 2,
53
+ display: "flex",
54
+ justifyContent: "flex-start",
55
+ alignItems: "center",
56
+ }}
57
+ >
58
+ {Icon !== null && (
59
+ <Icon
60
+ sx={{
61
+ mr: 2,
62
+ mt: 0.2,
63
+ width: "50px",
64
+ height: "50px",
65
+ fill: "currentColor",
66
+ stroke: "none",
67
+ }}
68
+ />
69
+ )}
70
+ {column.heading}
71
+ </Typography>
72
+ <Typography
73
+ variant="body2"
74
+ color="text.secondary"
75
+ component="div"
76
+ >
77
+ {column.text}
78
+ </Typography>
79
+ </Paper>
77
80
  );
78
81
  })}
79
82
  </Stack>
@@ -5,9 +5,10 @@ import {
5
5
  CardContent,
6
6
  Typography,
7
7
  Container,
8
- CardMedia,
8
+ Box,
9
9
  CardActions,
10
10
  Button,
11
+ useTheme,
11
12
  } from "@mui/material";
12
13
  import getIcon from "../lib/getIcon.ts";
13
14
 
@@ -25,6 +26,7 @@ interface FeatureSectionProps {
25
26
  title: string;
26
27
  description: string;
27
28
  feature: FeatureProps[];
29
+ maxWidth: any;
28
30
  }
29
31
 
30
32
  export function FeatureSection({
@@ -32,15 +34,26 @@ export function FeatureSection({
32
34
  }: {
33
35
  readonly data: FeatureSectionProps;
34
36
  }) {
35
- const { feature } = data;
37
+ const { feature, maxWidth } = data;
38
+
39
+ const theme = useTheme();
40
+
36
41
  return (
37
- <Container maxWidth="lg" sx={{ my: 1 }}>
42
+ <Container maxWidth={maxWidth || "lg"} sx={{ my: 1 }}>
38
43
  <Stack
39
44
  spacing={2}
40
- direction="row"
45
+ direction={"row"}
41
46
  justifyContent="stretch"
42
47
  flexWrap="wrap"
43
- sx={{ width: "100%" }}
48
+ sx={{
49
+ width: "100%",
50
+ [theme.breakpoints.up("xs")]: {
51
+ flexDirection: "column",
52
+ },
53
+ [theme.breakpoints.up("sm")]: {
54
+ flexDirection: "row",
55
+ },
56
+ }}
44
57
  useFlexGap={true}
45
58
  >
46
59
  {feature.map((feature) => {
@@ -53,11 +66,11 @@ export function FeatureSection({
53
66
  flexDirection: "column",
54
67
  justifyContent: "space-between",
55
68
  flex: 1,
56
- minWidth: "350px",
69
+ minWidth: 275,
57
70
  }}
58
71
  >
59
72
  <CardContent>
60
- <CardMedia
73
+ <Box
61
74
  sx={{
62
75
  height: 140,
63
76
  display: "grid",
@@ -78,7 +91,7 @@ export function FeatureSection({
78
91
  }}
79
92
  />
80
93
  )}
81
- </CardMedia>
94
+ </Box>
82
95
  <Typography
83
96
  variant="h5"
84
97
  align="center"
@@ -10,6 +10,7 @@ import {
10
10
  Box,
11
11
  Chip,
12
12
  Paper,
13
+ useTheme,
13
14
  } from "@mui/material";
14
15
  import { StrapiImage } from "./StrapiImage.tsx";
15
16
  import RadarIcon from "@mui/icons-material/Radar";
@@ -44,18 +45,30 @@ interface FleetSectionProps {
44
45
  title: string;
45
46
  description: string;
46
47
  airplane: AirplaneProps[];
48
+ maxWidth: any;
47
49
  }
48
50
 
49
51
  export function FleetSection({ data }: { readonly data: FleetSectionProps }) {
50
- const { airplane } = data;
52
+ const { airplane, maxWidth } = data;
53
+
54
+ const theme = useTheme();
55
+
51
56
  return (
52
- <Container maxWidth="lg" sx={{ my: 1 }}>
57
+ <Container maxWidth={maxWidth || "lg"} sx={{ my: 1 }}>
53
58
  <Stack
54
59
  spacing={2}
55
- direction="row"
60
+ direction={"row"}
56
61
  justifyContent="stretch"
57
62
  flexWrap="wrap"
58
- sx={{ width: "100%" }}
63
+ sx={{
64
+ width: "100%",
65
+ [theme.breakpoints.up("xs")]: {
66
+ flexDirection: "column",
67
+ },
68
+ [theme.breakpoints.up("sm")]: {
69
+ flexDirection: "row",
70
+ },
71
+ }}
59
72
  useFlexGap={true}
60
73
  >
61
74
  {airplane.map((airplane) => (
@@ -66,7 +79,7 @@ export function FleetSection({ data }: { readonly data: FleetSectionProps }) {
66
79
  flexDirection: "column",
67
80
  justifyContent: "space-between",
68
81
  flex: 1,
69
- minWidth: "350px",
82
+ minWidth: 275,
70
83
  }}
71
84
  >
72
85
  <CardHeader
@@ -18,6 +18,7 @@ import {
18
18
  import NextLink from "next/link";
19
19
  import { Link as MUILink } from "@mui/material";
20
20
  import Image from "next/image";
21
+ import getIcon from "../lib/getIcon.ts";
21
22
 
22
23
  import PropTypes from "prop-types";
23
24
 
@@ -144,13 +145,15 @@ function Footer({
144
145
  sx={{ width: "min-content", color: "primary.contrastText" }}
145
146
  >
146
147
  {company_socials.map((company_social, index) => {
148
+ const Icon = getIcon(company_social.icon);
147
149
  return (
148
150
  <IconButton
149
151
  key={index}
150
152
  color="inherit"
151
153
  href={company_social.url}
152
154
  >
153
- {company_social.icon}
155
+ {Icon !== null && <Icon sx={{ mr: 2, mt: 0.2 }} />}
156
+ {/* {company_social.icon} */}
154
157
  </IconButton>
155
158
  );
156
159
  })}
@@ -1,7 +1,14 @@
1
1
  "use client";
2
2
 
3
3
  import React from "react";
4
- import { Box, Container, Paper, Typography, Stack } from "@mui/material";
4
+ import {
5
+ Box,
6
+ Container,
7
+ Paper,
8
+ Typography,
9
+ Stack,
10
+ useTheme,
11
+ } from "@mui/material";
5
12
  const MuiMarkdown = React.lazy(
6
13
  () => import(/* webpackChunkName: "mui-markdown" */ "mui-markdown")
7
14
  );
@@ -41,6 +48,8 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
41
48
  /* TODO Text_content should deal with linebreaks,
42
49
  reading up upon mui-markdown docs is advised */
43
50
 
51
+ const theme = useTheme();
52
+
44
53
  return (
45
54
  <Container maxWidth={maxWidth || "lg"} sx={{ my: 1 }}>
46
55
  <Paper sx={{ p: 2 }}>
@@ -55,11 +64,21 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
55
64
  </Typography>
56
65
  )}
57
66
 
58
- <Stack spacing={2} direction={reverse ? "row-reverse" : "row"}>
67
+ <Stack
68
+ spacing={2}
69
+ direction={reverse ? "row-reverse" : "row"}
70
+ gap={2}
71
+ sx={{
72
+ width: "100%",
73
+ [theme.breakpoints.down("sm")]: {
74
+ flexDirection: "column",
75
+ },
76
+ }}
77
+ >
59
78
  {image?.url !== undefined && (
60
79
  <Box
61
80
  sx={{
62
- width: text !== null && text !== undefined ? "50%" : "100%",
81
+ minWidth: 275,
63
82
  height: "100%",
64
83
  overflow: "hidden",
65
84
  display: "flex",
@@ -79,10 +98,10 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
79
98
  {text !== null && text !== undefined && (
80
99
  <Box
81
100
  sx={{
82
- width:
101
+ /* width:
83
102
  image?.url !== null && image?.url !== undefined
84
103
  ? "50%"
85
- : "100%",
104
+ : "100%", */
86
105
  height: "100%",
87
106
  overflow: "hidden",
88
107
  display: "flex",
@@ -19,6 +19,11 @@ import MasksIcon from "@mui/icons-material/Masks";
19
19
  import BoltIcon from "@mui/icons-material/Bolt";
20
20
  import BedIcon from "@mui/icons-material/Bed";
21
21
  import AmbulanceIcon from "./AmbulanceIcon.tsx";
22
+ import LinkedInIcon from "@mui/icons-material/LinkedIn";
23
+ import FaceBookIcon from "@mui/icons-material/Facebook";
24
+ import TwitterIcon from "@mui/icons-material/Twitter";
25
+ import LocalShippingIcon from "@mui/icons-material/LocalShipping";
26
+ import InstagramIcon from "@mui/icons-material/Instagram";
22
27
 
23
28
  export default function getIcon(icon: string): React.ElementType | null {
24
29
  switch (icon) {
@@ -64,6 +69,16 @@ export default function getIcon(icon: string): React.ElementType | null {
64
69
  return BedIcon;
65
70
  case "AmbulanceIcon":
66
71
  return AmbulanceIcon;
72
+ case "LinkedInIcon":
73
+ return LinkedInIcon;
74
+ case "FaceBookIcon":
75
+ return FaceBookIcon;
76
+ case "TwitterIcon":
77
+ return TwitterIcon;
78
+ case "LocalShippingIcon":
79
+ return LocalShippingIcon;
80
+ case "InstagramIcon":
81
+ return InstagramIcon;
67
82
  default:
68
83
  return null;
69
84
  }
@@ -38,7 +38,7 @@ Orefs.args = {
38
38
  {
39
39
  name: "Facebook",
40
40
  url: "https://www.facebook.com/",
41
- icon: <FacebookIcon />,
41
+ icon: "FacebookIcon",
42
42
  },
43
43
  ],
44
44
  //disclaimer_link: PropTypes.string,
@@ -68,17 +68,17 @@ Orefs.args = {
68
68
  {
69
69
  name: "Facebook",
70
70
  url: "https://www.facebook.com/",
71
- icon: <FacebookIcon />,
71
+ icon: "FaceBookIcon",
72
72
  },
73
73
  {
74
74
  name: "Instagram",
75
75
  url: "https://www.instagram.com/",
76
- icon: <InstagramIcon />,
76
+ icon: "InstagramIcon",
77
77
  },
78
78
  {
79
79
  name: "LinkedIn",
80
80
  url: "https://www.linkedin.com/",
81
- icon: <LinkedInIcon />,
81
+ icon: "LinkedInIcon",
82
82
  },
83
83
  ],
84
84
  };
@@ -107,17 +107,17 @@ AMH.args = {
107
107
  {
108
108
  name: "Facebook",
109
109
  url: "https://www.facebook.com/",
110
- icon: <FacebookIcon />,
110
+ icon: "FaceBookIcon",
111
111
  },
112
112
  {
113
113
  name: "Instagram",
114
114
  url: "https://www.instagram.com/",
115
- icon: <InstagramIcon />,
115
+ icon: "InstagramIcon",
116
116
  },
117
117
  {
118
118
  name: "LinkedIn",
119
119
  url: "https://www.linkedin.com/",
120
- icon: <LinkedInIcon />,
120
+ icon: "LinkedInIcon",
121
121
  },
122
122
  ],
123
123
  disclaimer_link: "#",