umwd-components 0.1.76 → 0.1.77

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.
@@ -48,17 +48,18 @@ function FleetSection(_ref) {
48
48
  subheader: airplane.description
49
49
  }), /*#__PURE__*/React.createElement(material.CardMedia, {
50
50
  sx: {
51
- p: 1
51
+ p: 1,
52
+ height: "max-content"
52
53
  }
53
54
  }, /*#__PURE__*/React.createElement(material.Paper, {
54
55
  sx: {
55
56
  p: 1,
56
- py: 2,
57
- height: "250px",
57
+ py: "3rem",
58
58
  position: "relative",
59
59
  display: "grid",
60
60
  alignItems: "center",
61
- justifyContent: "center"
61
+ justifyContent: "center",
62
+ height: "100%"
62
63
  },
63
64
  variant: "outlined"
64
65
  }, airplane.floorplan !== null && /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
@@ -66,7 +67,9 @@ function FleetSection(_ref) {
66
67
  alt: airplane.floorplan.alternativeText,
67
68
  width: airplane.floorplan.width,
68
69
  height: airplane.floorplan.height,
69
- style: {}
70
+ style: {
71
+ objectFit: "contain"
72
+ }
70
73
  }), /*#__PURE__*/React.createElement(material.Box, {
71
74
  sx: {
72
75
  position: "absolute",
@@ -77,7 +80,9 @@ function FleetSection(_ref) {
77
80
  variant: "body2",
78
81
  color: "text.secondary",
79
82
  align: "right"
80
- }, /*#__PURE__*/React.createElement("strong", null, "Cabin Dimensions:"), " ", /*#__PURE__*/React.createElement("strong", null, "H"), " ", airplane.cabinHeight, " m ", /*#__PURE__*/React.createElement("strong", null, "W"), " ", airplane.cabinWidth, " m ", /*#__PURE__*/React.createElement("strong", null, "L"), " ", airplane.cabinLength, " m")))), /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.Stack, {
83
+ }, /*#__PURE__*/React.createElement("strong", null, "Cabin Dimensions:"), " ", /*#__PURE__*/React.createElement("strong", null, "H"), " ", airplane.cabinHeight, " m ", /*#__PURE__*/React.createElement("strong", null, "W"), " ", airplane.cabinWidth, " m ", /*#__PURE__*/React.createElement("strong", null, "L"), " ", airplane.cabinLength, " m")))), /*#__PURE__*/React.createElement(material.CardContent, {
84
+ sx: {}
85
+ }, /*#__PURE__*/React.createElement(material.Stack, {
81
86
  direction: "row",
82
87
  spacing: 1
83
88
  }, /*#__PURE__*/React.createElement(material.Chip, {
@@ -36,14 +36,14 @@ function TextImageSection(_ref) {
36
36
  text,
37
37
  image,
38
38
  reverse = false,
39
- maxWidth = "lg"
39
+ maxWidth
40
40
  } = data;
41
41
 
42
42
  /* TODO Text_content should deal with linebreaks,
43
43
  reading up upon mui-markdown docs is advised */
44
44
 
45
45
  return /*#__PURE__*/React.createElement(material.Container, {
46
- maxWidth: maxWidth,
46
+ maxWidth: maxWidth || "lg",
47
47
  sx: {
48
48
  my: 1
49
49
  }
@@ -72,10 +72,9 @@ function TextImageSection(_ref) {
72
72
  }
73
73
  }, /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
74
74
  alt: image.alt,
75
- style: {},
76
75
  height: image.height,
77
- src: image.url,
78
- width: image.width
76
+ width: image.width,
77
+ src: image.url
79
78
  })), text !== null && text !== undefined && /*#__PURE__*/React.createElement(material.Box, {
80
79
  sx: {
81
80
  width: (image === null || image === void 0 ? void 0 : image.url) !== null && (image === null || image === void 0 ? void 0 : image.url) !== undefined ? "50%" : "100%",
@@ -46,17 +46,18 @@ function FleetSection(_ref) {
46
46
  subheader: airplane.description
47
47
  }), /*#__PURE__*/React.createElement(CardMedia, {
48
48
  sx: {
49
- p: 1
49
+ p: 1,
50
+ height: "max-content"
50
51
  }
51
52
  }, /*#__PURE__*/React.createElement(Paper, {
52
53
  sx: {
53
54
  p: 1,
54
- py: 2,
55
- height: "250px",
55
+ py: "3rem",
56
56
  position: "relative",
57
57
  display: "grid",
58
58
  alignItems: "center",
59
- justifyContent: "center"
59
+ justifyContent: "center",
60
+ height: "100%"
60
61
  },
61
62
  variant: "outlined"
62
63
  }, airplane.floorplan !== null && /*#__PURE__*/React.createElement(StrapiImage, {
@@ -64,7 +65,9 @@ function FleetSection(_ref) {
64
65
  alt: airplane.floorplan.alternativeText,
65
66
  width: airplane.floorplan.width,
66
67
  height: airplane.floorplan.height,
67
- style: {}
68
+ style: {
69
+ objectFit: "contain"
70
+ }
68
71
  }), /*#__PURE__*/React.createElement(Box, {
69
72
  sx: {
70
73
  position: "absolute",
@@ -75,7 +78,9 @@ function FleetSection(_ref) {
75
78
  variant: "body2",
76
79
  color: "text.secondary",
77
80
  align: "right"
78
- }, /*#__PURE__*/React.createElement("strong", null, "Cabin Dimensions:"), " ", /*#__PURE__*/React.createElement("strong", null, "H"), " ", airplane.cabinHeight, " m ", /*#__PURE__*/React.createElement("strong", null, "W"), " ", airplane.cabinWidth, " m ", /*#__PURE__*/React.createElement("strong", null, "L"), " ", airplane.cabinLength, " m")))), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(Stack, {
81
+ }, /*#__PURE__*/React.createElement("strong", null, "Cabin Dimensions:"), " ", /*#__PURE__*/React.createElement("strong", null, "H"), " ", airplane.cabinHeight, " m ", /*#__PURE__*/React.createElement("strong", null, "W"), " ", airplane.cabinWidth, " m ", /*#__PURE__*/React.createElement("strong", null, "L"), " ", airplane.cabinLength, " m")))), /*#__PURE__*/React.createElement(CardContent, {
82
+ sx: {}
83
+ }, /*#__PURE__*/React.createElement(Stack, {
79
84
  direction: "row",
80
85
  spacing: 1
81
86
  }, /*#__PURE__*/React.createElement(Chip, {
@@ -32,14 +32,14 @@ function TextImageSection(_ref) {
32
32
  text,
33
33
  image,
34
34
  reverse = false,
35
- maxWidth = "lg"
35
+ maxWidth
36
36
  } = data;
37
37
 
38
38
  /* TODO Text_content should deal with linebreaks,
39
39
  reading up upon mui-markdown docs is advised */
40
40
 
41
41
  return /*#__PURE__*/React.createElement(Container, {
42
- maxWidth: maxWidth,
42
+ maxWidth: maxWidth || "lg",
43
43
  sx: {
44
44
  my: 1
45
45
  }
@@ -68,10 +68,9 @@ function TextImageSection(_ref) {
68
68
  }
69
69
  }, /*#__PURE__*/React.createElement(StrapiImage, {
70
70
  alt: image.alt,
71
- style: {},
72
71
  height: image.height,
73
- src: image.url,
74
- width: image.width
72
+ width: image.width,
73
+ src: image.url
75
74
  })), text !== null && text !== undefined && /*#__PURE__*/React.createElement(Box, {
76
75
  sx: {
77
76
  width: (image === null || image === void 0 ? void 0 : image.url) !== null && (image === null || image === void 0 ? void 0 : image.url) !== undefined ? "50%" : "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.76",
3
+ "version": "0.1.77",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -76,17 +76,18 @@ export function FleetSection({ data }: { readonly data: FleetSectionProps }) {
76
76
  <CardMedia
77
77
  sx={{
78
78
  p: 1,
79
+ height: "max-content",
79
80
  }}
80
81
  >
81
82
  <Paper
82
83
  sx={{
83
84
  p: 1,
84
- py: 2,
85
- height: "250px",
85
+ py: "3rem",
86
86
  position: "relative",
87
87
  display: "grid",
88
88
  alignItems: "center",
89
89
  justifyContent: "center",
90
+ height: "100%",
90
91
  }}
91
92
  variant="outlined"
92
93
  >
@@ -96,7 +97,7 @@ export function FleetSection({ data }: { readonly data: FleetSectionProps }) {
96
97
  alt={airplane.floorplan.alternativeText}
97
98
  width={airplane.floorplan.width}
98
99
  height={airplane.floorplan.height}
99
- style={{}}
100
+ style={{ objectFit: "contain" }}
100
101
  />
101
102
  )}
102
103
  <Box
@@ -115,7 +116,7 @@ export function FleetSection({ data }: { readonly data: FleetSectionProps }) {
115
116
  </Box>
116
117
  </Paper>
117
118
  </CardMedia>
118
- <CardContent>
119
+ <CardContent sx={{}}>
119
120
  <Stack direction="row" spacing={1}>
120
121
  <Chip
121
122
  label={`Range: ${airplane.range} km`}
@@ -7,7 +7,7 @@ interface StrapiImageProps {
7
7
  alt: string;
8
8
  height: number;
9
9
  width: number;
10
- style: React.CSSProperties;
10
+ style?: React.CSSProperties;
11
11
  }
12
12
 
13
13
  export function StrapiImage({
@@ -7,8 +7,6 @@ const MuiMarkdown = React.lazy(
7
7
  );
8
8
  import { StrapiImage } from "./StrapiImage.tsx";
9
9
 
10
- type maxWidth = "xs" | "sm" | "md" | "lg" | "xl" | false | string;
11
-
12
10
  /*
13
11
  TODO intregrate this interface into StrapiImage.tsx
14
12
 
@@ -32,19 +30,19 @@ interface TextImageSectionProps {
32
30
  alt: string;
33
31
  };
34
32
  reverse: boolean;
35
- maxWidth: maxWidth;
33
+ maxWidth: any;
36
34
  minHeight: string;
37
35
  };
38
36
  }
39
37
 
40
38
  function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
41
- const { title, text, image, reverse = false, maxWidth = "lg" } = data;
39
+ const { title, text, image, reverse = false, maxWidth } = data;
42
40
 
43
41
  /* TODO Text_content should deal with linebreaks,
44
42
  reading up upon mui-markdown docs is advised */
45
43
 
46
44
  return (
47
- <Container maxWidth={maxWidth} sx={{ my: 1 }}>
45
+ <Container maxWidth={maxWidth || "lg"} sx={{ my: 1 }}>
48
46
  <Paper sx={{ p: 2 }}>
49
47
  {title && (
50
48
  <Typography
@@ -71,10 +69,9 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
71
69
  >
72
70
  <StrapiImage
73
71
  alt={image.alt}
74
- style={{}}
75
72
  height={image.height}
76
- src={image.url}
77
73
  width={image.width}
74
+ src={image.url}
78
75
  />
79
76
  </Box>
80
77
  )}