umwd-components 0.1.90 → 0.1.92

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.
@@ -15,10 +15,11 @@ function IconSection(_ref) {
15
15
  data
16
16
  } = _ref;
17
17
  const {
18
- icon
18
+ icon,
19
+ maxWidth
19
20
  } = data;
20
21
  return /*#__PURE__*/React.createElement(material.Container, {
21
- maxWidth: "lg",
22
+ maxWidth: maxWidth || "lg",
22
23
  sx: {
23
24
  my: 1
24
25
  }
@@ -44,7 +44,7 @@ function TextImageSection(_ref) {
44
44
 
45
45
  const theme = material.useTheme();
46
46
  return /*#__PURE__*/React.createElement(material.Container, {
47
- maxWidth: maxWidth || "lg",
47
+ maxWidth: maxWidth ? maxWidth : "lg",
48
48
  sx: {
49
49
  my: 1
50
50
  }
@@ -55,23 +55,20 @@ function TextImageSection(_ref) {
55
55
  }, title && /*#__PURE__*/React.createElement(material.Typography, {
56
56
  variant: "h1",
57
57
  textAlign: "center",
58
- width: "100%",
59
58
  sx: {
60
59
  pb: 2
61
60
  }
62
61
  }, title), /*#__PURE__*/React.createElement(material.Stack, {
63
62
  spacing: 2,
64
63
  direction: reverse ? "row-reverse" : "row",
65
- gap: 2,
66
64
  sx: {
67
- width: "100%",
68
65
  [theme.breakpoints.down("sm")]: {
69
66
  flexDirection: "column"
70
67
  }
71
68
  }
72
69
  }, (image === null || image === void 0 ? void 0 : image.url) !== undefined && /*#__PURE__*/React.createElement(material.Box, {
73
70
  sx: {
74
- minWidth: 275,
71
+ minWidth: 200,
75
72
  height: "100%",
76
73
  overflow: "hidden",
77
74
  display: "flex",
@@ -85,10 +82,6 @@ function TextImageSection(_ref) {
85
82
  src: image.url
86
83
  })), text !== null && text !== undefined && /*#__PURE__*/React.createElement(material.Box, {
87
84
  sx: {
88
- /* width:
89
- image?.url !== null && image?.url !== undefined
90
- ? "50%"
91
- : "100%", */
92
85
  height: "100%",
93
86
  overflow: "hidden",
94
87
  display: "flex",
@@ -13,10 +13,11 @@ function IconSection(_ref) {
13
13
  data
14
14
  } = _ref;
15
15
  const {
16
- icon
16
+ icon,
17
+ maxWidth
17
18
  } = data;
18
19
  return /*#__PURE__*/React__default.createElement(Container, {
19
- maxWidth: "lg",
20
+ maxWidth: maxWidth || "lg",
20
21
  sx: {
21
22
  my: 1
22
23
  }
@@ -40,7 +40,7 @@ function TextImageSection(_ref) {
40
40
 
41
41
  const theme = useTheme();
42
42
  return /*#__PURE__*/React__default.createElement(Container, {
43
- maxWidth: maxWidth || "lg",
43
+ maxWidth: maxWidth ? maxWidth : "lg",
44
44
  sx: {
45
45
  my: 1
46
46
  }
@@ -51,23 +51,20 @@ function TextImageSection(_ref) {
51
51
  }, title && /*#__PURE__*/React__default.createElement(Typography, {
52
52
  variant: "h1",
53
53
  textAlign: "center",
54
- width: "100%",
55
54
  sx: {
56
55
  pb: 2
57
56
  }
58
57
  }, title), /*#__PURE__*/React__default.createElement(Stack, {
59
58
  spacing: 2,
60
59
  direction: reverse ? "row-reverse" : "row",
61
- gap: 2,
62
60
  sx: {
63
- width: "100%",
64
61
  [theme.breakpoints.down("sm")]: {
65
62
  flexDirection: "column"
66
63
  }
67
64
  }
68
65
  }, (image === null || image === void 0 ? void 0 : image.url) !== undefined && /*#__PURE__*/React__default.createElement(Box, {
69
66
  sx: {
70
- minWidth: 275,
67
+ minWidth: 200,
71
68
  height: "100%",
72
69
  overflow: "hidden",
73
70
  display: "flex",
@@ -81,10 +78,6 @@ function TextImageSection(_ref) {
81
78
  src: image.url
82
79
  })), text !== null && text !== undefined && /*#__PURE__*/React__default.createElement(Box, {
83
80
  sx: {
84
- /* width:
85
- image?.url !== null && image?.url !== undefined
86
- ? "50%"
87
- : "100%", */
88
81
  height: "100%",
89
82
  overflow: "hidden",
90
83
  display: "flex",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.90",
3
+ "version": "0.1.92",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -9,6 +9,8 @@ import {
9
9
  } from "@mui/material";
10
10
  import getIcon from "../lib/getIcon.ts";
11
11
 
12
+ type MaxWidth = "xs" | "sm" | "md" | "lg" | "xl" | false | undefined;
13
+
12
14
  interface ColumnProps {
13
15
  id: number;
14
16
  heading: string;
@@ -22,7 +24,7 @@ interface ColumnsSectionProps {
22
24
  title: string;
23
25
  description: string;
24
26
  column: ColumnProps[];
25
- maxWidth: any;
27
+ maxWidth: MaxWidth;
26
28
  }
27
29
 
28
30
  export function ColumnsSection({
@@ -12,6 +12,8 @@ import {
12
12
  } from "@mui/material";
13
13
  import getIcon from "../lib/getIcon.ts";
14
14
 
15
+ type MaxWidth = "xs" | "sm" | "md" | "lg" | "xl" | false | undefined;
16
+
15
17
  interface FeatureProps {
16
18
  id: number;
17
19
  heading: string;
@@ -26,7 +28,7 @@ interface FeatureSectionProps {
26
28
  title: string;
27
29
  description: string;
28
30
  feature: FeatureProps[];
29
- maxWidth: any;
31
+ maxWidth: MaxWidth;
30
32
  }
31
33
 
32
34
  export function FeatureSection({
@@ -17,6 +17,8 @@ import RadarIcon from "@mui/icons-material/Radar";
17
17
  import SpeedIcon from "@mui/icons-material/Speed";
18
18
  import HeightIcon from "@mui/icons-material/Height";
19
19
 
20
+ type MaxWidth = "xs" | "sm" | "md" | "lg" | "xl" | false | undefined;
21
+
20
22
  interface ImageProps {
21
23
  id: number;
22
24
  url: string;
@@ -45,7 +47,7 @@ interface FleetSectionProps {
45
47
  title: string;
46
48
  description: string;
47
49
  airplane: AirplaneProps[];
48
- maxWidth: any;
50
+ maxWidth: MaxWidth;
49
51
  }
50
52
 
51
53
  export function FleetSection({ data }: { readonly data: FleetSectionProps }) {
@@ -2,6 +2,8 @@ import React from "react";
2
2
  import { Grid, Card, CardContent, Typography, Container } from "@mui/material";
3
3
  import getIcon from "../lib/getIcon.ts";
4
4
 
5
+ type MaxWidth = "xs" | "sm" | "md" | "lg" | "xl" | false | undefined;
6
+
5
7
  interface IconProps {
6
8
  id: number;
7
9
  title: string;
@@ -15,13 +17,14 @@ interface IconSectionProps {
15
17
  title: string;
16
18
  description: string;
17
19
  icon: IconProps[];
20
+ maxWidth: MaxWidth;
18
21
  }
19
22
 
20
23
  export function IconSection({ data }: { readonly data: IconSectionProps }) {
21
- const { icon } = data;
24
+ const { icon, maxWidth } = data;
22
25
 
23
26
  return (
24
- <Container maxWidth="lg" sx={{ my: 1 }}>
27
+ <Container maxWidth={maxWidth || "lg"} sx={{ my: 1 }}>
25
28
  <Grid container spacing={2}>
26
29
  {icon.map((icon) => {
27
30
  const Icon = getIcon(icon.icon) as React.ElementType | null;
@@ -51,15 +51,10 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
51
51
  const theme = useTheme();
52
52
 
53
53
  return (
54
- <Container maxWidth={maxWidth || "lg"} sx={{ my: 1 }}>
54
+ <Container maxWidth={maxWidth ? maxWidth : "lg"} sx={{ my: 1 }}>
55
55
  <Paper sx={{ p: 2 }}>
56
56
  {title && (
57
- <Typography
58
- variant="h1"
59
- textAlign="center"
60
- width={"100%"}
61
- sx={{ pb: 2 }}
62
- >
57
+ <Typography variant="h1" textAlign="center" sx={{ pb: 2 }}>
63
58
  {title}
64
59
  </Typography>
65
60
  )}
@@ -67,9 +62,7 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
67
62
  <Stack
68
63
  spacing={2}
69
64
  direction={reverse ? "row-reverse" : "row"}
70
- gap={2}
71
65
  sx={{
72
- width: "100%",
73
66
  [theme.breakpoints.down("sm")]: {
74
67
  flexDirection: "column",
75
68
  },
@@ -78,7 +71,7 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
78
71
  {image?.url !== undefined && (
79
72
  <Box
80
73
  sx={{
81
- minWidth: 275,
74
+ minWidth: 200,
82
75
  height: "100%",
83
76
  overflow: "hidden",
84
77
  display: "flex",
@@ -98,10 +91,6 @@ function TextImageSection({ data }: Readonly<TextImageSectionProps>) {
98
91
  {text !== null && text !== undefined && (
99
92
  <Box
100
93
  sx={{
101
- /* width:
102
- image?.url !== null && image?.url !== undefined
103
- ? "50%"
104
- : "100%", */
105
94
  height: "100%",
106
95
  overflow: "hidden",
107
96
  display: "flex",