@daeryun/dr_components 1.0.64 → 1.0.65

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 (22) hide show
  1. package/dist/asset/images/consult/consult_bg.webp +0 -0
  2. package/dist/asset/images/consult/new_choice_consult.webp +0 -0
  3. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  4. package/dist/components/PersonalInfoAgreementModal/PersonalInfoAgreementModal.d.ts +7 -0
  5. package/dist/components/PersonalInfoAgreementModal/PersonalInfoAgreementModal.jsx +197 -0
  6. package/dist/components/PersonalInfoAgreementModal/PersonalInfoAgreementModal.module.css +84 -0
  7. package/dist/components/PersonalInfoAgreementModal/PersonalInfoAgreementModal.stories.d.ts +8 -0
  8. package/dist/components/PersonalInfoAgreementModal/PersonalInfoAgreementModal.stories.jsx +19 -0
  9. package/dist/components/PersonalInfoAgreementModal/PersonalInfoAgreementModal.stories.tsx +27 -0
  10. package/dist/components/PersonalInfoAgreementModal/PersonalInfoAgreementModal.tsx +207 -0
  11. package/dist/components/common/integrate/index.d.ts +1 -1
  12. package/dist/components/page/Consult/Consult.d.ts +11 -0
  13. package/dist/components/page/Consult/Consult.jsx +602 -0
  14. package/dist/components/page/Consult/Consult.stories.d.ts +6 -0
  15. package/dist/components/page/Consult/Consult.stories.jsx +20 -0
  16. package/dist/components/page/Consult/Consult.stories.tsx +28 -0
  17. package/dist/components/page/Consult/Consult.tsx +994 -0
  18. package/dist/components/page/Consulting/Consulting.jsx +13 -1
  19. package/dist/components/page/Consulting/Consulting.tsx +21 -1
  20. package/dist/styles/globals.css +494 -361
  21. package/dist/tsconfig.tsbuildinfo +1 -1
  22. package/package.json +1 -1
