umwd-components 0.1.82 → 0.1.83

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.
@@ -6,28 +6,10 @@
6
6
 
7
7
  'use strict';
8
8
 
9
- var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.js');
10
9
  var React = require('react');
11
10
  var material = require('@mui/material');
11
+ var getIcon = require('../lib/getIcon.js');
12
12
 
13
- function getIcon(name) {
14
- switch (name) {
15
- case "CLOCK_ICON":
16
- return /*#__PURE__*/React.createElement(ClockIcon, {
17
- className: "w-12 h-12 mb-4 text-gray-900"
18
- });
19
- case "CHECK_ICON":
20
- return /*#__PURE__*/React.createElement(CheckIcon, {
21
- className: "w-12 h-12 mb-4 text-gray-900"
22
- });
23
- case "CLOUD_ICON":
24
- return /*#__PURE__*/React.createElement(CloudIcon, {
25
- className: "w-12 h-12 mb-4 text-gray-900"
26
- });
27
- default:
28
- return null;
29
- }
30
- }
31
13
  function FeatureSection(_ref) {
32
14
  let {
33
15
  data
@@ -49,98 +31,62 @@ function FeatureSection(_ref) {
49
31
  width: "100%"
50
32
  },
51
33
  useFlexGap: true
52
- }, feature.map(feature => /*#__PURE__*/React.createElement(material.Card, {
53
- key: feature.id,
54
- sx: {
55
- display: "flex",
56
- flexDirection: "column",
57
- justifyContent: "space-between",
58
- flex: 1,
59
- minWidth: "350px"
60
- }
61
- }, /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.CardMedia, {
62
- sx: {
63
- height: 140,
64
- display: "grid",
65
- alignItems: "center",
66
- justifyContent: "center"
67
- }
68
- }, getIcon(feature.icon)), /*#__PURE__*/React.createElement(material.Typography, {
69
- variant: "h5",
70
- align: "center",
71
- component: "div",
72
- sx: {
73
- mb: 2
74
- }
75
- }, feature.heading), /*#__PURE__*/React.createElement(material.Typography, {
76
- variant: "h6",
77
- align: "center",
78
- component: "div",
79
- sx: {
80
- mb: 2
81
- }
82
- }, feature.subHeading.substring(0, 50)), /*#__PURE__*/React.createElement(material.Typography, {
83
- variant: "body2",
84
- color: "text.secondary",
85
- component: "div"
86
- }, feature.subHeading)), /*#__PURE__*/React.createElement(material.CardActions, {
87
- sx: {
88
- mb: 0
89
- }
90
- }, /*#__PURE__*/React.createElement(material.Button, {
91
- size: "small"
92
- }, "Share"), /*#__PURE__*/React.createElement(material.Button, {
93
- size: "small"
94
- }, "Learn More"))))));
95
- }
96
- function CheckIcon(props) {
97
- return /*#__PURE__*/React.createElement("svg", _rollupPluginBabelHelpers.extends({}, props, {
98
- xmlns: "http://www.w3.org/2000/svg",
99
- width: "24",
100
- height: "24",
101
- viewBox: "0 0 24 24",
102
- fill: "none",
103
- stroke: "currentColor",
104
- strokeWidth: "2",
105
- strokeLinecap: "round",
106
- strokeLinejoin: "round"
107
- }), /*#__PURE__*/React.createElement("polyline", {
108
- points: "20 6 9 17 4 12"
109
- }));
110
- }
111
- function ClockIcon(props) {
112
- return /*#__PURE__*/React.createElement("svg", _rollupPluginBabelHelpers.extends({}, props, {
113
- xmlns: "http://www.w3.org/2000/svg",
114
- width: "24",
115
- height: "24",
116
- viewBox: "0 0 24 24",
117
- fill: "none",
118
- stroke: "currentColor",
119
- strokeWidth: "2",
120
- strokeLinecap: "round",
121
- strokeLinejoin: "round"
122
- }), /*#__PURE__*/React.createElement("circle", {
123
- cx: "12",
124
- cy: "12",
125
- r: "10"
126
- }), /*#__PURE__*/React.createElement("polyline", {
127
- points: "12 6 12 12 16 14"
128
- }));
129
- }
130
- function CloudIcon(props) {
131
- return /*#__PURE__*/React.createElement("svg", _rollupPluginBabelHelpers.extends({}, props, {
132
- xmlns: "http://www.w3.org/2000/svg",
133
- width: "24",
134
- height: "24",
135
- viewBox: "0 0 24 24",
136
- fill: "none",
137
- stroke: "currentColor",
138
- strokeWidth: "2",
139
- strokeLinecap: "round",
140
- strokeLinejoin: "round"
141
- }), /*#__PURE__*/React.createElement("path", {
142
- d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"
143
- }));
34
+ }, feature.map(feature => {
35
+ const Icon = getIcon.default(feature.icon);
36
+ return /*#__PURE__*/React.createElement(material.Card, {
37
+ key: feature.id,
38
+ sx: {
39
+ display: "flex",
40
+ flexDirection: "column",
41
+ justifyContent: "space-between",
42
+ flex: 1,
43
+ minWidth: "350px"
44
+ }
45
+ }, /*#__PURE__*/React.createElement(material.CardContent, null, /*#__PURE__*/React.createElement(material.CardMedia, {
46
+ sx: {
47
+ height: 140,
48
+ display: "grid",
49
+ alignItems: "center",
50
+ justifyContent: "center"
51
+ }
52
+ }, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
53
+ sx: {
54
+ mr: 2,
55
+ mt: 0.2,
56
+ width: "75px",
57
+ height: "75px",
58
+ fill: "none",
59
+ stroke: "currentColor",
60
+ strokeWidth: 0.5
61
+ }
62
+ })), /*#__PURE__*/React.createElement(material.Typography, {
63
+ variant: "h5",
64
+ align: "center",
65
+ component: "div",
66
+ sx: {
67
+ mb: 2
68
+ }
69
+ }, feature.heading), /*#__PURE__*/React.createElement(material.Typography, {
70
+ variant: "h6",
71
+ align: "center",
72
+ component: "div",
73
+ sx: {
74
+ mb: 2
75
+ }
76
+ }, feature.subHeading.substring(0, 50)), /*#__PURE__*/React.createElement(material.Typography, {
77
+ variant: "body2",
78
+ color: "text.secondary",
79
+ component: "div"
80
+ }, feature.subHeading)), /*#__PURE__*/React.createElement(material.CardActions, {
81
+ sx: {
82
+ mb: 0
83
+ }
84
+ }, /*#__PURE__*/React.createElement(material.Button, {
85
+ size: "small"
86
+ }, "Share"), /*#__PURE__*/React.createElement(material.Button, {
87
+ size: "small"
88
+ }, "Learn More")));
89
+ })));
144
90
  }
