@aslaluroba/help-center-react 3.2.4 → 3.2.6

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.
Files changed (103) hide show
  1. package/README.md +0 -3
  2. package/dist/components/shared/Button/button.d.ts +3 -3
  3. package/dist/components/ui/index.d.ts +0 -1
  4. package/dist/core/AblyService.d.ts +4 -1
  5. package/dist/core/api.d.ts +4 -4
  6. package/dist/index.css +1 -1
  7. package/dist/index.esm.js +16040 -15655
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +16043 -15664
  10. package/dist/index.js.map +1 -1
  11. package/dist/lib/custom-hooks/useActionHandler.d.ts +8 -0
  12. package/dist/lib/index.d.ts +1 -0
  13. package/dist/lib/theme-utils.d.ts +0 -9
  14. package/dist/lib/types.d.ts +6 -3
  15. package/dist/services.esm.js +9588 -9443
  16. package/dist/services.esm.js.map +1 -1
  17. package/dist/services.js +9582 -9439
  18. package/dist/services.js.map +1 -1
  19. package/dist/ui/chatbot-popup/active-chat-actions.d.ts +7 -0
  20. package/dist/ui/chatbot-popup/chat-window-screen/action-button.d.ts +10 -0
  21. package/dist/ui/chatbot-popup/chat-window-screen/footer.d.ts +1 -0
  22. package/dist/ui/chatbot-popup/chat-window-screen/header.d.ts +2 -5
  23. package/dist/ui/chatbot-popup/chat-window-screen/in-chat-review.d.ts +9 -0
  24. package/dist/ui/chatbot-popup/chat-window-screen/index.d.ts +7 -3
  25. package/dist/ui/chatbot-popup/chat-window-screen/typing-indicator.d.ts +6 -0
  26. package/dist/ui/chatbot-popup/error-screen/index.d.ts +0 -1
  27. package/dist/ui/chatbot-popup/loading-screen/index.d.ts +0 -2
  28. package/dist/ui/chatbot-popup/options-list-screen/company-card.d.ts +9 -0
  29. package/dist/ui/chatbot-popup/options-list-screen/header.d.ts +1 -2
  30. package/dist/ui/chatbot-popup/options-list-screen/helpscreen-intro.d.ts +6 -0
  31. package/dist/ui/chatbot-popup/options-list-screen/helpscreen-list.d.ts +10 -0
  32. package/dist/ui/chatbot-popup/options-list-screen/helpscreen-option.d.ts +9 -0
  33. package/dist/ui/chatbot-popup/options-list-screen/index.d.ts +1 -4
  34. package/dist/ui/help-center.d.ts +2 -5
  35. package/dist/ui/help-popup.d.ts +16 -7
  36. package/dist/ui/review-dialog/index.d.ts +2 -1
  37. package/package.json +35 -29
  38. package/src/components/shared/Button/button.tsx +11 -18
  39. package/src/components/shared/Card/card.tsx +8 -8
  40. package/src/components/ui/agent-response/agent-response.tsx +4 -4
  41. package/src/components/ui/image-attachment.tsx +8 -8
  42. package/src/components/ui/image-preview-dialog.tsx +41 -41
  43. package/src/components/ui/index.ts +0 -1
  44. package/src/core/AblyService.ts +60 -23
  45. package/src/core/api.ts +9 -7
  46. package/src/globals.css +216 -50
  47. package/src/lib/custom-hooks/useActionHandler.ts +102 -0
  48. package/src/lib/index.ts +1 -0
  49. package/src/lib/theme-utils.ts +1 -33
  50. package/src/lib/types.ts +7 -4
  51. package/src/locales/ar.json +16 -6
  52. package/src/locales/en.json +16 -6
  53. package/src/types/icons.d.ts +6 -0
  54. package/src/ui/chatbot-popup/active-chat-actions.tsx +39 -0
  55. package/src/ui/chatbot-popup/chat-window-screen/action-button.tsx +37 -0
  56. package/src/ui/chatbot-popup/chat-window-screen/footer.tsx +42 -43
  57. package/src/ui/chatbot-popup/chat-window-screen/header.tsx +34 -67
  58. package/src/ui/chatbot-popup/chat-window-screen/in-chat-review.tsx +83 -0
  59. package/src/ui/chatbot-popup/chat-window-screen/index.tsx +49 -42
  60. package/src/ui/chatbot-popup/chat-window-screen/typing-indicator.tsx +27 -0
  61. package/src/ui/chatbot-popup/error-screen/index.tsx +7 -7
  62. package/src/ui/chatbot-popup/loading-screen/index.tsx +6 -17
  63. package/src/ui/chatbot-popup/options-list-screen/company-card.tsx +37 -0
  64. package/src/ui/chatbot-popup/options-list-screen/header.tsx +12 -31
  65. package/src/ui/chatbot-popup/options-list-screen/helpscreen-intro.tsx +32 -0
  66. package/src/ui/chatbot-popup/options-list-screen/helpscreen-list.tsx +48 -0
  67. package/src/ui/chatbot-popup/options-list-screen/helpscreen-option.tsx +38 -0
  68. package/src/ui/chatbot-popup/options-list-screen/index.tsx +44 -38
  69. package/src/ui/confirmation-modal/index.tsx +27 -12
  70. package/src/ui/floating-message.tsx +8 -7
  71. package/src/ui/help-button.tsx +5 -5
  72. package/src/ui/help-center.tsx +95 -58
  73. package/src/ui/help-popup.tsx +114 -91
  74. package/src/ui/powered-by.tsx +49 -7
  75. package/src/ui/review-dialog/index.tsx +48 -65
  76. package/src/ui/review-dialog/rating.tsx +7 -7
  77. package/dist/components/ui/header.d.ts +0 -6
  78. package/dist/ui/chatbot-popup/home-screen/card.d.ts +0 -6
  79. package/dist/ui/chatbot-popup/home-screen/chat-now-card.d.ts +0 -5
  80. package/dist/ui/chatbot-popup/home-screen/index.d.ts +0 -7
  81. package/dist/ui/chatbot-popup/options-list-screen/expanded-option.d.ts +0 -7
  82. package/dist/ui/chatbot-popup/options-list-screen/option-card.d.ts +0 -5
  83. package/src/.DS_Store +0 -0
  84. package/src/assets/icons/arrowRight.svg +0 -3
  85. package/src/assets/icons/chat.svg +0 -4
  86. package/src/assets/icons/close.svg +0 -1
  87. package/src/assets/icons/closeCircle.svg +0 -3
  88. package/src/assets/icons/closeCirclePrimary.svg +0 -4
  89. package/src/assets/icons/envelope.svg +0 -3
  90. package/src/assets/icons/paperclip.svg +0 -3
  91. package/src/assets/icons/threeDots.svg +0 -3
  92. package/src/assets/icons/user.svg +0 -3
  93. package/src/assets/icons/x.svg +0 -4
  94. package/src/assets/logoColors.svg +0 -5
  95. package/src/assets/logo_ai.svg +0 -14
  96. package/src/assets/thinking-logo.svg +0 -3
  97. package/src/components/ui/header.tsx +0 -22
  98. package/src/ui/chatbot-popup/home-screen/card.tsx +0 -33
  99. package/src/ui/chatbot-popup/home-screen/chat-now-card.tsx +0 -36
  100. package/src/ui/chatbot-popup/home-screen/index.tsx +0 -44
  101. package/src/ui/chatbot-popup/options-list-screen/expanded-option.tsx +0 -37
  102. package/src/ui/chatbot-popup/options-list-screen/option-card.tsx +0 -31
  103. /package/src/assets/{icons/seperator.svg → seperator.svg} +0 -0