@@ -0,0 +1,602 @@
1
+ 'use client';
2
+ import React, { useEffect, useState } from 'react';
3
+ import { bodyFetch, formatPhoneNumber } from '../../../lib';
4
+ import { insert } from '../../../lib';
5
+ import Image from 'next/image';
6
+ import { savePowerLinkConversion } from '../../../lib';
7
+ import { SelectBox } from '../../SelectBox/SelectBox';
8
+ import { useRouter } from 'next/navigation';
9
+ import Loader from '../../Loader/Loader';
10
+ import IconMt from '../../../asset/images/choice/mt_icon.svg';
11
+ import NewChoiceConsult from '../../../asset/images/consult/new_choice_consult.webp';
12
+ import ChoiceLock from '../../../asset/images/consulting/choice_lock.webp';
13
+ import IconStep01 from '../../../asset/images/choice/choice_stepIcon_01.webp';
14
+ import IconTriangle from '../../../asset/images/choice/choice_tri.webp';
15
+ import IconStep02 from '../../../asset/images/choice/choice_stepIcon_02.webp';
16
+ import IconStep03 from '../../../asset/images/choice/choice_stepIcon_03.webp';
17
+ import IconStep04 from '../../../asset/images/choice/choice_stepIcon_04.webp';
18
+ import BgConsult from '../../../asset/images/consult/consult_bg.webp';
19
+ import PersonalInfoAgreementModal from '../../PersonalInfoAgreementModal/PersonalInfoAgreementModal';
20
+ const Index = ({ officesData, fieldsData, ace_Click }) => {
21
+ const consultType = 'general';
22
+ const router = useRouter();
23
+ const mobile = require('is-mobile');
24
+ const [isMobile, setIsMobile] = useState(false);
25
+ const [isLoading, setIsLoading] = useState(false);
26
+ const [modalOn, setModalOn] = useState(false);
27
+ const conversionType = 'consult';
28
+ const [consult, setConsult] = useState({
29
+ cc_name: '',
30
+ cc_tel: '',
31
+ office_code: '',
32
+ law_type_code: '',
33
+ contents: '',
34
+ consult_type: consultType,
35
+ isCheck: false
36
+ });
37
+ const [isCheck, setIsCheck] = useState(false);
38
+ const [isOver14, setIsOver14] = useState(false);
39
+ const consultProcess = () => {
40
+ var _a;
41
+ setIsLoading(true);
42
+ if (!isCheck) {
43
+ alert('개인정보 제공에 동의해주세요');
44
+ setIsLoading(false);
45
+ return false;
46
+ }
47
+ if (!isOver14) {
48
+ alert('만 14세 이상 여부를 체크해주세요');
49
+ (_a = document.getElementById('isOver14Check')) === null || _a === void 0 ? void 0 : _a.focus();
50
+ setIsLoading(false);
51
+ return false;
52
+ }
53
+ if (consult.cc_name === '') {
54
+ alert('이름을 입력해주세요.');
55
+ setIsLoading(false);
56
+ return false;
57
+ }
58
+ if (consult.cc_tel === '') {
59
+ alert('연락처를 입력해주세요.');
60
+ setIsLoading(false);
61
+ return false;
62
+ }
63
+ if (consult.office_code === '') {
64
+ alert('사무소를 선택해주세요');
65
+ setIsLoading(false);
66
+ return false;
67
+ }
68
+ // if (consult.law_type_code === '') {
69
+ // alert('사건분야를 선택해주세요');
70
+ // setIsLoading(false);
71
+ // return false;
72
+ // }
73
+ if (consult.contents === '') {
74
+ alert('문의내용을 입력해주세요.');
75
+ setIsLoading(false);
76
+ return false;
77
+ }
78
+ insert(conversionType, isMobile);
79
+ if (ace_Click) {
80
+ ace_Click();
81
+ }
82
+ bodyFetch('/api/consult', consult, (obj) => {
83
+ if (obj.result) {
84
+ if (obj.msg) {
85
+ alert(obj.msg);
86
+ setIsLoading(false);
87
+ }
88
+ if (!obj.isNotComplete) {
89
+ savePowerLinkConversion('online', isMobile);
90
+ router.push('/complete?isConsult=true');
91
+ }
92
+ }
93
+ else {
94
+ alert('상담 신청에 실패했습니다. 잠시후 다시 시도해주세요.');
95
+ setIsLoading(false);
96
+ }
97
+ }, 'POST');
98
+ };
99
+ useEffect(() => {
100
+ setIsMobile(mobile());
101
+ }, []);
102
+ return (<>
103
+ {isLoading ? <Loader fullScreen/> : <></>}
104
+ <PersonalInfoAgreementModal modalOn={modalOn} closeModal={() => {
105
+ setModalOn(false);
106
+ }}/>
107
+ <div className={'mt-[150px] flex h-[270px] w-full flex-col justify-between rounded-[15px] border-[2px] border-solid border-[#0A89AF] px-[40px] py-[30px] ' +
108
+ //1500px
109
+ 'max-3xl:mt-[100px] ' +
110
+ //1024px
111
+ 'max-lg:mt-[60px] max-lg:h-[230px] ' +
112
+ //768px
113
+ 'max-md:h-auto max-md:p-[35px] ' +
114
+ //480px
115
+ 'max-xs:p-[25px] ' +
116
+ //325px
117
+ 'max-3xs:p-[20px]'}>
118
+ <span className={'relative flex items-end gap-[50px] p-[20px] ' +
119
+ //1500px
120
+ 'max-3xl:gap-[40px] ' +
121
+ //1024px
122
+ 'max-lg:gap-[30px] max-lg:p-[10px] ' +
123
+ //768px
124
+ 'max-md:mb-[20px] max-md:flex-col max-md:items-start max-md:gap-[15px] max-md:p-0 ' +
125
+ //480px
126
+ 'max-xs:gap-[10px] max-xs:pt-[5px]'}>
127
+ <Image src={NewChoiceConsult} alt={'consult icon'} width={207} height={195} className={'h-auto w-[90px] object-contain object-top ' +
128
+ //1024px
129
+ 'max-lg:w-[70px] ' +
130
+ //768px
131
+ 'max-md:w-[60px] ' +
132
+ //480px
133
+ 'max-xs:w-[50px] '}/>
134
+ <span>
135
+ <h2 className={'text-[38px] font-[800] leading-[48px] tracking-[-1.9px] text-[#0A89AF] ' +
136
+ //1500px
137
+ 'max-3xl:text-[36px] max-3xl:leading-[46px] ' +
138
+ //1024px
139
+ 'max-lg:text-[30px] max-lg:leading-[40px] ' +
140
+ //480px
141
+ 'max-xs:text-[26px] ' +
142
+ //325px
143
+ 'max-3xs:text-[24px]'}>
144
+ 개인고객
145
+ </h2>
146
+ <p className={'mt-[10px] text-[22px] leading-[30px] tracking-[-0.55px] text-[#343434] ' +
147
+ //1500px
148
+ 'max-3xl:mt-[5px] max-3xl:text-[20px] max-3xl:leading-[30px] ' +
149
+ //1024px
150
+ 'max-lg:mt-[3px] max-lg:text-[16px] max-lg:leading-[22px] '}>
151
+ 각종 민 · 형사상 법률분쟁 등 <br className={'md:hidden'}/>
152
+ 개인고객 맞춤 법률서비스를 제공합니다.
153
+ </p>
154
+ </span>
155
+ </span>
156
+ <div className={'flex w-full items-center justify-start gap-[15px] rounded-[15px] bg-[#0A89AF] bg-opacity-5 px-[30px] py-[14px] tracking-[-0.35px] ' +
157
+ //480px
158
+ 'max-xs:px-[20px]'}>
159
+ <Image src={ChoiceLock} alt={'choice_lock'} width={39} height={52} className={'h-auto w-[17px] translate-y-[-1px] ' +
160
+ //1024px
161
+ 'max-lg:w-[15px]'}/>
162
+ <p className={'break-keep text-lg leading-none tracking-[-0.45px] text-[#3C3C3C] ' +
163
+ //1024px
164
+ 'max-lg:text-base max-lg:leading-[20px] ' +
165
+ //480px
166
+ 'max-xs:text-[14px] max-xs:leading-[18px] '}>
167
+ 안심하세요! 의뢰인의 상담 내용에 대한 비밀유지를 약속합니다.
168
+ </p>
169
+ </div>
170
+ </div>
171
+
172
+ <span className={'mt-[50px] flex h-[320px] w-full items-center justify-between gap-[10px] ' +
173
+ //1500px
174
+ 'max-3xl:h-[300px] ' +
175
+ //768px
176
+ 'max-md:h-auto max-md:flex-col ' +
177
+ //480px
178
+ 'max-xs:gap-[5px]'}>
179
+ <div className={'relative flex h-full max-w-[320px] flex-1 flex-col items-center justify-center gap-[10px] bg-[#F8F8F8] ' +
180
+ //768px
181
+ 'max-md:h-[150px] max-md:w-full max-md:max-w-[unset] max-md:flex-row max-md:justify-start max-md:gap-[30px] max-md:p-[40px] ' +
182
+ //480px
183
+ 'max-xs:gap-[20px] max-xs:p-[20px] '}>
184
+ <span className={'mb-[10px] flex aspect-square w-[35%] items-center justify-center rounded-full bg-[#fff] ' +
185
+ //768px
186
+ 'max-md:m-0 max-md:w-[100px] ' +
187
+ //480px
188
+ 'max-xs:w-[65px]'}>
189
+ <Image src={IconStep01} alt={'stepIcon_01'} width={102} height={116} className={'h-auto w-[50%]'}/>
190
+ </span>
191
+ <span className={'flex flex-col items-center justify-center gap-[10px] ' +
192
+ //768px
193
+ 'max-md:items-start ' +
194
+ //480px
195
+ 'max-xs:gap-[5px]'}>
196
+ <p className={'text-[17px] font-[800] text-[#285EA7] ' +
197
+ //480px
198
+ 'max-xs:text-xs'}>
199
+ STEP 1
200
+ </p>
201
+ <p className={'text-[24px] font-[800] tracking-[-0.6px] ' +
202
+ //1280px
203
+ 'max-xl:text-[20px] ' +
204
+ //480px
205
+ 'max-xs:text-[17px]'}>
206
+ 상담문의 접수
207
+ </p>
208
+ <p className={'text-[17px] text-[#555] ' +
209
+ //1280px
210
+ 'max-xl:text-[15px] ' +
211
+ //480px
212
+ 'max-xs:text-xs'}>
213
+ 사건경위 파악
214
+ </p>
215
+ </span>
216
+ </div>
217
+ <Image src={IconTriangle} alt={'arrow'} width={12} height={36} className={'h-auto w-[6px] ' +
218
+ //768px
219
+ 'max-md:rotate-90'}/>
220
+ <div className={'relative flex h-full max-w-[320px] flex-1 flex-col items-center justify-center gap-[10px] bg-[#F8F8F8] ' +
221
+ //768px
222
+ 'max-md:h-[150px] max-md:w-full max-md:max-w-[unset] max-md:flex-row max-md:justify-start max-md:gap-[30px] max-md:p-[40px] ' +
223
+ //480px
224
+ 'max-xs:gap-[20px] max-xs:p-[20px] '}>
225
+ <span className={'mb-[10px] flex aspect-square w-[35%] items-center justify-center rounded-full bg-[#fff] ' +
226
+ //768px
227
+ 'max-md:m-0 max-md:w-[100px] ' +
228
+ //480px
229
+ 'max-xs:w-[65px]'}>
230
+ <Image src={IconStep02} alt={'stepIcon_02'} width={116} height={115} className={'h-auto w-[50%]'}/>
231
+ </span>
232
+ <span className={'flex flex-col items-center justify-center gap-[10px] ' +
233
+ //768px
234
+ 'max-md:items-start ' +
235
+ //480px
236
+ 'max-xs:gap-[5px]'}>
237
+ <p className={'text-[17px] font-[800] text-[#285EA7] ' +
238
+ //480px
239
+ 'max-xs:text-xs'}>
240
+ STEP 2
241
+ </p>
242
+ <p className={'text-[24px] font-[800] tracking-[-0.6px] ' +
243
+ //1280px
244
+ 'max-xl:text-[20px] ' +
245
+ //480px
246
+ 'max-xs:text-[17px]'}>
247
+ 상담일정 조정
248
+ </p>
249
+ <p className={'text-[17px] text-[#555] ' +
250
+ //1280px
251
+ 'max-xl:text-[15px] ' +
252
+ //480px
253
+ 'max-xs:text-xs'}>
254
+ 예약확정문자 발송
255
+ </p>
256
+ </span>
257
+ </div>
258
+ <Image src={IconTriangle} alt={'arrow'} width={12} height={36} className={'h-auto w-[6px] ' +
259
+ //768px
260
+ 'max-md:rotate-90'}/>
261
+ <div className={'relative flex h-full max-w-[320px] flex-1 flex-col items-center justify-center gap-[10px] bg-[#F8F8F8] ' +
262
+ //768px
263
+ 'max-md:h-[150px] max-md:w-full max-md:max-w-[unset] max-md:flex-row max-md:justify-start max-md:gap-[30px] max-md:p-[40px] ' +
264
+ //480px
265
+ 'max-xs:gap-[20px] max-xs:p-[20px] '}>
266
+ <span className={'mb-[10px] flex aspect-square w-[35%] items-center justify-center rounded-full bg-[#fff] ' +
267
+ //768px
268
+ 'max-md:m-0 max-md:w-[100px] ' +
269
+ //480px
270
+ 'max-xs:w-[65px]'}>
271
+ <Image src={IconStep03} alt={'stepIcon_03'} width={102} height={116} className={'h-auto w-[50%]'}/>
272
+ </span>
273
+ <span className={'flex flex-col items-center justify-center gap-[10px] ' +
274
+ //768px
275
+ 'max-md:items-start ' +
276
+ //480px
277
+ 'max-xs:gap-[5px]'}>
278
+ <p className={'text-[17px] font-[800] text-[#285EA7] ' +
279
+ //480px
280
+ 'max-xs:text-xs'}>
281
+ STEP 3
282
+ </p>
283
+ <p className={'text-[24px] font-[800] tracking-[-0.6px] ' +
284
+ //1280px
285
+ 'max-xl:text-[20px] ' +
286
+ //480px
287
+ 'max-xs:text-[17px]'}>
288
+ 체계적 법률컨설팅
289
+ </p>
290
+ <p className={'text-[17px] leading-[24px] text-[#555] ' +
291
+ //1280px
292
+ 'max-xl:text-[15px] ' +
293
+ //480px
294
+ 'max-xs:text-xs'}>
295
+ 분야별 전문가 <br className={'lg:hidden'}/>
296
+ 대면상담진행
297
+ </p>
298
+ </span>
299
+ </div>
300
+ <Image src={IconTriangle} alt={'arrow'} width={12} height={36} className={'h-auto w-[6px] ' +
301
+ //768px
302
+ 'max-md:rotate-90'}/>
303
+ <div className={'relative flex h-full max-w-[320px] flex-1 flex-col items-center justify-center gap-[10px] bg-[#F8F8F8] ' +
304
+ //768px
305
+ 'max-md:h-[150px] max-md:w-full max-md:max-w-[unset] max-md:flex-row max-md:justify-start max-md:gap-[30px] max-md:p-[40px] ' +
306
+ //480px
307
+ 'max-xs:gap-[20px] max-xs:p-[20px] '}>
308
+ <span className={'mb-[10px] flex aspect-square w-[35%] items-center justify-center rounded-full bg-[#fff] ' +
309
+ //768px
310
+ 'max-md:m-0 max-md:w-[100px] ' +
311
+ //480px
312
+ 'max-xs:w-[65px]'}>
313
+ <Image src={IconStep04} alt={'stepIcon_04'} width={102} height={116} className={'h-auto w-[50%]'}/>
314
+ </span>
315
+ <span className={'flex flex-col items-center justify-center gap-[10px] ' +
316
+ //768px
317
+ 'max-md:items-start ' +
318
+ //480px
319
+ 'max-xs:gap-[5px]'}>
320
+ <p className={'text-[17px] font-[800] text-[#285EA7] ' +
321
+ //480px
322
+ 'max-xs:text-xs '}>
323
+ STEP 4
324
+ </p>
325
+ <p className={'text-[24px] font-[800] tracking-[-0.6px] ' +
326
+ //1280px
327
+ 'max-xl:text-[20px] ' +
328
+ //480px
329
+ 'max-xs:text-[17px]'}>
330
+ 맞춤형 법률서비스
331
+ </p>
332
+ <p className={'text-[17px] text-[#555] ' +
333
+ //1280px
334
+ 'max-xl:text-[15px] ' +
335
+ //480px
336
+ 'max-xs:text-xs'}>
337
+ 전문가 TF의 확실한 조력
338
+ </p>
339
+ </span>
340
+ </div>
341
+ </span>
342
+
343
+ <div className={'relative mb-[50px] mt-[100px] flex h-[220px] w-full flex-col items-center justify-center gap-[10px] text-[#fff] ' +
344
+ //480px
345
+ 'max-xs:mb-[25px] max-xs:h-[160px] max-xs:gap-[5px] '}>
346
+ <Image src={BgConsult} alt={'consult_bg'} fill className={'absolute -z-10 object-fill'}/>
347
+ <p className={'text-lg ' +
348
+ //1024px
349
+ 'max-lg:text-base '}>
350
+ 법률상담예약접수
351
+ </p>
352
+ <h3 className={'text-center text-[34px] font-[600] leading-[44px] tracking-[-0.85px] ' +
353
+ //1500px
354
+ 'max-3xl:text-[30px] max-3xl:leading-[40px] ' +
355
+ //1024px
356
+ 'max-lg:text-[26px] max-lg:leading-[34px] ' +
357
+ //768px
358
+ 'max-md:text-[24px] max-md:leading-[32px] ' +
359
+ //480px
360
+ 'max-xs:text-[18px] max-xs:leading-[26px] ' +
361
+ //325px
362
+ 'max-3xs:text-[18px]'}>
363
+ 법률고민이 있다면 가까운 사무소에서 <br />
364
+ {process.env.NEXT_PUBLIC_KEYWORD}전문변호사와 상담해보세요
365
+ </h3>
366
+ </div>
367
+
368
+ <div className={'relative mb-[60px] mt-[40px] h-auto w-[100%] '}>
369
+ <span className={'block h-[1px] w-full bg-[#CECECE] ' +
370
+ 'after:absolute after:right-0 after:top-0 after:block after:h-[10px] after:w-[10px] after:-translate-y-[50%] after:rounded-full after:bg-[#CECECE] after:content-[""] ' +
371
+ 'before:absolute before:left-0 before:top-0 before:block before:h-[10px] before:w-[10px] before:-translate-y-[50%] before:rounded-full before:bg-[#285FA2] before:content-[""]'}></span>
372
+ <span className={'flex h-auto w-full flex-col px-[26px] py-[22px]'}>
373
+ <div className={'relative mb-[10px] h-auto w-[37px]'}>
374
+ <IconMt />
375
+ </div>
376
+ <p className={'mb-[10px] break-keep text-[18px] leading-[1.35] tracking-[-0.72px] text-[#6C6C6C] ' +
377
+ //1500px
378
+ 'max-3xl:text-[16px] ' +
379
+ //1024px
380
+ 'max-lg:text-[18px] max-lg:leading-[1.5] ' +
381
+ //480px
382
+ 'max-xs:text-[16px] ' +
383
+ //325px
384
+ 'max-3xs:text-[14px]'}>
385
+ 퀄리티 높은 상담 제공을 위해 하루 상담 수에 제한을 두고 있어{' '}
386
+ <span className={'font-bold'}>상담 예약이 빠르게 마감되고 있습니다.</span>
387
+ <br />
388
+ <br className={''}/>
389
+ 모든 상담은 전문변호사가 사건 검토를 마친 뒤{' '}
390
+ <span className={'font-bold'}>전문적으로 진행하기에 예약제로 실시됩니다.</span>
391
+ <br />
392
+ <br className={''}/>
393
+ 가급적 빠른 상담 예약을 권유드리며, 예약 시간 준수를 부탁드립니다. 만족스러운 상담을 위해 최선을
394
+ 다하겠습니다.
395
+ <br className={''}/>
396
+ <br className={''}/>※ 단, 상담 예약이 확정된 경우라도 동시간에 긴급한 우선 상담 사안이
397
+ 발생하거나 회사 내부사정에 따라 상담 일정이 조정되거나 취소될 수 있습니다.
398
+ </p>
399
+ </span>
400
+ <span className={'block h-[1px] w-full bg-[#CECECE] ' +
401
+ 'after:absolute after:bottom-0 after:right-0 after:block after:h-[10px] after:w-[10px] after:translate-y-[50%] after:rounded-full after:bg-[#285FA2] after:content-[""] ' +
402
+ 'before:absolute before:bottom-0 before:left-0 before:block before:h-[10px] before:w-[10px] before:translate-y-[50%] before:rounded-full before:bg-[#CECECE] before:content-[""]'}></span>
403
+ </div>
404
+ {/*상담입력폼*/}
405
+ <span className={'mb-[200px] block w-full max-xs:mb-[70px]'}>
406
+ <div className={'flex w-full gap-[45px] ' +
407
+ //1024px
408
+ 'max-lg:flex-col ' +
409
+ //480px
410
+ 'max-xs:gap-[25px]'}>
411
+ <div className={'flex flex-1 flex-col gap-[30px] ' +
412
+ //480px
413
+ 'max-xs:gap-[25px]'}>
414
+ {/*-- 이름 --*/}
415
+ <span className={'flex h-auto items-center justify-between ' +
416
+ //480px
417
+ 'max-xs:flex-col max-xs:items-start max-xs:gap-[10px]'}>
418
+ <p className={'w-[100px] text-[20px] font-[600] ' +
419
+ //1024px
420
+ 'max-lg:w-[90px] max-lg:text-[18px]'}>
421
+ 이름
422
+ </p>
423
+ <input name="cc_name" value={consult.cc_name} id="nameInput" placeholder={'입력해주세요'} spellCheck={false} className={'h-[60px] flex-1 border-[1px] border-solid border-[#D0D0D0] px-[30px] py-[18px] text-[18px] leading-[18px] placeholder-[#848484] transition-[border] ' +
424
+ 'focus-visible:border-[#285FA7] focus-visible:outline-none ' +
425
+ //1024px
426
+ 'max-lg:h-[55px] max-lg:text-[16px] max-lg:leading-[16px] ' +
427
+ //480px
428
+ 'max-xs:w-full max-xs:px-[20px] max-xs:py-[15px]'} onChange={e => {
429
+ setConsult(Object.assign(Object.assign({}, consult), { cc_name: e.target.value }));
430
+ }}/>
431
+ </span>
432
+ {/*-- 연락처 --*/}
433
+ <span className={'flex h-auto items-center justify-between ' +
434
+ //480px
435
+ 'max-xs:flex-col max-xs:items-start max-xs:gap-[10px]'}>
436
+ <p className={'w-[100px] text-[20px] font-[600] ' +
437
+ //1024px
438
+ 'max-lg:w-[90px] max-lg:text-[18px]'}>
439
+ 연락처
440
+ </p>
441
+
442
+ <input name="cc_tel" value={consult.cc_tel} id="telInput" placeholder={'- 없이 입력해주세요'} spellCheck={false} className={'h-[60px] flex-1 border-[1px] border-solid border-[#D0D0D0] px-[30px] py-[18px] text-[18px] leading-[18px] placeholder-[#848484] transition-[border] ' +
443
+ 'focus-visible:border-[#285FA7] focus-visible:outline-none ' +
444
+ //1024px
445
+ 'max-lg:h-[55px] max-lg:text-[16px] max-lg:leading-[16px] ' +
446
+ //480px
447
+ 'max-xs:w-full max-xs:px-[20px] max-xs:py-[15px]'} onChange={e => {
448
+ setConsult(Object.assign(Object.assign({}, consult), { cc_tel: formatPhoneNumber(e.target.value) }));
449
+ }}/>
450
+ </span>
451
+ {/*-- 사무소 --*/}
452
+ <span className={'flex h-auto items-center justify-between ' +
453
+ //480px
454
+ 'max-xs:flex-col max-xs:items-start max-xs:gap-[10px]'}>
455
+ <p className={'w-[100px] text-[20px] font-[600] ' +
456
+ //1024px
457
+ 'max-lg:w-[90px] max-lg:text-[18px]'}>
458
+ 사무소
459
+ </p>
460
+ <SelectBox id={'사무소선택'} value={consult.office_code} onSelect={(codename, code) => {
461
+ setConsult(Object.assign(Object.assign({}, consult), { office_code: code }));
462
+ }} items={officesData.map(item => ({
463
+ code: item.code,
464
+ codename: item.code_name || ''
465
+ }))} icon={<Image src={process.env.NEXT_PUBLIC_S3_URL +
466
+ '/consult/main/section6/icon_arrow_gray.webp'} alt={'select icon'} width={28} height={15} className={'absolute right-[24px] top-[50%] w-[15px] translate-y-[-50%] max-xs:w-[11px]'}/>} style={'h-[60px] w-full px-[30px] py-[17px] border-solid border-[1px] border-[#D0D0D0] cursor-pointer transition-[border] text-[18px] ' +
467
+ 'focus-visible:outline-none focus-visible:border-[#285FA7] ' +
468
+ //1024px
469
+ 'max-lg:text-[16px] max-lg:leading-[16px] max-lg:h-[55px] ' +
470
+ //480px
471
+ 'max-xs:w-full max-xs:px-[20px] max-xs:py-[15px] max-xs:h-[52px] '} parentStyle={'flex-1 ' + 'max-sm:w-full'} placeholderOptions={'사무소를 선택해주세요'}/>
472
+ </span>
473
+ {/*-- 사건분야 --*/}
474
+ {/*<span*/}
475
+ {/* className={*/}
476
+ {/* 'flex h-auto items-center justify-between ' +*/}
477
+ {/* //480px*/}
478
+ {/* 'max-xs:flex-col max-xs:items-start max-xs:gap-[10px]'*/}
479
+ {/* }*/}
480
+ {/*>*/}
481
+ {/* <p*/}
482
+ {/* className={*/}
483
+ {/* 'w-[100px] text-[20px] font-[600] ' +*/}
484
+ {/* //1024px*/}
485
+ {/* 'max-lg:w-[90px] max-lg:text-[18px]'*/}
486
+ {/* }*/}
487
+ {/* >*/}
488
+ {/* 사건분야*/}
489
+ {/* </p>*/}
490
+ {/* <SelectBox*/}
491
+ {/* id={'사건분야 선택'}*/}
492
+ {/* value={consult.law_type_code}*/}
493
+ {/* onSelect={(codename, code) => {*/}
494
+ {/* setConsult({ ...consult, law_type_code: code });*/}
495
+ {/* }}*/}
496
+ {/* items={fieldsData.map(item => ({*/}
497
+ {/* code: item.code,*/}
498
+ {/* codename: item.code_name || ''*/}
499
+ {/* }))}*/}
500
+ {/* icon={*/}
501
+ {/* <Image*/}
502
+ {/* src={*/}
503
+ {/* process.env.NEXT_PUBLIC_S3_URL +*/}
504
+ {/* '/consult/main/section6/icon_arrow_gray.webp'*/}
505
+ {/* }*/}
506
+ {/* alt={'select icon'}*/}
507
+ {/* width={28}*/}
508
+ {/* height={15}*/}
509
+ {/* className={*/}
510
+ {/* 'absolute right-[24px] top-[50%] w-[15px] translate-y-[-50%] max-xs:w-[11px]'*/}
511
+ {/* }*/}
512
+ {/* />*/}
513
+ {/* }*/}
514
+ {/* style={*/}
515
+ {/* 'h-[60px] w-full px-[30px] py-[18px] border-solid border-[1px] border-[#D0D0D0] cursor-pointer transition-[border] text-[18px] ' +*/}
516
+ {/* 'focus-visible:outline-none focus-visible:border-[#285FA7] ' +*/}
517
+ {/* //1024px*/}
518
+ {/* 'max-lg:text-[16px] max-lg:leading-[16px] max-lg:h-[55px] ' +*/}
519
+ {/* //480px*/}
520
+ {/* 'max-xs:w-full max-xs:px-[20px] max-xs:py-[15px] max-xs:h-[52px] '*/}
521
+ {/* }*/}
522
+ {/* parentStyle={'flex-1 ' + 'max-sm:w-full'}*/}
523
+ {/* placeholderOptions={'사건분야를 선택해주세요'}*/}
524
+ {/* />*/}
525
+ {/*</span>*/}
526
+ </div>
527
+ <div className={'flex-1'}>
528
+ {/*-- 문의내용 --*/}
529
+ <span className={'flex h-full items-start justify-between ' +
530
+ //1024px
531
+ 'max-lg:h-[200px] ' +
532
+ //480px
533
+ 'max-xs:flex-col max-xs:items-start max-xs:gap-[10px]'}>
534
+ <p className={'w-[100px] text-[20px] font-[600] leading-[60px] ' +
535
+ //1024px
536
+ 'max-lg:w-[90px] max-lg:text-[18px] max-lg:leading-[55px] ' +
537
+ //480px
538
+ 'max-xs:text-lg'}>
539
+ 문의내용
540
+ </p>
541
+ <textarea name="contents" value={consult.contents} id="contentsInput" placeholder={'내용을 입력해주세요'} spellCheck={false} maxLength={700} className={'h-full flex-1 resize-none border-[1px] border-solid border-[#D0D0D0] px-[30px] py-[20px] text-[18px] leading-[18px] placeholder-[#848484] transition-[border] ' +
542
+ 'focus-visible:border-[#285FA7] focus-visible:outline-none ' +
543
+ //1024px
544
+ 'max-lg:text-[16px] max-lg:leading-[24px] ' +
545
+ //480px
546
+ 'max-xs:h-[170px] max-xs:w-full max-xs:px-[20px] max-xs:py-[15px] '} onChange={e => {
547
+ setConsult(Object.assign(Object.assign({}, consult), { contents: e.target.value }));
548
+ }}/>
549
+ </span>
550
+ </div>
551
+ </div>
552
+ {/*-- 전문보기 버튼 --*/}
553
+ <span className={'mt-5 flex justify-end max-md:mt-3'}>
554
+ <button className={'flex h-[28px] w-[84px] items-center justify-center border-[1px] border-solid border-[#ddd] bg-[#eee] text-[15px] leading-none text-black max-3xl:h-[22px] max-3xl:w-[70px] max-md:h-[24px] max-md:w-[75px] '} onClick={() => {
555
+ setModalOn(true);
556
+ }}>
557
+ 전문보기
558
+ </button>
559
+ </span>
560
+ <span className={'mx-auto mt-[40px] block max-w-[570px] max-xs:max-w-[240px]'}>
561
+ {/*-- 동의 체크박스 --*/}
562
+ <span className={'mx-auto mb-[40px] flex w-fit flex-col gap-2'}>
563
+ <label className={'block w-full cursor-pointer text-[16px] leading-[16px] text-[#5F5F5F] ' +
564
+ 'flex items-center gap-[10px] ' +
565
+ 'max-sm:justify-center '}>
566
+ <input type="checkbox" name="consultCheck" id="consultCk" className={'h-[17px] w-[17px] shrink-0 cursor-pointer outline-none ' +
567
+ 'after:pointer-events-none after:block after:h-full after:w-full after:border-[1px] after:border-solid after:border-[#B4B4B4] after:bg-white after:font-[800] after:content-[""] ' +
568
+ 'checked:after:border-[#285FA7] checked:after:bg-[#285FA7] checked:after:text-center checked:after:text-[17px] checked:after:leading-[15px] checked:after:text-white checked:after:content-["✓"] '} onChange={e => {
569
+ setIsCheck(!isCheck);
570
+ }} checked={isCheck} onKeyDown={e => {
571
+ if (e.key === 'Enter') {
572
+ setIsCheck(!isCheck);
573
+ }
574
+ }}/>
575
+ 개인정보수집에 동의합니다.
576
+ </label>
577
+ <label className={'block w-full cursor-pointer text-[16px] leading-[16px] text-[#5F5F5F] ' +
578
+ 'flex items-center gap-[10px] '}>
579
+ <input type="checkbox" name="isOver14Check" id="isOver14Check" className={'h-[17px] w-[17px] cursor-pointer outline-none ' +
580
+ 'after:pointer-events-none after:block after:h-full after:w-full after:border-[1px] after:border-solid after:border-[#B4B4B4] after:bg-white after:font-[800] after:content-[""] ' +
581
+ 'checked:after:border-[#285FA7] checked:after:bg-[#285FA7] checked:after:text-center checked:after:text-[17px] checked:after:leading-[15px] checked:after:text-white checked:after:content-["✓"] '} onChange={e => {
582
+ setIsOver14(!isOver14);
583
+ }} checked={isOver14} onKeyDown={e => {
584
+ if (e.key === 'Enter') {
585
+ setIsOver14(!isOver14);
586
+ }
587
+ }}/>
588
+ 만 14세 이상입니다.
589
+ </label>
590
+ </span>
591
+ {/*-- 제출 submit 버튼 --*/}
592
+ <button type="button" id={'submitBtn'} className={'h-[70px] w-full cursor-pointer bg-[#285FA7] text-xl tracking-[-0.5px] text-white ' +
593
+ 'max-xs:h-[50px] max-xs:text-base'} onClick={() => {
594
+ consultProcess();
595
+ }} disabled={isLoading}>
596
+ 상담신청서 제출
597
+ </button>
598
+ </span>
599
+ </span>
600
+ </>);
601
+ };
602
+ export default Index;
@@ -0,0 +1,6 @@
1
+ import Consult from './Consult';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ declare const meta: Meta<typeof Consult>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
@@ -0,0 +1,20 @@
1
+ import Consult from './Consult';
2
+ const meta = {
3
+ component: Consult,
4
+ title: 'ConsultPage'
5
+ };
6
+ export default meta;
7
+ export const Default = {
8
+ render: args => {
9
+ return (<div className={'font-[SUIT]'}>
10
+ <Consult {...args}/>
11
+ </div>);
12
+ },
13
+ args: {
14
+ fieldsData: [],
15
+ officesData: [
16
+ { code: '00', code_name: '서울' },
17
+ { code: '00', code_name: '부산' }
18
+ ]
19
+ }
20
+ };
@@ -0,0 +1,28 @@
1
+ import Consult from './Consult';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+
4
+ const meta: Meta<typeof Consult> = {
5
+ component: Consult,
6
+ title: 'ConsultPage'
7
+ };
8
+
9
+ export default meta;
10
+
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const Default: Story = {
14
+ render: args => {
15
+ return (
16
+ <div className={'font-[SUIT]'}>
17
+ <Consult {...args} />
18
+ </div>
19
+ );
20
+ },
21
+ args: {
22
+ fieldsData: [],
23
+ officesData: [
24
+ { code: '00', code_name: '서울' },
25
+ { code: '00', code_name: '부산' }
26
+ ]
27
+ }
28
+ };