145
91
 
146
92
  exports.FeatureSection = FeatureSection;
@@ -8,70 +8,8 @@
8
8
 
9
9
  var React = require('react');
10
10
  var material = require('@mui/material');
11
- var BedroomBabyIcon = require('@mui/icons-material/BedroomBaby');
12
- var BedroomParentIcon = require('@mui/icons-material/BedroomParent');
13
- var MonitorHeartIcon = require('@mui/icons-material/MonitorHeart');
14
- var VaccinesIcon = require('@mui/icons-material/Vaccines');
15
- var LocalHospitalIcon = require('@mui/icons-material/LocalHospital');
16
- var MedicalInformationIcon = require('@mui/icons-material/MedicalInformation');
17
- var MedicalServicesIcon = require('@mui/icons-material/MedicalServices');
18
- var ChildCareIcon = require('@mui/icons-material/ChildCare');
19
- var ScreenshotMonitorIcon = require('@mui/icons-material/ScreenshotMonitor');
20
- var MedicationIcon = require('@mui/icons-material/Medication');
21
- var BloodtypeIcon = require('@mui/icons-material/Bloodtype');
22
- var HealingIcon = require('@mui/icons-material/Healing');
23
- var LocalPharmacyIcon = require('@mui/icons-material/LocalPharmacy');
24
- var FlightIcon = require('@mui/icons-material/Flight');
25
- var AirlineSeatFlatIcon = require('@mui/icons-material/AirlineSeatFlat');
26
- var AccessibleIcon = require('@mui/icons-material/Accessible');
27
- var PropaneTankIcon = require('@mui/icons-material/PropaneTank');
28
- var MasksIcon = require('@mui/icons-material/Masks');
29
- var BoltIcon = require('@mui/icons-material/Bolt');
11
+ var getIcon = require('../lib/getIcon.js');
30
12
 
