@aslaluroba/help-center-react 3.0.8 → 3.0.9
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/index.css +1 -1
- package/dist/index.esm.js +2229 -17
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2229 -18
- package/dist/index.js.map +1 -1
- package/package.json +2 -4
- package/src/ui/chatbot-popup/chat-window-screen/header.tsx +4 -4
- package/src/ui/chatbot-popup/options-list-screen/header.tsx +6 -8
- package/src/ui/chatbot-popup/options-list-screen/option-card.tsx +4 -5
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"main": "dist/index.js",
|
|
4
4
|
"module": "dist/index.esm.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
|
-
"version": "3.0.
|
|
6
|
+
"version": "3.0.9",
|
|
7
7
|
"description": "BabylAI Help Center Widget for React and Next.js",
|
|
8
8
|
"private": false,
|
|
9
9
|
"exports": {
|
|
@@ -52,10 +52,8 @@
|
|
|
52
52
|
"dist/index.css"
|
|
53
53
|
],
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"i18next": "^23.0.0 || ^25.0.0",
|
|
56
55
|
"react": "^18 || ^19",
|
|
57
|
-
"react-dom": "^18 || ^19"
|
|
58
|
-
"react-i18next": "^13.0.0 || ^15.0.0"
|
|
56
|
+
"react-dom": "^18 || ^19"
|
|
59
57
|
},
|
|
60
58
|
"dependencies": {
|
|
61
59
|
"@ably/chat": "^0.8.0",
|
|
@@ -17,7 +17,7 @@ interface ChatWindowHeaderProps {
|
|
|
17
17
|
const ChatWindowHeader: React.FC<ChatWindowHeaderProps> = (props) => {
|
|
18
18
|
const [showMenu, setShowMenu] = useState(false);
|
|
19
19
|
const { t, dir } = useLocalTranslation();
|
|
20
|
-
const isRTL = dir === "rtl";
|
|
20
|
+
const isRTL = String(dir) === "rtl";
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
23
|
<header className="babylai-flex babylai-w-full babylai-items-center babylai-py-[18px] babylai-px-[18px] babylai-justify-between babylai-relative babylai-bg-black-white-50 dark:!babylai-bg-storm-dust-900 babylai-rounded-t-3xl">
|
|
@@ -29,10 +29,10 @@ const ChatWindowHeader: React.FC<ChatWindowHeaderProps> = (props) => {
|
|
|
29
29
|
onClick={props.handleBack}
|
|
30
30
|
>
|
|
31
31
|
<ArrowRight
|
|
32
|
-
className={
|
|
33
|
-
/>
|
|
32
|
+
className={`babylai-w-3 babylai-h-3 ${isRTL ? "" : "babylai-rotate-180"} babylai-text-primary-500 dark:babylai-text-white`}
|
|
33
|
+
/>
|
|
34
34
|
</Button>
|
|
35
|
-
<div className="babylai-relative
|
|
35
|
+
<div className="babylai-relative">
|
|
36
36
|
<Button
|
|
37
37
|
variant="rounded-icon"
|
|
38
38
|
size="icon"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from '@/components';
|
|
2
2
|
import ArrowRight from './../../../assets/icons/arrowRight.svg';
|
|
3
|
-
import ThinkingLogo from '
|
|
3
|
+
import ThinkingLogo from '@/assets/thinking-logo.svg';
|
|
4
4
|
import { useLocalTranslation } from '../../../useLocalTranslation';
|
|
5
5
|
import CloseCircle from '../../../assets/icons/closeCirclePrimary.svg';
|
|
6
6
|
|
|
@@ -14,14 +14,12 @@ const OptionsListHeader: React.FC<OptionsListHeaderProps> = ({
|
|
|
14
14
|
showHelpScreen,
|
|
15
15
|
}) => {
|
|
16
16
|
const { dir } = useLocalTranslation();
|
|
17
|
-
const isRTL = dir === "rtl";
|
|
17
|
+
const isRTL = String(dir) === "rtl";
|
|
18
18
|
|
|
19
19
|
return (
|
|
20
20
|
<header
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
!showHelpScreen ? "babylai-justify-end" : "babylai-justify-between"
|
|
24
|
-
}`}
|
|
21
|
+
className={`babylai-flex babylai-w-full babylai-items-center babylai-mb-2 ${!showHelpScreen ? "babylai-justify-end" : "babylai-justify-between"
|
|
22
|
+
}`}
|
|
25
23
|
>
|
|
26
24
|
<Button
|
|
27
25
|
variant="rounded-icon"
|
|
@@ -31,13 +29,13 @@ const OptionsListHeader: React.FC<OptionsListHeaderProps> = ({
|
|
|
31
29
|
>
|
|
32
30
|
{showHelpScreen ? (
|
|
33
31
|
<ArrowRight
|
|
34
|
-
className={`${isRTL ? "" : "babylai-rotate-180"} babylai-text-primary-500 babylai-w-full babylai-h-full`}
|
|
32
|
+
className={`${!isRTL ? "" : "babylai-rotate-180"} babylai-text-primary-500 babylai-w-full babylai-h-full`}
|
|
35
33
|
/>
|
|
36
34
|
) : (
|
|
37
35
|
<CloseCircle className="!babylai-w-full !babylai-h-full babylai-cursor-pointer" />
|
|
38
36
|
)}
|
|
39
37
|
</Button>
|
|
40
|
-
<ThinkingLogo className="babylai-w-40 babylai-h-40 babylai-text-primary-500 babylai-absolute babylai-top-0 babylai-
|
|
38
|
+
<ThinkingLogo className="babylai-w-40 babylai-h-40 babylai-text-primary-500 babylai-absolute babylai-top-0 babylai-end-1 babylai-overflow-hidden" />
|
|
41
39
|
</header>
|
|
42
40
|
);
|
|
43
41
|
};
|
|
@@ -7,8 +7,9 @@ interface OptionCardProps {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const OptionCard: React.FC<OptionCardProps> = (props) => {
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const { dir } = useLocalTranslation();
|
|
11
|
+
const isRTL = String(dir) === "rtl";
|
|
12
|
+
|
|
12
13
|
return (
|
|
13
14
|
<div className="babylai-flex babylai-items-center babylai-justify-between babylai-p-2">
|
|
14
15
|
<p className="babylai-text-sm babylai-font-medium babylai-text-black-white-800 dark:babylai-text-white">
|
|
@@ -20,9 +21,7 @@ const OptionCard: React.FC<OptionCardProps> = (props) => {
|
|
|
20
21
|
className="babylai-text-primary-500 hover:babylai-bg-primary-100"
|
|
21
22
|
>
|
|
22
23
|
<ArrowRight
|
|
23
|
-
className={`babylai-w-3 babylai-h-3 ${
|
|
24
|
-
isLTR ? "" : "babylai-rotate-180"
|
|
25
|
-
} babylai-text-primary-500`}
|
|
24
|
+
className={`babylai-w-3 babylai-h-3 ${!isRTL ? "" : "babylai-rotate-180"} babylai-text-primary-500 dark:babylai-text-white`}
|
|
26
25
|
/>
|
|
27
26
|
</Button>
|
|
28
27
|
</div>
|