@daeryun/dr_components 0.1.85 → 0.1.86

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.
@@ -0,0 +1,16 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 36.726 27.872">
2
+ <defs>
3
+ <linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
4
+ <stop offset="0" stop-color="#4d6eb5"/>
5
+ <stop offset="1" stop-color="#242672"/>
6
+ </linearGradient>
7
+ <clipPath id="clip-path">
8
+ <rect id="사각형_5" data-name="사각형 5" width="36.726" height="27.872" fill="url(#linear-gradient)"/>
9
+ </clipPath>
10
+ </defs>
11
+ <g id="그룹_7" data-name="그룹 7" transform="translate(0 0)">
12
+ <g id="그룹_6" data-name="그룹 6" transform="translate(0 0)" clip-path="url(#clip-path)">
13
+ <path id="패스_5" data-name="패스 5" d="M36.724,17.243v-.488c.006-2.164.011-4.032-1.153-5.2a3.684,3.684,0,0,0-2.751-.966H30.06V8.919c.018-3.184.033-5.934-1.6-7.573A5.236,5.236,0,0,0,24.556,0H5.611A5.294,5.294,0,0,0,1.66,1.365C-.017,3.047-.007,5.88,0,9.163V10.7c-.008,3.282-.018,6.117,1.659,7.8a5.294,5.294,0,0,0,3.951,1.365h1.1V25.19a.91.91,0,0,0,1.553.643l5.976-5.975h2.714a4.556,4.556,0,0,0,1.079,3.085,3.637,3.637,0,0,0,2.723.955h6.436L30.9,27.606a.906.906,0,0,0,.643.267.9.9,0,0,0,.348-.069.911.911,0,0,0,.562-.841V23.9h.369a3.687,3.687,0,0,0,2.751-.966c1.164-1.169,1.159-3.037,1.153-5.2ZM28.241,10.95c.016,2.778.029,5.176-1.068,6.279a3.554,3.554,0,0,1-2.617.808h-10.7a.91.91,0,0,0-.643.267L8.529,22.992V18.948a.91.91,0,0,0-.91-.91H5.611a3.606,3.606,0,0,1-2.662-.83C1.806,16.062,1.814,13.577,1.821,10.7V9.157C1.814,6.281,1.806,3.8,2.949,2.65a3.611,3.611,0,0,1,2.662-.83H24.556a3.549,3.549,0,0,1,2.617.809c1.1,1.1,1.084,3.5,1.068,6.278ZM15.034,7.891a1.954,1.954,0,1,0,1.954,1.954,1.954,1.954,0,0,0-1.954-1.954m-6.555,0a1.954,1.954,0,1,0,1.955,1.954A1.954,1.954,0,0,0,8.479,7.891m13.109,0a1.954,1.954,0,1,0,1.954,1.954,1.953,1.953,0,0,0-1.954-1.954" transform="translate(0 0)" fill="url(#linear-gradient)"/>
14
+ </g>
15
+ </g>
16
+ </svg>
@@ -1,33 +1,54 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
1
  import Link from 'next/link';
11
2
  import React, { useEffect, useRef, useState } from 'react';
12
3
  import Image from 'next/image';
13
4
  import { insert } from '../../lib';
14
5
  import * as gtag from '../../lib/gtag';
15
6
  import { savePowerLinkConversion } from '../../lib';
16
- import style from './index.module.css';
17
7
  import { useRouter } from 'next/router';
8
+ import useBrowser from '../common/hook/useBrowser';
18
9
  import OnlineIcon from '../../asset/images/fix/online.webp';
19
10
  import KakaoIcon from '../../asset/images/fix/kakao.webp';
20
11
  import CallIcon from '../../asset/images/fix/call.webp';
21
12
  import Call2Icon from '../../asset/images/fix/call2.webp';
22
13
  import MenuXIcon from '../../asset/images/fix/menu_x.webp';
23
14
  import ArrowIcon from '../../asset/images/fix/arrow.webp';