31
- function getIcon(icon) {
32
- switch (icon) {
33
- case "BedroomBabyIcon":
34
- return BedroomBabyIcon;
35
- case "BedroomParentIcon":
36
- return BedroomParentIcon;
37
- case "MonitorHeartIcon":
38
- return MonitorHeartIcon;
39
- case "VaccinesIcon":
40
- return VaccinesIcon;
41
- case "LocalHospitalIcon":
42
- return LocalHospitalIcon;
43
- case "MedicalInformationIcon":
44
- return MedicalInformationIcon;
45
- case "MedicalServicesIcon":
46
- return MedicalServicesIcon;
47
- case "ChildCareIcon":
48
- return ChildCareIcon;
49
- case "ScreenshotMonitorIcon":
50
- return ScreenshotMonitorIcon;
51
- case "MedicationIcon":
52
- return MedicationIcon;
53
- case "BloodtypeIcon":
54
- return BloodtypeIcon;
55
- case "HealingIcon":
56
- return HealingIcon;
57
- case "LocalPharmacyIcon":
58
- return LocalPharmacyIcon;
59
- case "FlightIcon":
60
- return FlightIcon;
61
- case "AirlineSeatFlatIcon":
62
- return AirlineSeatFlatIcon;
63
- case "AccessibleIcon":
64
- return AccessibleIcon;
65
- case "PropaneTankIcon":
66
- return PropaneTankIcon;
67
- case "MasksIcon":
68
- return MasksIcon;
69
- case "BoltIcon":
70
- return BoltIcon;
71
- default:
72
- return null;
73
- }
74
- }
75
13
  function IconSection(_ref) {
76
14
  let {
77
15
  data
@@ -88,7 +26,7 @@ function IconSection(_ref) {
88
26
  container: true,
89
27
  spacing: 2
90
28
  }, icon.map(icon => {
91
- const Icon = getIcon(icon.icon);
29
+ const Icon = getIcon.default(icon.icon);
92
30
  return /*#__PURE__*/React.createElement(material.Grid, {
93
31
  item: true,
94
32
  xs: 12,
@@ -0,0 +1,79 @@
1
+ /*
2
+ * UMWD-Components
3
+ * @copyright Jelle Paulus
4
+ * @license MIT
5
+ */
6
+
7
+ 'use strict';
8
+
9
+ Object.defineProperty(exports, '__esModule', { value: true });
10
+
11
+ var BedroomBabyIcon = require('@mui/icons-material/BedroomBaby');
12
+ var BedroomParentIcon = require('@mui/icons-material/BedroomParent');
13
+ var MonitorHeartIcon = require('@mui/icons-material/MonitorHeart');
14
+ var VaccinesIcon = require('@mui/icons-material/Vaccines');
15
+ var LocalHospitalIcon = require('@mui/icons-material/LocalHospital');
16
+ var MedicalInformationIcon = require('@mui/icons-material/MedicalInformation');
17
+ var MedicalServicesIcon = require('@mui/icons-material/MedicalServices');
18
+ var ChildCareIcon = require('@mui/icons-material/ChildCare');
19
+ var ScreenshotMonitorIcon = require('@mui/icons-material/ScreenshotMonitor');
20
+ var MedicationIcon = require('@mui/icons-material/Medication');
21
+ var BloodtypeIcon = require('@mui/icons-material/Bloodtype');
22
+ var HealingIcon = require('@mui/icons-material/Healing');
23
+ var LocalPharmacyIcon = require('@mui/icons-material/LocalPharmacy');
24
+ var FlightIcon = require('@mui/icons-material/Flight');
25
+ var AirlineSeatFlatIcon = require('@mui/icons-material/AirlineSeatFlat');
26
+ var AccessibleIcon = require('@mui/icons-material/Accessible');
27
+ var PropaneTankIcon = require('@mui/icons-material/PropaneTank');
28
+ var MasksIcon = require('@mui/icons-material/Masks');
29
+ var BoltIcon = require('@mui/icons-material/Bolt');
30
+ var BedIcon = require('@mui/icons-material/Bed');
31
+
32
+ function getIcon(icon) {
33
+ switch (icon) {
34
+ case "BedroomBabyIcon":
35
+ return BedroomBabyIcon;
36
+ case "BedroomParentIcon":
37
+ return BedroomParentIcon;
38
+ case "MonitorHeartIcon":
39
+ return MonitorHeartIcon;
40
+ case "VaccinesIcon":
41
+ return VaccinesIcon;
42
+ case "LocalHospitalIcon":
43
+ return LocalHospitalIcon;
44
+ case "MedicalInformationIcon":
45
+ return MedicalInformationIcon;
46
+ case "MedicalServicesIcon":
47
+ return MedicalServicesIcon;
48
+ case "ChildCareIcon":
49
+ return ChildCareIcon;
50
+ case "ScreenshotMonitorIcon":
51
+ return ScreenshotMonitorIcon;
52
+ case "MedicationIcon":
53
+ return MedicationIcon;
54
+ case "BloodtypeIcon":
55
+ return BloodtypeIcon;
56
+ case "HealingIcon":
57
+ return HealingIcon;
58
+ case "LocalPharmacyIcon":
59
+ return LocalPharmacyIcon;
60
+ case "FlightIcon":
61
+ return FlightIcon;
62
+ case "AirlineSeatFlatIcon":
63
+ return AirlineSeatFlatIcon;
64
+ case "AccessibleIcon":
65
+ return AccessibleIcon;
66
+ case "PropaneTankIcon":
67
+ return PropaneTankIcon;
68
+ case "MasksIcon":
69
+ return MasksIcon;
70
+ case "BoltIcon":
71
+ return BoltIcon;
72
+ case "BedIcon":
73
+ return BedIcon;
74
+ default:
75
+ return null;
76
+ }
77
+ }
78
+
79
+ exports.default = getIcon;
@@ -4,28 +4,10 @@
4
4
  * @license MIT
5
5
  */
6
6
 
7
- import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
8
7
  import React from 'react';
9
8
  import { Container, Stack, Card, CardContent, CardMedia, Typography, CardActions, Button } from '@mui/material';
9
+ import getIcon from '../lib/getIcon.js';
10
10
 
11
- function getIcon(name) {
12
- switch (name) {
13
- case "CLOCK_ICON":
14
- return /*#__PURE__*/React.createElement(ClockIcon, {
15
- className: "w-12 h-12 mb-4 text-gray-900"
16
- });
17
- case "CHECK_ICON":
18
- return /*#__PURE__*/React.createElement(CheckIcon, {
19
- className: "w-12 h-12 mb-4 text-gray-900"
20
- });
21
- case "CLOUD_ICON":
22
- return /*#__PURE__*/React.createElement(CloudIcon, {
23
- className: "w-12 h-12 mb-4 text-gray-900"
24
- });
25
- default:
26
- return null;
27
- }
28
- }
29
11
  function FeatureSection(_ref) {
30
12
  let {
31
13
  data
@@ -47,98 +29,62 @@ function FeatureSection(_ref) {
47
29
  width: "100%"
48
30
  },
49
31
  useFlexGap: true
50
- }, feature.map(feature => /*#__PURE__*/React.createElement(Card, {
51
- key: feature.id,
52
- sx: {
53
- display: "flex",
54
- flexDirection: "column",
55
- justifyContent: "space-between",
56
- flex: 1,
57
- minWidth: "350px"
58
- }
59
- }, /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(CardMedia, {
60
- sx: {
61
- height: 140,
62
- display: "grid",
63
- alignItems: "center",
64
- justifyContent: "center"
65
- }
66
- }, getIcon(feature.icon)), /*#__PURE__*/React.createElement(Typography, {
67
- variant: "h5",
68
- align: "center",
69
- component: "div",
70
- sx: {
71
- mb: 2
72
- }
73
- }, feature.heading), /*#__PURE__*/React.createElement(Typography, {
74
- variant: "h6",
75
- align: "center",
76
- component: "div",
77
- sx: {
78
- mb: 2
79
- }
80
- }, feature.subHeading.substring(0, 50)), /*#__PURE__*/React.createElement(Typography, {
81
- variant: "body2",
82
- color: "text.secondary",
83
- component: "div"
84
- }, feature.subHeading)), /*#__PURE__*/React.createElement(CardActions, {
85
- sx: {
86
- mb: 0
87
- }
88
- }, /*#__PURE__*/React.createElement(Button, {
89
- size: "small"
90
- }, "Share"), /*#__PURE__*/React.createElement(Button, {
91
- size: "small"
92
- }, "Learn More"))))));
93
- }
94
- function CheckIcon(props) {
95
- return /*#__PURE__*/React.createElement("svg", _extends({}, 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
- }), /*#__PURE__*/React.createElement("polyline", {
106
- points: "20 6 9 17 4 12"
107
- }));
108
- }
109
- function ClockIcon(props) {
110
- return /*#__PURE__*/React.createElement("svg", _extends({}, props, {
111
- xmlns: "http://www.w3.org/2000/svg",
112
- width: "24",
113
- height: "24",
114
- viewBox: "0 0 24 24",
115
- fill: "none",
116
- stroke: "currentColor",
117
- strokeWidth: "2",
118
- strokeLinecap: "round",
119
- strokeLinejoin: "round"
120
- }), /*#__PURE__*/React.createElement("circle", {
121
- cx: "12",
122
- cy: "12",
123
- r: "10"
124
- }), /*#__PURE__*/React.createElement("polyline", {
125
- points: "12 6 12 12 16 14"
126
- }));
127
- }
128
- function CloudIcon(props) {
129
- return /*#__PURE__*/React.createElement("svg", _extends({}, props, {
130
- xmlns: "http://www.w3.org/2000/svg",
131
- width: "24",
132
- height: "24",
133
- viewBox: "0 0 24 24",
134
- fill: "none",
135
- stroke: "currentColor",
136
- strokeWidth: "2",
137
- strokeLinecap: "round",
138
- strokeLinejoin: "round"
139
- }), /*#__PURE__*/React.createElement("path", {
140
- d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"
141
- }));
32
+ }, feature.map(feature => {
33
+ const Icon = getIcon(feature.icon);
34
+ return /*#__PURE__*/React.createElement(Card, {
35
+ key: feature.id,
36
+ sx: {
37
+ display: "flex",
38
+ flexDirection: "column",
39
+ justifyContent: "space-between",
40
+ flex: 1,
41
+ minWidth: "350px"
42
+ }
43
+ }, /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(CardMedia, {
44
+ sx: {
45
+ height: 140,
46
+ display: "grid",
47
+ alignItems: "center",
48
+ justifyContent: "center"
49
+ }
50
+ }, Icon !== null && /*#__PURE__*/React.createElement(Icon, {
51
+ sx: {
52
+ mr: 2,
53
+ mt: 0.2,
54
+ width: "75px",
55
+ height: "75px",
56
+ fill: "none",
57
+ stroke: "currentColor",
58
+ strokeWidth: 0.5
59
+ }
60
+ })), /*#__PURE__*/React.createElement(Typography, {
61
+ variant: "h5",
62
+ align: "center",
63
+ component: "div",
64
+ sx: {
65
+ mb: 2
66
+ }
67
+ }, feature.heading), /*#__PURE__*/React.createElement(Typography, {
68
+ variant: "h6",
69
+ align: "center",
70
+ component: "div",
71
+ sx: {
72
+ mb: 2
73
+ }
74
+ }, feature.subHeading.substring(0, 50)), /*#__PURE__*/React.createElement(Typography, {
75
+ variant: "body2",
76
+ color: "text.secondary",
77
+ component: "div"
78
+ }, feature.subHeading)), /*#__PURE__*/React.createElement(CardActions, {
79
+ sx: {
80
+ mb: 0
81
+ }
82
+ }, /*#__PURE__*/React.createElement(Button, {
83
+ size: "small"
84
+ }, "Share"), /*#__PURE__*/React.createElement(Button, {
85
+ size: "small"
86
+ }, "Learn More")));
87
+ })));
142
88
  }
