@luscii-healthtech/web-ui 2.6.0 → 2.7.0

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.
@@ -1,22 +1,12 @@
1
- export default CenteredHero;
2
- declare function CenteredHero({ title, text, image, buttons, className }: {
3
- title: any;
4
- text: any;
5
- image: any;
6
- buttons: any;
7
- className: any;
8
- }): JSX.Element;
9
- declare namespace CenteredHero {
10
- export namespace propTypes {
11
- export const title: PropTypes.Requireable<string>;
12
- export const text: PropTypes.Requireable<string>;
13
- export const image: PropTypes.Requireable<string>;
14
- export const buttons: PropTypes.Requireable<(PropTypes.InferProps<{
15
- title: PropTypes.Validator<string>;
16
- handleOnClick: PropTypes.Validator<(...args: any[]) => any>;
17
- type: PropTypes.Validator<"primary" | "secondary">;
18
- }> | null | undefined)[]>;
19
- export const className: PropTypes.Requireable<string>;
20
- }
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from "../Button/Button.types";
3
+ export declare type BackgroundColor = "white" | "slate-50";
4
+ export interface CenteredHeroProps {
5
+ title: string;
6
+ text: string;
7
+ image: string;
8
+ buttons: ButtonProps[];
9
+ background?: BackgroundColor;
21
10
  }
22
- import PropTypes from "prop-types";
11
+ declare const CenteredHero: ({ title, text, image, buttons, background, }: CenteredHeroProps) => JSX.Element;
12
+ export default CenteredHero;
@@ -1328,11 +1328,6 @@ video {
1328
1328
  margin-bottom: 1rem;
1329
1329
  }
1330
1330
 
1331
- .my-6 {
1332
- margin-top: 1.5rem;
1333
- margin-bottom: 1.5rem;
1334
- }
1335
-
1336
1331
  .mx-auto {
1337
1332
  margin-left: auto;
1338
1333
  margin-right: auto;
@@ -1382,6 +1377,10 @@ video {
1382
1377
  margin-left: 0.75rem;
1383
1378
  }
1384
1379
 
1380
+ .mt-4 {
1381
+ margin-top: 1rem;
1382
+ }
1383
+
1385
1384
  .mr-4 {
1386
1385
  margin-right: 1rem;
1387
1386
  }
@@ -1406,10 +1405,6 @@ video {
1406
1405
  margin-left: 1.5rem;
1407
1406
  }
1408
1407
 
1409
- .mt-8 {
1410
- margin-top: 2rem;
1411
- }
1412
-
1413
1408
  .ml-10 {
1414
1409
  margin-left: 2.5rem;
1415
1410
  }
@@ -2054,6 +2049,10 @@ video {
2054
2049
  width: 6rem;
2055
2050
  }
2056
2051
 
2052
+ .w-36 {
2053
+ width: 9rem;
2054
+ }
2055
+
2057
2056
  .w-46 {
2058
2057
  width: 11.5rem;
2059
2058
  }
@@ -2066,10 +2065,6 @@ video {
2066
2065
  width: 26rem;
2067
2066
  }
2068
2067
 
2069
- .w-200 {
2070
- width: 50rem;
2071
- }
2072
-
2073
2068
  .w-auto {
2074
2069
  width: auto;
2075
2070
  }
@@ -1130,49 +1130,42 @@ Title.defaultProps = {
1130
1130
  type: "base"
1131
1131
  };
1132
1132
 
1133
- CenteredHero.propTypes = {
1134
- title: PropTypes.string,
1135
- text: PropTypes.string,
1136
- image: PropTypes.string,
1137
- buttons: /*#__PURE__*/PropTypes.arrayOf( /*#__PURE__*/PropTypes.shape({
1138
- title: PropTypes.string.isRequired,
1139
- handleOnClick: PropTypes.func.isRequired,
1140
- type: /*#__PURE__*/PropTypes.oneOf([BUTTON_ROLES.PRIMARY, BUTTON_ROLES.SECONDARY]).isRequired
1141
- })),
1142
- className: PropTypes.string
1143
- };
1144
-
1145
- function CenteredHero(_ref) {
1133
+ var CenteredHero = function CenteredHero(_ref) {
1146
1134
  var title = _ref.title,
1147
1135
  text = _ref.text,
1148
1136
  image = _ref.image,
1149
1137
  buttons = _ref.buttons,
1150
- className = _ref.className;
1138
+ _ref$background = _ref.background,
1139
+ background = _ref$background === void 0 ? "slate-50" : _ref$background;
1151
1140
  return /*#__PURE__*/React__default.createElement("div", {
1152
- className: classNames(className, "p-6 my-6 flex flex-col items-center w-200 ml-auto mr-auto")
1141
+ className: classNames("p-6 flex flex-col items-center align-center w-full", {
1142
+ "bg-white": background === "white",
1143
+ "bg-slate-50": background === "slate-50"
1144
+ })
1153
1145
  }, image && /*#__PURE__*/React__default.createElement("img", {
1154
- src: image
1146
+ src: image,
1147
+ className: "h-36 w-36 mb-4"
1155
1148
  }), title && /*#__PURE__*/React__default.createElement(Title, {
1156
- className: "mt-8 mb-2",
1157
1149
  text: title,
1158
1150
  type: "base"
1159
1151
  }), text && /*#__PURE__*/React__default.createElement(Text, {
1160
1152
  text: text
1161
1153
  }), (buttons == null ? void 0 : buttons.length) > 0 && /*#__PURE__*/React__default.createElement("div", {
1162
- className: "flex flex-row mt-8"
1154
+ className: "flex flex-row mt-4"
1163
1155
  }, buttons.filter(function (button) {
1164
1156
  return button.title && button.handleOnClick && button.type;
1165
1157
  }).map(function (button) {
1166
1158
  return /*#__PURE__*/React__default.createElement(Button, {
1167
1159
  className: "mr-4 last:mr-0",
1168
1160
  key: button.title,
1169
- role: button.type,
1161
+ role: button.role,
1162
+ type: button.type,
1170
1163
  title: button.title,
1171
- text: button.title,
1164
+ text: button.text,
1172
1165
  onClick: button.handleOnClick
1173
1166
  });
1174
1167
  })));
1175
- }
1168
+ };
1176
1169
 
1177
1170
  var css_248z$5 = ".cweb-checkbox {\n outline: none;\n transition: all 0.3s ease;\n}\n\n.cweb-checkbox .cweb-checkbox-input {\n position: absolute;\n -webkit-appearance: none;\n height: 1px;\n opacity: 0;\n width: 1px;\n}\n\n.cweb-checkbox.type-regular .cweb-checkbox-label {\n display: flex;\n align-items: center;\n margin-bottom: 0;\n}\n\n.cweb-checkbox.type-regular .cweb-checkbox-icon-container {\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n border: 1px solid #cccccc;\n border-radius: 4px;\n}\n\n.cweb-checkbox.type-regular.hasError .cweb-checkbox-icon-container {\n border: 1px solid #ff6266;\n}\n\n.cweb-checkbox.type-regular .cweb-checkbox-icon {\n display: block;\n}\n\n.cweb-checkbox.type-regular.is-focused .cweb-checkbox-icon-container {\n border-color: #0074dd;\n}\n\n.cweb-checkbox.type-regular.is-checked .cweb-checkbox-icon {\n width: 0.5rem;\n height: 0.5rem;\n padding: 4px;\n background: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2210%22 height%3D%228%22 viewBox%3D%220 0 10 8%22 fill%3D%22none%22%3E %3Cpath d%3D%22M9.207 0.792787C9.39447 0.980314 9.49979 1.23462 9.49979 1.49979C9.49979 1.76495 9.39447 2.01926 9.207 2.20679L4.207 7.20679C4.01947 7.39426 3.76516 7.49957 3.5 7.49957C3.23484 7.49957 2.98053 7.39426 2.793 7.20679L0.793 5.20679C0.610842 5.01818 0.510047 4.76558 0.512326 4.50339C0.514604 4.24119 0.619773 3.99038 0.805181 3.80497C0.990589 3.61956 1.2414 3.51439 1.5036 3.51211C1.7658 3.50983 2.0184 3.61063 2.207 3.79279L3.5 5.08579L7.793 0.792787C7.98053 0.605316 8.23484 0.5 8.5 0.5C8.76516 0.5 9.01947 0.605316 9.207 0.792787Z%22 fill%3D%22white%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-checkbox.type-regular.is-indeterminate .cweb-checkbox-icon {\n width: 0.5rem;\n height: 0.5rem;\n padding: 4px;\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%222%22 viewBox%3D%220 0 10 2%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M9 -4.37114e-08C9.55228 -1.95703e-08 10 0.447715 10 1C10 1.55228 9.55228 2 9 2L1 2C0.447716 2 -6.78525e-08 1.55228 -4.37114e-08 1C-1.95703e-08 0.447715 0.447715 -4.17544e-07 1 -3.93402e-07L9 -4.37114e-08Z%22 fill%3D%22white%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-checkbox.type-regular.is-disabled.show-cross-when-disabled .cweb-checkbox-icon {\n width: 10px;\n height: 10px;\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2211px%22 height%3D%2211px%22 viewBox%3D%220 0 11 11%22 version%3D%221.1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cg stroke%3D%22none%22 stroke-width%3D%221%22 fill%3D%22none%22 fill-rule%3D%22evenodd%22 stroke-linecap%3D%22round%22%3E %3Cg transform%3D%22translate(-6.000000%2C -7.000000)%22 stroke%3D%22%232D2D2D%22 stroke-width%3D%222%22%3E %3Cpath d%3D%22M7%2C17 L16%2C8 M16%2C17 L7%2C8%22 %2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n opacity: 0.6;\n}\n\n.cweb-checkbox.type-switch .cweb-checkbox-label {\n display: flex;\n align-items: center;\n margin-bottom: 0;\n width: 56px;\n height: 28px;\n position: relative;\n}\n\n.cweb-checkbox.type-switch .cweb-checkbox-icon-container {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #d1d5db;\n border-radius: 16px;\n}\n\n.cweb-checkbox.type-switch .cweb-checkbox-icon-container:after {\n position: relative;\n display: block;\n content: \"\";\n height: 20px;\n width: 20px;\n top: 4px;\n left: 4px;\n background-color: white;\n border-radius: 50%;\n transition: all 0.2s ease;\n}\n\n.cweb-checkbox.type-switch.is-checked .cweb-checkbox-icon-container {\n background-color: #6abfa6;\n}\n\n.cweb-checkbox.type-switch.is-checked .cweb-checkbox-icon-container:after {\n left: 32px;\n}\n";
1178
1171
  styleInject(css_248z$5);