@appcorp/kismaa-web-ui 0.2.23 → 0.2.25

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.
@@ -11,7 +11,7 @@ var horizontal_divider_1 = require("../../molecules/horizontal-divider/horizonta
11
11
  var react_1 = __importDefault(require("react"));
12
12
  var image_1 = __importDefault(require("next/image"));
13
13
  var ExtendedUserCard = function (_a) {
14
- var avgRating = _a.avgRating, expertIn = _a.expertIn, fee = _a.fee, imageUrl = _a.imageUrl, onChatClick = _a.onChatClick, onlineStatus = _a.onlineStatus, otherExpertise = _a.otherExpertise, title = _a.title, totalChat = _a.totalChat, totalRating = _a.totalRating;
14
+ var avgRating = _a.avgRating, buttonDisabled = _a.buttonDisabled, expertIn = _a.expertIn, rate = _a.rate, imageUrl = _a.imageUrl, onChatClick = _a.onChatClick, onlineStatus = _a.onlineStatus, otherExpertise = _a.otherExpertise, title = _a.title, totalChat = _a.totalChat, totalRating = _a.totalRating;
15
15
  return (react_1.default.createElement("div", { className: "overflow-hidden rounded-xl border-[1px] border-gray-300" },
16
16
  react_1.default.createElement("div", { className: "relative" },
17
17
  react_1.default.createElement("div", { className: "absolute top-3 right-3 z-10" },
@@ -25,7 +25,7 @@ var ExtendedUserCard = function (_a) {
25
25
  react_1.default.createElement("div", { className: "w-[50%] text-gray-400" },
26
26
  react_1.default.createElement(molecules_1.Typography, { variant: molecules_1.TYPOGRAPHY_VARIANTS.P2 }, "Fee")),
27
27
  react_1.default.createElement("div", { className: "w-[50%]" },
28
- react_1.default.createElement(molecules_1.Typography, { variant: molecules_1.TYPOGRAPHY_VARIANTS.SUBH3 }, fee))),
28
+ react_1.default.createElement(molecules_1.Typography, { variant: molecules_1.TYPOGRAPHY_VARIANTS.SUBH3 }, rate))),
29
29
  react_1.default.createElement(horizontal_divider_1.HorizontalDivider, null),
30
30
  react_1.default.createElement("div", { className: "my-3 flex w-full items-center" },
31
31
  react_1.default.createElement("div", { className: "w-[50%] text-gray-400" },
@@ -57,6 +57,6 @@ var ExtendedUserCard = function (_a) {
57
57
  react_1.default.createElement(molecules_1.Typography, { variant: molecules_1.TYPOGRAPHY_VARIANTS.P2 }, "Other expertise")),
58
58
  react_1.default.createElement("div", { className: "flex w-[50%] flex-col gap-2" }, otherExpertise.map(function (expertise) { return (react_1.default.createElement(molecules_1.Badge, { key: expertise.label, label: expertise.label, type: type_1.BADGE_TYPE.CARD_BADGE })); }))),
59
59
  react_1.default.createElement("div", { className: "mt-7 w-full" },
60
- react_1.default.createElement(molecules_1.Button, { label: "Chat Now", size: molecules_1.BUTTON_SIZES.MD, type: molecules_1.BUTTON_TYPES.PRIMARY, handleOnClick: onChatClick })))));
60
+ react_1.default.createElement(molecules_1.Button, { disabled: buttonDisabled, label: "Chat Now", size: molecules_1.BUTTON_SIZES.MD, type: molecules_1.BUTTON_TYPES.PRIMARY, handleOnClick: onChatClick })))));
61
61
  };
62
62
  exports.ExtendedUserCard = ExtendedUserCard;
