@daeryun/dr_components 0.1.66 → 0.1.68

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.
@@ -6,7 +6,7 @@ import 'swiper/swiper-bundle.css';
6
6
  declare const MapFix: (props: {
7
7
  selectRegion: string;
8
8
  mapFixOpen: boolean;
9
- onClose: () => void;
10
9
  isGroup?: boolean;
10
+ setMapFixOpen: any;
11
11
  }) => React.JSX.Element;
12
12
  export default MapFix;
@@ -2,8 +2,9 @@ import React, { useEffect, useRef, useState } from 'react';
2
2
  import Image from 'next/image';
3
3
  import { newNapAreaMobile } from '../common';
4
4
  import AreaImage from './AreaImage';
5
- import SwiperCore from 'swiper';
5
+ import OnlineIcon from '../../asset/images/header/menu_x.webp';
6
6
  import Swiper from 'swiper';
7
+ import { Pagination } from 'swiper/modules';
7
8
  import 'swiper/css';
8
9
  import 'swiper/css/grid';
9
10
  import 'swiper/css/pagination';
@@ -11,12 +12,9 @@ import 'swiper/swiper-bundle.css';
11
12
  import { SwiperSlide } from 'swiper/react';
12
13
  import Link from 'next/link';
13
14
  import { useRouter } from 'next/router';
14
- import { Pagination } from 'swiper/modules';
15
- SwiperCore.use([Pagination]);
16
15
  const MapFix = (props) => {
17
- const { selectRegion, mapFixOpen, onClose, isGroup = false } = props;
16
+ const { selectRegion, mapFixOpen, isGroup = false, setMapFixOpen } = props;
18
17
  const router = useRouter();
19
- const isGroupValue = isGroup;
20
18
  const [mapAreas, setMapAreas] = useState([]);
21
19
  const [isShow, setIsShow] = useState(true);
22
20
  const swiper = useRef(null);
@@ -51,7 +49,7 @@ const MapFix = (props) => {
51
49
  !divRef.current.contains(event.target) &&
52
50
  !(map && map.contains(event.target)) &&
53
51
  !(banner && banner.contains(event.target))) {
54
- onClose();
52
+ setMapFixOpen(false);
55
53
  }
56
54
  };
57
55
  document.addEventListener('mousedown', handleClickOutside);
@@ -64,20 +62,14 @@ const MapFix = (props) => {
64
62
  setMapAreas(data);
65
63
  }, [selectRegion]);
66
64
  useEffect(() => {
67
- onClose();
68
- if (router.pathname === '/') {
69
- setIsShow(true);
70
- }
71
- else {
72
- setIsShow(false);
73
- }
65
+ setMapFixOpen(false);
74
66
  }, [router.pathname]);
