@daeryun/dr_components 0.2.35 → 0.2.37

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.
@@ -1,243 +0,0 @@
1
- import Link from 'next/link';
2
- import React, { useEffect, useState } from 'react';
3
- import Image from 'next/image';
4
- import { insert } from '../../lib';
5
- import * as gtag from '../../lib/gtag';
6
- import { savePowerLinkConversion } from '../../lib';
7
-
8
- import style from './main.module.css';
9
- import MyCase from '../myCase/MyCase';
10
- import { useRouter } from 'next/router';
11
- import Menu from '../../asset/images/header/menu_x.webp';
12
- import Window from '../../asset/images/header/image_b.webp';
13
- import Call from '../../asset/images/header/h_call_line_b.webp';
14
- import { IPcMenuType } from '../../types/header';
15
- import BrochureBtn from '../BrochureBtn/BrochureBtn';
16
-
17
- const PCMenu = ({ handleMenuToggle, opacity, menuToggle, tel, routes, isBrochureBtn, isMedical }: IPcMenuType) => {
18
- const mobile = require('is-mobile');
19
- const [isMobile, setIsMobile] = useState<boolean>(false);
20
-
21
- const router = useRouter();
22
-
23
- //나의사건검색
24
- const [isMyCaseOn, setIsMyCaseOn] = useState<boolean>(false);
25
-
26
- // GA 클릭이벤트
27
- const menuTelClickPC = () => {
28
- gtag.event({
29
- action: 'menu_tel',
30
- category: 'menutel',
31
- label: 'PC메뉴내전화버튼',
32
- value: '1'
33
- });
34
- };
35
-
36
- //나의사건검샛
37
- const onClickMyCase = () => {
38
- setIsMyCaseOn(false);
39
- };
40
-
41
- const handleKeyPress = (e: any) => {
42
- if (e.key === 'Enter') {
43
- handleMenuToggle();
44
- }
45
- };
46
- useEffect(() => {
47
- setIsMobile(mobile());
48
- }, []);
49
-
50
- //페이지 내부에서 쿼리 파라미터 없이 루트 경로로 돌아갈 때 새로고침
51
- const reloadUrl = (url: string) => {
52
- if (router.pathname === url) {
53
- router.push(url).then(() => {
54
- router.reload();
55
- });
56
- }
57
- };
58
- return (
59
- <>
60
- {isMyCaseOn ? <MyCase onClick={onClickMyCase} /> : <></>}
61
-
62
- {/*pc 메뉴*/}
63
- {/*<div style={{ opacity }} className={style.main + ' max-lg:hidden'}>*/}
64
- <div
65
- style={{ opacity, zIndex: menuToggle ? 50 : -9999, pointerEvents: menuToggle ? 'auto' : 'none' }}
66
- className={`relative max-lg:hidden`}
67
- >
68
- <Image
69
- onKeyDown={handleKeyPress}
70
- tabIndex={0}
71
- src={Menu}
72
- width={54}
73
- height={54}
74
- alt={'메뉴'}
75
- className={`fixed right-[7.5%] top-[5%] z-[101] w-[16px] cursor-pointer max-lg:right-[3.5%] max-lg:top-[2.8%] sm:w-[18px] md:w-[20px]`}
76
- onClick={() => handleMenuToggle()}
77
- />
78
- <div
79
- className={`fixed inset-0 z-50 block bg-black bg-opacity-[55%]`}
80
- onClick={() => handleMenuToggle()}
81
- ></div>
82
- <div
83
- className={
84
- 'fixed right-0 top-0 z-[50] h-full w-[68.5%] min-w-[320px] overflow-hidden bg-white pt-[100px]'
85
- }
86
- >
87
- <div
88
- className={
89
- 'flex h-full max-h-[800px] flex-col justify-between overflow-y-auto pb-[30px] text-center xl:ml-[75px] xl:w-[80%]'
90
- }
91
- >
92
- {[...Array(2)].map((_, index) => {
93
- return (
94
- <ul key={index} className={`flex ${index === 0 ? 'pb-[30px]' : 'mt-0'}`}>
95
- {[...Array(4)].map((_, index2) => {
96
- return (
97
- <li key={index2} className={'mt-[11.14px] lg:float-left lg:mt-0 lg:w-3/5 '}>
98
- <ul className={'inline-block w-full text-black'}>
99
- <li>
100
- <span
101
- className={
102
- 'inline-block w-full cursor-pointer text-[1.2rem] font-[800] max-lg:pb-2 sm:text-[1.4em] md:text-[24px] lg:cursor-auto'
103
- }
104
- >
105
- {routes[index2 + index * 4].name}
106
- </span>
107
- <div className={`mx-auto max-lg:ml-3`}>
108
- <ul
109
- className={
110
- 'mt-2 flex w-4/5 flex-col gap-y-3 text-sm md:mt-2 md:text-2xl lg:block lg:w-full'
111
- }
112
- >
113
- {routes[index2 + index * 4].routes?.map(
114
- (item, index) => {
115
- return (
116
- <li key={index} className={'relative'}>
117
- {item.name != '나의 사건검색' ? (
118
- <Link
119
- href={
120
- item.path ? item.path : ''
121
- }
122
- onClick={() => {
123
- handleMenuToggle(item.path);
124
- reloadUrl(
125
- item.path
126
- ? item.path
127
- : ''
128
- );
129
- }}
130
- className={
131
- 'block w-1/2 pt-1 text-[18px] hover:text-[#285FA7] lg:w-full lg:py-2'
132
- }
133
- target={
134
- item.name === '통합검색' ||
135
- item.name === '판결분석' ||
136
- item.name ===
137
- '만화로 보는 사례' ||
138
- item.name === '인재채용'
139
- ? '_blank'
140
- : '_self'
141
- }
142
- >
143
- <span
144
- className={
145
- 'relative w-[10em]'
146
- }
147
- >
148
- {item.name}
149
- {item.name === '통합검색' ||
150
- item.name === '판결분석' ||
151
- item.name ===
152
- '만화로 보는 사례' ||
153
- item.name === '인재채용' ? (
154
- <Image
155
- src={Window}
156
- alt="새창이미지"
157
- width={13}
158
- height={13}
159
- className="absolute left-[4em] top-[6px] sm:top-[5px] md:left-auto md:right-[-1.2em] md:top-[5px]"
160
- />
161
- ) : null}
162
- </span>
163
- </Link>
164
- ) : (
165
- <span
166
- onClick={() =>
167
- setIsMyCaseOn(true)
168
- }
169
- className={
170
- 'block w-1/2 cursor-pointer pt-1 text-[18px] hover:text-[#285FA7] lg:w-full lg:py-2'
171
- }
172
- >
173
- <span
174
- className={
175
- 'relative w-[10em]'
176
- }
177
- >
178
- {item.name}
179
- </span>
180
- </span>
181
- )}
182
- </li>
183
- );
184
- }
185
- )}
186
- </ul>
187
- </div>
188
- </li>
189
- </ul>
190
- </li>
191
- );
192
- })}
193
- </ul>
194
- );
195
- })}
196
-
197
- {/*전화번호*/}
198
- <div
199
- className={
200
- 'mt-[30px] text-left text-black max-lg:mr-4 max-lg:text-right lg:ml-[4vw] xl:ml-[2vw] 2xl:ml-[3vw] ' +
201
- 'flex items-center justify-start'
202
- }
203
- >
204
- <Link
205
- href={`tel:${tel}`}
206
- onClick={() => {
207
- insert('call', isMobile);
208
- savePowerLinkConversion('call', isMobile);
209
- menuTelClickPC();
210
- }}
211
- className={'inline-block'}
212
- >
213
- <div className={'flex items-center justify-center'}>
214
- <Image
215
- src={Call}
216
- width={57}
217
- height={57}
218
- alt={'전화상담'}
219
- className={'aspect-square w-[35px] lg:w-[49px] '}
220
- />
221
- <span
222
- className={
223
- 'whitespace-nowrap pl-[12px] text-[24px] font-[800] lg:pl-[18px] lg:text-[32px] '
224
- }
225
- >
226
- {tel}
227
- </span>
228
- </div>
229
- </Link>
230
- {isBrochureBtn ? (
231
- <BrochureBtn width={'280px'} height={'58px'} className={'ml-16'} />
232
- ) : (
233
- <></>
234
- )}
235
- </div>
236
- </div>
237
- </div>
238
- </div>
239
- </>
240
- );
241
- };
242
-
243
- export default PCMenu;
@@ -1,150 +0,0 @@
1
- /* Keyframes */
2
- @keyframes leftMove {
3
- 0% {
4
- transform: translateX(0px);
5
- }
6
- 100% {
7
- transform: translateX(-80px);
8
- }
9
- }
10
-
11
- @keyframes bgWide {
12
- from {
13
- width: 0;
14
- }
15
- to {
16
- width: 100vw;
17
- }
18
- }
19
-
20
- @keyframes fadeInUp {
21
- from {
22
- opacity: 0;
23
- transform: translateY(20px);
24
- }
25
- to {
26
- opacity: 1;
27
- transform: translateY(0);
28
- }
29
- }
30
-
31
- @keyframes fadeIn {
32
- 0% {
33
- opacity: 0;
34
- }
35
- 20% {
36
- opacity: 1;
37
- }
38
- 100% {
39
- opacity: 1;
40
- }
41
- }
42
-
43
- @keyframes titleTextFadeOut {
44
- 0% {
45
- opacity: 1;
46
- }
47
- 100% {
48
- opacity: 0;
49
- }
50
- }
51
-
52
- @keyframes titleTextFadeIn {
53
- 0% {
54
- opacity: 0;
55
- }
56
- 100% {
57
- opacity: 1;
58
- }
59
- }
60
-
61
- @keyframes picAni_s {
62
- 0% {
63
- transform: translateZ(0) translateX(-50%) translateY(-50%) scale(0);
64
- }
65
- 100% {
66
- transform: translateZ(0) translateX(-50%) translateY(-50%) scale(5.5);
67
- }
68
- }
69
-
70
- @keyframes picAni_b {
71
- 0% {
72
- transform: translateZ(0) translateX(-50%) translateY(-50%) scale(0);
73
- }
74
- 100% {
75
- transform: translateZ(0) translateX(-50%) translateY(-50%) scale(5.5);
76
- }
77
- }
78
-
79
- /* Animations */
80
- .bg_animation {
81
- animation: leftMove 10s linear forwards;
82
- animation-fill-mode: forwards;
83
- }
84
-
85
- .scroll_fade_in {
86
- animation: fadeInUp 1.5s ease-in-out !important;
87
- animation-fill-mode: forwards;
88
- }
89
-
90
- .scroll_fade_in_strength {
91
- animation: fadeInUp 2.5s ease-in-out !important;
92
- animation-fill-mode: forwards;
93
- }
94
-
95
- .bg_css {
96
- position: relative;
97
- overflow: hidden;
98
- width: 100%;
99
- height: 100%;
100
- animation: bgWide 1s linear forwards !important;
101
- }
102
-
103
- .s4_bg_animation {
104
- animation: imageWide 0.5s ease-in-out;
105
- animation-fill-mode: forwards;
106
- }
107
-
108
- .fade_in_title {
109
- animation: fadeIn 10s ease-in-out infinite;
110
- }
111
-
112
- .fade_out_titleText {
113
- animation: titleTextFadeOut 2s ease-in-out 4s;
114
- }
115
-
116
- .fade_in_titleText {
117
- animation: titleTextFadeIn 2s ease-in-out;
118
- }
119
-
120
- .map_picAni_s {
121
- -webkit-animation: picAni_s 1.5s ease-in-out infinite;
122
- animation: picAni_s 1.5s ease-in-out infinite;
123
- }
124
-
125
- .map_picAni_b {
126
- transform-origin: 50% 50%;
127
- -webkit-animation: picAni_b 1.5s ease-in-out infinite;
128
- animation: picAni_b 1.5s ease-in-out infinite;
129
- }
130
-
131
- /* Masks */
132
- .slide_fade_up_down {
133
- mask-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1) 18%, rgba(0,0,0,1) 70%, rgba(0,0,0,0)),
134
- linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,1) 30%, rgba(0,0,0,1) 82%, rgba(0,0,0,0));
135
- }
136
-
137
- .slide_fade {
138
- mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 18%, rgba(0,0,0,1) 82%, rgba(0,0,0,0) 100%);
139
- }
140
-
141
- @media screen and (max-width: 1024px) {
142
- .slide_fade {
143
- mask-image: unset;
144
- }
145
-
146
- .slide_fade_up_down {
147
- mask-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1) 18%, rgba(0,0,0,1) 80%, rgba(0,0,0,0)),
148
- linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,1) 20%, rgba(0,0,0,1) 82%, rgba(0,0,0,0));
149
- }
150
- }
@@ -1,57 +0,0 @@
1
- export interface IHeaderType {
2
- setTel: (tel: string) => void;
3
- setFooterTel: (tel: string) => void;
4
- tel: string;
5
- footerTel: string;
6
- logo: string;
7
- logo_w: string;
8
- name: string;
9
- categoryType: string;
10
- doNotWrite?: boolean;
11
- keywordArr: string[];
12
- routes: IRouteType[];
13
- isBrochureBtn?: boolean;
14
- isMedical?: boolean;
15
- }
16
- export interface IRouteType {
17
- path: string;
18
- name: string;
19
- ename?: string;
20
- routes: {
21
- path: string;
22
- name: string;
23
- ename?: string;
24
- }[];
25
- }
26
- export interface IMenuType {
27
- handleMenuToggle: (url?: string) => void;
28
- opacity?: number;
29
- menuToggle?: boolean;
30
- routes: IRouteType[];
31
- keywordArr: string[];
32
- logo: string;
33
- tel: string;
34
- isBrochureBtn?: boolean;
35
- isMedical?: boolean;
36
- }
37
- export interface IMobileMenuType {
38
- handleMenuToggle: (url?: string) => void;
39
- opacity?: number;
40
- menuToggle?: boolean;
41
- tel: string;
42
- routes: IRouteType[];
43
- keywordArr: string[];
44
- logo: string;
45
- isBrochureBtn?: boolean;
46
- isMedical?: boolean;
47
- }
48
- export interface IPcMenuType {
49
- handleMenuToggle: (url?: string) => void;
50
- menuToggle?: boolean;
51
- opacity?: number;
52
- tel: string;
53
- routes: IRouteType[];
54
- isBrochureBtn?: boolean;
55
- isMedical?: boolean;
56
- }
57
- export declare const blankArr: string[];
@@ -1 +0,0 @@
1
- export const blankArr = ['통합검색', '판결분석', '만화로 보는 사례', '인재채용'];
@@ -1,59 +0,0 @@
1
- import { SetterOrUpdater } from 'recoil';
2
- export interface IHeaderType {
3
- setTel: (tel: string) => void;
4
- setFooterTel: (tel: string) => void;
5
- tel: string;
6
- footerTel: string;
7
- logo: string;
8
- logo_w: string;
9
- name: string;
10
- categoryType: string;
11
- doNotWrite?: boolean;
12
- keywordArr: string[];
13
- routes: IRouteType[];
14
- isBrochureBtn?: boolean;
15
- isMedical?: boolean;
16
- }
17
-
18
- export interface IRouteType {
19
- path: string;
20
- name: string;
21
- ename?: string;
22
- routes: { path: string; name: string; ename?: string }[];
23
- }
24
-
25
- export interface IMenuType {
26
- handleMenuToggle: (url?: string) => void;
27
- opacity?: number;
28
- menuToggle?: boolean;
29
- routes: IRouteType[];
30
- keywordArr: string[];
31
- logo: string;
32
- tel: string;
33
- isBrochureBtn?: boolean;
34
- isMedical?: boolean;
35
- }
36
-
37
- export interface IMobileMenuType {
38
- handleMenuToggle: (url?: string) => void;
39
- opacity?: number;
40
- menuToggle?: boolean;
41
- tel: string;
42
- routes: IRouteType[];
43
- keywordArr: string[];
44
- logo: string;
45
- isBrochureBtn?: boolean;
46
- isMedical?: boolean;
47
- }
48
-
49
- export interface IPcMenuType {
50
- handleMenuToggle: (url?: string) => void;
51
- menuToggle?: boolean;
52
- opacity?: number;
53
- tel: string;
54
- routes: IRouteType[];
55
- isBrochureBtn?: boolean;
56
- isMedical?: boolean;
57
- }
58
-
59
- export const blankArr = ['통합검색', '판결분석', '만화로 보는 사례', '인재채용'];