15
+ import OnlineIconM from '../../asset/images/fix/online_m.webp';
16
+ import KakaoIconM from '../../asset/images/fix/kakao_m.webp';
17
+ import CallIconM from '../../asset/images/fix/call_m.webp';
24
18
  const Fix = (props) => {
25
19
  const mobile = require('is-mobile');
26
20
  const [isMobile, setIsMobile] = useState(false);
27
21
  // const [isTop, setIsTop] = useState(true);
22
+ //온라인상담, 전화상담
23
+ const [viewOnline, setViewOnline] = useState(false);
24
+ const [viewCall, setViewCall] = useState(false);
28
25
  const onlineRef = useRef(null);
29
26
  const callRef = useRef(null);
27
+ const { width } = useBrowser();
28
+ //모바일 액티브
29
+ const [activeNum, setActiveNum] = useState(0);
30
+ const [isHovered, setIsHovered] = useState(false);
30
31
  const router = useRouter();
32
+ const handleCancel = (ref, type) => {
33
+ var _a, _b;
34
+ if (ref.current) {
35
+ ref.current.style.opacity = '0';
36
+ }
37
+ if (type === 'call')
38
+ (_a = document.getElementById('callBtn')) === null || _a === void 0 ? void 0 : _a.focus();
39
+ else if (type === 'online')
40
+ (_b = document.getElementById('onlineBtn')) === null || _b === void 0 ? void 0 : _b.focus();
41
+ setTimeout(() => {
42
+ var _a;
43
+ if (type === 'call') {
44
+ setViewCall(false);
45
+ }
46
+ else if (type === 'online') {
47
+ (_a = document.getElementById('onlineBtn')) === null || _a === void 0 ? void 0 : _a.focus();
48
+ setViewOnline(false);
49
+ }
50
+ }, 400);
51
+ };
31
52
  const onClickConsult = () => {
32
53
  if (isMobile) {
33
54
  mConsultClick();
@@ -198,124 +219,210 @@ const Fix = (props) => {
198
219
  const is_mobile = mobile();
199
220
  setIsMobile(is_mobile);
200
221
  }, []);
222
+ useEffect(() => {
223
+ let mainLoop;
224
+ const resetInterval = () => {
225
+ if (mainLoop)
226
+ clearInterval(mainLoop);
227
+ if (!isHovered) {
228
+ // 호버 중이 아닐 때만 인터벌 설정
229
+ mainLoop = setInterval(() => {
230
+ console.log(activeNum);
231
+ if (activeNum >= 2) {
232
+ setActiveNum(0);
233
+ }
234
+ else {
235
+ setActiveNum(prev => prev + 1);
236
+ }
237
+ }, 2000);
238
+ }
239
+ };
240
+ resetInterval();
241
+ return () => clearInterval(mainLoop);
242
+ }, [activeNum, isHovered]);
201
243
  return (<>
202
244
  <div className={
203
245
  // (isTop ? ' hidden ' : '') +
204
246
  ' fixed bottom-[6.5%] right-[25px] z-[2000] w-fit font-[SUIT] ' +
205
247
  ' max-5xl:bottom-[4%] ' +
206
- ' max-lg:relative max-lg:bottom-0 max-lg:right-0 max-lg:w-full'}>
248
+ ' 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)] '}>
249
+ {/*모바일용 원*/}
250
+ <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={{
251
+ left: `calc(((100%/3)/2)*${activeNum * 2 + 1})`
252
+ }}/>
253
+
207
254
  {/*Fix*/}
208
255
 
209
256
  <div className={'relative z-20 h-[330px] w-[100px] overflow-hidden rounded-full shadow-[0_4px_8px_0_rgba(0,0,0,0.1)] ' +
210
257
  'max-5xl:h-[250px] max-5xl:w-[75px] ' +
211
- 'max-lg:h-[65px] max-lg:w-full max-lg:rounded-none max-lg:shadow-[0_-2px_20px_0_rgba(0,0,0,0.08)] '}>
258
+ 'max-lg:h-[70px] max-lg:w-full max-lg:overflow-visible max-lg:shadow-none '}>
212
259
  <div className={'flex h-[60px] w-full justify-center bg-[#1B244F] px-[28px] py-[9px] pt-[15px] text-[16px] font-[800] leading-[17px] tracking-[0px] text-white max-5xl:h-[55px] max-5xl:pt-[13px] max-5xl:text-[14px] max-lg:hidden '}>
213
260
  Quick Menu
214
261
  </div>
215
- <div className={'leading-1 flex h-full w-full flex-col items-center gap-y-[29px] bg-[#fff] py-[15px] pb-[20px] text-[14px] font-[600] tracking-[-0.7px] text-[#2B2B2B] ' +
216
- ' max-5xl:gap-y-[13px] max-5xl:py-[13px] max-5xl:text-[13px] ' +
217
- ' max-lg:flex-row max-lg:pb-[18px] max-lg:pt-[20px] max-lg:text-[13px] '}>
218
- {/*온라인 예약 버튼*/}
219
- <div className={'flex w-full cursor-pointer flex-col items-center'} onClick={() => {
220
- var _a, _b, _c, _d;
221
- onClickConsult();
222
- (_a = callRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove(style.fadeIn);
223
- (_b = callRef.current) === null || _b === void 0 ? void 0 : _b.classList.remove(style.fadeOut);
224
- (_c = onlineRef.current) === null || _c === void 0 ? void 0 : _c.classList.remove(style.fadeOut);
225
- (_d = onlineRef.current) === null || _d === void 0 ? void 0 : _d.classList.add(style.fadeIn);
226
- }}>
227
- <Image src={OnlineIcon} alt={'online icon'} width={33} height={38} className={'h-auto w-[33px] max-5xl:w-[23px] max-lg:w-[25px] lg:mb-[3px] 5xl:mb-[5px] '}/>
228
- 온라인예약
229
- </div>
230
- {/*카톡 예약 버튼*/}
231
- <Link href="https://pf.kakao.com/_xgxoTlK/chat" target={'_blank'} className={'flex w-full cursor-pointer flex-col items-center'} onClick={onClickKakao}>
232
- <Image src={KakaoIcon} alt={'kakao icon'} width={33} height={31} className={'mb-[5px] h-auto w-[33px] max-5xl:mb-[3px] max-5xl:w-[23px] max-lg:w-[25px] '}/>
233
- 카톡예약
234
- </Link>
235
- {/*전화 예약 버튼*/}
236
- <div className={'flex w-full cursor-pointer flex-col items-center'} onClick={() => {
237
- var _a, _b, _c, _d;
238
- (_a = onlineRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove(style.fadeIn);
239
- (_b = onlineRef.current) === null || _b === void 0 ? void 0 : _b.classList.remove(style.fadeOut);
240
- (_c = callRef.current) === null || _c === void 0 ? void 0 : _c.classList.remove(style.fadeOut);
241
- (_d = callRef.current) === null || _d === void 0 ? void 0 : _d.classList.add(style.fadeIn);
242
- }}>
243
- <Image src={CallIcon} alt={'call icon'} width={33} height={33} className={'mb-[5px] h-auto w-[33px] max-5xl:mb-[3px] max-5xl:w-[23px] max-lg:w-[25px]'}/>
244
- 전화예약
245
- </div>
246
- </div>
262
+ {width >= 1024 ? (<div className={'leading-1 flex h-full w-full flex-col items-center gap-y-[29px] bg-[#fff] py-[15px] pb-[20px] text-[14px] font-[600] tracking-[-0.7px] text-[#2B2B2B] ' +
263
+ ' max-5xl:gap-y-[13px] max-5xl:py-[13px] max-5xl:text-[13px] ' +
264
+ ' max-lg:flex-row max-lg:pb-[18px] max-lg:pt-[20px] max-lg:text-[13px] ' +
265
+ ' max-lg:hidden'}>
266
+ {/*온라인 예약 버튼*/}
267
+ <div className={'flex w-full cursor-pointer flex-col items-center'} onClick={() => {
268
+ onClickConsult();
269
+ setViewOnline(true);
270
+ }}>
271
+ <Image src={OnlineIcon} alt={'online icon'} width={33} height={38} className={'h-auto w-[33px] max-5xl:w-[23px] max-lg:w-[25px] lg:mb-[3px] 5xl:mb-[5px] '}/>
272
+ 온라인예약
273
+ </div>
274
+ {/*카톡 예약 버튼*/}
275
+ <Link href="https://pf.kakao.com/_xgxoTlK/chat" target={'_blank'} className={'flex w-full cursor-pointer flex-col items-center'} onClick={onClickKakao}>
276
+ <Image src={KakaoIcon} alt={'kakao icon'} width={33} height={31} className={'mb-[5px] h-auto w-[33px] max-5xl:mb-[3px] max-5xl:w-[23px] max-lg:w-[25px] '}/>
277
+ 카톡예약
278
+ </Link>
279
+ {/*전화 예약 버튼*/}
280
+ <div className={'flex w-full cursor-pointer flex-col items-center'} onClick={() => {
281
+ setViewCall(true);
282
+ }}>
283
+ <Image src={CallIcon} alt={'call icon'} width={33} height={33} className={'mb-[5px] h-auto w-[33px] max-5xl:mb-[3px] max-5xl:w-[23px] max-lg:w-[25px]'}/>
284
+ 전화예약
285
+ </div>
286
+ </div>) : (<div className={'flex h-full w-full rounded-t-[20px] bg-white pb-[5px] text-[13px] font-[600] leading-none text-[#2B2B2B] lg:hidden '}>
287
+ {/*온라인 예약 버튼*/}
288
+ <button className={'relative z-10 flex w-full flex-col items-center justify-center gap-[8px]'} onClick={() => {
289
+ onClickConsult();
290
+ setViewOnline(true);
291
+ }} tabIndex={0} aria-label="온라인 예약" id={'onlineBtn'} onMouseEnter={() => {
292
+ setActiveNum(0);
293
+ setIsHovered(true);
294
+ }} onMouseLeave={() => setIsHovered(false)}>
295
+ <div className={'absolute top-[-5px] z-0 aspect-square w-[40px] scale-50 rounded-full bg-[#AE0E36] delay-[150ms] duration-300 ' +
296
+ 'transition-[opacity,transform] ' +
297
+ `${activeNum === 0 ? 'scale-[1] opacity-100' : 'opacity-0 transition-none delay-0'}`}/>
298
+ <span className={'relative h-[21px] w-[21px] transition-[filter,transform] delay-[150ms] duration-300 ' +
299
+ `${activeNum === 0 ? 'translate-y-[-8px] brightness-[300]' : 'brightness-[0] transition-none delay-0'}`}>
300
+ <Image src={OnlineIconM} alt={''} fill className={'h-full w-full object-contain '}/>
301
+ </span>
302
+ <p className={'z-10 tracking-[-0.6px] transition-[color,font-weight] delay-[150ms] duration-300 ' +
303
+ `${activeNum === 0 ? 'font-[800] text-[#AE0E36]' : ' transition-none delay-0'}`}>
304
+ 온라인예약
305
+ </p>
306
+ </button>
307
+ {/*카톡 예약 버튼*/}
308
+ <Link href="https://pf.kakao.com/_xgxoTlK/chat" title={'새창열림'} target={'_blank'} className={'flex w-full flex-col items-center justify-center gap-[8px]'} onClick={onClickKakao} tabIndex={0} aria-label="카카오톡 예약" onMouseEnter={() => {
309
+ setActiveNum(1);
310
+ setIsHovered(true);
311
+ }} onMouseLeave={() => setIsHovered(false)}>
312
+ <div className={'absolute top-[-5px] z-0 aspect-square w-[40px] scale-50 rounded-full bg-[#AE0E36] delay-[150ms] duration-300 ' +
313
+ 'transition-[opacity,transform] ' +
314
+ `${activeNum === 1 ? 'scale-[1] opacity-100' : 'opacity-0 transition-none delay-0'}`}/>
315
+ <span className={'relative h-[21px] w-[21px] transition-[filter,transform] delay-[150ms] duration-300 ' +
316
+ `${activeNum === 1 ? 'translate-y-[-8px] brightness-[300]' : 'brightness-[0] transition-none delay-0'}`}>
317
+ <Image src={KakaoIconM} alt={''} fill className={'h-full w-full scale-110 object-contain'}/>
318
+ </span>
319
+ <p className={'z-10 tracking-[-0.6px] transition-[color,font-weight] delay-[150ms] duration-300 ' +
320
+ `${activeNum === 1 ? 'font-[800] text-[#AE0E36]' : ' transition-none delay-0'}`}>
321
+ 카톡예약
322
+ </p>
323
+ </Link>
324
+ {/*전화 예약 버튼*/}
325
+ <button className={'flex w-full flex-col items-center justify-center gap-[8px]'} onClick={() => {
326
+ setViewCall(true);
327
+ }} tabIndex={0} aria-label="전화 예약" id={'callBtn'} onMouseEnter={() => {
328
+ setActiveNum(2);
329
+ setIsHovered(true);
330
+ }} onMouseLeave={() => setIsHovered(false)}>
331
+ <div className={'absolute top-[-5px] z-0 aspect-square w-[40px] scale-50 rounded-full bg-[#AE0E36] delay-[150ms] duration-300 ' +
332
+ 'transition-[opacity,transform] ' +
333
+ `${activeNum === 2 ? 'scale-[1] opacity-100' : 'opacity-0 transition-none delay-0'}`}/>
334
+ <span className={'relative h-[21px] w-[21px] transition-[filter,transform] delay-[150ms] duration-300 ' +
335
+ `${activeNum === 2 ? 'translate-y-[-8px] brightness-[300]' : 'brightness-[0] transition-none delay-0'}`}>
336
+ <Image src={CallIconM} alt={''} fill className={'h-full w-full object-contain'}/>
337
+ </span>
338
+ <p className={'z-10 tracking-[-0.6px] transition-[color,font-weight] delay-[150ms] duration-300 ' +
339
+ `${activeNum === 2 ? 'font-[800] text-[#AE0E36]' : ' transition-none delay-0'}`}>
340
+ 전화예약
341
+ </p>
342
+ </button>
343
+ </div>)}
247
344
  </div>
248
345
 
249
346
  {/*온라인*/}
250
- <div ref={onlineRef} className={'pointer-events-none fixed bottom-[13px] right-[25px] h-[300px] w-[300px] bg-white px-[30px] py-[26px] opacity-0 shadow-[0_4px_8px_0_rgba(0,0,0,0.1)] ' +
251
- 'max-5xl:bottom-[10px] max-5xl:h-[230px] max-5xl:w-[230px] max-5xl:px-[22px] max-5xl:py-[20px] ' +
252
- ' max-lg:bottom-[85px] max-lg:left-[20px] max-lg:h-[160px] max-lg:w-[240px] max-lg:px-[20px] max-lg:py-[17px]'}>
253
- <span className={'z-10 mb-[11px] flex w-full items-center justify-between text-[26px] font-bold leading-[30px] tracking-[-1.3px] max-5xl:text-[20px] max-lg:text-[18px] max-lg:leading-[23px]'}>
254
- 온라인 예약상담
255
- <Image src={MenuXIcon} width={54} height={54} alt={'취소'} onClick={() => {
256
- var _a, _b;
257
- (_a = onlineRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove(style.fadeIn);
258
- (_b = onlineRef.current) === null || _b === void 0 ? void 0 : _b.classList.add(style.fadeOut);
259
- }} className={'h-auto w-[20px] cursor-pointer max-5xl:w-[15px] max-lg:w-[15px]'}/>
260
- </span>
347
+ {viewOnline ? (<OnlineBox titleTxt={'온라인 예약상담'} reservationTxt={'해당사건에 특화된 전문변호사가 검토 후 신속한 대응전략을 제시합니다.'} companyTxt={'기업상담'} privateTxt={'개인상담'} cancel={handleCancel} onlineRef={onlineRef} onConsultCompClick={() => onConsultCompClick()} onConsultPersonalClick={() => onConsultPersonalClick()}/>) : (<></>)}
261
348
 
262
- <span className={'text-[16px] tracking-[-0.8px] text-[#5C5C5C] max-5xl:text-[14px] max-lg:hidden'}>
263
- 해당사건에 특화된 전문변호사가 검토 후 신속한 대응전략을 제시합니다.
264
- </span>
265
-
266
- <button className={'mb-[4px] mt-[32px] flex h-[60px] w-[240px] items-center justify-between rounded-[5px] bg-[#285EA7] px-[20px] py-[16px] text-[22px] font-bold text-white ' +
349
+ {/*전화*/}
350
+ {viewCall ? (<CallBox titleTxt={'전화 예약상담'} tel={props.tel} companyTxt={'기업상담'} privateTxt={'개인상담'} cancel={handleCancel} onClickTel={onClickTel} callRef={callRef}/>) : (<></>)}
351
+ </div>
352
+ </>);
353
+ };
354
+ export default Fix;
355
+ const OnlineBox = (props) => {
356
+ const closeRef = useRef(null);
357
+ return (<div ref={props.onlineRef} className={'fixed bottom-[33px] right-[25px] z-50 h-[300px] w-[300px] bg-white px-[30px] py-[26px] shadow-[0_4px_8px_0_rgba(0,0,0,0.1)] ' +
358
+ 'max-5xl:bottom-[10px] max-5xl:h-[230px] max-5xl:w-[230px] max-5xl:px-[22px] max-5xl:py-[20px] ' +
359
+ 'max-lg:bottom-[85px] max-lg:left-[20px] max-lg:h-[160px] max-lg:w-[240px] max-lg:px-[20px] max-lg:py-[17px] ' +
360
+ 'animate-[fadeIn_0.15s] transition-opacity '}>
361
+ <span className={'z-10 mb-[11px] flex w-full items-center justify-between text-[26px] font-bold leading-[30px] tracking-[-1.3px] max-5xl:text-[20px] max-lg:text-[18px] max-lg:leading-[23px]'}>
362
+ {props.titleTxt}
363
+ <button onClick={() => props.cancel(props.onlineRef, 'online')} ref={closeRef}>
364
+ <Image src={MenuXIcon} width={54} height={54} alt={'온라인상담 닫기'} className={'h-auto w-[20px] cursor-pointer max-5xl:w-[15px] max-lg:w-[15px]'}/>
365
+ </button>
366
+ </span>
367
+ <span className={'text-[16px] tracking-[-0.8px] text-[#5C5C5C] max-5xl:text-[14px] max-lg:hidden'}>
368
+ {props.reservationTxt}
369
+ </span>
370
+ <Link className={'mb-[4px] mt-[32px] flex h-[60px] w-[240px] items-center justify-between rounded-[5px] bg-[#285EA7] px-[20px] py-[16px] text-[22px] font-bold text-white ' +
267
371
  ' max-5xl:mt-[13px] max-5xl:h-[45px] max-5xl:w-[190px] max-5xl:text-[18px] ' +
268
- ' max-lg:mt-[17px] max-lg:h-[40px] max-lg:w-[200px] max-lg:py-[10px] max-lg:text-[16px] '} onClick={() => __awaiter(void 0, void 0, void 0, function* () {
269
- onConsultCompClick();
270
- yield router.push('/consulting');
271
- })}>
272
- 기업상담
273
- <Image src={ArrowIcon} width={22} height={18} alt={'온라인 예약상담 기업상담'} className={'h-auto w-[22px] max-5xl:w-[20px] max-lg:w-[17px]'}/>
274
- </button>
275
- <button className={'flex h-[60px] w-[240px] items-center justify-between rounded-[5px] bg-[#0A96AF] px-[20px] py-[16px] text-[22px] font-bold text-white' +
372
+ ' max-lg:mt-[17px] max-lg:h-[40px] max-lg:w-[200px] max-lg:py-[10px] max-lg:text-[16px] '} href={'/consulting'} aria-label={'기업 온라인 상담'} onClick={props.onConsultCompClick}>
373
+ {props.companyTxt}
374
+ <Image src={ArrowIcon} width={22} height={18} alt={''} className={'h-auto w-[22px] max-5xl:w-[20px] max-lg:w-[17px]'}/>
375
+ </Link>
376
+ <Link className={'flex h-[60px] w-[240px] items-center justify-between rounded-[5px] bg-[#0A96AF] px-[20px] py-[16px] text-[22px] font-bold text-white' +
276
377
  ' max-5xl:h-[45px] max-5xl:w-[190px] max-5xl:text-[18px] ' +
277
- ' max-lg:h-[40px] max-lg:w-[200px] max-lg:py-[10px] max-lg:text-[16px] '} onClick={() => __awaiter(void 0, void 0, void 0, function* () {
278
- onConsultPersonalClick();
279
- yield router.push('/consult');
280
- })}>
281
- 개인상담
282
- <Image src={ArrowIcon} width={22} height={18} alt={'온라인 예약상담 개인상담'} className={'h-auto w-[22px] max-5xl:w-[20px] max-lg:w-[17px]'}/>
283
- </button>
284
- </div>
285
-
286
- {/*전화*/}
287
- <div ref={callRef} className={'pointer-events-none fixed bottom-[13px] right-[25px] h-[300px] w-[300px] bg-white px-[30px] py-[26px] opacity-0 shadow-[0_4px_8px_0_rgba(0,0,0,0.1)] ' +
378
+ ' max-lg:h-[40px] max-lg:w-[200px] max-lg:py-[10px] max-lg:text-[16px] '} href={'/consult'} aria-label={'개인 온라인 상담'} onClick={props.onConsultPersonalClick} onKeyDown={e => {
379
+ var _a;
380
+ if (e.key === 'Tab') {
381
+ e.preventDefault();
382
+ (_a = closeRef.current) === null || _a === void 0 ? void 0 : _a.focus();
383
+ }
384
+ }}>
385
+ {props.privateTxt}
386
+ <Image src={ArrowIcon} width={22} height={18} alt={''} className={'h-auto w-[22px] max-5xl:w-[20px] max-lg:w-[17px]'}/>
387
+ </Link>
388
+ </div>);
389
+ };
390
+ const CallBox = (props) => {
391
+ const closeRef = useRef(null);
392
+ return (<div ref={props.callRef} className={'fixed bottom-[13px] right-[25px] z-50 h-[300px] w-[300px] bg-white px-[30px] py-[26px] shadow-[0_4px_8px_0_rgba(0,0,0,0.1)] ' +
288
393
  'max-5xl:bottom-[10px] max-5xl:h-[230px] max-5xl:w-[230px] max-5xl:px-[22px] max-5xl:py-[20px] ' +
289
- 'max-lg:bottom-[85px] max-lg:right-[20px] max-lg:h-[200px] max-lg:w-[240px] max-lg:px-[20px] max-lg:py-[17px]'}>
290
- <span className={'z-10 mb-[11px] flex w-full items-center justify-between text-[26px] font-bold leading-[30px] tracking-[-1.3px] max-5xl:text-[20px] max-lg:text-[18px] max-lg:leading-[23px]'}>
291
- 전화 예약상담
292
- <Image src={MenuXIcon} width={54} height={54} alt={'취소'} onClick={() => {
293
- var _a, _b;
294
- (_a = callRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove(style.fadeIn);
295
- (_b = callRef.current) === null || _b === void 0 ? void 0 : _b.classList.add(style.fadeOut);
296
- }} className={'h-auto w-[20px] cursor-pointer max-5xl:w-[15px] max-lg:w-[15px]'}/>
297
- </span>
394
+ 'max-lg:bottom-[85px] max-lg:right-[20px] max-lg:h-[200px] max-lg:w-[240px] max-lg:px-[20px] max-lg:py-[17px] ' +
395
+ 'animate-[fadeIn_0.15s] transition-opacity '}>
396
+ <span className={'z-10 mb-[11px] flex w-full items-center justify-between text-[26px] font-bold leading-[30px] tracking-[-1.3px] max-5xl:text-[20px] max-lg:text-[18px] max-lg:leading-[23px]'}>
397
+ {props.titleTxt}
398
+ <button onClick={() => props.cancel(props.callRef, 'call')} ref={closeRef}>
399
+ <Image src={MenuXIcon} width={54} height={54} alt={'취소'} className={'h-auto w-[20px] cursor-pointer max-5xl:w-[15px] max-lg:w-[15px]'}/>
400
+ </button>
401
+ </span>
298
402
 
299
- <Link href={`tel:${props.tel}`} className={'mb-[4px] mt-[32px] flex h-[80px] w-[240px] items-center justify-between rounded-[5px] bg-[#285EA7] px-[20px] py-[16px] text-[22px] font-bold text-white' +
403
+ <Link href={`tel:${props.tel}`} className={'mb-[4px] mt-[32px] flex h-[80px] w-[240px] items-center justify-between rounded-[5px] bg-[#285EA7] px-[20px] py-[16px] text-[22px] font-bold text-white' +
300
404
  ' max-5xl:h-[60px] max-5xl:w-[190px] max-5xl:text-[18px] ' +
301
- ' max-lg:mt-[15px] max-lg:h-[60px] max-lg:w-[200px] max-lg:px-[15px] max-lg:py-[12px] '} onClick={onClickTel}>
302
- <span className={'text-left font-bold leading-tight max-lg:leading-[17.5px]'}>
303
- <span className={'text-[20px] max-lg:text-[16px]'}>기업상담</span>
304
- {/* <span className={'text-[22px] max-lg:text-[16px] block'}>{tel}</span> */}
305
- </span>
306
- <Image src={Call2Icon} width={30} height={30} alt={'전화 예약상담 기업상담'} className={'h-[30px] w-[30px]'}/>
307
- </Link>
308
- <Link href={`tel:${props.tel}`} className={'flex h-[80px] w-[240px] items-center justify-between rounded-[5px] bg-[#0A96AF] px-[20px] py-[16px] text-[22px] font-bold text-white' +
405
+ ' max-lg:mt-[15px] max-lg:h-[60px] max-lg:w-[200px] max-lg:px-[15px] max-lg:py-[12px] '} onClick={props.onClickTel} aria-label={'기업 전화상담'}>
406
+ <span className={'text-left font-bold leading-tight max-lg:leading-[17.5px]'}>
407
+ <span className={'text-[20px] max-lg:text-[16px]'}>{props.companyTxt}</span>
408
+ {/* <span className={'text-[22px] max-lg:text-[16px] block'}>{tel}</span> */}
409
+ </span>
410
+ <Image src={Call2Icon} width={30} height={30} alt={''} className={'h-[30px] w-[30px]'}/>
411
+ </Link>
412
+ <Link href={`tel:${props.tel}`} className={'flex h-[80px] w-[240px] items-center justify-between rounded-[5px] bg-[#0A96AF] px-[20px] py-[16px] text-[22px] font-bold text-white' +
309
413
  ' max-5xl:h-[60px] max-5xl:w-[190px] max-5xl:text-[18px] ' +
310
- ' max-lg:h-[60px] max-lg:w-[200px] max-lg:px-[15px] max-lg:py-[12px] '} onClick={onClickTel}>
311
- <span className={'text-left font-bold leading-tight max-lg:leading-[17.5px]'}>
312
- <span className={'text-[20px] max-lg:text-[16px] '}>개인상담</span>
313
- {/* <span className={'text-[22px] max-lg:text-[16px] block '}>{tel}</span> */}
314
- </span>
315
- <Image src={Call2Icon} width={30} height={30} alt={'전화 예약상담 개인상담'} className={'h-[30px] w-[30px]'}/>
316
- </Link>
317
- </div>
318
- </div>
319
- </>);
414
+ ' max-lg:h-[60px] max-lg:w-[200px] max-lg:px-[15px] max-lg:py-[12px] '} onClick={props.onClickTel} aria-label={'개인 전화상담'} onKeyDown={e => {
415
+ var _a;
416
+ if (e.key === 'Tab') {
417
+ e.preventDefault();
418
+ (_a = closeRef.current) === null || _a === void 0 ? void 0 : _a.focus();
419
+ }
420
+ }}>
421
+ <span className={'text-left font-bold leading-tight max-lg:leading-[17.5px]'}>
422
+ <span className={'text-[20px] max-lg:text-[16px] '}>{props.privateTxt}</span>
423
+ {/* <span className={'text-[22px] max-lg:text-[16px] block '}>{tel}</span> */}
424
+ </span>
425
+ <Image src={Call2Icon} width={30} height={30} alt={''} className={'h-[30px] w-[30px]'}/>
426
+ </Link>
427
+ </div>);
320
428
  };
321
- export default Fix;