143
89
 
144
90
  export { FeatureSection };
@@ -6,70 +6,8 @@
6
6
 
7
7
  import React from 'react';
8
8
  import { Container, Grid, Card, CardContent, Typography } from '@mui/material';
9
- import BedroomBabyIcon from '@mui/icons-material/BedroomBaby';
10
- import BedroomParentIcon from '@mui/icons-material/BedroomParent';
11
- import MonitorHeartIcon from '@mui/icons-material/MonitorHeart';
12
- import VaccinesIcon from '@mui/icons-material/Vaccines';
13
- import LocalHospitalIcon from '@mui/icons-material/LocalHospital';
14
- import MedicalInformationIcon from '@mui/icons-material/MedicalInformation';
15
- import MedicalServicesIcon from '@mui/icons-material/MedicalServices';
16
- import ChildCareIcon from '@mui/icons-material/ChildCare';
17
- import ScreenshotMonitorIcon from '@mui/icons-material/ScreenshotMonitor';
18
- import MedicationIcon from '@mui/icons-material/Medication';
19
- import BloodtypeIcon from '@mui/icons-material/Bloodtype';
20
- import HealingIcon from '@mui/icons-material/Healing';
21
- import LocalPharmacyIcon from '@mui/icons-material/LocalPharmacy';
22
- import FlightIcon from '@mui/icons-material/Flight';
23
- import AirlineSeatFlatIcon from '@mui/icons-material/AirlineSeatFlat';
24
- import AccessibleIcon from '@mui/icons-material/Accessible';
25
- import PropaneTankIcon from '@mui/icons-material/PropaneTank';
26
- import MasksIcon from '@mui/icons-material/Masks';
27
- import BoltIcon from '@mui/icons-material/Bolt';
9
+ import getIcon from '../lib/getIcon.js';
28
10
 