75
- return isShow ? (<div ref={divRef} className={'overflow-hidden rounded-t-[10px] bg-[#fff] shadow-[0px_-3px_6px_#00000029] transition-[transform,height] duration-700 ease-linear md:hidden ' +
67
+ return (<div ref={divRef} className={'overflow-hidden rounded-t-[10px] bg-[#fff] shadow-[0px_-3px_6px_#00000029] transition-[transform,height] duration-700 ease-linear md:hidden ' +
76
68
  (mapFixOpen ? ' h-[400px] translate-y-0 ' : ' z-0 h-[0px] translate-y-[500px] ')}>
77
69
  <div className={'relative flex h-full w-full flex-col justify-between px-[30px] pb-10 pt-[30px] md:hidden '}>
78
70
  <span>
79
- <Image src={'/images/header/menu_x.webp'} width={54} height={54} alt={'지도 레이어 팝업 닫기'} className={'absolute right-5 top-5 h-[15px] w-[15px] cursor-pointer'} draggable={false} onClick={() => {
80
- onClose();
71
+ <Image src={OnlineIcon} width={54} height={54} alt={'지도 레이어 팝업 닫기'} className={'absolute right-5 top-5 h-[15px] w-[15px] cursor-pointer'} draggable={false} onClick={() => {
72
+ setMapFixOpen(false);
81
73
  }}/>
82
74
  <div>
83
75
  <p className={'mb-[20px] text-center text-[20px] font-[700] leading-none'}>{selectRegion}</p>
@@ -98,12 +90,12 @@ const MapFix = (props) => {
98
90
  <span className={'mx-auto mt-1 flex h-[20px] !w-[46px] items-center justify-center gap-[3px]'} id={'map-pagination'}></span>
99
91
  </span>
100
92
  <Link className={'mx-auto flex h-[50px] w-[183px] items-center justify-between rounded-[40px] border border-solid border-black px-[20px] text-[16px] font-bold leading-none tracking-[-0.32px]'} href={'/map'} onClick={() => {
101
- onClose();
93
+ setMapFixOpen(false);
102
94
  }}>
103
95
  VIEW MORE{' '}
104
96
  <Image width={52} height={39} draggable={'false'} alt={''} src={'https://daeryun-homepage.s3.ap-northeast-2.amazonaws.com/main_new/icon_arrow_black.webp'} className={'h-auto w-[20px]'}/>
105
97
  </Link>
106
98
  </div>
107
- </div>) : (<></>);
99
+ </div>);
108
100
  };
109
101
  export default MapFix;
@@ -12,8 +12,8 @@ export const Default = {
12
12
  </div>);
13
13
  },
14
14
  args: {
15
+ setMapFixOpen: () => { },
15
16
  selectRegion: '서울',
16
- mapFixOpen: true,
17
- onClose: () => { }
17
+ mapFixOpen: true
18
18
  }
19
19
  };
@@ -22,8 +22,8 @@ export const Default: Story = {
22
22
  );
23
23
  },
24
24
  args: {
25
+ setMapFixOpen: () => {},
25
26
  selectRegion: '서울',
26
- mapFixOpen: true,
27
- onClose: () => {}
27
+ mapFixOpen: true
28
28
  }
29
29
  };
@@ -2,10 +2,9 @@ import React, { useEffect, useRef, useState } from 'react';
2
2
  import Image from 'next/image';
3
3
  import { newNapAreaMobile } from '../common';
4
4
  import AreaImage from './AreaImage';
5
-
6
- import SwiperCore from 'swiper';
5
+ import OnlineIcon from '../../asset/images/header/menu_x.webp';
7
6
  import Swiper from 'swiper';
8
-
7
+ import { Pagination } from 'swiper/modules';
9
8
  import 'swiper/css';
10
9
  import 'swiper/css/grid';
11
10
  import 'swiper/css/pagination';
@@ -13,14 +12,11 @@ import 'swiper/swiper-bundle.css';
13
12
  import { SwiperSlide } from 'swiper/react';
14
13
  import Link from 'next/link';
15
14
  import { useRouter } from 'next/router';
16
- import { Pagination } from 'swiper/modules';
17
15
 
