umwd-components 0.1.67 → 0.1.68

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,124 @@
1
+ /*
2
+ * UMWD-Components
3
+ * @copyright Jelle Paulus
4
+ * @license MIT
5
+ */
6
+
7
+ 'use strict';
8
+
9
+ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.js');
10
+ var React = require('react');
11
+ var material = require('@mui/material');
12
+
13
+ function getIcon(name) {
14
+ switch (name) {
15
+ case "CLOCK_ICON":
16
+ return /*#__PURE__*/React.createElement(ClockIcon, null);
17
+ case "CHECK_ICON":
18
+ return /*#__PURE__*/React.createElement(CheckIcon, null);
19
+ case "CLOUD_ICON":
20
+ return /*#__PURE__*/React.createElement(CloudIcon, null);
21
+ default:
22
+ return null;
23
+ }
24
+ }
25
+ function IconSection(_ref) {
26
+ let {
27
+ data
28
+ } = _ref;
29
+ const {
30
+ icon
31
+ } = data;
32
+ return /*#__PURE__*/React.createElement(material.Container, {
33
+ maxWidth: "lg",
34
+ sx: {
35
+ my: 1
36
+ }
37
+ }, /*#__PURE__*/React.createElement(material.Grid, {
38
+ container: true,
39
+ spacing: 2
40
+ }, icon.map(icon => /*#__PURE__*/React.createElement(material.Grid, {
41
+ item: true,
42
+ xs: 12,
43
+ sm: 6,
44
+ md: 4,
45
+ lg: 3
46
+ }, /*#__PURE__*/React.createElement(material.Card, {
47
+ key: icon.id,
48
+ sx: {
49
+ display: "flex",
50
+ flexDirection: "column",
51
+ justifyContent: "space-between",
52
+ flex: 1,
53
+ height: "100%"
54
+ }
55
+ }, /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.Typography, {
56
+ variant: "h6",
57
+ component: "div",
58
+ sx: {
59
+ mb: 1,
60
+ display: "flex",
61
+ justifyContent: "start",
62
+ alignItems: "center"
63
+ }
64
+ }, /*#__PURE__*/React.createElement(material.SvgIcon, {
65
+ sx: {
66
+ mr: 2
67
+ }
68
+ }, getIcon(icon.icon)), " ", icon.title), /*#__PURE__*/React.createElement(material.Typography, {
69
+ variant: "caption",
70
+ color: "text.secondary",
71
+ component: "div"
72
+ }, icon.text)))))));
73
+ }
74
+ function CheckIcon(props) {
75
+ return /*#__PURE__*/React.createElement("svg", _rollupPluginBabelHelpers.extends({}, props, {
76
+ xmlns: "http://www.w3.org/2000/svg",
77
+ width: "24",
78
+ height: "24",
79
+ viewBox: "0 0 24 24",
80
+ fill: "none",
81
+ stroke: "currentColor",
82
+ strokeWidth: "2",
83
+ strokeLinecap: "round",
84
+ strokeLinejoin: "round"
85
+ }), /*#__PURE__*/React.createElement("polyline", {
86
+ points: "20 6 9 17 4 12"
87
+ }));
88
+ }
89
+ function ClockIcon(props) {
90
+ return /*#__PURE__*/React.createElement("svg", _rollupPluginBabelHelpers.extends({}, props, {
91
+ xmlns: "http://www.w3.org/2000/svg",
92
+ width: "24",
93
+ height: "24",
94
+ viewBox: "0 0 24 24",
95
+ fill: "none",
96
+ stroke: "currentColor",
97
+ strokeWidth: "2",
98
+ strokeLinecap: "round",
99
+ strokeLinejoin: "round"
100
+ }), /*#__PURE__*/React.createElement("circle", {
101
+ cx: "12",
102
+ cy: "12",
103
+ r: "10"
104
+ }), /*#__PURE__*/React.createElement("polyline", {
105
+ points: "12 6 12 12 16 14"
106
+ }));
107
+ }
108
+ function CloudIcon(props) {
109
+ return /*#__PURE__*/React.createElement("svg", _rollupPluginBabelHelpers.extends({}, props, {
110
+ xmlns: "http://www.w3.org/2000/svg",
111
+ width: "24",
112
+ height: "24",
113
+ viewBox: "0 0 24 24",
114
+ fill: "none",
115
+ stroke: "currentColor",
116
+ strokeWidth: "2",
117
+ strokeLinecap: "round",
118
+ strokeLinejoin: "round"
119
+ }), /*#__PURE__*/React.createElement("path", {
120
+ d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"
121
+ }));
122
+ }
123
+
124
+ exports.IconSection = IconSection;
@@ -14,6 +14,7 @@ var PropTypes = require('prop-types');
14
14
  var TextImageSection = require('./TextImageSection.js');