@@ -6,11 +6,12 @@ exports.extendedUserCardData = {
6
6
  onlineStatus: kismaa_utils_1.PSYCHIC_ONLINE_STATUS.OFFLINE,
7
7
  imageUrl: 'https://ytiwekjzaihrkrirjgpk.supabase.co/storage/v1/object/public/publicBlob/assets/psychic.webp',
8
8
  title: 'TRUE HEALER',
9
- fee: '$199.00/min',
9
+ rate: '$199.00/min',
10
10
  avgRating: 5,
11
11
  totalRating: 100,
12
12
  totalChat: 50,
13
13
  expertIn: 'Love Psychics',
14
14
  otherExpertise: [{ label: 'Aura Cleansing' }, { label: 'Angel Readings' }],
15
15
  onChatClick: function () { return console.log('Chat button clicked'); },
16
+ buttonDisabled: false,
16
17
  };
@@ -3,14 +3,15 @@ export interface Expertise {
3
3
  label: string;
4
4
  }
5
5
  export interface ExtendedUserCardProps {
6
- onlineStatus: PSYCHIC_ONLINE_STATUS;
7
- imageUrl: string;
8
- title: string;
9
- fee: string;
10
6
  avgRating: number;
11
- totalRating: number;
12
- totalChat: number;
7
+ buttonDisabled: boolean;
13
8
  expertIn: string;
14
- otherExpertise: Expertise[];
9
+ rate: string;
10
+ imageUrl: string;
15
11
  onChatClick: () => void;
12
+ onlineStatus: PSYCHIC_ONLINE_STATUS;
13
+ otherExpertise: Expertise[];
14
+ title: string;
15
+ totalChat: number;
16
+ totalRating: number;
16
17
  }
@@ -19,8 +19,8 @@ var ReviewCard = function (_a) {
19
19
  react_1.default.createElement("div", { className: "grid grid-cols-2" },
20
20
  react_1.default.createElement(quote_icon_1.QuoteIcon, { fill: isActive ? '#FFF' : quoteIconFill, className: "size-10" }),
21
21
  react_1.default.createElement("div", { className: "flex flex-row-reverse gap-2" },
22
- isTrustPilot && (react_1.default.createElement("div", { className: "relative size-10" },
23
- react_1.default.createElement(image_1.default, { alt: "Trustpilot logo", fill: true, height: 0, sizes: "20vw", src: trustPilotSrc, width: 0 }))),
22
+ isTrustPilot && (react_1.default.createElement("div", { className: "relative h-8 w-8 shrink-0" },
23
+ react_1.default.createElement(image_1.default, { alt: "Trustpilot logo", fill: true, height: 0, sizes: "8vw", src: trustPilotSrc, width: 0 }))),
24
24
  react_1.default.createElement("div", { className: "flex flex-col items-end" },
25
25
  react_1.default.createElement("div", { className: "font-secondary" },
26
26
  react_1.default.createElement(molecules_1.Typography, { variant: molecules_1.TYPOGRAPHY_VARIANTS.H5 }, (0, util_functions_1.truncateText)(name, 7))),
@@ -12,11 +12,6 @@ var UserDetailBanner = function (_a) {
12
12
  react_1.default.createElement("div", { className: "text-gray-800" },
13
13
  react_1.default.createElement(molecules_1.Typography, { variant: molecules_1.TYPOGRAPHY_VARIANTS.H2 },
14
14
  "Hi! I am ",
15
- react_1.default.createElement("span", { className: "text-primary" }, userName))),
16
- react_1.default.createElement("div", { className: "mt-5 min-h-80 w-full overflow-hidden rounded-xl", style: {
17
- backgroundImage: "url(".concat(bannerImageSrc, ")"),
18
- backgroundSize: 'cover',
19
- backgroundPosition: 'center',
20
- } })));
15
+ react_1.default.createElement("span", { className: "text-primary" }, userName)))));
21
16
  };
22
17
  exports.UserDetailBanner = UserDetailBanner;
@@ -24,6 +24,7 @@ exports.userDetailsData = {
24
24
  { label: 'Aura Cleansing' },
25
25
  { label: 'Angel Readings' },
26
26
  ],
