@daeryun/dr_components 0.4.95 → 0.4.98

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 (44) hide show
  1. package/dist/asset/images/header/head_link.svg +3 -0
  2. package/dist/components/Header/HeaderWrapper.d.ts +8 -0
  3. package/dist/components/Header/HeaderWrapper.jsx +8 -0
  4. package/dist/components/Header/HeaderWrapper.tsx +22 -0
  5. package/dist/components/Header/MobileHeader.jsx +3 -3
  6. package/dist/components/Header/MobileHeader.tsx +3 -3
  7. package/dist/components/Header/PcHeader.jsx +6 -4
  8. package/dist/components/Header/PcHeader.tsx +13 -4
  9. package/dist/components/index.js +2 -0
  10. package/dist/components/index.ts +2 -0
  11. package/dist/components/page/LawyerDetail/BasicInfo.d.ts +8 -0
  12. package/dist/components/page/LawyerDetail/BasicInfo.jsx +127 -0
  13. package/dist/components/page/LawyerDetail/BasicInfo.tsx +265 -0
  14. package/dist/components/page/LawyerDetail/CareerList.d.ts +20 -0
  15. package/dist/components/page/LawyerDetail/CareerList.jsx +289 -0
  16. package/dist/components/page/LawyerDetail/CareerList.tsx +544 -0
  17. package/dist/components/page/LawyerDetail/ILawyerDetailTypes.d.ts +48 -0
  18. package/dist/components/page/LawyerDetail/ILawyerDetailTypes.jsx +1 -0
  19. package/dist/components/page/LawyerDetail/ILawyerDetailTypes.tsx +53 -0
  20. package/dist/components/page/LawyerDetail/Introduce.d.ts +7 -0
  21. package/dist/components/page/LawyerDetail/Introduce.jsx +25 -0
  22. package/dist/components/page/LawyerDetail/Introduce.tsx +41 -0
  23. package/dist/components/page/LawyerDetail/LawyerDetail.d.ts +11 -0
  24. package/dist/components/page/LawyerDetail/LawyerDetail.jsx +117 -0
  25. package/dist/components/page/LawyerDetail/LawyerDetail.stories.d.ts +6 -0
  26. package/dist/components/page/LawyerDetail/LawyerDetail.stories.jsx +2485 -0
  27. package/dist/components/page/LawyerDetail/LawyerDetail.stories.tsx +2495 -0
  28. package/dist/components/page/LawyerDetail/LawyerDetail.tsx +180 -0
  29. package/dist/components/page/LawyerDetail/MobileRelatedPage.d.ts +10 -0
  30. package/dist/components/page/LawyerDetail/MobileRelatedPage.jsx +45 -0
  31. package/dist/components/page/LawyerDetail/MobileRelatedPage.tsx +118 -0
  32. package/dist/components/page/LawyerDetail/MobileSpeciality.d.ts +9 -0
  33. package/dist/components/page/LawyerDetail/MobileSpeciality.jsx +59 -0
  34. package/dist/components/page/LawyerDetail/MobileSpeciality.tsx +113 -0
  35. package/dist/components/page/LawyerDetail/MobileTabButton.d.ts +5 -0
  36. package/dist/components/page/LawyerDetail/MobileTabButton.jsx +20 -0
  37. package/dist/components/page/LawyerDetail/MobileTabButton.tsx +35 -0
  38. package/dist/components/page/LawyerDetail/PcTabButton.d.ts +8 -0
  39. package/dist/components/page/LawyerDetail/PcTabButton.jsx +102 -0
  40. package/dist/components/page/LawyerDetail/PcTabButton.tsx +182 -0
  41. package/dist/components/page/LawyerDetail/detail.module.css +602 -0
  42. package/dist/styles/globals.css +692 -4
  43. package/dist/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +1 -1
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { searchColorLawyerText } from '../../common/integrate';
3
+ const Introduce = ({ lawyerInfo, integrateSearch }) => {
4
+ return (<section className={'mx-auto w-full max-w-screen-2xl py-[60px] ' +
5
+ //768px
6
+ 'max-md:py-[40px]'}>
7
+ <div className={'mx-auto w-[90%]'}>
8
+ <p className={'text-[28px] font-[700] leading-[1.2] tracking-[-0.8px] ' +
9
+ //1280px
10
+ 'max-xl:text-[26px] ' +
11
+ //768px
12
+ 'max-md:text-[20px] '}>
13
+ {searchColorLawyerText(lawyerInfo.l_introduce_main, integrateSearch)}
14
+ </p>
15
+ <p className={'mt-6 whitespace-pre-line break-all text-[24px] font-[500] tracking-[-0.9px] text-[#767676] ' +
16
+ //1280px
17
+ 'max-xl:text-[18px] ' +
18
+ //768px
19
+ 'max-md:text-[16px] max-md:leading-[1.4]'}>
20
+ {searchColorLawyerText(lawyerInfo.l_introduce, integrateSearch)}
21
+ </p>
22
+ </div>
23
+ </section>);
24
+ };
25
+ export default Introduce;
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { ILawyer } from './ILawyerDetailTypes';
3
+ import { searchColorLawyerText } from '../../common/integrate';
4
+
5
+ const Introduce = ({ lawyerInfo, integrateSearch }: { lawyerInfo: ILawyer; integrateSearch: string }) => {
6
+ return (
7
+ <section
8
+ className={
9
+ 'mx-auto w-full max-w-screen-2xl py-[60px] ' +
10
+ //768px
11
+ 'max-md:py-[40px]'
12
+ }
13
+ >
14
+ <div className={'mx-auto w-[90%]'}>
15
+ <p
16
+ className={
17
+ 'text-[28px] font-[700] leading-[1.2] tracking-[-0.8px] ' +
18
+ //1280px
19
+ 'max-xl:text-[26px] ' +
20
+ //768px
21
+ 'max-md:text-[20px] '
22
+ }
23
+ >
24
+ {searchColorLawyerText(lawyerInfo.l_introduce_main, integrateSearch)}
25
+ </p>
26
+ <p
27
+ className={
28
+ 'mt-6 whitespace-pre-line break-all text-[24px] font-[500] tracking-[-0.9px] text-[#767676] ' +
29
+ //1280px
30
+ 'max-xl:text-[18px] ' +
31
+ //768px
32
+ 'max-md:text-[16px] max-md:leading-[1.4]'
33
+ }
34
+ >
35
+ {searchColorLawyerText(lawyerInfo.l_introduce, integrateSearch)}
36
+ </p>
37
+ </div>
38
+ </section>
39
+ );
40
+ };
41
+ export default Introduce;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { ILawyerCareer, ILawyer, ILawyerCerti, ICommonCode } from './ILawyerDetailTypes';
3
+ interface IDetailProps {
4
+ lawyerInfo: ILawyer;
5
+ careerList: ILawyerCareer[];
6
+ speciality: ILawyerCareer[];
7
+ certiList: ILawyerCerti[];
8
+ codeList: ICommonCode[];
9
+ }
10
+ declare const Detail: ({ lawyerInfo, careerList, certiList, codeList, speciality }: IDetailProps) => React.JSX.Element | null;
11
+ export default Detail;
@@ -0,0 +1,117 @@
1
+ 'use client';
2
+ import React, { useEffect, useRef, useState } from 'react';
3
+ import { useSearchParams } from 'next/navigation';
4
+ import Link from 'next/link';
5
+ import Image from 'next/image';
6
+ import BasicInfo from './BasicInfo';
7
+ import CareerList from './CareerList';
8
+ import PcTabButton from './PcTabButton';
9
+ import MobileTabButton from './MobileTabButton';
10
+ import MobileSpeciality from './MobileSpeciality';
11
+ import Introduce from './Introduce';
12
+ import MobileRelatedPage from './MobileRelatedPage';
13
+ import { bodyFetch, lawyerCode } from '../../../lib';
14
+ const Detail = ({ lawyerInfo, careerList, certiList, codeList, speciality }) => {
15
+ const searchParams = useSearchParams();
16
+ const targetRefs = {
17
+ career: useRef(null),
18
+ act: useRef(null),
19
+ success: useRef(null),
20
+ edu: useRef(null),
21
+ book: useRef(null),
22
+ certi: useRef(null)
23
+ };
24
+ const targetTitleRefs = {
25
+ career: useRef(null),
26
+ act: useRef(null),
27
+ success: useRef(null),
28
+ edu: useRef(null),
29
+ book: useRef(null),
30
+ certi: useRef(null)
31
+ };
32
+ const [successList, setSuccessList] = useState([]);
33
+ const [broadcastList, setBroadcastList] = useState([]);
34
+ const [reviewList, setReviewList] = useState([]);
35
+ const [queryStr, setQueryStr] = useState('');
36
+ const [integrateSearch, setIntegrateSearch] = useState('');
37
+ const [isLawyer, setIsLawyer] = useState(lawyerInfo && lawyerInfo.lawyer_code !== null && lawyerCode.includes(lawyerInfo.lawyer_code));
38
+ //모바일 전문분야 더보기 버튼
39
+ const [maxLines, setMaxLines] = useState(0); // 최종 박스 크기
40
+ //모바일 전문분야 최대높이 계산
41
+ const calculateMaxLines = () => {
42
+ const ulElement = document.getElementById('field_box');
43
+ return ulElement ? ulElement.offsetHeight : 0;
44
+ };
45
+ useEffect(() => {
46
+ if (lawyerInfo !== null) {
47
+ bodyFetch('/api/mapping/list', { idx: lawyerInfo.l_id, key: 'contents' }, (obj) => {
48
+ setSuccessList(obj.returnObj.successList);
49
+ setBroadcastList(obj.returnObj.broadcastList);
50
+ setReviewList(obj.returnObj.reviewList);
51
+ });
52
+ // sessionStorage.setItem('selected-lawyer-id', lawyerInfo.l_id)
53
+ }
54
+ //모바일 전문분야
55
+ const handleResize = () => {
56
+ const newMaxLines = calculateMaxLines();
57
+ setMaxLines(newMaxLines);
58
+ };
59
+ window.addEventListener('resize', handleResize);
60
+ handleResize();
61
+ return () => {
62
+ window.removeEventListener('resize', handleResize);
63
+ };
64
+ }, []);
65
+ useEffect(() => {
66
+ const page = searchParams.get('page');
67
+ const integrate_search = searchParams.get('integrate_search');
68
+ if (page) {
69
+ const pro = searchParams.get('pro');
70
+ const search = searchParams.get('search');
71
+ const selected = searchParams.get('selected');
72
+ const nameFilter = searchParams.get('nameFilter');
73
+ setQueryStr(`?pro=${pro}&page=${page}&selected=${selected}&search=${search}&nameFilter=${nameFilter}`);
74
+ }
75
+ else {
76
+ setQueryStr('');
77
+ }
78
+ setIntegrateSearch(integrate_search ? String(integrate_search) : '');
79
+ }, [searchParams]);
80
+ return lawyerInfo ? (<section id={'sub_contents'} className={' pt-[310px] max-xl:pt-[260px] max-lg:pt-[180px] max-md:pt-[120px] max-sm:pt-[68px]'}>
81
+ <BasicInfo codeList={codeList} lawyerInfo={lawyerInfo} integrateSearch={integrateSearch}/>
82
+
83
+ {/*변호사 설명*/}
84
+ <Introduce lawyerInfo={lawyerInfo} integrateSearch={integrateSearch}/>
85
+
86
+ <div className={'h-[1px] w-full bg-[#ddd]'}></div>
87
+
88
+ {/*모바일 전문분야*/}
89
+ <MobileSpeciality speciality={speciality} codeList={codeList} maxLines={maxLines} integrateSearch={integrateSearch}/>
90
+
91
+ <section className={'mx-auto max-w-screen-2xl '}>
92
+ <div className={'relative mx-auto w-[90%]'}>
93
+ {/*모바일 업무사례, 언론보도, 후기*/}
94
+ <MobileRelatedPage lawyerInfo={lawyerInfo} successList={successList} broadcastList={broadcastList} reviewList={reviewList} isLawyer={isLawyer}/>
95
+
96
+ {/*모바일 상단 버튼*/}
97
+ <MobileTabButton targetRefs={targetRefs}/>
98
+
99
+ {/*pc 상단 버튼*/}
100
+ <PcTabButton targetTitleRefs={targetTitleRefs} targetRefs={targetRefs} careerList={careerList}/>
101
+
102
+ {/* 경력 리스트 */}
103
+ <CareerList integrateSearch={integrateSearch} successList={successList} broadcastList={broadcastList} reviewList={reviewList} careerList={careerList} lawyerInfo={lawyerInfo} speciality={speciality} codeList={codeList} certiList={certiList} targetRefs={targetRefs} targetTitleRefs={targetTitleRefs}/>
104
+
105
+ <div className={'m-auto mb-[100px] flex w-[90%] max-w-[1400px] justify-center sm:justify-end '}>
106
+ <Link href={'/lawyer' + queryStr}>
107
+ <div className={'flex w-[10em] items-center justify-between rounded-[34px] border-[1px] border-solid border-[#ddd] bg-[#113461] px-6 py-4 text-[20px] font-bold text-[#fff] sm:w-[232px] '}>
108
+ 변호사 더보기
109
+ <Image src={'https://d1tgonli21s4df.cloudfront.net/lawyer/Arrow_Right_LG.svg'} alt={''} title={''} width={36} height={36} className={'h-[30px] w-auto'}/>
110
+ </div>
111
+ </Link>
112
+ </div>
113
+ </div>
114
+ </section>
115
+ </section>) : null;
116
+ };
117
+ export default Detail;
@@ -0,0 +1,6 @@
1
+ import LawyerDetail from './LawyerDetail';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ declare const meta: Meta<typeof LawyerDetail>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;