@@ -1,28 +1,17 @@
1
- import Header from '@/components/ui/header'
2
- import { cn } from '@/lib'
3
1
  import animatedLogo from '../../../assets/animatedLogo.gif'
2
+ import Header from '../options-list-screen/header'
4
3
 
5
4
  interface ChatBotLoadingScreenProps {
6
- isShowList: boolean
7
5
  onClose: () => void
8
- logoUrl?: string
9
6
  }
10
7
 
11
8
  const ChatBotLoadingScreen: React.FC<ChatBotLoadingScreenProps> = (props) => {
12
9
  return (
13
- <div className="babylai-w-full babylai-h-full babylai-bg-black-white-50 dark:babylai-bg-storm-dust-950 babylai-rounded-3xl babylai-shadow-lg babylai-flex babylai-flex-col">
14
- <div
15
- className={cn(
16
- 'babylai-rounded-3xl babylai-h-full babylai-flex babylai-flex-col babylai-py-6 md:babylai-py-8 babylai-px-6 babylai-gap-4 md:babylai-gap-8',
17
- {
18
- 'babylai-bg-linear-to-b': !props.isShowList,
19
- 'babylai-bg-black-white-100 dark:babylai-bg-storm-dust-950': props.isShowList
20
- }
21
- )}
22
- >
23
- <Header onClose={props.onClose} logoUrl={props.logoUrl} />
24
- <div className="babylai-flex babylai-flex-col babylai-items-center babylai-justify-center babylai-w-full babylai-h-full babylai-py-16 md:babylai-py-28">
25
- <img src={animatedLogo} alt="Animated Logo" className="babylai-w-20 babylai-h-20" />
10
+ <div className="babylai:w-full babylai:h-full babylai:bg-secondary babylai:rounded-3xl babylai:shadow-lg babylai:flex babylai:flex-col">
11
+ <div className="babylai:rounded-3xl babylai:h-full babylai:flex babylai:flex-col babylai:gap-4">
12
+ <Header onMinimize={props.onClose} />
13
+ <div className="babylai:flex babylai:flex-col babylai:items-center babylai:justify-center babylai:w-full babylai:h-full babylai:py-16 babylai:md:py-28">
14
+ <img src={animatedLogo} alt="Animated Logo" className="babylai:w-20 babylai:h-20" />
26
15
  </div>
27
16
  </div>
28
17
  </div>
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+
3
+ interface CompanyCardProps {
4
+ logoUrl?: string;
5
+ name?: string;
6
+ description?: string;
7
+ title?: string;
8
+ }
9
+
10
+ const CompanyCard: React.FC<CompanyCardProps> = ({
11
+ logoUrl,
12
+ name,
13
+ description,
14
+ title,
15
+ }) => {
16
+ return (
17
+ <section className='babylai:border-b babylai:border-black-white-200'>
18
+ <div className="babylai:flex babylai:items-center babylai:gap-3 babylai:p-6 babylai:mb-6 babylai:rounded-3xl babylai:border babylai:border-black-white-200 babylai:bg-card">
19
+ <div className="babylai:shrink-0 babylai:w-12 babylai:h-12 babylai:rounded-md babylai:overflow-hidden">
20
+ <img
21
+ src={logoUrl}
22
+ alt={title ? `${title} logo` : 'Company logo'}
23
+ className="babylai:w-full babylai:h-full babylai:object-contain"
24
+ />
25
+ </div>
26
+ <div className="babylai:flex-1 babylai:min-w-0 babylai:text-start">
27
+ <h3 className="babylai:text-lg babylai:font-semibold babylai:mb-1 babylai:text-card-foreground" dir="auto">{name}</h3>
28
+ <p className="babylai:text-sm babylai:text-muted-foreground" dir="auto">{description}</p>
29
+ </div>
30
+ </div>
31
+ </section>
32
+ );
33
+ };
34
+
35
+ CompanyCard.displayName = 'CompanyCard';
36
+
37
+ export default CompanyCard;
@@ -1,42 +1,23 @@
1
- import { Button } from '@/components';
2
- import ArrowRight from './../../../assets/icons/arrowRight.svg';
3
- import ThinkingLogo from '@/assets/thinking-logo.svg';
4
- import { useLocalTranslation } from '../../../useLocalTranslation';
5
- import CloseCircle from '../../../assets/icons/closeCirclePrimary.svg';
1
+ import ActionButton from '../chat-window-screen/action-button';
2
+ import IcRoundMinus from '~icons/ic/round-minus'
6
3
 
7
4
  interface OptionsListHeaderProps {
8
- handleBack: () => void;
9
- showHelpScreen: boolean;
5
+ onMinimize: () => void;
10
6
  }
11
7
 
12
8
  const OptionsListHeader: React.FC<OptionsListHeaderProps> = ({
13
- handleBack,
14
- showHelpScreen,
9
+ onMinimize,
15
10
  }) => {
16
- const { dir } = useLocalTranslation();
17
- const isRTL = String(dir) === "rtl";
18
11
 
19
12
  return (
20
- <header
21
- className={`babylai-flex babylai-w-full babylai-items-center babylai-mb-2 ${showHelpScreen ? "babylai-justify-end" : "babylai-justify-between"
22
- }`}
23
- >
24
- <Button
25
- variant="rounded-icon"
26
- size="icon"
27
- className="!babylai-w-12 !babylai-h-12 !babylai-bg-black-white-50 dark:!babylai-bg-storm-dust-900 babylai-relative babylai-z-10"
28
- onClick={handleBack}
29
- >
30
- {showHelpScreen ? (
31
- <ArrowRight
32
- className={`${!isRTL ? "" : "babylai-rotate-180"} babylai-text-primary-500 babylai-w-full babylai-h-full`}
33
- />
34
- ) : (
35
- <CloseCircle className="!babylai-w-full !babylai-h-full babylai-cursor-pointer babylai-text-primary-500" />
36
- )}
37
- </Button>
38
- <ThinkingLogo className="babylai-w-40 babylai-h-40 babylai-text-primary-500 babylai-absolute babylai-top-0 babylai-end-1 babylai-overflow-hidden" />
39
- </header>
13
+ <header className="bg-header babylai:flex babylai:items-center babylai:justify-end babylai:p-6 babylai:border-b babylai:border-black-white-200">
14
+ <ActionButton
15
+ onClick={onMinimize}
16
+ icon={<IcRoundMinus />}
17
+ ariaLabel="Minimize"
18
+ />
19
+ </header >
40
20
  );
41
21
  };
22
+
42
23
  export default OptionsListHeader;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+
3
+ interface HelpscreenIntroProps {
4
+ title?: string | null;
5
+ }
6
+
7
+ const HelpscreenIntro: React.FC<HelpscreenIntroProps> = ({ title }) => {
8
+ return (
9
+ <section className="babylai:flex babylai:items-center babylai:justify-center babylai:gap-3 babylai:pb-5 babylai:border-b babylai:border-black-white-200">
10
+ <svg
11
+ className="babylai:w-8 babylai:h-8"
12
+ style={{ color: 'var(--babylai-color-primary)' }}
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ viewBox="0 0 34 34"
15
+ fill="currentColor"
16
+ >
17
+ <path
18
+ d="M18.4785 1.12896C18.4758 1.11935 18.4745 1.11454 18.4739 1.11232C18.0509 -0.370772 15.9491 -0.370772 15.5261 1.11232C15.5255 1.11454 15.5242 1.11935 15.5215 1.12896C15.5143 1.15428 15.5107 1.16694 15.5074 1.17883C13.5422 8.11839 8.11839 13.5422 1.17883 15.5074C1.16694 15.5107 1.15428 15.5143 1.12895 15.5215C1.11934 15.5242 1.11454 15.5255 1.11232 15.5261C-0.370773 15.9491 -0.370773 18.0509 1.11232 18.4739C1.11454 18.4745 1.11934 18.4758 1.12896 18.4785C1.15428 18.4857 1.16694 18.4893 1.17883 18.4926C8.11839 20.4578 13.5422 25.8816 15.5074 32.8212C15.5107 32.8331 15.5143 32.8457 15.5215 32.871C15.5242 32.8807 15.5255 32.8855 15.5261 32.8877C15.9491 34.3708 18.0509 34.3708 18.4739 32.8877C18.4745 32.8855 18.4758 32.8807 18.4785 32.871C18.4857 32.8457 18.4893 32.8331 18.4926 32.8212C20.4578 25.8816 25.8816 20.4578 32.8212 18.4926C32.8331 18.4893 32.8457 18.4857 32.871 18.4785C32.8807 18.4758 32.8855 18.4745 32.8877 18.4739C34.3708 18.0509 34.3708 15.9491 32.8877 15.5261C32.8855 15.5255 32.8807 15.5242 32.871 15.5215C32.8457 15.5143 32.8331 15.5107 32.8212 15.5074C25.8816 13.5422 20.4578 8.11839 18.4926 1.17883C18.4893 1.16694 18.4857 1.15428 18.4785 1.12896Z"
19
+ fill="currentColor"
20
+ />
21
+ </svg>
22
+ <h1 className="babylai:text-2xl babylai:font-semibold babylai:text-card-foreground">
23
+ {title}
24
+ </h1>
25
+ </section>
26
+ );
27
+ };
28
+
29
+ HelpscreenIntro.displayName = 'HelpscreenIntro';
30
+
31
+ export default HelpscreenIntro;
32
+
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import { Option } from '@/lib/types';
3
+ import HelpscreenOption from '@/ui/chatbot-popup/options-list-screen/helpscreen-option';
4
+ import { useLocalTranslation } from '@/useLocalTranslation';
5
+
6
+ interface HelpscreenListProps {
7
+ options: Option[] | undefined;
8
+ selectedOption: Option | null;
9
+ onToggleOption: (option: Option) => void;
10
+ onStartChat: () => void;
11
+ }
12
+
13
+ const HelpscreenList: React.FC<HelpscreenListProps> = ({
14
+ options,
15
+ selectedOption,
16
+ onToggleOption,
17
+ onStartChat,
18
+ }) => {
19
+ const { t } = useLocalTranslation();
20
+
21
+ return (
22
+ <section className='babylai:flex babylai:flex-col babylai:flex-1 babylai:gap-4'>
23
+ <div className='babylai:grid babylai:grid-cols-1 babylai:gap-4'>
24
+ {options?.map((option) => (
25
+ <HelpscreenOption
26
+ key={option.id}
27
+ option={option}
28
+ isSelected={selectedOption?.id === option.id}
29
+ onClick={() => onToggleOption(option)}
30
+ />
31
+ ))}
32
+ </div>
33
+ <div className="babylai:sticky babylai:bottom-0 babylai:z-10">
34
+ <button
35
+ className="babylai:bg-primary babylai:border babylai:border-primary babylai:cursor-pointer babylai:disabled:bg-black-white-300 babylai:disabled:border-black-white-300 babylai:disabled:cursor-not-allowed babylai:disabled:text-white babylai:duration-200 babylai:ease-out babylai:flex babylai:gap-1 babylai:items-center babylai:justify-center babylai:p-3 babylai:relative babylai:rounded-2xl babylai:text-white babylai:text-xl babylai:transition-all babylai:w-full"
36
+ onClick={onStartChat}
37
+ disabled={!selectedOption}
38
+ >
39
+ {t('homeSdk.chatNow')}
40
+ </button>
41
+ </div>
42
+ </section>
43
+ );
44
+ };
45
+
46
+ HelpscreenList.displayName = 'HelpscreenList';
47
+
48
+ export default HelpscreenList;
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import { Option } from '@/lib/types';
3
+ import { cn } from '@/lib/utils';
4
+
5
+ interface HelpscreenOptionProps {
6
+ option: Option;
7
+ isSelected: boolean;
8
+ onClick: () => void;
9
+ }
10
+
11
+ const HelpscreenOption: React.FC<HelpscreenOptionProps> = ({
12
+ option,
13
+ isSelected,
14
+ onClick,
15
+ }) => {
16
+ return (
17
+ <div
18
+ className={cn(
19
+ 'babylai:flex babylai:flex-col babylai:p-6 babylai:rounded-3xl babylai:text-start babylai:border babylai:border-black-white-200 babylai:bg-card babylai:cursor-pointer',
20
+ isSelected && 'babylai:ring babylai:ring-primary-500 babylai:shadow-md'
21
+ )}
22
+ onClick={onClick}
23
+ >
24
+ <h2 className="babylai:text-base babylai:font-semibold babylai:mb-2 babylai:text-card-foreground" dir="auto">
25
+ {option.title}
26
+ </h2>
27
+ {option.paragraphs.map((paragraph, index) => (
28
+ <p key={index} className="babylai:text-sm babylai:text-muted-foreground" dir="auto">
29
+ {paragraph}
30
+ </p>
31
+ ))}
32
+ </div>
33
+ );
34
+ };
35
+
36
+ HelpscreenOption.displayName = 'HelpscreenOption';
37
+
38
+ export default HelpscreenOption;
@@ -1,59 +1,65 @@
1
- import { Card } from '@/components';
2
1
  import { HelpScreenData, Option } from '@/lib/types';
3
- import ExpandedOption from '@/ui/chatbot-popup/options-list-screen/expanded-option';
4
2
  import OptionsListHeader from '@/ui/chatbot-popup/options-list-screen/header';
5
- import OptionCard from '@/ui/chatbot-popup/options-list-screen/option-card';
3
+ import CompanyCard from '@/ui/chatbot-popup/options-list-screen/company-card';
4
+ import HelpscreenIntro from '@/ui/chatbot-popup/options-list-screen/helpscreen-intro';
5
+ import HelpscreenList from '@/ui/chatbot-popup/options-list-screen/helpscreen-list';
6
+ import PoweredBy from '@/ui/powered-by';
7
+ import { useState, useEffect } from 'react';
6
8
 
7
9
  interface OptionsListScreenProps {
8
10
  helpScreen: HelpScreenData | null;
9
- expandedOption: Option | null;
10
- setExpandedOption: (option: Option | null) => void;
11
11
  handleStartChat: (option: Option) => void;
12
- handleBack: () => void;
13
- showHelpScreen: boolean;
12
+ handleMinimize: () => void;
14
13
  }
15
14
 
16
15
  const OptionsListScreen: React.FC<OptionsListScreenProps> = ({
17
16
  helpScreen,
18
- expandedOption,
19
- setExpandedOption,
20
17
  handleStartChat,
21
- handleBack,
22
- showHelpScreen,
18
+ handleMinimize,
23
19
  }) => {
20
+ const [selectedOption, setSelectedOption] = useState<Option | null>(null);
21
+
22
+ useEffect(() => {
23
+ // Reset selected option when helpScreen changes
24
+ setSelectedOption(null);
25
+ }, [helpScreen?.id]);
26
+
24
27
  const handleToggleExpandOption = (option: Option) => {
25
- if (expandedOption?.id === option.id) {
26
- setExpandedOption(null);
28
+ if (selectedOption?.id === option.id) {
29
+ setSelectedOption(null);
27
30
  } else {
28
- setExpandedOption(option);
31
+ setSelectedOption(option);
32
+ }
33
+ };
34
+
35
+ const handleStartChatWithSelected = () => {
36
+ if (selectedOption) {
37
+ handleStartChat(selectedOption);
29
38
  }
30
39
  };
31
40
 
32
41
  return (
33
- <div className='babylai-px-8 babylai-pb-12 babylai-pt-8 babylai-overflow-y-auto babylai-h-full'>
34
- <OptionsListHeader handleBack={handleBack} showHelpScreen={showHelpScreen} />
35
-
36
- <h1 className='babylai-text-4xl babylai-font-bold babylai-mb-4 babylai-text-black-white-800 dark:babylai-text-white babylai-mt-0'>
37
- {helpScreen?.title}
38
- </h1>
39
-
40
- {helpScreen && (
41
- <div className='babylai-flex babylai-flex-col babylai-gap-3 babylai-mt-3 babylai-mb-3'>
42
- {helpScreen?.options?.map((option) => (
43
- <Card
44
- key={option.id}
45
- variant='rounded'
46
- className='babylai-cursor-pointer babylai-transition-all hover:babylai-shadow-md !babylai-px-2 !babylai-py-1 dark:!babylai-bg-storm-dust-900'
47
- onClick={() => handleToggleExpandOption(option)}
48
- >
49
- <OptionCard title={option.title} />
50
-
51
- {expandedOption?.id === option.id && <ExpandedOption option={option} handleStartChat={handleStartChat} />}
52
- </Card>
53
- ))}
54
- </div>
55
- )}
56
- </div>
42
+ <div className='babylai:flex babylai:flex-col babylai:max-h-full'>
43
+ <OptionsListHeader onMinimize={handleMinimize} />
44
+ <div className='babylai:flex babylai:flex-col babylai:flex-1 babylai:overflow-y-auto babylai:px-6 babylai:pt-6 babylai:pb-4 babylai:gap-6'>
45
+ <HelpscreenIntro title={helpScreen?.title} />
46
+
47
+ <CompanyCard
48
+ logoUrl={helpScreen?.tenant?.logoUrl}
49
+ name={helpScreen?.tenant?.name}
50
+ description={helpScreen?.tenant?.settings?.description}
51
+ title={helpScreen?.title}
52
+ />
53
+
54
+ <HelpscreenList
55
+ options={helpScreen?.options}
56
+ selectedOption={selectedOption}
57
+ onToggleOption={handleToggleExpandOption}
58
+ onStartChat={handleStartChatWithSelected}
59
+ />
60
+ </div >
61
+ <PoweredBy />
62
+ </div >
57
63
  );
58
64
  };
59
65
 
@@ -1,5 +1,8 @@
1
1
  import { Button } from "@/components";
2
2
  import { useLocalTranslation } from "@/useLocalTranslation";
3
+ import SolarChatRoundUnreadBoldDuotone from '~icons/solar/chat-round-unread-bold-duotone'
4
+ import SolarCloseCircleLineDuotone from '~icons/solar/close-circle-line-duotone'
5
+ import SolarPlain2BoldDuotone from '~icons/solar/plain-2-bold-duotone'
3
6
 
4
7
  interface ConfirmationModalProps {
5
8
  title: string;
@@ -12,27 +15,39 @@ const ConfirmationModal = ({ title, message, onCancel, onConfirm }: Confirmation
12
15
  const { t } = useLocalTranslation();
13
16
 
14
17
  return (
15
- <div className='babylai-absolute babylai-inset-0 babylai-z-50 babylai-flex babylai-items-center babylai-justify-center babylai-rounded-3xl babylai-overflow-hidden'>
16
- <div className='babylai-absolute babylai-inset-0 babylai-bg-black/60' onClick={onCancel}></div>
17
- <div className='babylai-bg-black-white-100 dark:babylai-bg-storm-dust-900 babylai-rounded-3xl babylai-p-4 babylai-w-[220px] babylai-z-50 babylai-shadow-lg'>
18
- <h3 className='babylai-text-black-white-900 babylai-font-bold babylai-text-sm babylai-mb-2 babylai-text-center babylai-mt-0 dark:babylai-text-white'>{title}</h3>
19
- <p className='babylai-text-black-white-700 babylai-text-xs babylai-mb-4 dark:babylai-text-white babylai-mt-0'>{message}</p>
20
- <div className='babylai-flex babylai-justify-end babylai-gap-2 babylai-w-full'>
18
+ <div className='babylai:absolute babylai:inset-0 babylai:z-50 babylai:flex babylai:items-end babylai:rounded-3xl babylai:overflow-hidden'>
19
+ <div className='babylai:absolute babylai:inset-0 babylai:bg-black/60' onClick={onCancel}></div>
20
+ <div className='babylai:flex babylai:flex-col babylai:bg-card babylai:rounded-2xl babylai:p-6 babylai:pb-5 babylai:w-full babylai:z-50 babylai:shadow-lg'>
21
+ <button className="babylai:cursor-pointer babylai:mb-6 babylai:ms-auto babylai:text-card-foreground"
22
+ type='button'
23
+ onClick={onCancel}
24
+ >
25
+ <SolarCloseCircleLineDuotone className="babylai:w-6 babylai:h-6" />
26
+ </button>
27
+
28
+ <section className="babylai:flex babylai:items-center babylai:justify-center babylai:border-b babylai:border-black-white-200 babylai:pb-6 babylai:mb-6">
29
+ <div className="babylai:flex babylai:items-center babylai:justify-center babylai:w-20 babylai:h-20 babylai:rounded-full babylai:p-3 babylai:bg-primary/15 babylai:text-primary">
30
+ <SolarChatRoundUnreadBoldDuotone className="babylai:w-16 babylai:h-16" />
31
+ </div>
32
+ </section>
33
+
34
+ <h3 className='babylai:text-2xl babylai:text-center babylai:font-bold babylai:mb-2 babylai:text-card-foreground'>{title}</h3>
35
+
36
+ <p className='babylai:text-sm babylai:text-center babylai:text-muted-foreground'>{message}</p>
37
+
38
+ <div className='babylai:flex babylai:justify-between babylai:gap-3 babylai:mt-6'>
21
39
  <Button
22
- variant='default'
23
- size='sm'
24
40
  onClick={onConfirm}
25
- className='babylai-text-sm babylai-w-full !babylai-font-bold'
41
+ variant='secondary'
26
42
  >
27
43
  {t('homeSdk.ConfirmationModal.confirmation_button')}
28
44
  </Button>
29
45
  <Button
30
- variant='outline'
31
- size='sm'
32
46
  onClick={onCancel}
33
- className='babylai-text-sm babylai-w-full babylai-text-primary-500 !babylai-font-bold'
47
+ variant='default'
34
48
  >
35
49
  {t('homeSdk.ConfirmationModal.cancel_button')}
50
+ <SolarPlain2BoldDuotone className="babylai:w-6 babylai:h-6" />
36
51
  </Button>
37
52
  </div>
38
53
  </div>
@@ -1,4 +1,5 @@
1
- import CloseIcon from '@/assets/icons/close.svg'
1
+ import MaterialSymbolsCloseSmallOutlineRounded from '~icons/material-symbols/close-small-outline-rounded'
2
+
2
3
  interface FloatingMessageProps {
3
4
  message: string
4
5
  onClose: () => void
@@ -8,16 +9,16 @@ const FloatingMessage = ({ message, onClose }: FloatingMessageProps) => {
8
9
  return (
9
10
  <div
10
11
  className="
11
- babylai-fixed babylai-bottom-[6rem] babylai-right-4
12
- babylai-z-50 babylai-flex babylai-flex-col babylai-items-end babylai-animate-[float_2s_infinite_ease-in-out]"
12
+ babylai:fixed babylai:bottom-16 babylai:right-4
13
+ babylai:z-50 babylai:flex babylai:flex-col babylai:items-end babylai:animate-[float_2s_infinite_ease-in-out]"
13
14
  >
14
- <div className="babylai-bg-primary-500 babylai-text-white babylai-py-3 babylai-px-4 babylai-rounded-3xl babylai-shadow-lg babylai-mb-4 babylai-max-w-[200px] babylai-relative after:babylai-content-[''] after:babylai-absolute after:babylai--bottom-[10px] after:babylai-right-5 after:babylai-w-0 after:babylai-h-0 after:babylai-border-l-[10px] after:babylai-border-r-[10px] after:babylai-border-t-[10px] after:babylai-border-l-transparent after:babylai-border-r-transparent after:babylai-border-t-primary-500">
15
- <p className="babylai-text-xs babylai-font-bold babylai-m-0">{message}</p>
15
+ <div className="babylai:bg-primary-500 babylai:text-white babylai:py-3 babylai:px-4 babylai:rounded-3xl babylai:shadow-lg babylai:mb-4 babylai:max-w-[200px] babylai:relative after:babylai:content-[''] after:babylai:absolute after:babylai:-bottom-[10px] after:babylai:right-5 after:babylai:w-0 after:babylai:h-0 after:babylai:border-l-[10px] after:babylai:border-r-[10px] after:babylai:border-t-[10px] after:babylai:border-l-transparent after:babylai:border-r-transparent after:babylai:border-t-primary-500">
16
+ <p className="babylai:text-xs babylai:font-bold babylai:m-0">{message}</p>
16
17
  <button
17
- className="babylai-absolute babylai--top-2 babylai--right-2 babylai-w-5 babylai-h-5 babylai-rounded-full babylai-bg-white babylai-border-none babylai-cursor-pointer babylai-flex babylai-items-center babylai-justify-center babylai-text-black-white-700 babylai-p-[3px] hover:babylai-bg-primary-400 babylai-hover:text-white babylai-shadow-md"
18
+ className="babylai:absolute babylai:-top-2 babylai:-right-2 babylai:w-5 babylai:h-5 babylai:rounded-full babylai:bg-white babylai:border-none babylai:cursor-pointer babylai:flex babylai:items-center babylai:justify-center babylai:text-black-white-700 babylai:p-[3px] babylai:hover:bg-primary-400 babylai:hover:text-white babylai:shadow-md"
18
19
  onClick={onClose}
19
20
  >
20
- <CloseIcon className="babylai-w-8 babylai-h-8" />
21
+ <MaterialSymbolsCloseSmallOutlineRounded className="babylai:w-8 babylai:h-8" />
21
22
  </button>
22
23
  </div>
23
24
  </div>
@@ -9,14 +9,14 @@ const HelpButton = ({ onClick }: HelpButtonProps) => {
9
9
  return (
10
10
  <button
11
11
  className="
12
- babylai-fixed babylai-z-50 babylai-bottom-4 babylai-right-4
13
- babylai-w-[80px] babylai-h-[80px]
14
- babylai-rounded-full babylai-bg-primary-500 babylai-flex babylai-items-center
15
- babylai-justify-center babylai-border-[0.5px] babylai-border-black-white-50 "
12
+ babylai:fixed babylai:z-50 babylai:bottom-4 babylai:right-4
13
+ babylai:p-4
14
+ babylai:rounded-full babylai:bg-primary-500 babylai:flex babylai:items-center
15
+ babylai:justify-center babylai:border-[0.5px] babylai:border-black-white-50 "
16
16
  onClick={onClick}
17
17
  aria-label="Need Help?"
18
18
  >
19
- <Logo className="babylai-w-[60%] babylai-h-[60%] babylai-text-primary-500" />
19
+ <Logo className="babylai:w-8 babylai:h-8 babylai:text-primary-500" />
20
20
  </button>
21
21
  )
22
22
  }