27
- fee: '$199.00/min',
27
+ rate: '$199.00/min',
28
28
  breadcrumbs: { items: [] },
29
+ chatButtonDisabled: false,
29
30
  };
@@ -8,15 +8,16 @@ export interface UserDetailsProps {
8
8
  avgRating: number;
9
9
  bannerImageSrc: string;
10
10
  breadcrumbs: BreadcrumbsProps;
11
+ chatButtonDisabled: boolean;
11
12
  description: string;
12
13
  expertIn: string;
13
- fee: string;
14
+ rate: string;
14
15
  heading: string;
15
16
  onChatClick: () => void;
16
17
  onlineStatus: PSYCHIC_ONLINE_STATUS;
17
18
  otherExpertise: Expertise[];
18
- profileImageSrc: string;
19
19
  profileImageAlt: string;
20
+ profileImageSrc: string;
20
21
  title: string;
21
22
  totalChat: number;
22
23
  totalRating: number;
@@ -11,13 +11,13 @@ var extended_user_card_1 = require("../extended-user-card");
11
11
  var attributes_section_1 = require("../attributes-section");
12
12
  var section_header_1 = require("../section-header");
13
13
  var UserDetails = function (_a) {
14
- var aboutTitle = _a.aboutTitle, attributesData = _a.attributesData, avgRating = _a.avgRating, bannerImageSrc = _a.bannerImageSrc, breadcrumbs = _a.breadcrumbs, description = _a.description, expertIn = _a.expertIn, fee = _a.fee, heading = _a.heading, onChatClick = _a.onChatClick, onlineStatus = _a.onlineStatus, otherExpertise = _a.otherExpertise, profileImageSrc = _a.profileImageSrc, title = _a.title, totalChat = _a.totalChat, totalRating = _a.totalRating, userName = _a.userName;
14
+ var aboutTitle = _a.aboutTitle, attributesData = _a.attributesData, avgRating = _a.avgRating, bannerImageSrc = _a.bannerImageSrc, breadcrumbs = _a.breadcrumbs, chatButtonDisabled = _a.chatButtonDisabled, description = _a.description, expertIn = _a.expertIn, heading = _a.heading, onChatClick = _a.onChatClick, onlineStatus = _a.onlineStatus, otherExpertise = _a.otherExpertise, profileImageSrc = _a.profileImageSrc, rate = _a.rate, title = _a.title, totalChat = _a.totalChat, totalRating = _a.totalRating, userName = _a.userName;
15
15
  return (react_1.default.createElement("section", { className: "kismaa-section-spacing bg-white" },
16
16
  react_1.default.createElement("div", { className: "kismaa-container" },
17
17
  react_1.default.createElement(section_header_1.SectionHeader, { heading: heading, subheading: "", renderCtaButton: false, handleButtonClick: function () { return null; }, breadcrumbs: breadcrumbs }),
18
18
  react_1.default.createElement("div", { className: "grid w-full gap-6 xl:grid-cols-12 xl:gap-24" },
19
19
  react_1.default.createElement("div", { className: "block w-full md:hidden lg:hidden xl:hidden" },
20
- react_1.default.createElement(extended_user_card_1.ExtendedUserCard, { avgRating: avgRating, expertIn: expertIn, fee: fee, imageUrl: profileImageSrc, onChatClick: onChatClick, onlineStatus: onlineStatus, otherExpertise: otherExpertise, title: title, totalChat: totalChat, totalRating: totalRating })),
20
+ react_1.default.createElement(extended_user_card_1.ExtendedUserCard, { avgRating: avgRating, buttonDisabled: chatButtonDisabled, expertIn: expertIn, rate: rate, imageUrl: profileImageSrc, onChatClick: onChatClick, onlineStatus: onlineStatus, otherExpertise: otherExpertise, title: title, totalChat: totalChat, totalRating: totalRating })),
21
21
  react_1.default.createElement("div", { className: "w-full lg:col-span-7 xl:col-span-8" },
22
22
  react_1.default.createElement("div", { className: "mt-4 lg:mt-9" },
23
23
  react_1.default.createElement(user_detail_banner_1.UserDetailBanner, { userName: userName, bannerImageSrc: bannerImageSrc })),
@@ -27,8 +27,8 @@ var UserDetails = function (_a) {
27
27
  react_1.default.createElement("div", { className: "lg:col-span-7 xl:col-span-9" },
28
28
  react_1.default.createElement(attributes_section_1.AttributeSection, { attributesData: attributesData })),
29
29
  react_1.default.createElement("div", { className: "hidden w-full md:block lg:col-span-5 xl:hidden" },
30
- react_1.default.createElement(extended_user_card_1.ExtendedUserCard, { onlineStatus: onlineStatus, imageUrl: profileImageSrc, onChatClick: onChatClick, otherExpertise: otherExpertise, fee: fee, title: title, avgRating: avgRating, totalRating: totalRating, totalChat: totalChat, expertIn: expertIn })))),
30
+ react_1.default.createElement(extended_user_card_1.ExtendedUserCard, { avgRating: avgRating, buttonDisabled: chatButtonDisabled, expertIn: expertIn, rate: rate, imageUrl: profileImageSrc, onChatClick: onChatClick, onlineStatus: onlineStatus, otherExpertise: otherExpertise, title: title, totalChat: totalChat, totalRating: totalRating })))),
31
31
  react_1.default.createElement("div", { className: "hidden w-full lg:col-span-4 lg:hidden xl:block" },
32
- react_1.default.createElement(extended_user_card_1.ExtendedUserCard, { onlineStatus: onlineStatus, imageUrl: profileImageSrc, onChatClick: onChatClick, otherExpertise: otherExpertise, fee: fee, title: title, avgRating: avgRating, totalRating: totalRating, totalChat: totalChat, expertIn: expertIn }))))));
32
+ react_1.default.createElement(extended_user_card_1.ExtendedUserCard, { avgRating: avgRating, buttonDisabled: chatButtonDisabled, expertIn: expertIn, rate: rate, imageUrl: profileImageSrc, onChatClick: onChatClick, onlineStatus: onlineStatus, otherExpertise: otherExpertise, title: title, totalChat: totalChat, totalRating: totalRating }))))));
33
33
  };
