@appcorp/kismaa-web-ui 0.2.57 → 0.2.59
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/atoms/active-icon.js
CHANGED
|
@@ -14,6 +14,6 @@ var statusColorMap = (_a = {},
|
|
|
14
14
|
_a);
|
|
15
15
|
var ActiveIcon = function (_a) {
|
|
16
16
|
var onlineStatus = _a.onlineStatus;
|
|
17
|
-
return (react_1.default.createElement("div", { className: "w-fit rounded-full border-2 border-white p-1.5 shadow-[0px_0px_5px_2px_#00000080]
|
|
17
|
+
return (react_1.default.createElement("div", { className: "w-fit rounded-full border-2 border-white p-1.5 shadow-[0px_0px_5px_2px_#00000080] ".concat(statusColorMap[onlineStatus]) }));
|
|
18
18
|
};
|
|
19
19
|
exports.ActiveIcon = ActiveIcon;
|
|
@@ -50,7 +50,7 @@ exports.sizeMap = (_d = {},
|
|
|
50
50
|
var Button = function (_a) {
|
|
51
51
|
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, handleOnClick = _a.handleOnClick, iconPrefix = _a.iconPrefix, iconSuffix = _a.iconSuffix, label = _a.label, _c = _a.outlined, outlined = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? type_1.BUTTON_SIZES.MD : _d, type = _a.type;
|
|
52
52
|
var disabledStyles = 'opacity-50 cursor-not-allowed';
|
|
53
|
-
var buttonClasses = "flex items-center justify-center gap-2 rounded-md w-[100%] cursor-pointer ".concat(outlined ? outlinedColorMap[type] : exports.colorMap[type], " ").concat(disabled || type === type_1.BUTTON_TYPES.LOADING
|
|
53
|
+
var buttonClasses = "flex items-center justify-center gap-2 rounded-md w-[100%] cursor-pointer whitespace-nowrap ".concat(outlined ? outlinedColorMap[type] : exports.colorMap[type], " ").concat(disabled || type === type_1.BUTTON_TYPES.LOADING
|
|
54
54
|
? disabledStyles
|
|
55
55
|
: type === type_1.BUTTON_TYPES.SUCCESS || type === type_1.BUTTON_TYPES.ERROR
|
|
56
56
|
? ''
|
|
@@ -17,12 +17,12 @@ var ratings_1 = require("../ratings");
|
|
|
17
17
|
var solid_1 = require("@heroicons/react/24/solid");
|
|
18
18
|
var UserCard = function (_a) {
|
|
19
19
|
var badges = _a.badges, description = _a.description, handleButtonClick = _a.handleButtonClick, handleCardClick = _a.handleCardClick, handleIsFavorite = _a.handleIsFavorite, id = _a.id, imageAlt = _a.imageAlt, imageSrc = _a.imageSrc, isFavorite = _a.isFavorite, isHovered = _a.isHovered, loggedInUser = _a.loggedInUser, name = _a.name, onlineStatus = _a.onlineStatus, price = _a.price, rating = _a.rating, setIsHovered = _a.setIsHovered, username = _a.username;
|
|
20
|
-
return (react_1.default.createElement("div", { className: "w-full overflow-hidden rounded-xl shadow-[0px_5px_16px_0px_#0000001A] hover:cursor-pointer lg:max-w-[415px]",
|
|
20
|
+
return (react_1.default.createElement("div", { className: "w-full overflow-hidden rounded-xl shadow-[0px_5px_16px_0px_#0000001A] hover:cursor-pointer lg:max-w-[415px]", onClick: function (e) {
|
|
21
21
|
e.stopPropagation();
|
|
22
22
|
handleCardClick(username);
|
|
23
23
|
} },
|
|
24
|
-
react_1.default.createElement("div", { className: "relative overflow-hidden rounded-xl" },
|
|
25
|
-
react_1.default.createElement("div", { className: "absolute top-
|
|
24
|
+
react_1.default.createElement("div", { className: "relative overflow-hidden rounded-xl", onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } },
|
|
25
|
+
react_1.default.createElement("div", { className: "absolute top-2 right-2 z-10" },
|
|
26
26
|
react_1.default.createElement(active_icon_1.ActiveIcon, { onlineStatus: onlineStatus })),
|
|
27
27
|
react_1.default.createElement("div", { className: "" },
|
|
28
28
|
react_1.default.createElement("div", { className: "relative h-64 w-full" },
|
|
@@ -56,7 +56,7 @@ var UserCard = function (_a) {
|
|
|
56
56
|
price.duration,
|
|
57
57
|
"min")),
|
|
58
58
|
(loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.userType) &&
|
|
59
|
-
loggedInUser.userType == kismaa_utils_1.USER_TYPE.USER && (react_1.default.createElement("div", { className: "absolute right-
|
|
59
|
+
loggedInUser.userType == kismaa_utils_1.USER_TYPE.USER && (react_1.default.createElement("div", { className: "absolute right-2 bottom-2 z-10 cursor-pointer" }, isFavorite ? (react_1.default.createElement("div", { onClick: function (e) {
|
|
60
60
|
e.stopPropagation();
|
|
61
61
|
handleIsFavorite(id);
|
|
62
62
|
} },
|