@daeryun/dr_components 1.2.66 → 1.2.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.
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -0
- package/dist/components/SearchBar/SearchBar.jsx +17 -2
- package/dist/components/SearchBar/SearchBar.stories.d.ts +8 -0
- package/dist/components/SearchBar/SearchBar.stories.jsx +113 -0
- package/dist/components/SearchBar/SearchBar.stories.tsx +137 -0
- package/dist/components/SearchBar/SearchBar.tsx +20 -1
- package/dist/components/banner/MobileTopBanner.tsx +0 -1
- package/dist/components/common/integrate/index.d.ts +1 -1
- package/dist/components/page/LawyerDetail/component/BasicInfo.jsx +2 -2
- package/dist/components/page/LawyerDetail/component/BasicInfo.tsx +2 -2
- package/dist/styles/globals.css +417 -412
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -26,3 +26,140 @@ export const Default: Story = {
|
|
|
26
26
|
placeholder: '검색어를 입력해주세요.'
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
+
|
|
30
|
+
export const WithBorder: Story = {
|
|
31
|
+
render: args => {
|
|
32
|
+
return (
|
|
33
|
+
<div className={'w-full'}>
|
|
34
|
+
<SearchBar {...args} />
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
},
|
|
38
|
+
args: {
|
|
39
|
+
onChange: () => {},
|
|
40
|
+
onClick: () => {},
|
|
41
|
+
search: '',
|
|
42
|
+
label: '',
|
|
43
|
+
placeholder: '검색어를 입력해주세요.',
|
|
44
|
+
border: true
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const SuccessPlaceholder: Story = {
|
|
49
|
+
render: args => {
|
|
50
|
+
return (
|
|
51
|
+
<div className={'w-full'}>
|
|
52
|
+
<SearchBar {...args} />
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
},
|
|
56
|
+
args: {
|
|
57
|
+
onChange: () => {},
|
|
58
|
+
onClick: () => {},
|
|
59
|
+
search: '',
|
|
60
|
+
label: '',
|
|
61
|
+
placeholder: 'success'
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const InfoPlaceholder: Story = {
|
|
66
|
+
render: args => {
|
|
67
|
+
return (
|
|
68
|
+
<div className={'w-full'}>
|
|
69
|
+
<SearchBar {...args} />
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
},
|
|
73
|
+
args: {
|
|
74
|
+
onChange: () => {},
|
|
75
|
+
onClick: () => {},
|
|
76
|
+
search: '',
|
|
77
|
+
label: '',
|
|
78
|
+
placeholder: 'info'
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const FaqPlaceholder: Story = {
|
|
83
|
+
render: args => {
|
|
84
|
+
return (
|
|
85
|
+
<div className={'w-full'}>
|
|
86
|
+
<SearchBar {...args} />
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
},
|
|
90
|
+
args: {
|
|
91
|
+
onChange: () => {},
|
|
92
|
+
onClick: () => {},
|
|
93
|
+
search: '',
|
|
94
|
+
label: '',
|
|
95
|
+
placeholder: 'faq'
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const ReplyPlaceholder: Story = {
|
|
100
|
+
render: args => {
|
|
101
|
+
return (
|
|
102
|
+
<div className={'w-full'}>
|
|
103
|
+
<SearchBar {...args} />
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
},
|
|
107
|
+
args: {
|
|
108
|
+
onChange: () => {},
|
|
109
|
+
onClick: () => {},
|
|
110
|
+
search: '',
|
|
111
|
+
label: '',
|
|
112
|
+
placeholder: 'reply'
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const BroadcastPlaceholder: Story = {
|
|
117
|
+
render: args => {
|
|
118
|
+
return (
|
|
119
|
+
<div className={'w-full'}>
|
|
120
|
+
<SearchBar {...args} />
|
|
121
|
+
</div>
|
|
122
|
+
);
|
|
123
|
+
},
|
|
124
|
+
args: {
|
|
125
|
+
onChange: () => {},
|
|
126
|
+
onClick: () => {},
|
|
127
|
+
search: '',
|
|
128
|
+
label: '',
|
|
129
|
+
placeholder: 'broadcast'
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const NoticePlaceholder: Story = {
|
|
134
|
+
render: args => {
|
|
135
|
+
return (
|
|
136
|
+
<div className={'w-full'}>
|
|
137
|
+
<SearchBar {...args} />
|
|
138
|
+
</div>
|
|
139
|
+
);
|
|
140
|
+
},
|
|
141
|
+
args: {
|
|
142
|
+
onChange: () => {},
|
|
143
|
+
onClick: () => {},
|
|
144
|
+
search: '',
|
|
145
|
+
label: '',
|
|
146
|
+
placeholder: 'notice'
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export const ArchivePlaceholder: Story = {
|
|
151
|
+
render: args => {
|
|
152
|
+
return (
|
|
153
|
+
<div className={'w-full'}>
|
|
154
|
+
<SearchBar {...args} />
|
|
155
|
+
</div>
|
|
156
|
+
);
|
|
157
|
+
},
|
|
158
|
+
args: {
|
|
159
|
+
onChange: () => {},
|
|
160
|
+
onClick: () => {},
|
|
161
|
+
search: '',
|
|
162
|
+
label: '',
|
|
163
|
+
placeholder: 'archive'
|
|
164
|
+
}
|
|
165
|
+
};
|
|
@@ -16,6 +16,7 @@ const SearchBar = (props: {
|
|
|
16
16
|
placeholder: string;
|
|
17
17
|
maxLength?: number;
|
|
18
18
|
isIntegrate?: boolean;
|
|
19
|
+
border?: boolean;
|
|
19
20
|
isMarginNotAuto?: boolean; //중앙정렬 아닐 시 true
|
|
20
21
|
marginTop?: [number, number, number]; //기본값 존재, 순서대로 all, 768px, 640px
|
|
21
22
|
marginBottom?: number; //기본값 존재
|
|
@@ -27,6 +28,7 @@ const SearchBar = (props: {
|
|
|
27
28
|
maxLength,
|
|
28
29
|
label,
|
|
29
30
|
isIntegrate,
|
|
31
|
+
border = false,
|
|
30
32
|
isMarginNotAuto,
|
|
31
33
|
marginTop,
|
|
32
34
|
marginBottom,
|
|
@@ -34,6 +36,22 @@ const SearchBar = (props: {
|
|
|
34
36
|
} = props;
|
|
35
37
|
const pathname = usePathname();
|
|
36
38
|
|
|
39
|
+
// placeholder 전환
|
|
40
|
+
const getPlaceholderText = (placeholder: string) => {
|
|
41
|
+
const placeholderMap: { [key: string]: string } = {
|
|
42
|
+
'success': '업무사례를 검색해보세요',
|
|
43
|
+
'info': '법률정보를 검색해보세요',
|
|
44
|
+
'faq': '법률지식인을 검색해보세요',
|
|
45
|
+
'reply': '고객후기를 검색해보세요',
|
|
46
|
+
'broadcast': '언론보도를 검색해보세요',
|
|
47
|
+
'notice': '공지사항을 검색해보세요',
|
|
48
|
+
'archive': '법률서식을 검색해보세요'
|
|
49
|
+
};
|
|
50
|
+
return placeholderMap[placeholder] || placeholder;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const displayPlaceholder = getPlaceholderText(placeholder);
|
|
54
|
+
|
|
37
55
|
const handleInputChange = (e: React.FormEvent<HTMLInputElement>) => {
|
|
38
56
|
props.onChange(e);
|
|
39
57
|
};
|
|
@@ -86,7 +104,7 @@ const SearchBar = (props: {
|
|
|
86
104
|
</label>
|
|
87
105
|
<input
|
|
88
106
|
name="sear_txt"
|
|
89
|
-
placeholder={
|
|
107
|
+
placeholder={displayPlaceholder}
|
|
90
108
|
maxLength={maxLength ? maxLength : 20}
|
|
91
109
|
value={search}
|
|
92
110
|
onChange={handleInputChange}
|
|
@@ -96,6 +114,7 @@ const SearchBar = (props: {
|
|
|
96
114
|
spellCheck={false}
|
|
97
115
|
className={
|
|
98
116
|
`bg-[${isIntegrate ? '#FFFFFF' : '#F7F7F7'}] w-[100%] !rounded-full px-[40px] py-[24px] ` +
|
|
117
|
+
(border ? 'border border-[#c1c1c1] ' : '') +
|
|
99
118
|
'text-2xl tracking-[-0.6px] text-[#333333] placeholder:text-[#575757] ' +
|
|
100
119
|
//1500px
|
|
101
120
|
'max-3xl:text-xl ' +
|
|
@@ -143,7 +143,7 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
143
143
|
<div className={'mx-auto mt-4 md:hidden ' + (isUseWrapper ? 'max-md:px-10 max-2sm:px-5' : ' w-[90%] ')}>
|
|
144
144
|
{lawyerInfo.l_introduce_shorts ? (<>
|
|
145
145
|
<div className={'flex items-center justify-between'}>
|
|
146
|
-
<span className={'
|
|
146
|
+
<span className={'text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px]'}>
|
|
147
147
|
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
148
148
|
</span>
|
|
149
149
|
<div className={'flex h-[49px] w-[189px] shrink-0 cursor-pointer items-center justify-center gap-[4px] whitespace-nowrap rounded-[24.5px] bg-[#fff] text-[22px] font-[600]'} onClick={() => {
|
|
@@ -161,7 +161,7 @@ const BasicInfo = ({ lawyerInfo, codeList, centerCode, isUseWrapper, integrateSe
|
|
|
161
161
|
: lawyerInfo.l_position, integrateSearch)}
|
|
162
162
|
</span>)}
|
|
163
163
|
</>) : (<>
|
|
164
|
-
<span className={'block
|
|
164
|
+
<span className={'block text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px]'}>
|
|
165
165
|
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
166
166
|
</span>
|
|
167
167
|
{lawyerInfo.l_position && (<span className={'mt-2 block whitespace-pre-wrap text-[22px] font-[600] leading-[1.42] tracking-[-0.7px] max-xs:text-[20px]'}>
|
|
@@ -286,7 +286,7 @@ const BasicInfo = ({
|
|
|
286
286
|
<div className={'flex items-center justify-between'}>
|
|
287
287
|
<span
|
|
288
288
|
className={
|
|
289
|
-
'
|
|
289
|
+
'text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px]'
|
|
290
290
|
}
|
|
291
291
|
>
|
|
292
292
|
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|
|
@@ -336,7 +336,7 @@ const BasicInfo = ({
|
|
|
336
336
|
<>
|
|
337
337
|
<span
|
|
338
338
|
className={
|
|
339
|
-
'block
|
|
339
|
+
'block text-[50px] font-[800] leading-[1.14] tracking-[-0.9px] max-md:text-[46px] max-xs:text-[40px]'
|
|
340
340
|
}
|
|
341
341
|
>
|
|
342
342
|
{searchColorLawyerText(lawyerInfo.l_name, integrateSearch)}
|