15
15
  var HeroSection = require('./HeroSection.js');
16
16
  var FeaturesSection = require('./FeaturesSection.js');
17
+ var IconSection = require('./IconSection.js');
17
18
 
18
19
  function blockRenderer(block) {
19
20
  switch (block.__component) {
@@ -32,6 +33,11 @@ function blockRenderer(block) {
32
33
  key: block.id,
33
34
  data: block
34
35
  });
36
+ case "layout.icon-section":
37
+ return /*#__PURE__*/React.createElement(IconSection.IconSection, {
38
+ key: block.id,
39
+ data: block
40
+ });
35
41
  default:
36
42
  return null;
37
43
  }
@@ -0,0 +1,122 @@
1
+ /*
2
+ * UMWD-Components
3
+ * @copyright Jelle Paulus
4
+ * @license MIT
5
+ */
6
+
7
+ import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
8
+ import React from 'react';
9
+ import { Container, Grid, Card, CardContent, Typography, SvgIcon } from '@mui/material';
10
+
11
+ function getIcon(name) {
12
+ switch (name) {
13
+ case "CLOCK_ICON":
14
+ return /*#__PURE__*/React.createElement(ClockIcon, null);
15
+ case "CHECK_ICON":
16
+ return /*#__PURE__*/React.createElement(CheckIcon, null);
17
+ case "CLOUD_ICON":
18
+ return /*#__PURE__*/React.createElement(CloudIcon, null);
19
+ default:
20
+ return null;
21
+ }
22
+ }
23
+ function IconSection(_ref) {
24
+ let {
25
+ data
26
+ } = _ref;
27
+ const {
28
+ icon
29
+ } = data;
30
+ return /*#__PURE__*/React.createElement(Container, {
31
+ maxWidth: "lg",
32
+ sx: {
33
+ my: 1
34
+ }
35
+ }, /*#__PURE__*/React.createElement(Grid, {
36
+ container: true,
37
+ spacing: 2
38
+ }, icon.map(icon => /*#__PURE__*/React.createElement(Grid, {
39
+ item: true,
40
+ xs: 12,
41
+ sm: 6,
42
+ md: 4,
43
+ lg: 3
44
+ }, /*#__PURE__*/React.createElement(Card, {
45
+ key: icon.id,
46
+ sx: {
47
+ display: "flex",
48
+ flexDirection: "column",
49
+ justifyContent: "space-between",
50
+ flex: 1,
51
+ height: "100%"
52
+ }
53
+ }, /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(Typography, {
54
+ variant: "h6",
55
+ component: "div",
56
+ sx: {
57
+ mb: 1,
58
+ display: "flex",
59
+ justifyContent: "start",
60
+ alignItems: "center"
61
+ }
62
+ }, /*#__PURE__*/React.createElement(SvgIcon, {
63
+ sx: {
64
+ mr: 2
65
+ }
66
+ }, getIcon(icon.icon)), " ", icon.title), /*#__PURE__*/React.createElement(Typography, {
67
+ variant: "caption",
68
+ color: "text.secondary",
69
+ component: "div"
70
+ }, icon.text)))))));
71
+ }
72
+ function CheckIcon(props) {
73
+ return /*#__PURE__*/React.createElement("svg", _extends({}, props, {
74
+ xmlns: "http://www.w3.org/2000/svg",
75
+ width: "24",
76
+ height: "24",
77
+ viewBox: "0 0 24 24",
78
+ fill: "none",
79
+ stroke: "currentColor",
80
+ strokeWidth: "2",
81
+ strokeLinecap: "round",
82
+ strokeLinejoin: "round"
83
+ }), /*#__PURE__*/React.createElement("polyline", {
84
+ points: "20 6 9 17 4 12"
85
+ }));
86
+ }
87
+ function ClockIcon(props) {
88
+ return /*#__PURE__*/React.createElement("svg", _extends({}, props, {
89
+ xmlns: "http://www.w3.org/2000/svg",
90
+ width: "24",
91
+ height: "24",
92
+ viewBox: "0 0 24 24",
93
+ fill: "none",
94
+ stroke: "currentColor",
95
+ strokeWidth: "2",
96
+ strokeLinecap: "round",
97
+ strokeLinejoin: "round"
98
+ }), /*#__PURE__*/React.createElement("circle", {
99
+ cx: "12",
100
+ cy: "12",
101
+ r: "10"
102
+ }), /*#__PURE__*/React.createElement("polyline", {
103
+ points: "12 6 12 12 16 14"
104
+ }));
105
+ }
106
+ function CloudIcon(props) {
107
+ return /*#__PURE__*/React.createElement("svg", _extends({}, props, {
108
+ xmlns: "http://www.w3.org/2000/svg",
109
+ width: "24",
110
+ height: "24",
111
+ viewBox: "0 0 24 24",
112
+ fill: "none",
113
+ stroke: "currentColor",
114
+ strokeWidth: "2",
115
+ strokeLinecap: "round",
116
+ strokeLinejoin: "round"
117
+ }), /*#__PURE__*/React.createElement("path", {
118
+ d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"
119
+ }));
120
+ }
121
+
122
+ export { IconSection };
@@ -10,6 +10,7 @@ import PropTypes from 'prop-types';
10
10
  import TextImageSection from './TextImageSection.js';
