@daeryun/dr_components 0.6.14 → 0.6.16
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.
- package/dist/components/SearchBar/SearchBar.jsx +3 -3
- package/dist/components/SearchBar/SearchBar.tsx +3 -3
- package/dist/components/page/Faq/FaqList.d.ts +2 -1
- package/dist/components/page/Faq/FaqList.jsx +3 -3
- package/dist/components/page/Faq/FaqList.tsx +4 -3
- package/dist/components/page/Faq/GroupList.d.ts +2 -1
- package/dist/components/page/Faq/GroupList.jsx +7 -2
- package/dist/components/page/Faq/GroupList.tsx +8 -2
- package/dist/components/page/Faq/GroupSelectBox.d.ts +2 -1
- package/dist/components/page/Faq/GroupSelectBox.jsx +7 -2
- package/dist/components/page/Faq/GroupSelectBox.tsx +8 -2
- package/dist/styles/globals.css +8 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -46,7 +46,7 @@ const SearchBar = (props) => {
|
|
|
46
46
|
<label style={{ cursor: 'pointer' }} className={'sr-only'}>
|
|
47
47
|
{label}
|
|
48
48
|
</label>
|
|
49
|
-
<input name="sear_txt" placeholder={placeholder} maxLength={maxLength ? maxLength : 20} value={search} onChange={handleInputChange} onKeyUp={handleOnKeyPress} type={'search'} aria-label={label} spellCheck={false} className={`bg-[${isIntegrate ? '#FFFFFF' : '#F7F7F7'}] w-[100%] rounded-full px-[40px] py-[24px] ` +
|
|
49
|
+
<input name="sear_txt" placeholder={placeholder} maxLength={maxLength ? maxLength : 20} value={search} onChange={handleInputChange} onKeyUp={handleOnKeyPress} type={'search'} aria-label={label} spellCheck={false} className={`bg-[${isIntegrate ? '#FFFFFF' : '#F7F7F7'}] w-[100%] !rounded-full px-[40px] py-[24px] ` +
|
|
50
50
|
'text-2xl tracking-[-0.6px] text-[#333333] placeholder:text-[#575757] ' +
|
|
51
51
|
//1500px
|
|
52
52
|
'max-3xl:text-xl ' +
|
|
@@ -61,7 +61,7 @@ const SearchBar = (props) => {
|
|
|
61
61
|
'max-3xs:py-[15px] max-3xs:pl-[20px] max-3xs:pr-[55px] max-3xs:text-sm '}/>
|
|
62
62
|
|
|
63
63
|
<button type={'button'} onClick={handleClick} className={'absolute right-[20px] top-[50%] z-10 translate-y-[-50%] ' +
|
|
64
|
-
'h-[65%] w-[140px] cursor-pointer rounded-full bg-[#2E2E2E] ' +
|
|
64
|
+
'h-[65%] w-[140px] cursor-pointer !rounded-full bg-[#2E2E2E] ' +
|
|
65
65
|
'flex items-center justify-center gap-[10px] ' +
|
|
66
66
|
//768px
|
|
67
67
|
'max-md:w-[120px] ' +
|
|
@@ -76,7 +76,7 @@ const SearchBar = (props) => {
|
|
|
76
76
|
검색
|
|
77
77
|
</span>
|
|
78
78
|
</button>
|
|
79
|
-
<button type={'button'} onClick={handleClick} className={'absolute right-[15px] top-[50%] z-10 flex translate-y-[-50%] cursor-pointer items-center justify-center rounded-[30px] bg-[#2E2E2E] sm:hidden ' +
|
|
79
|
+
<button type={'button'} onClick={handleClick} className={'absolute right-[15px] top-[50%] z-10 flex translate-y-[-50%] cursor-pointer items-center justify-center !rounded-[30px] bg-[#2E2E2E] sm:hidden ' +
|
|
80
80
|
//650px
|
|
81
81
|
'h-[40px] w-[40px] ' +
|
|
82
82
|
//325px
|
|
@@ -95,7 +95,7 @@ const SearchBar = (props: {
|
|
|
95
95
|
aria-label={label}
|
|
96
96
|
spellCheck={false}
|
|
97
97
|
className={
|
|
98
|
-
`bg-[${isIntegrate ? '#FFFFFF' : '#F7F7F7'}] w-[100%] rounded-full px-[40px] py-[24px] ` +
|
|
98
|
+
`bg-[${isIntegrate ? '#FFFFFF' : '#F7F7F7'}] w-[100%] !rounded-full px-[40px] py-[24px] ` +
|
|
99
99
|
'text-2xl tracking-[-0.6px] text-[#333333] placeholder:text-[#575757] ' +
|
|
100
100
|
//1500px
|
|
101
101
|
'max-3xl:text-xl ' +
|
|
@@ -116,7 +116,7 @@ const SearchBar = (props: {
|
|
|
116
116
|
onClick={handleClick}
|
|
117
117
|
className={
|
|
118
118
|
'absolute right-[20px] top-[50%] z-10 translate-y-[-50%] ' +
|
|
119
|
-
'h-[65%] w-[140px] cursor-pointer rounded-full bg-[#2E2E2E] ' +
|
|
119
|
+
'h-[65%] w-[140px] cursor-pointer !rounded-full bg-[#2E2E2E] ' +
|
|
120
120
|
'flex items-center justify-center gap-[10px] ' +
|
|
121
121
|
//768px
|
|
122
122
|
'max-md:w-[120px] ' +
|
|
@@ -148,7 +148,7 @@ const SearchBar = (props: {
|
|
|
148
148
|
type={'button'}
|
|
149
149
|
onClick={handleClick}
|
|
150
150
|
className={
|
|
151
|
-
'absolute right-[15px] top-[50%] z-10 flex translate-y-[-50%] cursor-pointer items-center justify-center rounded-[30px] bg-[#2E2E2E] sm:hidden ' +
|
|
151
|
+
'absolute right-[15px] top-[50%] z-10 flex translate-y-[-50%] cursor-pointer items-center justify-center !rounded-[30px] bg-[#2E2E2E] sm:hidden ' +
|
|
152
152
|
//650px
|
|
153
153
|
'h-[40px] w-[40px] ' +
|
|
154
154
|
//325px
|
|
@@ -18,6 +18,7 @@ interface FaqListProps {
|
|
|
18
18
|
code_desc: string | null;
|
|
19
19
|
}[];
|
|
20
20
|
faqList: IFaqTypes[];
|
|
21
|
+
currentCodeDesc?: string;
|
|
21
22
|
}
|
|
22
|
-
declare const FaqList: ({ SearchBarProps, PaginationProps, groupList, faqList }: FaqListProps) => import("react").JSX.Element;
|
|
23
|
+
declare const FaqList: ({ SearchBarProps, PaginationProps, groupList, faqList, currentCodeDesc }: FaqListProps) => import("react").JSX.Element;
|
|
23
24
|
export default FaqList;
|
|
@@ -10,7 +10,7 @@ import Image from 'next/image';
|
|
|
10
10
|
import PaginationComponent from '../MyCase/_component/_pagination/PaginationComponent';
|
|
11
11
|
import EyeImg from '../../../asset/images/faq/eye.webp';
|
|
12
12
|
import PlusImg from '../../../asset/images/faq/plus.webp';
|
|
13
|
-
const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList }) => {
|
|
13
|
+
const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList, currentCodeDesc }) => {
|
|
14
14
|
return (<>
|
|
15
15
|
<PageTitleBox titleTxt={'법률지식인'} subTxt={<span>
|
|
16
16
|
법률 궁금증 비전문가, 광고성 답변에 지쳤다면?
|
|
@@ -24,10 +24,10 @@ const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList }) => {
|
|
|
24
24
|
<section className={'mb-[50px] mt-[100px] w-full max-xl:mt-[80px] max-md:mt-[40px] '}>
|
|
25
25
|
<div className={'flex w-full gap-[84px] pb-10 max-xl:gap-0 max-xl:pb-0 max-md:flex-col max-md:gap-[58px]'}>
|
|
26
26
|
{/*pc 768px 이상*/}
|
|
27
|
-
<GroupList groupList={groupList}/>
|
|
27
|
+
<GroupList groupList={groupList} currentCodeDesc={currentCodeDesc}/>
|
|
28
28
|
|
|
29
29
|
{/*mo 768px 미만*/}
|
|
30
|
-
<GroupSelectBox groupList={groupList}/>
|
|
30
|
+
<GroupSelectBox groupList={groupList} currentCodeDesc={currentCodeDesc}/>
|
|
31
31
|
|
|
32
32
|
<ul id={'faq_list'} className={'relative flex w-full flex-col border-t-[4px] border-solid border-t-black'}>
|
|
33
33
|
{faqList && faqList.length > 0 ? (faqList.map((item, key) => {
|
|
@@ -30,9 +30,10 @@ interface FaqListProps {
|
|
|
30
30
|
PaginationProps: IPaginationProps;
|
|
31
31
|
groupList: { code: string; code_name: string | null; code_desc: string | null }[];
|
|
32
32
|
faqList: IFaqTypes[];
|
|
33
|
+
currentCodeDesc?: string;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList }: FaqListProps) => {
|
|
36
|
+
const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList, currentCodeDesc }: FaqListProps) => {
|
|
36
37
|
return (
|
|
37
38
|
<>
|
|
38
39
|
<PageTitleBox
|
|
@@ -66,10 +67,10 @@ const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList }: FaqLis
|
|
|
66
67
|
}
|
|
67
68
|
>
|
|
68
69
|
{/*pc 768px 이상*/}
|
|
69
|
-
<GroupList groupList={groupList} />
|
|
70
|
+
<GroupList groupList={groupList} currentCodeDesc={currentCodeDesc} />
|
|
70
71
|
|
|
71
72
|
{/*mo 768px 미만*/}
|
|
72
|
-
<GroupSelectBox groupList={groupList} />
|
|
73
|
+
<GroupSelectBox groupList={groupList} currentCodeDesc={currentCodeDesc} />
|
|
73
74
|
|
|
74
75
|
<ul
|
|
75
76
|
id={'faq_list'}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const GroupList: ({ groupList }: {
|
|
2
|
+
declare const GroupList: ({ groupList, currentCodeDesc }: {
|
|
3
3
|
groupList: {
|
|
4
4
|
code: string;
|
|
5
5
|
code_name: string | null;
|
|
6
6
|
code_desc: string | null;
|
|
7
7
|
}[];
|
|
8
|
+
currentCodeDesc?: string;
|
|
8
9
|
}) => React.JSX.Element;
|
|
9
10
|
export default GroupList;
|
|
@@ -4,11 +4,16 @@ import Image from 'next/image';
|
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import IconRight from '../../../asset/images/faq/right.webp';
|
|
6
6
|
import { usePathname } from 'next/navigation';
|
|
7
|
-
const GroupList = ({ groupList }) => {
|
|
7
|
+
const GroupList = ({ groupList, currentCodeDesc }) => {
|
|
8
8
|
const pathname = usePathname();
|
|
9
9
|
const [select, setSelect] = useState('');
|
|
10
10
|
useEffect(() => {
|
|
11
|
-
|
|
11
|
+
if (pathname === '/faq' && currentCodeDesc) {
|
|
12
|
+
setSelect(currentCodeDesc);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
setSelect(String(pathname.replace('/faq/', '')));
|
|
16
|
+
}
|
|
12
17
|
}, [pathname]);
|
|
13
18
|
return (<div className="relative w-[350px] shrink-0 max-xl:w-[240px] max-md:hidden ">
|
|
14
19
|
<p className={'mb-8 px-3 py-[10px] text-[32px] font-[900] max-xl:mb-5 max-xl:text-[24px]'}>업무분야</p>
|
|
@@ -8,15 +8,21 @@ import IconRight from '../../../asset/images/faq/right.webp';
|
|
|
8
8
|
import { usePathname } from 'next/navigation';
|
|
9
9
|
|
|
10
10
|
const GroupList = ({
|
|
11
|
-
groupList
|
|
11
|
+
groupList,
|
|
12
|
+
currentCodeDesc
|
|
12
13
|
}: {
|
|
13
14
|
groupList: { code: string; code_name: string | null; code_desc: string | null }[];
|
|
15
|
+
currentCodeDesc?: string;
|
|
14
16
|
}) => {
|
|
15
17
|
const pathname = usePathname();
|
|
16
18
|
const [select, setSelect] = useState<string>('');
|
|
17
19
|
|
|
18
20
|
useEffect(() => {
|
|
19
|
-
|
|
21
|
+
if (pathname === '/faq' && currentCodeDesc) {
|
|
22
|
+
setSelect(currentCodeDesc);
|
|
23
|
+
} else {
|
|
24
|
+
setSelect(String(pathname.replace('/faq/', '')));
|
|
25
|
+
}
|
|
20
26
|
}, [pathname]);
|
|
21
27
|
|
|
22
28
|
return (
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const GroupSelectBox: ({ groupList }: {
|
|
2
|
+
declare const GroupSelectBox: ({ groupList, currentCodeDesc }: {
|
|
3
3
|
groupList: {
|
|
4
4
|
code: string;
|
|
5
5
|
code_name: string | null;
|
|
6
6
|
code_desc: string | null;
|
|
7
7
|
}[];
|
|
8
|
+
currentCodeDesc?: string;
|
|
8
9
|
}) => React.JSX.Element;
|
|
9
10
|
export default GroupSelectBox;
|
|
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
3
3
|
import { usePathname, useRouter } from 'next/navigation';
|
|
4
4
|
import IconArrow from '../../../asset/images/faq/vector_stroke.svg';
|
|
5
5
|
import IconArrowAct from '../../../asset/images/faq/vector_blu.svg';
|
|
6
|
-
const GroupSelectBox = ({ groupList }) => {
|
|
6
|
+
const GroupSelectBox = ({ groupList, currentCodeDesc }) => {
|
|
7
7
|
const router = useRouter();
|
|
8
8
|
const [select, setSelect] = useState('');
|
|
9
9
|
const [showAllFields, setShowAllFields] = useState(false);
|
|
@@ -12,7 +12,12 @@ const GroupSelectBox = ({ groupList }) => {
|
|
|
12
12
|
const [shouldScroll, setShouldScroll] = useState(false);
|
|
13
13
|
const displayedFields = !showAllFields ? groupList.slice(0, previewCount) : groupList;
|
|
14
14
|
useEffect(() => {
|
|
15
|
-
|
|
15
|
+
if (pathname === '/faq' && currentCodeDesc) {
|
|
16
|
+
setSelect(currentCodeDesc);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
setSelect(String(pathname.replace('/faq/', '')));
|
|
20
|
+
}
|
|
16
21
|
}, [pathname]);
|
|
17
22
|
const scrollToList = () => {
|
|
18
23
|
var _a, _b;
|
|
@@ -7,9 +7,11 @@ import IconArrow from '../../../asset/images/faq/vector_stroke.svg';
|
|
|
7
7
|
import IconArrowAct from '../../../asset/images/faq/vector_blu.svg';
|
|
8
8
|
|
|
9
9
|
const GroupSelectBox = ({
|
|
10
|
-
groupList
|
|
10
|
+
groupList,
|
|
11
|
+
currentCodeDesc
|
|
11
12
|
}: {
|
|
12
13
|
groupList: { code: string; code_name: string | null; code_desc: string | null }[];
|
|
14
|
+
currentCodeDesc?: string;
|
|
13
15
|
}) => {
|
|
14
16
|
const router = useRouter();
|
|
15
17
|
const [select, setSelect] = useState<string>('');
|
|
@@ -22,7 +24,11 @@ const GroupSelectBox = ({
|
|
|
22
24
|
const displayedFields = !showAllFields ? groupList.slice(0, previewCount) : groupList;
|
|
23
25
|
|
|
24
26
|
useEffect(() => {
|
|
25
|
-
|
|
27
|
+
if (pathname === '/faq' && currentCodeDesc) {
|
|
28
|
+
setSelect(currentCodeDesc);
|
|
29
|
+
} else {
|
|
30
|
+
setSelect(String(pathname.replace('/faq/', '')));
|
|
31
|
+
}
|
|
26
32
|
}, [pathname]);
|
|
27
33
|
|
|
28
34
|
const scrollToList = () => {
|
package/dist/styles/globals.css
CHANGED
|
@@ -3408,6 +3408,14 @@ video {
|
|
|
3408
3408
|
word-break: keep-all;
|
|
3409
3409
|
}
|
|
3410
3410
|
|
|
3411
|
+
.\!rounded-\[30px\] {
|
|
3412
|
+
border-radius: 30px !important;
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
.\!rounded-full {
|
|
3416
|
+
border-radius: 9999px !important;
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3411
3419
|
.rounded {
|
|
3412
3420
|
border-radius: 0.25rem;
|
|
3413
3421
|
}
|