@daeryun/dr_components 0.1.28 → 0.1.30

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 (45) hide show
  1. package/dist/asset/images/header/h_call_line.webp +0 -0
  2. package/dist/asset/images/header/h_call_line_b.webp +0 -0
  3. package/dist/asset/images/header/h_menu.webp +0 -0
  4. package/dist/asset/images/header/h_menu_b.webp +0 -0
  5. package/dist/asset/images/header/image_b.webp +0 -0
  6. package/dist/asset/images/header/logo_b.webp +0 -0
  7. package/dist/asset/images/header/logo_w.webp +0 -0
  8. package/dist/asset/images/header/m_right.webp +0 -0
  9. package/dist/asset/images/header/m_sr.webp +0 -0
  10. package/dist/asset/images/header/search_black.webp +0 -0
  11. package/dist/asset/images/header/search_white.webp +0 -0
  12. package/dist/components/CountingSection/CountingSection.jsx +5 -9
  13. package/dist/components/CountingSection/CountingSection.tsx +5 -21
  14. package/dist/components/LogoSection/LogoSection.d.ts +6 -0
  15. package/dist/components/LogoSection/LogoSection.jsx +51 -0
  16. package/dist/components/LogoSection/LogoSection.stories.d.ts +8 -0
  17. package/dist/components/LogoSection/LogoSection.stories.jsx +15 -0
  18. package/dist/components/LogoSection/LogoSection.stories.tsx +23 -0
  19. package/dist/components/LogoSection/LogoSection.tsx +106 -0
  20. package/dist/components/Menu/IMenuTypes.d.ts +17 -0
  21. package/dist/components/Menu/IMenuTypes.js +1 -0
  22. package/dist/components/Menu/IMenuTypes.ts +13 -0
  23. package/dist/components/Menu/Menu.d.ts +4 -0
  24. package/dist/components/Menu/Menu.jsx +10 -0
  25. package/dist/components/Menu/Menu.stories.d.ts +7 -0
  26. package/dist/components/Menu/Menu.stories.jsx +162 -0
  27. package/dist/components/Menu/Menu.stories.tsx +170 -0
  28. package/dist/components/Menu/Menu.tsx +15 -0
  29. package/dist/components/Menu/MobileMenu.d.ts +4 -0
  30. package/dist/components/Menu/MobileMenu.jsx +174 -0
  31. package/dist/components/Menu/MobileMenu.tsx +286 -0
  32. package/dist/components/Menu/MyCase.d.ts +5 -0
  33. package/dist/components/Menu/MyCase.jsx +26 -0
  34. package/dist/components/Menu/MyCase.tsx +47 -0
  35. package/dist/components/Menu/PCMenu.d.ts +4 -0
  36. package/dist/components/Menu/PCMenu.jsx +130 -0
  37. package/dist/components/Menu/PCMenu.tsx +238 -0
  38. package/dist/components/common/data/index.d.ts +7 -0
  39. package/dist/components/common/data/index.js +41 -0
  40. package/dist/components/common/data/index.ts +42 -0
  41. package/dist/components/index.js +2 -1
  42. package/dist/components/index.ts +2 -1
  43. package/dist/styles/globals.css +673 -30
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +1 -1
@@ -0,0 +1,170 @@
1
+ import Menu from './Menu';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import '../../styles/globals.css';
4
+ import Logo from '../../asset/images/footer/logo_b.webp';
5
+
6
+ const meta: Meta<typeof Menu> = {
7
+ component: Menu,
8
+ title: 'Menu'
9
+ };
10
+
11
+ export default meta;
12
+
13
+ type Story = StoryObj<typeof meta>;
14
+
15
+ export const Default: Story = {
16
+ render: args => {
17
+ return <Menu {...args} />;
18
+ },
19
+ args: {
20
+ tel: '1800-7905',
21
+ opacity: 100,
22
+ logo: Logo,
23
+ keywordArr: ['보이스피싱', '성범죄', '교통사고', '음주운전', '학교폭력', '마약', '명예훼손', '중대재해'],
24
+ menuToggle: true,
25
+ routes: [
26
+ {
27
+ path: '/intro', // the url
28
+ name: '그룹소개', // name that appear in Sidebar
29
+ routes: [
30
+ {
31
+ path: '/intro',
32
+ name: '그룹소개'
33
+ },
34
+ {
35
+ path: '/strength',
36
+ name: '대륜의 강점'
37
+ },
38
+
39
+ {
40
+ path: '/map',
41
+ name: '오시는 길'
42
+ },
43
+ {
44
+ path: 'https://www.daeryunlaw.com/integrate?search=&tab=전체',
45
+ name: '통합검색'
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ path: '/success',
51
+ name: '업무사례',
52
+ routes: [
53
+ {
54
+ path: '/success',
55
+ name: '업무사례'
56
+ },
57
+ {
58
+ path: 'https://www.daeryunlaw.com/trend',
59
+ name: '판결분석'
60
+ },
61
+ {
62
+ path: '/info',
63
+ name: '법률정보'
64
+ },
65
+ {
66
+ path: 'https://www.daeryunlaw.com/webtoon',
67
+ name: '만화로 보는 사례'
68
+ },
69
+ {
70
+ path: '/reply',
71
+ name: '고객후기'
72
+ }
73
+ ]
74
+ },
75
+ {
76
+ path: '/field/area',
77
+ name: '업무분야',
78
+ routes: [
79
+ {
80
+ path: '/field/area',
81
+ name: process.env.NEXT_PUBLIC_GROUPNAME + ' 업무'
82
+ },
83
+ {
84
+ path: '/field/areaAll',
85
+ name: '전체'
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ path: '/lawyer',
91
+ name: '구성원 소개',
92
+ routes: [
93
+ {
94
+ path: '/lawyer',
95
+ name: process.env.NEXT_PUBLIC_KEYWORD + '전문변호사'
96
+ },
97
+ {
98
+ path: '/lawyer?pro=true',
99
+ name: '특수분야전문가'
100
+ }
101
+ ]
102
+ },
103
+
104
+ {
105
+ path: '/broadcast',
106
+ name: '소식/자료',
107
+ routes: [
108
+ {
109
+ path: '/broadcast',
110
+ name: '언론보도'
111
+ },
112
+ {
113
+ path: '/notice',
114
+ name: '공지사항'
115
+ },
116
+ {
117
+ path: '/archive',
118
+ name: '법률서식'
119
+ },
120
+ {
121
+ path: 'https://career.daeryunlaw.com',
122
+ name: '인재채용'
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ path: '/youtube',
128
+ name: 'SNS',
129
+ routes: [
130
+ {
131
+ path: '/youtube',
132
+ name: '유튜브'
133
+ },
134
+ {
135
+ path: '/blog',
136
+ name: '블로그'
137
+ },
138
+ {
139
+ path: '/instagram',
140
+ name: '인스타그램'
141
+ },
142
+ {
143
+ path: '/kin',
144
+ name: '법률지식인'
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ path: 'https://www.scourt.go.kr/portal/information/events/search/search.jsp',
150
+ name: '나의 사건검색',
151
+ routes: [
152
+ {
153
+ path: 'https://www.scourt.go.kr/portal/information/events/search/search.jsp',
154
+ name: '나의 사건검색'
155
+ }
156
+ ]
157
+ },
158
+ {
159
+ path: '/choice',
160
+ name: '대륜법률상담예약',
161
+ routes: [
162
+ {
163
+ path: '/choice',
164
+ name: '대륜법률상담예약'
165
+ }
166
+ ]
167
+ }
168
+ ]
169
+ }
170
+ };
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import MobileMenu from './MobileMenu';
3
+ import PCMenu from './PCMenu';
4
+ import { IMenuTypes } from './IMenuTypes';
5
+
6
+ const Menu = (props: IMenuTypes) => {
7
+ return (
8
+ <>
9
+ <MobileMenu {...props} />
10
+ <PCMenu {...props} />
11
+ </>
12
+ );
13
+ };
14
+
15
+ export default Menu;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IMenuTypes } from './IMenuTypes';
3
+ declare const MobileMenu: ({ handleMenuToggle, logo, opacity, menuToggle, tel, keywordArr, routes }: IMenuTypes) => React.JSX.Element;
4
+ export default MobileMenu;
@@ -0,0 +1,174 @@
1
+ import Link from 'next/link';
2
+ import React, { useEffect, useState } from 'react';
3
+ import Image from 'next/image';
4
+ import * as gtag from '../../lib/gtag';
5
+ import { useRouter } from 'next/router';
6
+ import MyCase from './MyCase';
7
+ import menuXImg from '../../asset/images/header/menu_x.webp';
8
+ import searchIcon from '../../asset/images/header/m_sr.webp';
9
+ import callLineImg from '../../asset/images/header/h_call_line_b.webp';
10
+ import { insert, savePowerLinkConversion } from '../../lib';
11
+ const MobileMenu = ({ handleMenuToggle, logo, opacity, menuToggle, tel, keywordArr, routes }) => {
12
+ const router = useRouter();
13
+ const mobile = require('is-mobile');
14
+ const [isMobile, setIsMobile] = useState(false);
15
+ const currentPath = router.pathname;
16
+ const [activeMenu, setActiveMenu] = useState();
17
+ const [search, setSearch] = useState('');
18
+ const [isMyCaseOn, setIsMyCaseOn] = useState(false);
19
+ const menuTelClickMo = () => {
20
+ insert('call', isMobile);
21
+ savePowerLinkConversion('call', isMobile);
22
+ gtag.event({
23
+ action: 'mobile_menu_tel',
24
+ category: 'menutel',
25
+ label: '모바일메뉴내전화버튼',
26
+ value: '1'
27
+ });
28
+ };
29
+ const ace_ToptelClick = () => {
30
+ try {
31
+ // @ts-ignore
32
+ AM_PL('/m_Toptel');
33
+ }
34
+ catch (e) { }
35
+ };
36
+ const findOuterName = (currentPath) => {
37
+ for (const route of routes) {
38
+ if (currentPath === route.path || currentPath.startsWith(route.path + '/')) {
39
+ return route.name;
40
+ }
41
+ for (const nestedRoute of route.routes) {
42
+ if (currentPath === nestedRoute.path || currentPath.startsWith(nestedRoute.path + '/')) {
43
+ return route.name;
44
+ }
45
+ }
46
+ }
47
+ return routes[0].name;
48
+ };
49
+ const handleClickForMobile = (e) => {
50
+ setActiveMenu(e.target.textContent);
51
+ };
52
+ const handleKeyPressSearch = (e) => {
53
+ e.preventDefault();
54
+ if (e.key === 'Enter' && search.length > 0) {
55
+ handleMenuToggle(`https://www.daeryunlaw.com/integrate?tab=전체&search=${search}`);
56
+ window.open(`https://www.daeryunlaw.com/integrate?tab=전체&search=${search}`, '_blank');
57
+ }
58
+ };
59
+ const handleClickSearch = () => {
60
+ handleMenuToggle(`https://www.daeryunlaw.com/integrate?tab=전체&search=${search}`);
61
+ window.open(`https://www.daeryunlaw.com/integrate?tab=전체&search=${search}`, '_blank');
62
+ };
63
+ const handleClickKeyword = (keyword) => {
64
+ if (keyword) {
65
+ handleMenuToggle(`https://www.daeryunlaw.com/integrate?tab=전체&search=${keyword}&recommend=true`);
66
+ window.open(`https://www.daeryunlaw.com/integrate?tab=전체&search=${keyword}&recommend=true`, '_blank');
67
+ }
68
+ };
69
+ const onClickMyCase = () => {
70
+ setIsMyCaseOn(false);
71
+ };
72
+ const reloadUrl = (url) => {
73
+ if (router.pathname === url) {
74
+ router.push(url).then(() => {
75
+ router.reload();
76
+ });
77
+ }
78
+ };
79
+ useEffect(() => {
80
+ setIsMobile(mobile());
81
+ setActiveMenu(findOuterName(currentPath));
82
+ }, []);
83
+ return (<>
84
+ {isMyCaseOn ? <MyCase onClick={onClickMyCase}/> : <></>}
85
+
86
+ <div style={{ opacity, zIndex: menuToggle ? 50 : -9999, pointerEvents: menuToggle ? 'auto' : 'none' }} className={' fixed left-0 top-0 hidden h-full w-full max-lg:block'}>
87
+ <div className={'absolute left-0 top-0 h-full w-full bg-black bg-opacity-[55%]'} onClick={() => handleMenuToggle()}></div>
88
+ <span style={{
89
+ msOverflowStyle: 'none',
90
+ scrollbarWidth: 'none'
91
+ }} className={'absolute right-0 top-0 z-0 h-full w-[65%] overflow-y-auto bg-white max-sm:w-[100%]'}>
92
+ <nav className={'h-full min-h-[800px] w-full'}>
93
+ <div className={'flex h-[55%] max-h-[290px] w-full flex-col justify-end border-b-[1px] border-solid border-b-[#F2F2F2] px-[30px] py-[30px] max-md:h-[20%] max-md:max-h-[180px] max-md:min-h-[250px]'}>
94
+ <Image tabIndex={0} src={menuXImg} width={54} height={54} alt={'메뉴'} className={'absolute right-[20px] top-[30px] h-[18px] w-[18px] cursor-pointer max-md:h-[15px] max-md:w-[15px]'} draggable={false} onKeyDown={(e) => {
95
+ if (e.key === 'Enter') {
96
+ handleMenuToggle();
97
+ }
98
+ }} onClick={() => handleMenuToggle()}/>
99
+ <span>
100
+ <Link href="/" onClick={() => handleMenuToggle('/')}>
101
+ <Image src={logo} alt="대륜 로고" width={324} height={50} className={'h-auto w-[200px] max-md:w-[155px]'}/>
102
+ </Link>
103
+ <div className={'relative mt-[20px] h-[50px] w-full max-md:h-[40px] '}>
104
+ <input placeholder={'사건분야, 변호사, 법률정보 등을 검색해보세요'} className={'h-full w-full border-[1px] border-solid border-[#285FA7] px-[20px] text-base tracking-[-0.6px] max-md:text-sm'} onChange={e => setSearch(e.target.value)} onKeyUp={handleKeyPressSearch}/>
105
+ <Image src={searchIcon} alt={'sr_icon'} width={35} height={34} className={'absolute right-[15px] top-[50%] h-auto w-[20px] translate-y-[-50%] cursor-pointer max-md:w-[17px]'} onClick={handleClickSearch}/>
106
+ </div>
107
+
108
+ <div className={'relative mt-[20px] grid w-full grid-cols-4 gap-2 '}>
109
+ {keywordArr.map((item, index) => (<div key={index} tabIndex={0} className={'cursor-pointer rounded-full border-[1px] border-solid border-[#285FA7] p-1 text-center text-[14px] font-[800] tracking-tighter text-[#285FA7] max-xs:text-[12px] '} onKeyDown={(e) => {
110
+ if (e.key === 'Enter') {
111
+ handleClickKeyword(item);
112
+ }
113
+ }} onClick={() => handleClickKeyword(item)}>
114
+ #{item}
115
+ </div>))}
116
+ </div>
117
+ </span>
118
+ </div>
119
+
120
+ <div className={'relative h-[60%] max-h-[600px] w-full bg-[#FCFCFC] py-[30px]'}>
121
+ <div className={'absolute top-0 h-full w-[45%] bg-[#F7F7F7]'}></div>
122
+ <div className={'flex h-full w-full flex-col justify-between'}>
123
+ {routes.map((menu, index) => {
124
+ var _a;
125
+ return (<span key={index} className={'relative w-full'}>
126
+ <button type={'button'} className={'h-[35px] w-[48%] flex-shrink-0 translate-x-[15px] rounded-full pl-[20px] text-left text-base font-[800] ' +
127
+ `${activeMenu == menu.name
128
+ ? '!bg-[#285FA7] text-white '
129
+ : 'hover:bg-[#EAEAEA]'}`} onClick={handleClickForMobile}>
130
+ {menu.name}
131
+ </button>
132
+ {menu.routes ? (<ul className={'absolute right-0 top-[5px] z-10 flex max-h-[160px] w-[55%] flex-col gap-[2vh] ' +
133
+ `${activeMenu == menu.name ? '' : 'hidden'}`}>
134
+ {(_a = menu.routes) === null || _a === void 0 ? void 0 : _a.map((submenu, index) => (<li key={index} className={' pl-[50px] pr-[30px] '}>
135
+ {submenu.name !== '나의 사건검색' ? (<Link href={submenu.path} className={' text-sm tracking-tight '} onClick={() => {
136
+ if (submenu.path === '/professional/case') {
137
+ setIsMyCaseOn(true);
138
+ handleMenuToggle();
139
+ }
140
+ else {
141
+ reloadUrl(submenu.path);
142
+ handleMenuToggle(submenu.path);
143
+ }
144
+ }}>
145
+ {submenu.name}
146
+ </Link>) : (<span className={' text-sm tracking-tight '} onClick={() => {
147
+ setIsMyCaseOn(true);
148
+ handleMenuToggle();
149
+ }}>
150
+ {submenu.name}
151
+ </span>)}
152
+ </li>))}
153
+ </ul>) : (<></>)}
154
+ </span>);
155
+ })}
156
+
157
+ <div className={'relative w-full text-left'}>
158
+ <a href={`tel:${tel}`} onClick={menuTelClickMo}>
159
+ <div className={'absolute left-[7px] top-[50%] h-[20px] w-[15px] translate-y-[-50%] '}>
160
+ <Image src={callLineImg} alt="전화"/>
161
+ </div>
162
+ <button type={'button'} className={'relative h-[60px] w-full pl-[30px] text-left text-xl font-[800] text-[#285FA7] '} onClick={ace_ToptelClick}>
163
+ {tel}
164
+ </button>
165
+ </a>
166
+ </div>
167
+ </div>
168
+ </div>
169
+ </nav>
170
+ </span>
171
+ </div>
172
+ </>);
173
+ };
174
+ export default MobileMenu;
@@ -0,0 +1,286 @@
1
+ import Link from 'next/link';
2
+ import React, { useEffect, useState } from 'react';
3
+ import Image from 'next/image';
4
+ import * as gtag from '../../lib/gtag';
5
+ import { useRouter } from 'next/router';
6
+ import MyCase from './MyCase';
7
+ import { IMenuTypes } from './IMenuTypes';
8
+
9
+ import menuXImg from '../../asset/images/header/menu_x.webp';
10
+ import searchIcon from '../../asset/images/header/m_sr.webp';
11
+ import callLineImg from '../../asset/images/header/h_call_line_b.webp';
12
+ import { insert, savePowerLinkConversion } from '../../lib';
13
+
14
+ const MobileMenu = ({ handleMenuToggle, logo, opacity, menuToggle, tel, keywordArr, routes }: IMenuTypes) => {
15
+ const router = useRouter();
16
+ const mobile = require('is-mobile');
17
+ const [isMobile, setIsMobile] = useState<boolean>(false);
18
+
19
+ const currentPath = router.pathname;
20
+ const [activeMenu, setActiveMenu] = useState<string>();
21
+ const [search, setSearch] = useState<string>('');
22
+ const [isMyCaseOn, setIsMyCaseOn] = useState<boolean>(false);
23
+
24
+ const menuTelClickMo = () => {
25
+ insert('call', isMobile);
26
+ savePowerLinkConversion('call', isMobile);
27
+ gtag.event({
28
+ action: 'mobile_menu_tel',
29
+ category: 'menutel',
30
+ label: '모바일메뉴내전화버튼',
31
+ value: '1'
32
+ });
33
+ };
34
+
35
+ const ace_ToptelClick = () => {
36
+ try {
37
+ // @ts-ignore
38
+ AM_PL('/m_Toptel');
39
+ } catch (e) {}
40
+ };
41
+
42
+ const findOuterName = (currentPath: string) => {
43
+ for (const route of routes) {
44
+ if (currentPath === route.path || currentPath.startsWith(route.path + '/')) {
45
+ return route.name;
46
+ }
47
+
48
+ for (const nestedRoute of route.routes) {
49
+ if (currentPath === nestedRoute.path || currentPath.startsWith(nestedRoute.path + '/')) {
50
+ return route.name;
51
+ }
52
+ }
53
+ }
54
+ return routes[0].name;
55
+ };
56
+
57
+ const handleClickForMobile = (e: any) => {
58
+ setActiveMenu(e.target.textContent);
59
+ };
60
+
61
+ const handleKeyPressSearch = (e: React.KeyboardEvent<HTMLInputElement>) => {
62
+ e.preventDefault();
63
+ if (e.key === 'Enter' && search.length > 0) {
64
+ handleMenuToggle(`https://www.daeryunlaw.com/integrate?tab=전체&search=${search}`);
65
+ window.open(`https://www.daeryunlaw.com/integrate?tab=전체&search=${search}`, '_blank');
66
+ }
67
+ };
68
+
69
+ const handleClickSearch = () => {
70
+ handleMenuToggle(`https://www.daeryunlaw.com/integrate?tab=전체&search=${search}`);
71
+ window.open(`https://www.daeryunlaw.com/integrate?tab=전체&search=${search}`, '_blank');
72
+ };
73
+
74
+ const handleClickKeyword = (keyword: string) => {
75
+ if (keyword) {
76
+ handleMenuToggle(`https://www.daeryunlaw.com/integrate?tab=전체&search=${keyword}&recommend=true`);
77
+ window.open(`https://www.daeryunlaw.com/integrate?tab=전체&search=${keyword}&recommend=true`, '_blank');
78
+ }
79
+ };
80
+
81
+ const onClickMyCase = () => {
82
+ setIsMyCaseOn(false);
83
+ };
84
+
85
+ const reloadUrl = (url: string) => {
86
+ if (router.pathname === url) {
87
+ router.push(url).then(() => {
88
+ router.reload();
89
+ });
90
+ }
91
+ };
92
+
93
+ useEffect(() => {
94
+ setIsMobile(mobile());
95
+ setActiveMenu(findOuterName(currentPath));
96
+ }, []);
97
+
98
+ return (
99
+ <>
100
+ {isMyCaseOn ? <MyCase onClick={onClickMyCase} /> : <></>}
101
+
102
+ <div
103
+ style={{ opacity, zIndex: menuToggle ? 50 : -9999, pointerEvents: menuToggle ? 'auto' : 'none' }}
104
+ className={' fixed left-0 top-0 hidden h-full w-full max-lg:block'}
105
+ >
106
+ <div
107
+ className={'absolute left-0 top-0 h-full w-full bg-black bg-opacity-[55%]'}
108
+ onClick={() => handleMenuToggle()}
109
+ ></div>
110
+ <span
111
+ style={{
112
+ msOverflowStyle: 'none',
113
+ scrollbarWidth: 'none'
114
+ }}
115
+ className={'absolute right-0 top-0 z-0 h-full w-[65%] overflow-y-auto bg-white max-sm:w-[100%]'}
116
+ >
117
+ <nav className={'h-full min-h-[800px] w-full'}>
118
+ <div
119
+ className={
120
+ 'flex h-[55%] max-h-[290px] w-full flex-col justify-end border-b-[1px] border-solid border-b-[#F2F2F2] px-[30px] py-[30px] max-md:h-[20%] max-md:max-h-[180px] max-md:min-h-[250px]'
121
+ }
122
+ >
123
+ <Image
124
+ tabIndex={0}
125
+ src={menuXImg}
126
+ width={54}
127
+ height={54}
128
+ alt={'메뉴'}
129
+ className={
130
+ 'absolute right-[20px] top-[30px] h-[18px] w-[18px] cursor-pointer max-md:h-[15px] max-md:w-[15px]'
131
+ }
132
+ draggable={false}
133
+ onKeyDown={(e: any) => {
134
+ if (e.key === 'Enter') {
135
+ handleMenuToggle();
136
+ }
137
+ }}
138
+ onClick={() => handleMenuToggle()}
139
+ />
140
+ <span>
141
+ <Link href="/" onClick={() => handleMenuToggle('/')}>
142
+ <Image
143
+ src={logo}
144
+ alt="대륜 로고"
145
+ width={324}
146
+ height={50}
147
+ className={'h-auto w-[200px] max-md:w-[155px]'}
148
+ />
149
+ </Link>
150
+ <div className={'relative mt-[20px] h-[50px] w-full max-md:h-[40px] '}>
151
+ <input
152
+ placeholder={'사건분야, 변호사, 법률정보 등을 검색해보세요'}
153
+ className={
154
+ 'h-full w-full border-[1px] border-solid border-[#285FA7] px-[20px] text-base tracking-[-0.6px] max-md:text-sm'
155
+ }
156
+ onChange={e => setSearch(e.target.value)}
157
+ onKeyUp={handleKeyPressSearch}
158
+ />
159
+ <Image
160
+ src={searchIcon}
161
+ alt={'sr_icon'}
162
+ width={35}
163
+ height={34}
164
+ className={
165
+ 'absolute right-[15px] top-[50%] h-auto w-[20px] translate-y-[-50%] cursor-pointer max-md:w-[17px]'
166
+ }
167
+ onClick={handleClickSearch}
168
+ />
169
+ </div>
170
+
171
+ <div className={'relative mt-[20px] grid w-full grid-cols-4 gap-2 '}>
172
+ {keywordArr.map((item: string, index: number) => (
173
+ <div
174
+ key={index}
175
+ tabIndex={0}
176
+ className={
177
+ 'cursor-pointer rounded-full border-[1px] border-solid border-[#285FA7] p-1 text-center text-[14px] font-[800] tracking-tighter text-[#285FA7] max-xs:text-[12px] '
178
+ }
179
+ onKeyDown={(e: any) => {
180
+ if (e.key === 'Enter') {
181
+ handleClickKeyword(item);
182
+ }
183
+ }}
184
+ onClick={() => handleClickKeyword(item)}
185
+ >
186
+ #{item}
187
+ </div>
188
+ ))}
189
+ </div>
190
+ </span>
191
+ </div>
192
+
193
+ <div className={'relative h-[60%] max-h-[600px] w-full bg-[#FCFCFC] py-[30px]'}>
194
+ <div className={'absolute top-0 h-full w-[45%] bg-[#F7F7F7]'}></div>
195
+ <div className={'flex h-full w-full flex-col justify-between'}>
196
+ {routes.map((menu, index) => (
197
+ <span key={index} className={'relative w-full'}>
198
+ <button
199
+ type={'button'}
200
+ className={
201
+ 'h-[35px] w-[48%] flex-shrink-0 translate-x-[15px] rounded-full pl-[20px] text-left text-base font-[800] ' +
202
+ `${
203
+ activeMenu == menu.name
204
+ ? '!bg-[#285FA7] text-white '
205
+ : 'hover:bg-[#EAEAEA]'
206
+ }`
207
+ }
208
+ onClick={handleClickForMobile}
209
+ >
210
+ {menu.name}
211
+ </button>
212
+ {menu.routes ? (
213
+ <ul
214
+ className={
215
+ 'absolute right-0 top-[5px] z-10 flex max-h-[160px] w-[55%] flex-col gap-[2vh] ' +
216
+ `${activeMenu == menu.name ? '' : 'hidden'}`
217
+ }
218
+ >
219
+ {menu.routes?.map((submenu, index) => (
220
+ <li key={index} className={' pl-[50px] pr-[30px] '}>
221
+ {submenu.name !== '나의 사건검색' ? (
222
+ <Link
223
+ href={submenu.path}
224
+ className={' text-sm tracking-tight '}
225
+ onClick={() => {
226
+ if (submenu.path === '/professional/case') {
227
+ setIsMyCaseOn(true);
228
+ handleMenuToggle();
229
+ } else {
230
+ reloadUrl(submenu.path);
231
+ handleMenuToggle(submenu.path);
232
+ }
233
+ }}
234
+ >
235
+ {submenu.name}
236
+ </Link>
237
+ ) : (
238
+ <span
239
+ className={' text-sm tracking-tight '}
240
+ onClick={() => {
241
+ setIsMyCaseOn(true);
242
+ handleMenuToggle();
243
+ }}
244
+ >
245
+ {submenu.name}
246
+ </span>
247
+ )}
248
+ </li>
249
+ ))}
250
+ </ul>
251
+ ) : (
252
+ <></>
253
+ )}
254
+ </span>
255
+ ))}
256
+
257
+ <div className={'relative w-full text-left'}>
258
+ <a href={`tel:${tel}`} onClick={menuTelClickMo}>
259
+ <div
260
+ className={
261
+ 'absolute left-[7px] top-[50%] h-[20px] w-[15px] translate-y-[-50%] '
262
+ }
263
+ >
264
+ <Image src={callLineImg} alt="전화" />
265
+ </div>
266
+ <button
267
+ type={'button'}
268
+ className={
269
+ 'relative h-[60px] w-full pl-[30px] text-left text-xl font-[800] text-[#285FA7] '
270
+ }
271
+ onClick={ace_ToptelClick}
272
+ >
273
+ {tel}
274
+ </button>
275
+ </a>
276
+ </div>
277
+ </div>
278
+ </div>
279
+ </nav>
280
+ </span>
281
+ </div>
282
+ </>
283
+ );
284
+ };
285
+
286
+ export default MobileMenu;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const MyCase: (props: {
3
+ onClick: () => void;
4
+ }) => React.JSX.Element;
5
+ export default MyCase;