umwd-components 0.1.68 → 0.1.69

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.
@@ -18,7 +18,8 @@ function HeroSection(_ref) {
18
18
  const {
19
19
  heading,
20
20
  subHeading,
21
- image,
21
+ bgImage,
22
+ logoImage,
22
23
  link
23
24
  } = data;
24
25
  return /*#__PURE__*/React.createElement("header", {
@@ -47,16 +48,24 @@ function HeroSection(_ref) {
47
48
  height: "100%"
48
49
  },
49
50
  height: 1080,
50
- src: image.url,
51
+ src: bgImage.url,
51
52
  width: 1920
52
53
  }), /*#__PURE__*/React.createElement(material.Stack, {
53
54
  spacing: 2,
55
+ alignItems: "center",
56
+ justifyContent: "center",
54
57
  sx: {
55
58
  width: "max-content",
56
59
  maxWidth: "600px",
57
60
  zIndex: 1
58
61
  }
59
- }, /*#__PURE__*/React.createElement(material.Typography, {
62
+ }, logoImage && /*#__PURE__*/React.createElement(StrapiImage.StrapiImage, {
63
+ alt: logoImage.alternativeText,
64
+ height: logoImage.height || 100,
65
+ style: logoImage.style || {},
66
+ src: logoImage.url,
67
+ width: logoImage.width || 100
68
+ }), /*#__PURE__*/React.createElement(material.Typography, {
60
69
  variant: "h1",
61
70
  align: "center"
62
71
  }, heading), /*#__PURE__*/React.createElement(material.Typography, {
@@ -15,6 +15,7 @@ var TextImageSection = require('./TextImageSection.js');
15
15
  var HeroSection = require('./HeroSection.js');
16
16
  var FeaturesSection = require('./FeaturesSection.js');
17
17
  var IconSection = require('./IconSection.js');
18
+ var material = require('@mui/material');
18
19
 
19
20
  function blockRenderer(block) {
20
21
  switch (block.__component) {
@@ -44,12 +45,17 @@ function blockRenderer(block) {
44
45
  }
45
46
  function Page(_ref) {
46
47
  let {
47
- blocks
48
+ blocks,
49
+ sx
48
50
  } = _ref;
49
51
  if (!blocks) {
50
52
  return /*#__PURE__*/React.createElement("p", null, "No sections found");
51
53
  }
52
- return /*#__PURE__*/React.createElement(React.Fragment, null, blocks.map(blockRenderer));
54
+ return /*#__PURE__*/React.createElement(material.Box, {
55
+ sx: {
56
+ ...sx
57
+ }
58
+ }, blocks.map(blockRenderer));
53
59
  }
54
60
  Page.propTypes = {
55
61
  blocks: PropTypes.arrayOf(PropTypes.object)
@@ -26,7 +26,7 @@ function StrapiImage(_ref) {
26
26
  alt: alt,
27
27
  height: height,
28
28
  width: width,
29
- style: style
29
+ style: style && style
30
30
  });
31
31
  }
32
32
 
@@ -16,7 +16,8 @@ function HeroSection(_ref) {
16
16
  const {
17
17
  heading,
18
18
  subHeading,
19
- image,
19
+ bgImage,
20
+ logoImage,
20
21
  link
21
22
  } = data;
22
23
  return /*#__PURE__*/React.createElement("header", {
@@ -45,16 +46,24 @@ function HeroSection(_ref) {
45
46
  height: "100%"
46
47
  },
47
48
  height: 1080,
48
- src: image.url,
49
+ src: bgImage.url,
49
50
  width: 1920
50
51
  }), /*#__PURE__*/React.createElement(Stack, {
51
52
  spacing: 2,
53
+ alignItems: "center",
54
+ justifyContent: "center",
52
55
  sx: {
53
56
  width: "max-content",
54
57
  maxWidth: "600px",
55
58
  zIndex: 1
56
59
  }
57
- }, /*#__PURE__*/React.createElement(Typography, {
60
+ }, logoImage && /*#__PURE__*/React.createElement(StrapiImage, {
61
+ alt: logoImage.alternativeText,
62
+ height: logoImage.height || 100,
63
+ style: logoImage.style || {},
64
+ src: logoImage.url,
65
+ width: logoImage.width || 100
66
+ }), /*#__PURE__*/React.createElement(Typography, {
58
67
  variant: "h1",
59
68
  align: "center"
60
69
  }, heading), /*#__PURE__*/React.createElement(Typography, {
@@ -11,6 +11,7 @@ import TextImageSection from './TextImageSection.js';
11
11
  import { HeroSection } from './HeroSection.js';
12
12
  import { FeatureSection } from './FeaturesSection.js';
13
13
  import { IconSection } from './IconSection.js';
14
+ import { Box } from '@mui/material';
14
15
 
15
16
  function blockRenderer(block) {
16
17
  switch (block.__component) {
@@ -40,12 +41,17 @@ function blockRenderer(block) {
40
41
  }
41
42
  function Page(_ref) {
42
43
  let {
43
- blocks
44
+ blocks,
45
+ sx
44
46
  } = _ref;
45
47
  if (!blocks) {
46
48
  return /*#__PURE__*/React.createElement("p", null, "No sections found");
47
49
  }
48
- return /*#__PURE__*/React.createElement(React.Fragment, null, blocks.map(blockRenderer));
50
+ return /*#__PURE__*/React.createElement(Box, {
51
+ sx: {
52
+ ...sx
53
+ }
54
+ }, blocks.map(blockRenderer));
49
55
  }
50
56
  Page.propTypes = {
51
57
  blocks: PropTypes.arrayOf(PropTypes.object)
@@ -24,7 +24,7 @@ function StrapiImage(_ref) {
24
24
  alt: alt,
25
25
  height: height,
26
26
  width: width,
27
- style: style
27
+ style: style && style
28
28
  });
29
29
  }
30
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.68",
3
+ "version": "0.1.69",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -7,6 +7,9 @@ interface ImageProps {
7
7
  id: number;
8
8
  url: string;
9
9
  alternativeText: string;
10
+ style: React.CSSProperties;
11
+ width: number;
12
+ height: number;
10
13
  }
11
14
 
12
15
  interface LinkProps {
@@ -21,13 +24,14 @@ interface HeroSectionProps {
21
24
  __component: string;
22
25
  heading: string;
23
26
  subHeading: string;
24
- image: ImageProps;
27
+ bgImage: ImageProps;
28
+ logoImage: ImageProps;
25
29
  link: LinkProps;
26
30
  };
27
31
  }
28
32
 
29
33
  export function HeroSection({ data }: Readonly<HeroSectionProps>) {
30
- const { heading, subHeading, image, link } = data;
34
+ const { heading, subHeading, bgImage, logoImage, link } = data;
31
35
 
32
36
  return (
33
37
  <header style={{ position: "relative", padding: 0, margin: 0 }}>
@@ -52,13 +56,24 @@ export function HeroSection({ data }: Readonly<HeroSectionProps>) {
52
56
  height: "100%",
53
57
  }}
54
58
  height={1080}
55
- src={image.url}
59
+ src={bgImage.url}
56
60
  width={1920}
57
61
  />
58
62
  <Stack
59
63
  spacing={2}
64
+ alignItems="center"
65
+ justifyContent="center"
60
66
  sx={{ width: "max-content", maxWidth: "600px", zIndex: 1 }}
61
67
  >
68
+ {logoImage && (
69
+ <StrapiImage
70
+ alt={logoImage.alternativeText}
71
+ height={logoImage.height || 100}
72
+ style={logoImage.style || {}}
73
+ src={logoImage.url}
74
+ width={logoImage.width || 100}
75
+ />
76
+ )}
62
77
  <Typography variant="h1" align="center">
63
78
  {heading}
64
79
  </Typography>
@@ -6,6 +6,7 @@ import TextImageSection from "./TextImageSection.tsx";
6
6
  import { HeroSection } from "./HeroSection.tsx";
7
7
  import { FeatureSection } from "./FeaturesSection.tsx";
8
8
  import { IconSection } from "./IconSection.tsx";
9
+ import { Box } from "@mui/material";
9
10
 
10
11
  function blockRenderer(block) {
11
12
  switch (block.__component) {
@@ -22,12 +23,12 @@ function blockRenderer(block) {
22
23
  }
23
24
  }
24
25
 
25
- function Page({ blocks }) {
26
+ function Page({ blocks, sx }) {
26
27
  if (!blocks) {
27
28
  return <p>No sections found</p>;
28
29
  }
29
30
 
30
- return <>{blocks.map(blockRenderer)}</>;
31
+ return <Box sx={{ ...sx }}>{blocks.map(blockRenderer)}</Box>;
31
32
  }
32
33
 
33
34
  Page.propTypes = {
@@ -27,7 +27,7 @@ export function StrapiImage({
27
27
  alt={alt}
28
28
  height={height}
29
29
  width={width}
30
- style={style}
30
+ style={style && style}
31
31
  />
32
32
  );
33
33
  }
@@ -7,8 +7,8 @@ export default {
7
7
  // argTypes: { numberOfChildren: { type: "number" } },
8
8
  };
9
9
 
10
- const Template = ({ title, description, blocks, ...args }) => (
11
- <Page title={title} description={description} blocks={blocks} />
10
+ const Template = ({ title, description, blocks, sx, ...args }) => (
11
+ <Page title={title} description={description} blocks={blocks} sx={sx} />
12
12
  );
13
13
 
14
14
  export const HelloWorld = Template.bind({});
@@ -21,11 +21,174 @@ HelloWorld.args = {
21
21
  __component: "layout.hero-section",
22
22
  heading: "UMWD",
23
23
  subHeading: "A place for all your resources",
24
+ bgImage: {
25
+ id: 3,
26
+ url: "https://via.placeholder.com/100",
27
+ alternativeText: "UMWD",
28
+ },
29
+ logoImage: {
30
+ id: 3,
31
+ url: "/uploads/logo_decorated_ad284d33ef.png",
32
+ alternativeText: "UMWD",
33
+ width: 250,
34
+ height: 250,
35
+ },
36
+ link: {
37
+ id: 3,
38
+ url: "/resources",
39
+ text: "Resources",
40
+ },
41
+ },
42
+ {
43
+ id: 2,
44
+ __component: "layout.features-section",
45
+ title: "AMH",
46
+ description: "A place for all your resources",
47
+ feature: [
48
+ {
49
+ id: 1,
50
+ heading: "AIR AMBULANCE",
51
+ subHeading:
52
+ "All our aircraft providers are operational around the clock to ensure the patient gets home the fastest way. Our air ambulances are specifically modified to the highest medical standard. To ensure that patients who are in need of repatriation or evacuation can be transported as efficiently as possible. While upholding the highest international standards for medical treatment during the flight. Our aircrafts can carry up to two stretchers if needed and carry an oxygen capacity of ??? liters. Depending on the patient’s needs, travel distance and urgency of transport, the best type of air ambulance will be advised and provided.",
53
+ icon: "CLOUD_ICON",
54
+ },
55
+ {
56
+ id: 2,
57
+ heading: "BED TO BED",
58
+ subHeading:
59
+ "We offer bed to bed service. Where we will pick up the patient at the hospital of origin and also bring the patient to the receiving hospital with our medical team. This guarantees the best quality handover to the medical team that will take over the care of the patient at home.",
60
+ icon: "CHECK_ICON",
61
+ },
62
+ {
63
+ id: 3,
64
+ heading: "COMMERCIAL AIRLINE MEDICAL ESCORT",
65
+ subHeading:
66
+ "Medical transfer by commercial airline is a safe and more cost effective way to travel, if transport by air ambulance is not needed. We can provide medical escorts for necessary treatment and support, to keep the patient safe and comfortable during the flight. Depending on the patient’s diagnosis and condition and also flight options. Transport can be done in first class, business class or with a stretcher in economy class. Our team will help you pick the best way of transport.",
67
+ icon: "CLOCK_ICON",
68
+ },
69
+ ],
70
+ },
71
+ {
72
+ id: 1,
73
+ __component: "layout.text-image-section",
74
+ title: "Hello Mars",
24
75
  image: {
76
+ url: "/uploads/man_in_circle_icon_6c77b6d3e4.png",
77
+ alt: "Hello Mars",
78
+ },
79
+ text: "**Hello Mars,** \n a distant red planet that has captured the imagination of humanity for centuries. As we gaze upon your mysterious surface from Earth, we can't help but wonder about the secrets you hold. Hello to the vast landscapes of rust-colored terrain, the towering volcanoes, and the enigmatic canyons that weave across your surface. *Hello Mars,* a planet that has been the focus of numerous space missions, each one aiming to unveil the mysteries of your past and present. From the iconic rovers tirelessly traversing your rocky landscapes to the orbiters capturing breathtaking images from above, we extend our greetings to the scientific endeavors that seek to understand your geology, climate, and potential for life. <br /> <br /> *Hello Mars,* a beacon of human exploration and curiosity. The dreams of setting foot on your soil have fueled the aspirations of generations, and with each technological leap, the possibility of humans visiting you becomes more tangible. The prospect of a human settlement on Mars brings excitement, challenges, and the promise of a new chapter in our interplanetary journey. <br /> <br /> *Hello Mars,* a testament to the indomitable human spirit that constantly seeks to push the boundaries of what is possible. As we continue to study, explore, and dream about the mysteries you hold, we are reminded of the vastness of the cosmos and the endless opportunities for discovery that lie beyond our home planet.",
80
+ reverse: true,
81
+ },
82
+ {
83
+ id: 1,
84
+ __component: "layout.icon-section",
85
+ icon: [
86
+ {
87
+ id: 1,
88
+ title: "INTENSIVE CARE UNIT",
89
+ text: "Intensive care unit with stretcher and vacuum mattress (adjustable backrest) | oxygen supply, compressed air and vacuum pump | 110/230V + 12/24V power supplies",
90
+ icon: "CLOCK_ICON",
91
+ },
92
+ {
93
+ id: 2,
94
+ title: "OXYGEN CAPACITY",
95
+ text: "4.000 l (per intensive care unit) plus up to 10.800 l in carbon high pressure cylinders",
96
+ icon: "CHECK_ICON",
97
+ },
98
+ {
99
+ id: 3,
100
+ title: "RESPIRATION SYSTEM",
101
+ text: "Hamilton T1 | or Hamilton H900 humidifier for: adults, pediatrics, neonates",
102
+ icon: "CLOUD_ICON",
103
+ },
104
+ {
105
+ id: 4,
106
+ title: "MONITORING",
107
+ text: "Zoll X Series | T1 (invasive and non-invasive blood pressure measurement, pulse oxymetry, capnometry, temperature measurement, ECG monitoring)",
108
+ icon: "CLOCK_ICON",
109
+ },
110
+ {
111
+ id: 5,
112
+ title: "DEFIBRILLATOR",
113
+ text: "Zoll X Series (with external cardiac pacemaker)",
114
+ icon: "CHECK_ICON",
115
+ },
116
+ {
117
+ id: 6,
118
+ title: "AED",
119
+ text: "Heartsine 350 P",
120
+ icon: "CLOUD_ICON",
121
+ },
122
+ {
123
+ id: 7,
124
+ title: "SYRINGE PUMPS",
125
+ text: "Fresenius Agilia Injectomat",
126
+ icon: "CLOCK_ICON",
127
+ },
128
+ {
129
+ id: 8,
130
+ title: "INFUSION PUMPS",
131
+ text: "Fresenus Agilia Volumat",
132
+ icon: "CHECK_ICON",
133
+ },
134
+ {
135
+ id: 9,
136
+ title: "PORTABLE SUCTION UNITS",
137
+ text: "Laerdal LCSU 4",
138
+ icon: "CLOUD_ICON",
139
+ },
140
+ {
141
+ id: 10,
142
+ title: "EMERGENCY ALS BAGS",
143
+ text: "Extensive equipment for emergency and intensive care (e.g. videolaryngoscop, chest tube, urinary catheter, arterial catheter, surgical instruments, coniotomy, central venous line, care products)",
144
+ icon: "CLOCK_ICON",
145
+ },
146
+ {
147
+ id: 11,
148
+ title: "MEDICATION",
149
+ text: "Standard medication for emergency and intensiv care medicine | narcotics | antidotes",
150
+ icon: "CHECK_ICON",
151
+ },
152
+ {
153
+ id: 12,
154
+ title: "PEDIATRIC EQUIPMENT",
155
+ text: "Babypod transport incubator I & II with Kanmed BabyWarmer | Incubator Dräger | intensive care backpack pediatric | additional emergency and intensive care medicine",
156
+ icon: "CLOUD_ICON",
157
+ },
158
+ ],
159
+ },
160
+ ],
161
+ };
162
+
163
+ export const AMH = Template.bind({});
164
+
165
+ AMH.args = {
166
+ sx: {
167
+ header: {
168
+ h1: {
169
+ color: "red",
170
+ },
171
+ },
172
+ },
173
+ title: "Hello Cruel World",
174
+ blocks: [
175
+ {
176
+ id: 3,
177
+ __component: "layout.hero-section",
178
+ heading: "UMWD",
179
+ subHeading: "A place for all your resources",
180
+ bgImage: {
25
181
  id: 3,
26
182
  url: "https://via.placeholder.com/100",
27
183
  alternativeText: "UMWD",
28
184
  },
185
+ logoImage: {
186
+ id: 3,
187
+ url: "/uploads/logo_decorated_ad284d33ef.png",
188
+ alternativeText: "UMWD",
189
+ width: 250,
190
+ height: 250,
191
+ },
29
192
  link: {
30
193
  id: 3,
31
194
  url: "/resources",