@luscii-healthtech/web-ui 2.5.2 → 2.7.1
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.
- package/dist/components/CenteredHero/CenteredHero.d.ts +11 -21
- package/dist/web-ui-tailwind.css +10 -15
- package/dist/web-ui.cjs.development.js +18 -23
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +18 -23
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CenteredHero/CenteredHero.tsx +63 -0
- package/src/components/List/ListItem.tsx +1 -0
- package/src/components/LoadingIndicator/LoadingIndicator.tsx +1 -0
- package/src/components/Radio/RadioV2.tsx +1 -1
- package/src/components/Toaster/Toaster.scss +6 -2
- package/src/components/Toaster/Toaster.tsx +1 -1
- package/src/components/CenteredHero/CenteredHero.js +0 -50
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
11
|
+
declare const CenteredHero: ({ title, text, image, buttons, background, }: CenteredHeroProps) => JSX.Element;
|
|
12
|
+
export default CenteredHero;
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -691,8 +691,8 @@ video {
|
|
|
691
691
|
|
|
692
692
|
.bg-red-400 {
|
|
693
693
|
--bg-opacity: 1;
|
|
694
|
-
background-color: #
|
|
695
|
-
background-color: rgba(
|
|
694
|
+
background-color: #FF6266;
|
|
695
|
+
background-color: rgba(255, 98, 102, var(--bg-opacity));
|
|
696
696
|
}
|
|
697
697
|
|
|
698
698
|
.bg-orange-50 {
|
|
@@ -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
|
}
|
|
@@ -177,7 +177,7 @@ var WarningIcon = function WarningIcon(props) {
|
|
|
177
177
|
}));
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
var css_248z$1 = "#application-toaster {\n position: fixed;\n left: 50%;\n transform: translate(-50%,
|
|
180
|
+
var css_248z$1 = "#application-toaster {\n position: fixed;\n left: 50%;\n transform: translate(-50%, 200%);\n bottom: 48px;\n transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);\n}\n\n#application-toaster.shelved {\n transform: translate(-50%, 200%);\n}\n\n#application-toaster.expanded {\n transform: translate(-50%, 0);\n}\n\n#application-toaster.type-success {\n --bg-opacity: 1;\n background-color: #E7F5EC;\n background-color: rgba(231, 245, 236, var(--bg-opacity));\n}\n\n#application-toaster.type-success [data-test-id=\"toaster-title\"] {\n --text-opacity: 1;\n color: #2f855a;\n color: rgba(47, 133, 90, var(--text-opacity));\n}\n\n#application-toaster.type-success .failure-icon {\n display: none;\n}\n\n#application-toaster.type-success [data-test-id=\"toaster-progress-bar-container\"] {\n --bg-opacity: 1;\n background-color: #E7F5EC;\n background-color: rgba(231, 245, 236, var(--bg-opacity));\n}\n\n#application-toaster.type-success [data-test-id=\"toaster-progress-bar-container\"] [data-test-id=\"toaster-progress-bar\"] {\n --bg-opacity: 1;\n background-color: #52B093;\n background-color: rgba(82, 176, 147, var(--bg-opacity));\n}\n\n#application-toaster.type-failure {\n --bg-opacity: 1;\n background-color: #FFF1F1;\n background-color: rgba(255, 241, 241, var(--bg-opacity));\n}\n\n#application-toaster.type-failure [data-test-id=\"toaster-title\"] {\n --text-opacity: 1;\n color: #c53030;\n color: rgba(197, 48, 48, var(--text-opacity));\n}\n\n#application-toaster.type-failure .success-icon {\n display: none;\n}\n\n#application-toaster.type-failure [data-test-id=\"toaster-progress-bar-container\"] {\n --bg-opacity: 1;\n background-color: #FFF1F1;\n background-color: rgba(255, 241, 241, var(--bg-opacity));\n}\n\n#application-toaster.type-failure [data-test-id=\"toaster-progress-bar-container\"] [data-test-id=\"toaster-progress-bar\"] {\n --bg-opacity: 1;\n background-color: #FF6266;\n background-color: rgba(255, 98, 102, var(--bg-opacity));\n}\n";
|
|
181
181
|
styleInject(css_248z$1);
|
|
182
182
|
|
|
183
183
|
var TOASTER_TYPE_OPTIONS = {
|
|
@@ -200,7 +200,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
200
200
|
style: styleOverwrite,
|
|
201
201
|
id: "application-toaster",
|
|
202
202
|
"data-test-id": "toaster-panel-" + type,
|
|
203
|
-
className: classNames("bg-white cursor-pointer", "rounded-md shadow-
|
|
203
|
+
className: classNames("bg-white cursor-pointer", "rounded-md shadow-lg", "min-h-13 max-h-19 w-104 transition-transform", {
|
|
204
204
|
shelved: !isVisible,
|
|
205
205
|
expanded: isVisible,
|
|
206
206
|
"type-success": isSuccess,
|
|
@@ -1130,49 +1130,42 @@ Title.defaultProps = {
|
|
|
1130
1130
|
type: "base"
|
|
1131
1131
|
};
|
|
1132
1132
|
|
|
1133
|
-
CenteredHero
|
|
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
|
-
|
|
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(
|
|
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-
|
|
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.
|
|
1161
|
+
role: button.role,
|
|
1162
|
+
type: button.type,
|
|
1170
1163
|
title: button.title,
|
|
1171
|
-
text: button.
|
|
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);
|
|
@@ -2289,6 +2282,7 @@ function LoadingIndicator(_ref) {
|
|
|
2289
2282
|
className: containerClassName
|
|
2290
2283
|
}), /*#__PURE__*/React__default.createElement("img", {
|
|
2291
2284
|
src: asSpinner ? spinnerToRender : img$e,
|
|
2285
|
+
"data-chromatic": "ignore",
|
|
2292
2286
|
className: classNames("text-gray-600 fill-current stroke-current", {
|
|
2293
2287
|
"h-4 w-4": asSpinner,
|
|
2294
2288
|
"h-12 w-12": !asSpinner
|
|
@@ -2920,6 +2914,7 @@ var ListItem = function ListItem(_ref) {
|
|
|
2920
2914
|
className: "w-6 h-6"
|
|
2921
2915
|
}), !loadIconError && icon && typeof icon === "string" && /*#__PURE__*/React__default.createElement("img", {
|
|
2922
2916
|
src: icon,
|
|
2917
|
+
"data-chromatic": "ignore",
|
|
2923
2918
|
alt: "list-item-icon",
|
|
2924
2919
|
className: "w-6 h-6 text-sm",
|
|
2925
2920
|
onLoad: onListItemIconLoad,
|