11
11
  import { HeroSection } from './HeroSection.js';
12
12
  import { FeatureSection } from './FeaturesSection.js';
13
+ import { IconSection } from './IconSection.js';
13
14
 
14
15
  function blockRenderer(block) {
15
16
  switch (block.__component) {
@@ -28,6 +29,11 @@ function blockRenderer(block) {
28
29
  key: block.id,
29
30
  data: block
30
31
  });
32
+ case "layout.icon-section":
33
+ return /*#__PURE__*/React.createElement(IconSection, {
34
+ key: block.id,
35
+ data: block
36
+ });
31
37
  default:
32
38
  return null;
33
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.67",
3
+ "version": "0.1.68",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -0,0 +1,148 @@
1
+ import React from "react";
2
+ import {
3
+ Stack,
4
+ Grid,
5
+ Card,
6
+ CardContent,
7
+ Typography,
8
+ Container,
9
+ CardMedia,
10
+ CardActions,
11
+ Button,
12
+ SvgIcon,
13
+ } from "@mui/material";
14
+
15
+ function getIcon(name: string) {
16
+ switch (name) {
17
+ case "CLOCK_ICON":
18
+ return <ClockIcon />;
19
+ case "CHECK_ICON":
20
+ return <CheckIcon />;
21
+ case "CLOUD_ICON":
22
+ return <CloudIcon />;
23
+ default:
24
+ return null;
25
+ }
26
+ }
27
+
28
+ interface IconProps {
29
+ id: number;
30
+ title: string;
31
+ text: string;
32
+ icon: string;
33
+ }
34
+
35
+ interface IconSectionProps {
36
+ id: number;
37
+ __component: string;
38
+ title: string;
39
+ description: string;
40
+ icon: IconProps[];
41
+ }
42
+
43
+ export function IconSection({ data }: { readonly data: IconSectionProps }) {
44
+ const { icon } = data;
45
+
46
+ return (
47
+ <Container maxWidth="lg" sx={{ my: 1 }}>
48
+ <Grid container spacing={2}>
49
+ {icon.map((icon) => (
50
+ <Grid item xs={12} sm={6} md={4} lg={3}>
51
+ <Card
52
+ key={icon.id}
53
+ sx={{
54
+ display: "flex",
55
+ flexDirection: "column",
56
+ justifyContent: "space-between",
57
+ flex: 1,
58
+ height: "100%",
59
+ }}
60
+ >
61
+ <CardContent>
62
+ <Typography
63
+ variant="h6"
64
+ component="div"
65
+ sx={{
66
+ mb: 1,
67
+ display: "flex",
68
+ justifyContent: "start",
69
+ alignItems: "center",
70
+ }}
71
+ >
72
+ <SvgIcon sx={{ mr: 2 }}>{getIcon(icon.icon)}</SvgIcon>{" "}
73
+ {icon.title}
74
+ </Typography>
75
+
76
+ <Typography
77
+ variant="caption"
78
+ color="text.secondary"
79
+ component="div"
80
+ >
81
+ {icon.text}
82
+ </Typography>
83
+ </CardContent>
84
+ </Card>
85
+ </Grid>
86
+ ))}
87
+ </Grid>
88
+ </Container>
89
+ );
90
+ }
91
+
92
+ function CheckIcon(props: any) {
93
+ return (
94
+ <svg
95
+ {...props}
96
+ xmlns="http://www.w3.org/2000/svg"
97
+ width="24"
98
+ height="24"
99
+ viewBox="0 0 24 24"
100
+ fill="none"
101
+ stroke="currentColor"
102
+ strokeWidth="2"
103
+ strokeLinecap="round"
104
+ strokeLinejoin="round"
105
+ >
106
+ <polyline points="20 6 9 17 4 12" />
107
+ </svg>
108
+ );
109
+ }
110
+
111
+ function ClockIcon(props: any) {
112
+ return (
113
+ <svg
114
+ {...props}
115
+ xmlns="http://www.w3.org/2000/svg"
116
+ width="24"
117
+ height="24"
118
+ viewBox="0 0 24 24"
119
+ fill="none"
120
+ stroke="currentColor"
121
+ strokeWidth="2"
122
+ strokeLinecap="round"
123
+ strokeLinejoin="round"
124
+ >
125
+ <circle cx="12" cy="12" r="10" />
126
+ <polyline points="12 6 12 12 16 14" />
127
+ </svg>
128
+ );
129
+ }
130
+
131
+ function CloudIcon(props: any) {
132
+ return (
133
+ <svg
134
+ {...props}
135
+ xmlns="http://www.w3.org/2000/svg"
136
+ width="24"
137
+ height="24"
138
+ viewBox="0 0 24 24"
139
+ fill="none"
140
+ stroke="currentColor"
141
+ strokeWidth="2"
142
+ strokeLinecap="round"
143
+ strokeLinejoin="round"
144
+ >
145
+ <path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />
146
+ </svg>
147
+ );
148
+ }
@@ -5,6 +5,7 @@ import PropTypes from "prop-types";
5
5
  import TextImageSection from "./TextImageSection.tsx";
6
6
  import { HeroSection } from "./HeroSection.tsx";
7
7
  import { FeatureSection } from "./FeaturesSection.tsx";
8
+ import { IconSection } from "./IconSection.tsx";
8
9
 
9
10
  function blockRenderer(block) {
10
11
  switch (block.__component) {
@@ -14,6 +15,8 @@ function blockRenderer(block) {
14
15
  return <FeatureSection key={block.id} data={block} />;
15
16
  case "layout.text-image-section":
16
17
  return <TextImageSection key={block.id} data={block} />;
18
+ case "layout.icon-section":
19
+ return <IconSection key={block.id} data={block} />;
17
20
  default:
18
21
  return null;
19
22
  }
@@ -72,5 +72,83 @@ HelloWorld.args = {
72
72
  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.",
73
73
  reverse: true,
74
74
  },
75
+ {
76
+ id: 1,
77
+ __component: "layout.icon-section",
78
+ icon: [
79
+ {
80
+ id: 1,
81
+ title: "INTENSIVE CARE UNIT",
82
+ text: "Intensive care unit with stretcher and vacuum mattress (adjustable backrest) | oxygen supply, compressed air and vacuum pump | 110/230V + 12/24V power supplies",
83
+ icon: "CLOCK_ICON",
84
+ },
85
+ {
86
+ id: 2,
87
+ title: "OXYGEN CAPACITY",
88
+ text: "4.000 l (per intensive care unit) plus up to 10.800 l in carbon high pressure cylinders",
89
+ icon: "CHECK_ICON",
90
+ },
91
+ {
92
+ id: 3,
93
+ title: "RESPIRATION SYSTEM",
94
+ text: "Hamilton T1 | or Hamilton H900 humidifier for: adults, pediatrics, neonates",
95
+ icon: "CLOUD_ICON",
96
+ },
97
+ {
98
+ id: 4,
99
+ title: "MONITORING",
100
+ text: "Zoll X Series | T1 (invasive and non-invasive blood pressure measurement, pulse oxymetry, capnometry, temperature measurement, ECG monitoring)",
101
+ icon: "CLOCK_ICON",
102
+ },
103
+ {
104
+ id: 5,
105
+ title: "DEFIBRILLATOR",
106
+ text: "Zoll X Series (with external cardiac pacemaker)",
107
+ icon: "CHECK_ICON",
108
+ },
109
+ {
110
+ id: 6,
111
+ title: "AED",
112
+ text: "Heartsine 350 P",
113
+ icon: "CLOUD_ICON",
114
+ },
115
+ {
116
+ id: 7,
117
+ title: "SYRINGE PUMPS",
118
+ text: "Fresenius Agilia Injectomat",
119
+ icon: "CLOCK_ICON",
120
+ },
121
+ {
122
+ id: 8,
123
+ title: "INFUSION PUMPS",
124
+ text: "Fresenus Agilia Volumat",
125
+ icon: "CHECK_ICON",
126
+ },
127
+ {
128
+ id: 9,
129
+ title: "PORTABLE SUCTION UNITS",
130
+ text: "Laerdal LCSU 4",
131
+ icon: "CLOUD_ICON",
132
+ },
133
+ {
134
+ id: 10,
135
+ title: "EMERGENCY ALS BAGS",
136
+ 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)",
137
+ icon: "CLOCK_ICON",
138
+ },
139
+ {
140
+ id: 11,
141
+ title: "MEDICATION",
142
+ text: "Standard medication for emergency and intensiv care medicine | narcotics | antidotes",
143
+ icon: "CHECK_ICON",
144
+ },
145
+ {
146
+ id: 12,
147
+ title: "PEDIATRIC EQUIPMENT",
148
+ text: "Babypod transport incubator I & II with Kanmed BabyWarmer | Incubator Dräger | intensive care backpack pediatric | additional emergency and intensive care medicine",
149
+ icon: "CLOUD_ICON",
150
+ },
151
+ ],
152
+ },
75
153
  ],
76
154
  };