34
34
  exports.UserDetails = UserDetails;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/kismaa-web-ui",
3
- "version": "0.2.23",
3
+ "version": "0.2.25",
4
4
  "source": "src/index.ts",
5
5
  "main": "lib/main.js",
6
6
  "module": "lib/module.js",
@@ -43,9 +43,9 @@
43
43
  }
44
44
  },
45
45
  "devDependencies": {
46
- "@appcorp/app-corp-designs": "^0.4.89",
47
- "@appcorp/app-corp-vista": "^0.2.76",
48
- "@appcorp/kismaa-utils": "^0.2.22",
46
+ "@appcorp/app-corp-designs": "^0.4.90",
47
+ "@appcorp/app-corp-vista": "^0.2.83",
48
+ "@appcorp/kismaa-utils": "^0.2.24",
49
49
  "@chromatic-com/storybook": "3.2.6",
50
50
  "@eslint/compat": "^1.2.8",
51
51
  "@headlessui/react": "^2",
@@ -55,7 +55,7 @@
55
55
  "@mdx-js/react": "^3",
56
56
  "@next/eslint-plugin-next": "^15",
57
57
  "@next/mdx": "^15",
58
- "@react-pakistan/util-functions": "^1.24.35",
58
+ "@react-pakistan/util-functions": "^1.24.38",
59
59
  "@storybook/addon-essentials": "^8",
60
60
  "@storybook/addon-interactions": "^8",
61
61
  "@storybook/addon-links": "^8",