18
- SwiperCore.use([Pagination]);
19
-
20
- const MapFix = (props: { selectRegion: string; mapFixOpen: boolean; onClose: () => void; isGroup?: boolean }) => {
21
- const { selectRegion, mapFixOpen, onClose, isGroup = false } = props;
16
+ const MapFix = (props: { selectRegion: string; mapFixOpen: boolean; isGroup?: boolean; setMapFixOpen: any }) => {
17
+ const { selectRegion, mapFixOpen, isGroup = false, setMapFixOpen } = props;
22
18
  const router = useRouter();
23
- const isGroupValue = isGroup as boolean;
19
+
24
20
  const [mapAreas, setMapAreas] = useState<{ name: string; desc: string; url: string; src: string }[]>([]);
25
21
  const [isShow, setIsShow] = useState<boolean>(true);
26
22
 
@@ -59,7 +55,7 @@ const MapFix = (props: { selectRegion: string; mapFixOpen: boolean; onClose: ()
59
55
  !(map && map.contains(event.target as Node)) &&
60
56
  !(banner && banner.contains(event.target as Node))
61
57
  ) {
62
- onClose();
58
+ setMapFixOpen(false);
63
59
  }
64
60
  };
65
61
 
@@ -76,15 +72,10 @@ const MapFix = (props: { selectRegion: string; mapFixOpen: boolean; onClose: ()
76
72
  }, [selectRegion]);
77
73
 
78
74
  useEffect(() => {
79
- onClose();
80
- if (router.pathname === '/') {
81
- setIsShow(true);
82
- } else {
83
- setIsShow(false);
84
- }
75
+ setMapFixOpen(false);
85
76
  }, [router.pathname]);
86
77
 
87
- return isShow ? (
78
+ return (
88
79
  <div
89
80
  ref={divRef}
90
81
  className={
@@ -97,14 +88,14 @@ const MapFix = (props: { selectRegion: string; mapFixOpen: boolean; onClose: ()
97
88
  >
98
89
  <span>
99
90
  <Image
100
- src={'/images/header/menu_x.webp'}
91
+ src={OnlineIcon}
101
92
  width={54}
102
93
  height={54}
103
94
  alt={'지도 레이어 팝업 닫기'}
104
95
  className={'absolute right-5 top-5 h-[15px] w-[15px] cursor-pointer'}
105
96
  draggable={false}
106
97
  onClick={() => {
107
- onClose();
98
+ setMapFixOpen(false);
108
99
  }}
109
100
  />
110
101
  <div>
@@ -154,7 +145,7 @@ const MapFix = (props: { selectRegion: string; mapFixOpen: boolean; onClose: ()
154
145
  }
155
146
  href={'/map'}
156
147
  onClick={() => {
157
- onClose();
148
+ setMapFixOpen(false);
158
149
  }}
159
150
  >
160
151
  VIEW MORE{' '}
@@ -169,8 +160,6 @@ const MapFix = (props: { selectRegion: string; mapFixOpen: boolean; onClose: ()
169
160
  </Link>
170
161
  </div>
171
162
  </div>
172
- ) : (
173
- <></>
174
163
  );
175
164
  };
176
165
 
@@ -9,6 +9,7 @@ declare const MapSection: ({ initialData, selectRegion, setSelectRegion, setMapF
9
9
  setSelectRegion: any;
10
10
  setMapFixOpen: any;
11
11
  Title: React.ReactNode;
12
+ TitleMobile: React.ReactNode;
12
13
  isGroup?: boolean;
13
14
  }) => React.JSX.Element;
14
15
  export default MapSection;
@@ -24,29 +24,7 @@ const MapSection = ({ initialData, selectRegion, setSelectRegion, setMapFixOpen,
24
24
 
25
25
  <Wrapper className={'flex h-full w-full overflow-hidden pb-[239px] pt-[180px] max-xl:py-[150px] max-md:flex-col max-sm:py-[80px]'}>
26
26
  <div className={'w-[60%] pb-[200px] max-3xl:pb-[140px] max-lg:w-[63%] max-md2:w-[65%] max-md:w-full max-md:pb-0'}>
27
- <span className={`flex items-center gap-[20px] !font-[NanumSquare] text-[173px] font-[800] leading-none tracking-tight text-black max-3xl:text-[150px] max-xxl:text-[120px] max-lg:text-[90px] max-md:text-[80px]` +
28
- ' max-lg:gap-[10px] ' +
29
- ' max-sm:items-end ' +
30
- ' max-sm:text-[150px] max-2sm:text-[120px] max-xs:text-[100px] max-2xs:text-[70px]'}>
31
- {initialData.office_cnt}
32
-
33
- <span className={'flex flex-col gap-[10px] max-lg:gap-[5px]'}>
34
- <h2 className={'text-[30px] tracking-[-0.6px] max-3xl:text-[24px] max-xl:text-[22px] max-lg:text-[18px] max-sm:hidden '}>
35
- {Title ? Title : '전국의 대륜 산재전문변호사는 365일 24시간 긴급 대응 가능'}
36
- </h2>
37
- <span className={'text-[80px] max-3xl:text-[70px] max-xxl:text-[60px] ' +
38
- 'max-lg:text-[45px] ' +
39
- 'max-md:text-[40px] ' +
40
- 'max-sm:mb-[15px] max-sm:text-[65px] ' +
41
- 'max-2sm:mb-[10px] max-2sm:text-[55px] ' +
42
- 'max-2sm:mb-[7px] max-xs:text-[45px] ' +
43
- 'max-2xs:text-[35px]'}>
44
- {' '}
45
- OFFICE
46
- </span>
47
- </span>
48
- </span>
49
-
27
+ {Title}
50
28
  <div className={'relative mt-[55px] flex w-full justify-end max-3xl:mt-10 max-lg:mt-5 max-md:hidden '}>
51
29
  <Link className={'flex h-[82px] w-[386px] justify-between items-center px-[41px] text-[24px] font-bold text-white ' +
52
30
  'max-3xl:h-[70px] max-3xl:w-[300px] max-3xl:px-[24px] max-3xl:text-[20px] ' +
@@ -24,6 +24,7 @@ const MapSection = ({
24
24
  setSelectRegion: any;
25
25
  setMapFixOpen: any;
26
26
  Title: React.ReactNode;
27
+ TitleMobile: React.ReactNode;
27
28
  isGroup?: boolean;
28
29
  }) => {
29
30
  const router = useRouter();
@@ -56,41 +57,7 @@ const MapSection = ({
56
57
  'w-[60%] pb-[200px] max-3xl:pb-[140px] max-lg:w-[63%] max-md2:w-[65%] max-md:w-full max-md:pb-0'
57
58
  }
58
59
  >
59
- <span
60
- className={
61
- `flex items-center gap-[20px] !font-[NanumSquare] text-[173px] font-[800] leading-none tracking-tight text-black max-3xl:text-[150px] max-xxl:text-[120px] max-lg:text-[90px] max-md:text-[80px]` +
62
- ' max-lg:gap-[10px] ' +
63
- ' max-sm:items-end ' +
64
- ' max-sm:text-[150px] max-2sm:text-[120px] max-xs:text-[100px] max-2xs:text-[70px]'
65
- }
66
- >
67
- {initialData.office_cnt}
68
-
69
- <span className={'flex flex-col gap-[10px] max-lg:gap-[5px]'}>
70
- <h2
71
- className={
72
- 'text-[30px] tracking-[-0.6px] max-3xl:text-[24px] max-xl:text-[22px] max-lg:text-[18px] max-sm:hidden '
73
- }
74
- >
75
- {Title ? Title : '전국의 대륜 산재전문변호사는 365일 24시간 긴급 대응 가능'}
76
- </h2>
77
- <span
78
- className={
79
- 'text-[80px] max-3xl:text-[70px] max-xxl:text-[60px] ' +
80
- 'max-lg:text-[45px] ' +
81
- 'max-md:text-[40px] ' +
82
- 'max-sm:mb-[15px] max-sm:text-[65px] ' +
83
- 'max-2sm:mb-[10px] max-2sm:text-[55px] ' +
84
- 'max-2sm:mb-[7px] max-xs:text-[45px] ' +
85
- 'max-2xs:text-[35px]'
86
- }
87
- >
88
- {' '}
89
- OFFICE
90
- </span>
91
- </span>
92
- </span>
93
-
60
+ {Title}
94
61
  <div
95
62
  className={
96
63
  'relative mt-[55px] flex w-full justify-end max-3xl:mt-10 max-lg:mt-5 max-md:hidden '
@@ -1836,10 +1836,6 @@ video {
1836
1836
  text-align: center;
1837
1837
  }
1838
1838
 
1839
- .\!font-\[NanumSquare\] {
1840
- font-family: NanumSquare !important;
1841
- }
1842
-
1843
1839
  .font-\[SUIT\] {
1844
1840
  font-family: SUIT;
1845
1841
  }
@@ -1864,10 +1860,6 @@ video {
1864
1860
  font-size: 16px;
1865
1861
  }
1866
1862
 
1867
- .text-\[173px\] {
1868
- font-size: 173px;
1869
- }
1870
-
1871
1863
  .text-\[17px\] {
1872
1864
  font-size: 17px;
1873
1865
  }
@@ -1912,10 +1904,6 @@ video {
1912
1904
  font-size: 50px;
1913
1905
  }
1914
1906
 
1915
- .text-\[80px\] {
1916
- font-size: 80px;
1917
- }
1918
-
1919
1907
  .text-base {
1920
1908
  font-size: 1rem;
1921
1909
  line-height: 1.5rem;
@@ -2444,10 +2432,6 @@ body {
2444
2432
  padding-bottom: 140px;
2445
2433
  }
2446
2434
 
2447
- .max-3xl\:text-\[150px\] {
2448
- font-size: 150px;
2449
- }
2450
-
2451
2435
  .max-3xl\:text-\[16px\] {
2452
2436
  font-size: 16px;
2453
2437
  }
@@ -2459,10 +2443,6 @@ body {
2459
2443
  .max-3xl\:text-\[24px\] {
2460
2444
  font-size: 24px;
2461
2445
  }
2462
-
2463
- .max-3xl\:text-\[70px\] {
2464
- font-size: 70px;
2465
- }
2466
2446
  }
2467
2447
 
2468
2448
  @media not all and (min-width: 1400px) {
@@ -2478,17 +2458,9 @@ body {
2478
2458
  padding: 10px;
2479
2459
  }
2480
2460
 
2481
- .max-xxl\:text-\[120px\] {
2482
- font-size: 120px;
2483
- }
2484
-
2485
2461
  .max-xxl\:text-\[16px\] {
2486
2462
  font-size: 16px;
2487
2463
  }
2488
-
2489
- .max-xxl\:text-\[60px\] {
2490
- font-size: 60px;
2491
- }
2492
2464
  }
2493
2465
 
2494
2466
  @media not all and (min-width: 1280px) {
@@ -2566,10 +2538,6 @@ body {
2566
2538
  font-size: 20px;
2567
2539
  }
2568
2540
 
2569
- .max-xl\:text-\[22px\] {
2570
- font-size: 22px;
2571
- }
2572
-
2573
2541
  .max-xl\:text-\[48px\] {
2574
2542
  font-size: 48px;
2575
2543
  }
@@ -2746,14 +2714,6 @@ body {
2746
2714
  gap: 0.5rem;
2747
2715
  }
2748
2716
 
2749
- .max-lg\:gap-\[10px\] {
2750
- gap: 10px;
2751
- }
2752
-
2753
- .max-lg\:gap-\[5px\] {
2754
- gap: 5px;
2755
- }
2756
-
2757
2717
  .max-lg\:rounded-none {
2758
2718
  border-radius: 0px;
2759
2719
  }
@@ -2850,14 +2810,6 @@ body {
2850
2810
  font-size: 42px;
2851
2811
  }
2852
2812
 
2853
- .max-lg\:text-\[45px\] {
2854
- font-size: 45px;
2855
- }
2856
-
2857
- .max-lg\:text-\[90px\] {
2858
- font-size: 90px;
2859
- }
2860
-
2861
2813
  .max-lg\:leading-\[17\.5px\] {
2862
2814
  line-height: 17.5px;
2863
2815
  }
@@ -3111,14 +3063,6 @@ body {
3111
3063
  font-size: 38px;
3112
3064
  }
3113
3065
 
3114
- .max-md\:text-\[40px\] {
3115
- font-size: 40px;
3116
- }
3117
-
3118
- .max-md\:text-\[80px\] {
3119
- font-size: 80px;
3120
- }
3121
-
3122
3066
  .max-md\:text-sm {
3123
3067
  font-size: 0.875rem;
3124
3068
  line-height: 1.25rem;
@@ -3126,14 +3070,6 @@ body {
3126
3070
  }
3127
3071
 
3128
3072
  @media not all and (min-width: 640px) {
3129
- .max-sm\:mb-\[15px\] {
3130
- margin-bottom: 15px;
3131
- }
3132
-
3133
- .max-sm\:hidden {
3134
- display: none;
3135
- }
3136
-
3137
3073
  .max-sm\:h-\[300px\] {
3138
3074
  height: 300px;
3139
3075
  }
@@ -3166,10 +3102,6 @@ body {
3166
3102
  width: 30%;
3167
3103
  }
3168
3104
 
3169
- .max-sm\:items-end {
3170
- align-items: flex-end;
3171
- }
3172
-
3173
3105
  .max-sm\:object-left {
3174
3106
  -o-object-position: left;
3175
3107
  object-position: left;
@@ -3184,25 +3116,9 @@ body {
3184
3116
  padding-top: 80px;
3185
3117
  padding-bottom: 80px;
3186
3118
  }
3187
-
3188
- .max-sm\:text-\[150px\] {
3189
- font-size: 150px;
3190
- }
3191
-
3192
- .max-sm\:text-\[65px\] {
3193
- font-size: 65px;
3194
- }
3195
3119
  }
3196
3120
 
3197
3121
  @media not all and (min-width: 520px) {
3198
- .max-2sm\:mb-\[10px\] {
3199
- margin-bottom: 10px;
3200
- }
3201
-
3202
- .max-2sm\:mb-\[7px\] {
3203
- margin-bottom: 7px;
3204
- }
3205
-
3206
3122
  .max-2sm\:mt-\[15px\] {
3207
3123
  margin-top: 15px;
3208
3124
  }
@@ -3257,10 +3173,6 @@ body {
3257
3173
  padding-left: 10px;
3258
3174
  }
3259
3175
 
3260
- .max-2sm\:text-\[120px\] {
3261
- font-size: 120px;
3262
- }
3263
-
3264
3176
  .max-2sm\:text-\[13px\] {
3265
3177
  font-size: 13px;
3266
3178
  }
@@ -3276,10 +3188,6 @@ body {
3276
3188
  .max-2sm\:text-\[27px\] {
3277
3189
  font-size: 27px;
3278
3190
  }
3279
-
3280
- .max-2sm\:text-\[55px\] {
3281
- font-size: 55px;
3282
- }
3283
3191
  }
3284
3192
 
3285
3193
  @media not all and (min-width: 480px) {
@@ -3379,10 +3287,6 @@ body {
3379
3287
  text-align: left;
3380
3288
  }
3381
3289
 
3382
- .max-xs\:text-\[100px\] {
3383
- font-size: 100px;
3384
- }
3385
-
3386
3290
  .max-xs\:text-\[10px\] {
3387
3291
  font-size: 10px;
3388
3292
  }
@@ -3407,10 +3311,6 @@ body {
3407
3311
  font-size: 30px;
3408
3312
  }
3409
3313
 
3410
- .max-xs\:text-\[45px\] {
3411
- font-size: 45px;
3412
- }
3413
-
3414
3314
  .max-xs\:leading-snug {
3415
3315
  line-height: 1.375;
3416
3316
  }
@@ -3444,14 +3344,6 @@ body {
3444
3344
  .max-2xs\:text-\[14px\] {
3445
3345
  font-size: 14px;
3446
3346
  }
3447
-
3448
- .max-2xs\:text-\[35px\] {
3449
- font-size: 35px;
3450
- }
3451
-
3452
- .max-2xs\:text-\[70px\] {
3453
- font-size: 70px;
3454
- }
3455
3347
  }
3456
3348
 
3457
3349
  @media not all and (min-width: 325px) {