29
- function getIcon(icon) {
30
- switch (icon) {
31
- case "BedroomBabyIcon":
32
- return BedroomBabyIcon;
33
- case "BedroomParentIcon":
34
- return BedroomParentIcon;
35
- case "MonitorHeartIcon":
36
- return MonitorHeartIcon;
37
- case "VaccinesIcon":
38
- return VaccinesIcon;
39
- case "LocalHospitalIcon":
40
- return LocalHospitalIcon;
41
- case "MedicalInformationIcon":
42
- return MedicalInformationIcon;
43
- case "MedicalServicesIcon":
44
- return MedicalServicesIcon;
45
- case "ChildCareIcon":
46
- return ChildCareIcon;
47
- case "ScreenshotMonitorIcon":
48
- return ScreenshotMonitorIcon;
49
- case "MedicationIcon":
50
- return MedicationIcon;
51
- case "BloodtypeIcon":
52
- return BloodtypeIcon;
53
- case "HealingIcon":
54
- return HealingIcon;
55
- case "LocalPharmacyIcon":
56
- return LocalPharmacyIcon;
57
- case "FlightIcon":
58
- return FlightIcon;
59
- case "AirlineSeatFlatIcon":
60
- return AirlineSeatFlatIcon;
61
- case "AccessibleIcon":
62
- return AccessibleIcon;
63
- case "PropaneTankIcon":
64
- return PropaneTankIcon;
65
- case "MasksIcon":
66
- return MasksIcon;
67
- case "BoltIcon":
68
- return BoltIcon;
69
- default:
70
- return null;
71
- }
72
- }
73
11
  function IconSection(_ref) {
74
12
  let {
75
13
  data
@@ -0,0 +1,75 @@
1
+ /*
2
+ * UMWD-Components
3
+ * @copyright Jelle Paulus
4
+ * @license MIT
5
+ */
6
+
7
+ import BedroomBabyIcon from '@mui/icons-material/BedroomBaby';
8
+ import BedroomParentIcon from '@mui/icons-material/BedroomParent';
9
+ import MonitorHeartIcon from '@mui/icons-material/MonitorHeart';
10
+ import VaccinesIcon from '@mui/icons-material/Vaccines';
11
+ import LocalHospitalIcon from '@mui/icons-material/LocalHospital';
12
+ import MedicalInformationIcon from '@mui/icons-material/MedicalInformation';
13
+ import MedicalServicesIcon from '@mui/icons-material/MedicalServices';
14
+ import ChildCareIcon from '@mui/icons-material/ChildCare';
15
+ import ScreenshotMonitorIcon from '@mui/icons-material/ScreenshotMonitor';
16
+ import MedicationIcon from '@mui/icons-material/Medication';
17
+ import BloodtypeIcon from '@mui/icons-material/Bloodtype';
18
+ import HealingIcon from '@mui/icons-material/Healing';
19
+ import LocalPharmacyIcon from '@mui/icons-material/LocalPharmacy';
20
+ import FlightIcon from '@mui/icons-material/Flight';
21
+ import AirlineSeatFlatIcon from '@mui/icons-material/AirlineSeatFlat';
22
+ import AccessibleIcon from '@mui/icons-material/Accessible';
23
+ import PropaneTankIcon from '@mui/icons-material/PropaneTank';
24
+ import MasksIcon from '@mui/icons-material/Masks';
25
+ import BoltIcon from '@mui/icons-material/Bolt';
26
+ import BedIcon from '@mui/icons-material/Bed';
27
+
28
+ function getIcon(icon) {
29
+ switch (icon) {
30
+ case "BedroomBabyIcon":
31
+ return BedroomBabyIcon;
32
+ case "BedroomParentIcon":
33
+ return BedroomParentIcon;
34
+ case "MonitorHeartIcon":
35
+ return MonitorHeartIcon;
36
+ case "VaccinesIcon":
37
+ return VaccinesIcon;
38
+ case "LocalHospitalIcon":
39
+ return LocalHospitalIcon;
40
+ case "MedicalInformationIcon":
41
+ return MedicalInformationIcon;
42
+ case "MedicalServicesIcon":
43
+ return MedicalServicesIcon;
44
+ case "ChildCareIcon":
45
+ return ChildCareIcon;
46
+ case "ScreenshotMonitorIcon":
47
+ return ScreenshotMonitorIcon;
48
+ case "MedicationIcon":
49
+ return MedicationIcon;
50
+ case "BloodtypeIcon":
51
+ return BloodtypeIcon;
52
+ case "HealingIcon":
53
+ return HealingIcon;
54
+ case "LocalPharmacyIcon":
55
+ return LocalPharmacyIcon;
56
+ case "FlightIcon":
57
+ return FlightIcon;
58
+ case "AirlineSeatFlatIcon":
59
+ return AirlineSeatFlatIcon;
60
+ case "AccessibleIcon":
61
+ return AccessibleIcon;
62
+ case "PropaneTankIcon":
63
+ return PropaneTankIcon;
64
+ case "MasksIcon":
65
+ return MasksIcon;
66
+ case "BoltIcon":
67
+ return BoltIcon;
68
+ case "BedIcon":
69
+ return BedIcon;
70
+ default:
71
+ return null;
72
+ }
73
+ }
74
+
75
+ export { getIcon as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -9,19 +9,7 @@ import {
9
9
  CardActions,
10
10
  Button,
11
11
  } from "@mui/material";
12
-
13
- function getIcon(name: string) {
14
- switch (name) {
15
- case "CLOCK_ICON":
16
- return <ClockIcon className="w-12 h-12 mb-4 text-gray-900" />;
17
- case "CHECK_ICON":
18
- return <CheckIcon className="w-12 h-12 mb-4 text-gray-900" />;
19
- case "CLOUD_ICON":
20
- return <CloudIcon className="w-12 h-12 mb-4 text-gray-900" />;
21
- default:
22
- return null;
23
- }
24
- }
12
+ import getIcon from "../lib/getIcon.ts";
25
13
 
26
14
  interface FeatureProps {
27
15
  id: number;
@@ -55,117 +43,74 @@ export function FeatureSection({
55
43
  sx={{ width: "100%" }}
56
44
  useFlexGap={true}
57
45
  >
58
- {feature.map((feature) => (
59
- <Card
60
- key={feature.id}
61
- sx={{
62
- display: "flex",
63
- flexDirection: "column",
64
- justifyContent: "space-between",
65
- flex: 1,
66
- minWidth: "350px",
67
- }}
68
- >
69
- <CardContent>
70
- <CardMedia
71
- sx={{
72
- height: 140,
73
- display: "grid",
74
- alignItems: "center",
75
- justifyContent: "center",
76
- }}
77
- >
78
- {getIcon(feature.icon)}
79
- </CardMedia>
80
- <Typography
81
- variant="h5"
82
- align="center"
83
- component="div"
84
- sx={{ mb: 2 }}
85
- >
86
- {feature.heading}
87
- </Typography>
88
- <Typography
89
- variant="h6"
90
- align="center"
91
- component="div"
92
- sx={{ mb: 2 }}
93
- >
94
- {feature.subHeading.substring(0, 50)}
95
- </Typography>
96
- <Typography
97
- variant="body2"
98
- color="text.secondary"
99
- component="div"
100
- >
101
- {feature.subHeading}
102
- </Typography>
103
- </CardContent>
104
- <CardActions sx={{ mb: 0 }}>
105
- <Button size="small">Share</Button>
106
- <Button size="small">Learn More</Button>
107
- </CardActions>
108
- </Card>
109
- ))}
46
+ {feature.map((feature) => {
47
+ const Icon = getIcon(feature.icon) as React.ElementType | null;
48
+ return (
49
+ <Card
50
+ key={feature.id}
51
+ sx={{
52
+ display: "flex",
53
+ flexDirection: "column",
54
+ justifyContent: "space-between",
55
+ flex: 1,
56
+ minWidth: "350px",
57
+ }}
58
+ >
59
+ <CardContent>
60
+ <CardMedia
61
+ sx={{
62
+ height: 140,
63
+ display: "grid",
64
+ alignItems: "center",
65
+ justifyContent: "center",
66
+ }}
67
+ >
68
+ {Icon !== null && (
69
+ <Icon
70
+ sx={{
71
+ mr: 2,
72
+ mt: 0.2,
73
+ width: "75px",
74
+ height: "75px",
75
+ fill: "none",
76
+ stroke: "currentColor",
77
+ strokeWidth: 0.5,
78
+ }}
79
+ />
80
+ )}
81
+ </CardMedia>
82
+ <Typography
83
+ variant="h5"
84
+ align="center"
85
+ component="div"
86
+ sx={{ mb: 2 }}
87
+ >
88
+ {feature.heading}
89
+ </Typography>
90
+ <Typography
91
+ variant="h6"
92
+ align="center"
93
+ component="div"
94
+ sx={{ mb: 2 }}
95
+ >
96
+ {feature.subHeading.substring(0, 50)}
97
+ </Typography>
98
+ <Typography
99
+ variant="body2"
100
+ color="text.secondary"
101
+ component="div"
102
+ >
103
+ {feature.subHeading}
104
+ </Typography>
105
+ </CardContent>
106
+ <CardActions sx={{ mb: 0 }}>
107
+ <Button size="small">Share</Button>
108
+ <Button size="small">Learn More</Button>
109
+ </CardActions>
110
+ </Card>
111
+ );
112
+ })}
110
113
  </Stack>
111
114
  </Container>
112
115
  );
113
116
  }
114
-
115
- function CheckIcon(props: any) {
116
- return (
117
- <svg
118
- {...props}
119
- xmlns="http://www.w3.org/2000/svg"
120
- width="24"
121
- height="24"
122
- viewBox="0 0 24 24"
123
- fill="none"
124
- stroke="currentColor"
125
- strokeWidth="2"
126
- strokeLinecap="round"
127
- strokeLinejoin="round"
128
- >
129
- <polyline points="20 6 9 17 4 12" />
130
- </svg>
131
- );
132
- }
133
-
134
- function ClockIcon(props: any) {
135
- return (
136
- <svg
137
- {...props}
138
- xmlns="http://www.w3.org/2000/svg"
139
- width="24"
140
- height="24"
141
- viewBox="0 0 24 24"
142
- fill="none"
143
- stroke="currentColor"
144
- strokeWidth="2"
145
- strokeLinecap="round"
146
- strokeLinejoin="round"
147
- >
148
- <circle cx="12" cy="12" r="10" />
149
- <polyline points="12 6 12 12 16 14" />
150
- </svg>
151
- );
152
- }
153
-
154
- function CloudIcon(props: any) {
155
- return (
156
- <svg
157
- {...props}
158
- xmlns="http://www.w3.org/2000/svg"
159
- width="24"
160
- height="24"
161
- viewBox="0 0 24 24"
162
- fill="none"
163
- stroke="currentColor"
164
- strokeWidth="2"
165
- strokeLinecap="round"
166
- strokeLinejoin="round"
167
- >
168
- <path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />
169
- </svg>
170
- );
171
- }
@@ -1,34 +1,6 @@
1
1
  import React from "react";
2
- import {
3
- Stack,
4
- Grid,
5
- Card,
6
- CardContent,
7
- Typography,
8
- Container,
9
- SvgIcon,
10
- Divider,
11
- } from "@mui/material";
12
-
13
- import BedroomBabyIcon from "@mui/icons-material/BedroomBaby";
14
- import BedroomParentIcon from "@mui/icons-material/BedroomParent";
15
- import MonitorHeartIcon from "@mui/icons-material/MonitorHeart";
16
- import VaccinesIcon from "@mui/icons-material/Vaccines";
17
- import LocalHospitalIcon from "@mui/icons-material/LocalHospital";
18
- import MedicalInformationIcon from "@mui/icons-material/MedicalInformation";
19
- import MedicalServicesIcon from "@mui/icons-material/MedicalServices";
20
- import ChildCareIcon from "@mui/icons-material/ChildCare";
21
- import ScreenshotMonitorIcon from "@mui/icons-material/ScreenshotMonitor";
22
- import MedicationIcon from "@mui/icons-material/Medication";
23
- import BloodtypeIcon from "@mui/icons-material/Bloodtype";
24
- import HealingIcon from "@mui/icons-material/Healing";
25
- import LocalPharmacyIcon from "@mui/icons-material/LocalPharmacy";
26
- import FlightIcon from "@mui/icons-material/Flight";
27
- import AirlineSeatFlatIcon from "@mui/icons-material/AirlineSeatFlat";
28
- import AccessibleIcon from "@mui/icons-material/Accessible";
29
- import PropaneTankIcon from "@mui/icons-material/PropaneTank";
30
- import MasksIcon from "@mui/icons-material/Masks";
31
- import BoltIcon from "@mui/icons-material/Bolt";
2
+ import { Grid, Card, CardContent, Typography, Container } from "@mui/material";
3
+ import getIcon from "../lib/getIcon.ts";
32
4
 
33
5
  interface IconProps {
34
6
  id: number;
@@ -45,51 +17,6 @@ interface IconSectionProps {
45
17
  icon: IconProps[];
46
18
  }
47
19
 
48
- function getIcon(icon: string): React.ElementType | null {
49
- switch (icon) {
50
- case "BedroomBabyIcon":
51
- return BedroomBabyIcon;
52
- case "BedroomParentIcon":
53
- return BedroomParentIcon;
54
- case "MonitorHeartIcon":
55
- return MonitorHeartIcon;
56
- case "VaccinesIcon":
57
- return VaccinesIcon;
58
- case "LocalHospitalIcon":
59
- return LocalHospitalIcon;
60
- case "MedicalInformationIcon":
61
- return MedicalInformationIcon;
62
- case "MedicalServicesIcon":
63
- return MedicalServicesIcon;
64
- case "ChildCareIcon":
65
- return ChildCareIcon;
66
- case "ScreenshotMonitorIcon":
67
- return ScreenshotMonitorIcon;
68
- case "MedicationIcon":
69
- return MedicationIcon;
70
- case "BloodtypeIcon":
71
- return BloodtypeIcon;
72
- case "HealingIcon":
73
- return HealingIcon;
74
- case "LocalPharmacyIcon":
75
- return LocalPharmacyIcon;
76
- case "FlightIcon":
77
- return FlightIcon;
78
- case "AirlineSeatFlatIcon":
79
- return AirlineSeatFlatIcon;
80
- case "AccessibleIcon":
81
- return AccessibleIcon;
82
- case "PropaneTankIcon":
83
- return PropaneTankIcon;
84
- case "MasksIcon":
85
- return MasksIcon;
86
- case "BoltIcon":
87
- return BoltIcon;
88
- default:
89
- return null;
90
- }
91
- }
92
-
93
20
  export function IconSection({ data }: { readonly data: IconSectionProps }) {
94
21
  const { icon } = data;
95
22
 
@@ -0,0 +1,67 @@
1
+ import BedroomBabyIcon from "@mui/icons-material/BedroomBaby";
2
+ import BedroomParentIcon from "@mui/icons-material/BedroomParent";
3
+ import MonitorHeartIcon from "@mui/icons-material/MonitorHeart";
4
+ import VaccinesIcon from "@mui/icons-material/Vaccines";
5
+ import LocalHospitalIcon from "@mui/icons-material/LocalHospital";
6
+ import MedicalInformationIcon from "@mui/icons-material/MedicalInformation";
7
+ import MedicalServicesIcon from "@mui/icons-material/MedicalServices";
8
+ import ChildCareIcon from "@mui/icons-material/ChildCare";
9
+ import ScreenshotMonitorIcon from "@mui/icons-material/ScreenshotMonitor";
10
+ import MedicationIcon from "@mui/icons-material/Medication";
11
+ import BloodtypeIcon from "@mui/icons-material/Bloodtype";
12
+ import HealingIcon from "@mui/icons-material/Healing";
13
+ import LocalPharmacyIcon from "@mui/icons-material/LocalPharmacy";
14
+ import FlightIcon from "@mui/icons-material/Flight";
15
+ import AirlineSeatFlatIcon from "@mui/icons-material/AirlineSeatFlat";
16
+ import AccessibleIcon from "@mui/icons-material/Accessible";
17
+ import PropaneTankIcon from "@mui/icons-material/PropaneTank";
18
+ import MasksIcon from "@mui/icons-material/Masks";
19
+ import BoltIcon from "@mui/icons-material/Bolt";
20
+ import BedIcon from "@mui/icons-material/Bed";
21
+
22
+ export default function getIcon(icon: string): React.ElementType | null {
23
+ switch (icon) {
24
+ case "BedroomBabyIcon":
25
+ return BedroomBabyIcon;
26
+ case "BedroomParentIcon":
27
+ return BedroomParentIcon;
28
+ case "MonitorHeartIcon":
29
+ return MonitorHeartIcon;
30
+ case "VaccinesIcon":
31
+ return VaccinesIcon;
32
+ case "LocalHospitalIcon":
33
+ return LocalHospitalIcon;
34
+ case "MedicalInformationIcon":
35
+ return MedicalInformationIcon;
36
+ case "MedicalServicesIcon":
37
+ return MedicalServicesIcon;
38
+ case "ChildCareIcon":
39
+ return ChildCareIcon;
40
+ case "ScreenshotMonitorIcon":
41
+ return ScreenshotMonitorIcon;
42
+ case "MedicationIcon":
43
+ return MedicationIcon;
44
+ case "BloodtypeIcon":
45
+ return BloodtypeIcon;
46
+ case "HealingIcon":
47
+ return HealingIcon;
48
+ case "LocalPharmacyIcon":
49
+ return LocalPharmacyIcon;
50
+ case "FlightIcon":
51
+ return FlightIcon;
52
+ case "AirlineSeatFlatIcon":
53
+ return AirlineSeatFlatIcon;
54
+ case "AccessibleIcon":
55
+ return AccessibleIcon;
56
+ case "PropaneTankIcon":
57
+ return PropaneTankIcon;
58
+ case "MasksIcon":
59
+ return MasksIcon;
60
+ case "BoltIcon":
61
+ return BoltIcon;
62
+ case "BedIcon":
63
+ return BedIcon;
64
+ default:
65
+ return null;
66
+ }
67
+ }
@@ -50,21 +50,21 @@ HelloWorld.args = {
50
50
  heading: "AIR AMBULANCE",
51
51
  subHeading:
52
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",
53
+ icon: "AirlineSeatFlatIcon",
54
54
  },
55
55
  {
56
56
  id: 2,
57
57
  heading: "BED TO BED",
58
58
  subHeading:
59
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",
60
+ icon: "BedIcon",
61
61
  },
62
62
  {
63
63
  id: 3,
64
64
  heading: "COMMERCIAL AIRLINE MEDICAL ESCORT",
65
65
  subHeading:
66
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",
67
+ icon: "FlightIcon",
68
68
  },
69
69
  ],
70
70
  },