@daeryun/dr_components 1.0.69 → 1.0.71
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/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/Daeryuntalk/ChatButton.jsx +12 -12
- package/dist/components/Daeryuntalk/ChatButton.tsx +18 -21
- package/dist/components/Daeryuntalk/ChatConversation.jsx +2 -2
- package/dist/components/Daeryuntalk/ChatConversation.tsx +2 -2
- package/dist/components/Daeryuntalk/ChatHomeView.jsx +3 -3
- package/dist/components/Daeryuntalk/ChatHomeView.tsx +3 -3
- package/dist/components/Daeryuntalk/ChatWidget.jsx +44 -8
- package/dist/components/Daeryuntalk/ChatWidget.tsx +51 -7
- package/dist/components/Daeryuntalk/HistoryView.jsx +1 -1
- package/dist/components/Daeryuntalk/HistoryView.tsx +1 -1
- package/dist/components/Daeryuntalk/HomeView.jsx +2 -2
- package/dist/components/Daeryuntalk/HomeView.tsx +2 -2
- package/dist/components/Daeryuntalk/_hooks/useHoverScrollbar.js +3 -0
- package/dist/components/Daeryuntalk/_hooks/useHoverScrollbar.ts +3 -0
- package/dist/components/Daeryuntalk/index.jsx +12 -12
- package/dist/components/Daeryuntalk/index.tsx +13 -13
- package/dist/components/Fix/index.jsx +1 -1
- package/dist/components/Fix/index.tsx +1 -1
- package/dist/components/common/data/index.js +2 -2
- package/dist/components/common/data/index.ts +2 -2
- package/dist/components/common/integrate/index.d.ts +1 -1
- package/dist/components/page/StrengthNew/components/common/BannerSection.jsx +9 -7
- package/dist/components/page/StrengthNew/components/common/BannerSection.tsx +9 -7
- package/dist/styles/globals.css +411 -391
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,50 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef, useEffect } from 'react';
|
|
2
2
|
import ChatHomeView from './ChatHomeView';
|
|
3
3
|
import ImageViewer from './Viewer/ImageViewer';
|
|
4
4
|
import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
5
5
|
const ChatWidget = ({ isOpen, isMobile, onClose, hashValue, setHashValue, animationState }) => {
|
|
6
6
|
const { containerRef, isScroll, isBottom } = useScrollShadow();
|
|
7
7
|
const isHash = !!hashValue; // 해쉬 있을 경우
|
|
8
|
+
const chatWidgetRef = useRef(null);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const isScrollableElement = (element) => {
|
|
11
|
+
const style = window.getComputedStyle(element);
|
|
12
|
+
const hasScrollableY = style.overflowY === 'auto' || style.overflowY === 'scroll';
|
|
13
|
+
const hasScrollable = style.overflow === 'auto' || style.overflow === 'scroll';
|
|
14
|
+
// 실제로 스크롤이 가능한지 확인 (내용이 컨테이너보다 큰지)
|
|
15
|
+
if (hasScrollableY || hasScrollable) {
|
|
16
|
+
return element.scrollHeight > element.clientHeight;
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
};
|
|
20
|
+
const handleWheel = (e) => {
|
|
21
|
+
let target = e.target;
|
|
22
|
+
// 타겟부터 시작하여 부모 요소들을 확인
|
|
23
|
+
while (target && target !== chatWidgetRef.current) {
|
|
24
|
+
if (isScrollableElement(target)) {
|
|
25
|
+
// 스크롤 가능한 요소라면 이벤트를 허용
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
target = target.parentElement;
|
|
29
|
+
}
|
|
30
|
+
// 스크롤 가능한 요소가 아니라면 이벤트 차단
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
e.stopPropagation();
|
|
33
|
+
};
|
|
34
|
+
const element = chatWidgetRef.current;
|
|
35
|
+
if (element && isOpen) {
|
|
36
|
+
// passive: false로 설정하여 preventDefault()가 작동하도록 함
|
|
37
|
+
element.addEventListener('wheel', handleWheel, { passive: false });
|
|
38
|
+
}
|
|
39
|
+
return () => {
|
|
40
|
+
if (element) {
|
|
41
|
+
element.removeEventListener('wheel', handleWheel);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}, [isOpen]);
|
|
8
45
|
// 모바일 웹
|
|
9
46
|
const mobileWrapperCss = `
|
|
10
|
-
fixed inset-0 h-
|
|
47
|
+
fixed inset-0 h-full w-full bg-white z-[999998] rounded-none flex flex-col
|
|
11
48
|
duration-500 ease-in-out
|
|
12
49
|
${isOpen ? 'translate-y-0 opacity-100' : 'translate-y-full opacity-0 pointer-events-none'}
|
|
13
50
|
`;
|
|
@@ -15,8 +52,8 @@ const ChatWidget = ({ isOpen, isMobile, onClose, hashValue, setHashValue, animat
|
|
|
15
52
|
const webSmallWrapperCss = `
|
|
16
53
|
${isHash ? `duration-300 ease-in-out` : `duration-300 ease-in-out`}
|
|
17
54
|
${isHash ? `${isOpen ? ' translate-y-0 opacity-100' : 'translate-y-full opacity-0 pointer-events-none'} ` : isOpen ? 'translate-y-0 opacity-100' : 'translate-y-full opacity-0 pointer-events-none'}
|
|
18
|
-
fixed w-
|
|
19
|
-
bottom-0 right-0 h-[100dvh]
|
|
55
|
+
fixed w-full max-w-[100vw] z-[999998] rounded-none flex flex-col
|
|
56
|
+
bottom-0 right-0 h-[100dvh]
|
|
20
57
|
`;
|
|
21
58
|
// 해쉬 있을 경우는 여기서 중앙배치 css로
|
|
22
59
|
const webTbPCWrapperCss = `
|
|
@@ -33,9 +70,9 @@ const ChatWidget = ({ isOpen, isMobile, onClose, hashValue, setHashValue, animat
|
|
|
33
70
|
`
|
|
34
71
|
: `
|
|
35
72
|
h-[100dvh] ease-in-out
|
|
36
|
-
xs:bottom-[165px] xs:right-[
|
|
73
|
+
xs:bottom-[165px] right-0 xs:right-[30px] lg:right-[90px] xs:max-w-[390px]
|
|
37
74
|
xs:max-h-[690px] xs:rounded-[30px]
|
|
38
|
-
lg:bottom-[
|
|
75
|
+
lg:bottom-[120px] xs:rounded-[30px]
|
|
39
76
|
`}
|
|
40
77
|
`;
|
|
41
78
|
//
|
|
@@ -44,7 +81,6 @@ const ChatWidget = ({ isOpen, isMobile, onClose, hashValue, setHashValue, animat
|
|
|
44
81
|
`;
|
|
45
82
|
const innerWebSmallWrapperCss = `
|
|
46
83
|
rounded-none
|
|
47
|
-
|
|
48
84
|
`;
|
|
49
85
|
// 웹 480~1023px , pc 1024px~
|
|
50
86
|
const innerWebTbPCWrapperCss = `
|
|
@@ -56,7 +92,7 @@ const ChatWidget = ({ isOpen, isMobile, onClose, hashValue, setHashValue, animat
|
|
|
56
92
|
<ImageViewer />
|
|
57
93
|
|
|
58
94
|
<div className="relative ">
|
|
59
|
-
<div className={`
|
|
95
|
+
<div ref={chatWidgetRef} className={`
|
|
60
96
|
${isMobile ? `${mobileWrapperCss}` : `${webSmallWrapperCss} ${webTbPCWrapperCss} `}
|
|
61
97
|
`}>
|
|
62
98
|
<div ref={containerRef} className={`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { Dispatch, SetStateAction } from 'react';
|
|
1
|
+
import React, { Dispatch, SetStateAction, useRef, useEffect } from 'react';
|
|
2
2
|
import ChatHomeView from './ChatHomeView';
|
|
3
3
|
import ImageViewer from './Viewer/ImageViewer';
|
|
4
4
|
import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
@@ -22,10 +22,54 @@ const ChatWidget: React.FC<ChatWidgetProps> = ({
|
|
|
22
22
|
}) => {
|
|
23
23
|
const { containerRef, isScroll, isBottom } = useScrollShadow<HTMLDivElement>();
|
|
24
24
|
const isHash = !!hashValue; // 해쉬 있을 경우
|
|
25
|
+
const chatWidgetRef = useRef<HTMLDivElement>(null);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const isScrollableElement = (element: Element): boolean => {
|
|
29
|
+
const style = window.getComputedStyle(element);
|
|
30
|
+
const hasScrollableY = style.overflowY === 'auto' || style.overflowY === 'scroll';
|
|
31
|
+
const hasScrollable = style.overflow === 'auto' || style.overflow === 'scroll';
|
|
32
|
+
|
|
33
|
+
// 실제로 스크롤이 가능한지 확인 (내용이 컨테이너보다 큰지)
|
|
34
|
+
if (hasScrollableY || hasScrollable) {
|
|
35
|
+
return element.scrollHeight > element.clientHeight;
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const handleWheel = (e: WheelEvent) => {
|
|
41
|
+
let target = e.target as Element;
|
|
42
|
+
|
|
43
|
+
// 타겟부터 시작하여 부모 요소들을 확인
|
|
44
|
+
while (target && target !== chatWidgetRef.current) {
|
|
45
|
+
if (isScrollableElement(target)) {
|
|
46
|
+
// 스크롤 가능한 요소라면 이벤트를 허용
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
target = target.parentElement as Element;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 스크롤 가능한 요소가 아니라면 이벤트 차단
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
e.stopPropagation();
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const element = chatWidgetRef.current;
|
|
58
|
+
if (element && isOpen) {
|
|
59
|
+
// passive: false로 설정하여 preventDefault()가 작동하도록 함
|
|
60
|
+
element.addEventListener('wheel', handleWheel, { passive: false });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return () => {
|
|
64
|
+
if (element) {
|
|
65
|
+
element.removeEventListener('wheel', handleWheel);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}, [isOpen]);
|
|
25
69
|
|
|
26
70
|
// 모바일 웹
|
|
27
71
|
const mobileWrapperCss = `
|
|
28
|
-
fixed inset-0 h-
|
|
72
|
+
fixed inset-0 h-full w-full bg-white z-[999998] rounded-none flex flex-col
|
|
29
73
|
duration-500 ease-in-out
|
|
30
74
|
${isOpen ? 'translate-y-0 opacity-100' : 'translate-y-full opacity-0 pointer-events-none'}
|
|
31
75
|
`;
|
|
@@ -34,8 +78,8 @@ const ChatWidget: React.FC<ChatWidgetProps> = ({
|
|
|
34
78
|
const webSmallWrapperCss = `
|
|
35
79
|
${isHash ? `duration-300 ease-in-out` : `duration-300 ease-in-out`}
|
|
36
80
|
${isHash ? `${isOpen ? ' translate-y-0 opacity-100' : 'translate-y-full opacity-0 pointer-events-none'} ` : isOpen ? 'translate-y-0 opacity-100' : 'translate-y-full opacity-0 pointer-events-none'}
|
|
37
|
-
fixed w-
|
|
38
|
-
bottom-0 right-0 h-[100dvh]
|
|
81
|
+
fixed w-full max-w-[100vw] z-[999998] rounded-none flex flex-col
|
|
82
|
+
bottom-0 right-0 h-[100dvh]
|
|
39
83
|
`;
|
|
40
84
|
|
|
41
85
|
// 해쉬 있을 경우는 여기서 중앙배치 css로
|
|
@@ -56,9 +100,9 @@ const ChatWidget: React.FC<ChatWidgetProps> = ({
|
|
|
56
100
|
`
|
|
57
101
|
: `
|
|
58
102
|
h-[100dvh] ease-in-out
|
|
59
|
-
xs:bottom-[165px] xs:right-[
|
|
103
|
+
xs:bottom-[165px] right-0 xs:right-[30px] lg:right-[90px] xs:max-w-[390px]
|
|
60
104
|
xs:max-h-[690px] xs:rounded-[30px]
|
|
61
|
-
lg:bottom-[
|
|
105
|
+
lg:bottom-[120px] xs:rounded-[30px]
|
|
62
106
|
`
|
|
63
107
|
}
|
|
64
108
|
`;
|
|
@@ -70,7 +114,6 @@ const ChatWidget: React.FC<ChatWidgetProps> = ({
|
|
|
70
114
|
|
|
71
115
|
const innerWebSmallWrapperCss = `
|
|
72
116
|
rounded-none
|
|
73
|
-
|
|
74
117
|
`;
|
|
75
118
|
|
|
76
119
|
// 웹 480~1023px , pc 1024px~
|
|
@@ -88,6 +131,7 @@ const ChatWidget: React.FC<ChatWidgetProps> = ({
|
|
|
88
131
|
|
|
89
132
|
<div className="relative ">
|
|
90
133
|
<div
|
|
134
|
+
ref={chatWidgetRef}
|
|
91
135
|
className={`
|
|
92
136
|
${isMobile ? `${mobileWrapperCss}` : `${webSmallWrapperCss} ${webTbPCWrapperCss} `}
|
|
93
137
|
`}
|
|
@@ -19,7 +19,7 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
|
|
|
19
19
|
return (<div className={`
|
|
20
20
|
no-scrollbar relative w-full rounded-t-[30px]
|
|
21
21
|
${isMobile
|
|
22
|
-
? ` flex h-[calc(
|
|
22
|
+
? ` flex h-[calc(100%-64px)] flex-col items-center justify-start `
|
|
23
23
|
: ' flex h-[calc(100dvh-64px)] flex-col items-center xs:h-[calc(100vh-165px-64px)] lg:h-[calc(100vh-110px-64px)] ' +
|
|
24
24
|
' xs:max-h-[626px] xs:min-h-[320px] '}
|
|
25
25
|
`}>
|
|
@@ -53,7 +53,7 @@ const HistoryView: React.FC<HistoryViewProps> = ({
|
|
|
53
53
|
no-scrollbar relative w-full rounded-t-[30px]
|
|
54
54
|
${
|
|
55
55
|
isMobile
|
|
56
|
-
? ` flex h-[calc(
|
|
56
|
+
? ` flex h-[calc(100%-64px)] flex-col items-center justify-start `
|
|
57
57
|
: ' flex h-[calc(100dvh-64px)] flex-col items-center xs:h-[calc(100vh-165px-64px)] lg:h-[calc(100vh-110px-64px)] ' +
|
|
58
58
|
' xs:max-h-[626px] xs:min-h-[320px] '
|
|
59
59
|
}
|
|
@@ -110,7 +110,7 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
110
110
|
return (<div ref={wrapperRef} className={`
|
|
111
111
|
no-scrollbar relative w-full rounded-t-[30px]
|
|
112
112
|
${isMobile
|
|
113
|
-
? ` flex h-[calc(
|
|
113
|
+
? ` flex h-[calc(100%-64px)] flex-col items-center justify-between `
|
|
114
114
|
: ` flex h-[100vh] flex-col items-center justify-between xs:h-[calc(100vh-165px-64px)] lg:h-[calc(100vh-110px-64px)] ` +
|
|
115
115
|
` xs:max-h-[626px] xs:min-h-[320px] `}
|
|
116
116
|
`}>
|
|
@@ -136,7 +136,7 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
136
136
|
<section className={` flex h-full flex-col rounded-[12px] bg-white px-[16px] py-[24px] sm:h-fit ${isMobile ? 'w-full' : ' justify-between xs:justify-start '}`} style={{ boxShadow: '0px 4px 10px 0px #00000026' }}>
|
|
137
137
|
{/* 해당 컴포넌트의 최상위 부모와 브라우저 상단과 닿았을 때 우선적으로 해당 부분의 높이가 먼저 줄어들게 하고 싶다*/}
|
|
138
138
|
<div className="relative">
|
|
139
|
-
<div ref={containerRef} className={`flex min-h-[80px] flex-col ${isMobile ? 'overflow-y-auto ' : ''} overlay-scrollbar`} style={Object.assign({ maxHeight: `${contentHeight}px` }, (!isMobile ? hoverStyle : {}))}>
|
|
139
|
+
<div ref={containerRef} className={`flex min-h-[80px] flex-col overscroll-contain ${isMobile ? 'overflow-y-auto overscroll-contain ' : ''} overlay-scrollbar`} style={Object.assign({ maxHeight: `${contentHeight}px` }, (!isMobile ? hoverStyle : {}))}>
|
|
140
140
|
<div className="flex items-center gap-[10px]">
|
|
141
141
|
{(inquiryMainData === null || inquiryMainData === void 0 ? void 0 : inquiryMainData.channel_logo_image_url) ? (<Image src={inquiryMainData.channel_logo_image_url} alt="로고" width={32} height={32}/>) : (<DaeryunLogoIcon width={24} height={24} className="mr-2"/>)}
|
|
142
142
|
<h2 className="dr_talk_title_small text-drTalkBlack">
|
|
@@ -132,7 +132,7 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
132
132
|
no-scrollbar relative w-full rounded-t-[30px]
|
|
133
133
|
${
|
|
134
134
|
isMobile
|
|
135
|
-
? ` flex h-[calc(
|
|
135
|
+
? ` flex h-[calc(100%-64px)] flex-col items-center justify-between `
|
|
136
136
|
: ` flex h-[100vh] flex-col items-center justify-between xs:h-[calc(100vh-165px-64px)] lg:h-[calc(100vh-110px-64px)] ` +
|
|
137
137
|
` xs:max-h-[626px] xs:min-h-[320px] `
|
|
138
138
|
}
|
|
@@ -182,7 +182,7 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
182
182
|
<div className="relative">
|
|
183
183
|
<div
|
|
184
184
|
ref={containerRef}
|
|
185
|
-
className={`flex min-h-[80px] flex-col ${isMobile ? 'overflow-y-auto ' : ''} overlay-scrollbar`}
|
|
185
|
+
className={`flex min-h-[80px] flex-col overscroll-contain ${isMobile ? 'overflow-y-auto overscroll-contain ' : ''} overlay-scrollbar`}
|
|
186
186
|
style={{
|
|
187
187
|
maxHeight: `${contentHeight}px`,
|
|
188
188
|
...(!isMobile ? hoverStyle : {})
|
|
@@ -29,11 +29,14 @@ export function useHoverScrollbar(refParam, watchDeps = []) {
|
|
|
29
29
|
return;
|
|
30
30
|
const onEnter = () => setHovered(true);
|
|
31
31
|
const onLeave = () => setHovered(false);
|
|
32
|
+
const onMove = () => setHovered(true);
|
|
32
33
|
el.addEventListener('mouseenter', onEnter);
|
|
33
34
|
el.addEventListener('mouseleave', onLeave);
|
|
35
|
+
el.addEventListener('mousemove', onMove);
|
|
34
36
|
return () => {
|
|
35
37
|
el.removeEventListener('mouseenter', onEnter);
|
|
36
38
|
el.removeEventListener('mouseleave', onLeave);
|
|
39
|
+
el.removeEventListener('mousemove', onMove);
|
|
37
40
|
};
|
|
38
41
|
}, [ref]);
|
|
39
42
|
const style = {
|
|
@@ -50,13 +50,16 @@ export function useHoverScrollbar(
|
|
|
50
50
|
|
|
51
51
|
const onEnter = () => setHovered(true);
|
|
52
52
|
const onLeave = () => setHovered(false);
|
|
53
|
+
const onMove = () => setHovered(true);
|
|
53
54
|
|
|
54
55
|
el.addEventListener('mouseenter', onEnter);
|
|
55
56
|
el.addEventListener('mouseleave', onLeave);
|
|
57
|
+
el.addEventListener('mousemove', onMove);
|
|
56
58
|
|
|
57
59
|
return () => {
|
|
58
60
|
el.removeEventListener('mouseenter', onEnter);
|
|
59
61
|
el.removeEventListener('mouseleave', onLeave);
|
|
62
|
+
el.removeEventListener('mousemove', onMove);
|
|
60
63
|
};
|
|
61
64
|
}, [ref]);
|
|
62
65
|
|
|
@@ -34,18 +34,6 @@ const Daeryuntalk = ({ tel = '1800-7905', centerCode = 'CT0000' }) => {
|
|
|
34
34
|
setIsOpen(false);
|
|
35
35
|
}, 300);
|
|
36
36
|
};
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (isOpen) {
|
|
39
|
-
document.body.style.overflow = 'hidden';
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
document.body.style.overflow = '';
|
|
43
|
-
}
|
|
44
|
-
// 컴포넌트가 unmount 될 때도 원복
|
|
45
|
-
return () => {
|
|
46
|
-
document.body.style.overflow = '';
|
|
47
|
-
};
|
|
48
|
-
}, [isOpen]);
|
|
49
37
|
const toggleChat = () => {
|
|
50
38
|
if (isOpen) {
|
|
51
39
|
closeModal();
|
|
@@ -98,6 +86,18 @@ const Daeryuntalk = ({ tel = '1800-7905', centerCode = 'CT0000' }) => {
|
|
|
98
86
|
}
|
|
99
87
|
}
|
|
100
88
|
}, [pathName]);
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
if (isOpen && isMobile) {
|
|
91
|
+
document.body.style.overflow = 'hidden';
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
document.body.style.overflow = '';
|
|
95
|
+
}
|
|
96
|
+
// 컴포넌트가 unmount 될 때도 원복
|
|
97
|
+
return () => {
|
|
98
|
+
document.body.style.overflow = '';
|
|
99
|
+
};
|
|
100
|
+
}, [isOpen, isMobile]);
|
|
101
101
|
return (<div className="daeryuntalk-wrapper my-scroll-container">
|
|
102
102
|
{showCustomTitle && (<Head>
|
|
103
103
|
<title>법무법인 (유한)대륜 채팅상담</title>
|
|
@@ -48,19 +48,6 @@ const Daeryuntalk: React.FC<DaeryuntalkProps> = ({ tel = '1800-7905', centerCode
|
|
|
48
48
|
}, 300);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (isOpen) {
|
|
53
|
-
document.body.style.overflow = 'hidden';
|
|
54
|
-
} else {
|
|
55
|
-
document.body.style.overflow = '';
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// 컴포넌트가 unmount 될 때도 원복
|
|
59
|
-
return () => {
|
|
60
|
-
document.body.style.overflow = '';
|
|
61
|
-
};
|
|
62
|
-
}, [isOpen]);
|
|
63
|
-
|
|
64
51
|
const toggleChat = () => {
|
|
65
52
|
if (isOpen) {
|
|
66
53
|
closeModal();
|
|
@@ -118,6 +105,19 @@ const Daeryuntalk: React.FC<DaeryuntalkProps> = ({ tel = '1800-7905', centerCode
|
|
|
118
105
|
}
|
|
119
106
|
}, [pathName]);
|
|
120
107
|
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
if (isOpen && isMobile) {
|
|
110
|
+
document.body.style.overflow = 'hidden';
|
|
111
|
+
} else {
|
|
112
|
+
document.body.style.overflow = '';
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 컴포넌트가 unmount 될 때도 원복
|
|
116
|
+
return () => {
|
|
117
|
+
document.body.style.overflow = '';
|
|
118
|
+
};
|
|
119
|
+
}, [isOpen, isMobile]);
|
|
120
|
+
|
|
121
121
|
return (
|
|
122
122
|
<div className="daeryuntalk-wrapper my-scroll-container">
|
|
123
123
|
{showCustomTitle && (
|
|
@@ -252,7 +252,7 @@ const Fix = (props) => {
|
|
|
252
252
|
<div className={
|
|
253
253
|
// (isTop ? ' hidden ' : '') +
|
|
254
254
|
// `${props.wideBottom ? 'bottom-[110px] ' : 'bottom-[50px] '}` +
|
|
255
|
-
' fixed bottom-[
|
|
255
|
+
' fixed bottom-[150px] right-[25px] z-[2000] w-fit ' +
|
|
256
256
|
' max-lg:relative max-lg:bottom-0 max-lg:right-0 max-lg:w-full max-lg:rounded-t-[20px] max-lg:shadow-[0_-2px_20px_0_rgba(0,0,0,0.08)] '}>
|
|
257
257
|
{/*모바일용 원*/}
|
|
258
258
|
<div className={'absolute -top-[10px] aspect-square w-[50px] translate-x-[-50%] rounded-full bg-white transition-[left] duration-300 ease-out lg:hidden '} style={{
|
|
@@ -277,7 +277,7 @@ const Fix = (props: {
|
|
|
277
277
|
// (isTop ? ' hidden ' : '') +
|
|
278
278
|
// `${props.wideBottom ? 'bottom-[110px] ' : 'bottom-[50px] '}` +
|
|
279
279
|
|
|
280
|
-
' fixed bottom-[
|
|
280
|
+
' fixed bottom-[150px] right-[25px] z-[2000] w-fit ' +
|
|
281
281
|
' max-lg:relative max-lg:bottom-0 max-lg:right-0 max-lg:w-full max-lg:rounded-t-[20px] max-lg:shadow-[0_-2px_20px_0_rgba(0,0,0,0.08)] '
|
|
282
282
|
}
|
|
283
283
|
>
|
|
@@ -20,7 +20,7 @@ export const newNapAreaMobile = {
|
|
|
20
20
|
{ name: 'Yeouido', desc: '서울(여의도)', url: 'map_bonsa.webp', src: 'seoulbon' },
|
|
21
21
|
{ name: 'Yongsan', desc: '서울용산', url: 'map_yongsan.webp', src: 'seoul' },
|
|
22
22
|
{ name: 'Samseong', desc: '서울대치', url: 'map_gangnam.webp', src: 'samseong' },
|
|
23
|
-
{ name: '
|
|
23
|
+
{ name: '', desc: '', url: '', src: '' },
|
|
24
24
|
{ name: '', desc: '', url: '', src: '' }
|
|
25
25
|
],
|
|
26
26
|
'인천·부천': [
|
|
@@ -1983,7 +1983,7 @@ export const newNapArea = {
|
|
|
1983
1983
|
{ name: 'Yeouido', desc: '서울(여의도)', url: 'map_bonsa.webp', src: 'seoulbon' },
|
|
1984
1984
|
{ name: 'Yongsan', desc: '서울용산', url: 'map_yongsan.webp', src: 'seoul' },
|
|
1985
1985
|
{ name: 'Samseong', desc: '서울대치', url: 'map_gangnam.webp', src: 'samseong' },
|
|
1986
|
-
{ name: '
|
|
1986
|
+
{ name: '', desc: '', url: '', src: '' },
|
|
1987
1987
|
{ name: '', desc: '', url: '', src: '' },
|
|
1988
1988
|
{ name: '', desc: '', url: '', src: '' }
|
|
1989
1989
|
],
|
|
@@ -23,7 +23,7 @@ export const newNapAreaMobile: IMapArea = {
|
|
|
23
23
|
{ name: 'Yeouido', desc: '서울(여의도)', url: 'map_bonsa.webp', src: 'seoulbon' },
|
|
24
24
|
{ name: 'Yongsan', desc: '서울용산', url: 'map_yongsan.webp', src: 'seoul' },
|
|
25
25
|
{ name: 'Samseong', desc: '서울대치', url: 'map_gangnam.webp', src: 'samseong' },
|
|
26
|
-
{ name: '
|
|
26
|
+
{ name: '', desc: '', url: '', src: '' },
|
|
27
27
|
{ name: '', desc: '', url: '', src: '' }
|
|
28
28
|
],
|
|
29
29
|
'인천·부천': [
|
|
@@ -1990,7 +1990,7 @@ export const newNapArea: IMapArea = {
|
|
|
1990
1990
|
{ name: 'Yeouido', desc: '서울(여의도)', url: 'map_bonsa.webp', src: 'seoulbon' },
|
|
1991
1991
|
{ name: 'Yongsan', desc: '서울용산', url: 'map_yongsan.webp', src: 'seoul' },
|
|
1992
1992
|
{ name: 'Samseong', desc: '서울대치', url: 'map_gangnam.webp', src: 'samseong' },
|
|
1993
|
-
{ name: '
|
|
1993
|
+
{ name: '', desc: '', url: '', src: '' },
|
|
1994
1994
|
{ name: '', desc: '', url: '', src: '' },
|
|
1995
1995
|
{ name: '', desc: '', url: '', src: '' }
|
|
1996
1996
|
],
|
|
@@ -25,12 +25,14 @@ const BannerSection = ({ title, subTitle, menu, initialData }) => {
|
|
|
25
25
|
{isMain ? (<h1 className={'text-center text-[32px] font-[400] leading-[1] ' +
|
|
26
26
|
'max-xl:text-[24px] ' +
|
|
27
27
|
'max-md:text-[22px] ' +
|
|
28
|
-
'max-sm:text-[20px] '
|
|
28
|
+
'max-sm:text-[20px] ' +
|
|
29
|
+
'max-xs:text-[18px]'}>
|
|
29
30
|
{title}
|
|
30
31
|
<span className={'mt-4 block text-[52px] font-[800] ' +
|
|
31
32
|
'max-xl:mt-[10px] max-xl:text-[40px] ' +
|
|
32
33
|
'max-md:text-[34px] ' +
|
|
33
|
-
'max-sm:text-[28px]'
|
|
34
|
+
'max-sm:text-[28px] ' +
|
|
35
|
+
'max-xs:text-[26px] '}>
|
|
34
36
|
{subTitle}
|
|
35
37
|
</span>
|
|
36
38
|
</h1>) : (<>
|
|
@@ -38,7 +40,8 @@ const BannerSection = ({ title, subTitle, menu, initialData }) => {
|
|
|
38
40
|
'max-3xl:text-[46px] ' +
|
|
39
41
|
'max-xl:text-[36px] ' +
|
|
40
42
|
'max-md:text-[32px] ' +
|
|
41
|
-
'max-sm:text-[28px] '
|
|
43
|
+
'max-sm:text-[28px] ' +
|
|
44
|
+
'max-xs:text-[26px]'}>
|
|
42
45
|
{title}
|
|
43
46
|
</h1>
|
|
44
47
|
<p className={'text-center text-[22px] leading-[1.4] ' +
|
|
@@ -86,16 +89,15 @@ const BannerSection = ({ title, subTitle, menu, initialData }) => {
|
|
|
86
89
|
|
|
87
90
|
{isMain ? (<>
|
|
88
91
|
{/*상단 이미지*/}
|
|
89
|
-
<span className={'absolute right-0 top-[120px] z-0 block h-[
|
|
90
|
-
'max-3xl:h-[400px] max-3xl:w-[500px] ' +
|
|
92
|
+
<span className={'absolute right-0 top-[120px] z-0 block h-[400px] w-[500px] ' +
|
|
91
93
|
'max-xl:h-[300px] max-xl:w-[380px] ' +
|
|
92
94
|
'max-md:h-[240px] max-md:w-[320px] ' +
|
|
93
|
-
'max-sm:top-[
|
|
95
|
+
'max-sm:top-[108px] ' +
|
|
94
96
|
'max-xs:h-[157px] max-xs:w-[200px]'}>
|
|
95
97
|
<Image src={imagePath + '/strength_new/main_bg_right.webp'} alt={'강점'} fill priority sizes="(max-width: 480px) 200px, (max-width: 768px) 320px, (max-width: 1024px) 380px, (max-width: 1500px) 500px, 636px" className={'object-contain object-right-top'} quality={100}/>
|
|
96
98
|
</span>
|
|
97
99
|
{/*하단 이미지*/}
|
|
98
|
-
<span className={'absolute bottom-0 left-0 z-0 block h-[
|
|
100
|
+
<span className={'absolute bottom-0 left-0 z-0 block h-[350px] w-[350px] ' +
|
|
99
101
|
'max-3xl:h-[300px] max-3xl:w-[300px] ' +
|
|
100
102
|
'max-xl:h-[180px] max-xl:w-[180px] ' +
|
|
101
103
|
'max-md:h-[150px] max-md:w-[150px] ' +
|
|
@@ -51,7 +51,8 @@ const BannerSection = ({
|
|
|
51
51
|
'text-center text-[32px] font-[400] leading-[1] ' +
|
|
52
52
|
'max-xl:text-[24px] ' +
|
|
53
53
|
'max-md:text-[22px] ' +
|
|
54
|
-
'max-sm:text-[20px] '
|
|
54
|
+
'max-sm:text-[20px] ' +
|
|
55
|
+
'max-xs:text-[18px]'
|
|
55
56
|
}
|
|
56
57
|
>
|
|
57
58
|
{title}
|
|
@@ -60,7 +61,8 @@ const BannerSection = ({
|
|
|
60
61
|
'mt-4 block text-[52px] font-[800] ' +
|
|
61
62
|
'max-xl:mt-[10px] max-xl:text-[40px] ' +
|
|
62
63
|
'max-md:text-[34px] ' +
|
|
63
|
-
'max-sm:text-[28px]'
|
|
64
|
+
'max-sm:text-[28px] ' +
|
|
65
|
+
'max-xs:text-[26px] '
|
|
64
66
|
}
|
|
65
67
|
>
|
|
66
68
|
{subTitle}
|
|
@@ -74,7 +76,8 @@ const BannerSection = ({
|
|
|
74
76
|
'max-3xl:text-[46px] ' +
|
|
75
77
|
'max-xl:text-[36px] ' +
|
|
76
78
|
'max-md:text-[32px] ' +
|
|
77
|
-
'max-sm:text-[28px] '
|
|
79
|
+
'max-sm:text-[28px] ' +
|
|
80
|
+
'max-xs:text-[26px]'
|
|
78
81
|
}
|
|
79
82
|
>
|
|
80
83
|
{title}
|
|
@@ -181,11 +184,10 @@ const BannerSection = ({
|
|
|
181
184
|
{/*상단 이미지*/}
|
|
182
185
|
<span
|
|
183
186
|
className={
|
|
184
|
-
'absolute right-0 top-[120px] z-0 block h-[
|
|
185
|
-
'max-3xl:h-[400px] max-3xl:w-[500px] ' +
|
|
187
|
+
'absolute right-0 top-[120px] z-0 block h-[400px] w-[500px] ' +
|
|
186
188
|
'max-xl:h-[300px] max-xl:w-[380px] ' +
|
|
187
189
|
'max-md:h-[240px] max-md:w-[320px] ' +
|
|
188
|
-
'max-sm:top-[
|
|
190
|
+
'max-sm:top-[108px] ' +
|
|
189
191
|
'max-xs:h-[157px] max-xs:w-[200px]'
|
|
190
192
|
}
|
|
191
193
|
>
|
|
@@ -202,7 +204,7 @@ const BannerSection = ({
|
|
|
202
204
|
{/*하단 이미지*/}
|
|
203
205
|
<span
|
|
204
206
|
className={
|
|
205
|
-
'absolute bottom-0 left-0 z-0 block h-[
|
|
207
|
+
'absolute bottom-0 left-0 z-0 block h-[350px] w-[350px] ' +
|
|
206
208
|
'max-3xl:h-[300px] max-3xl:w-[300px] ' +
|
|
207
209
|
'max-xl:h-[180px] max-xl:w-[180px] ' +
|
|
208
210
|
'max-md:h-[150px] max-md:w-[150px] ' +
|