@daeryun/dr_components 1.0.79 → 1.0.80
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/Daeryuntalk/ChatItem/ChatPrivacyAuth.jsx +9 -5
- package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.tsx +11 -5
- package/dist/components/Daeryuntalk/_ui/buttons/Button1.jsx +1 -0
- package/dist/components/Daeryuntalk/_ui/buttons/Button1.tsx +1 -0
- package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox1.d.ts +8 -0
- package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox1.jsx +15 -0
- package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox1.tsx +38 -0
- package/dist/styles/globals.css +5 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import ChatWrapper from './ChatWrapper';
|
|
|
12
12
|
import Input1 from '../_ui/inputs/Input1';
|
|
13
13
|
import { useDaeryuntalk } from '../DaeryuntalkContext';
|
|
14
14
|
import Button1 from '../_ui/buttons/Button1';
|
|
15
|
+
import CheckBox1 from '../_ui/checkboxs/CheckBox1';
|
|
15
16
|
// 채팅문의 번호 인증
|
|
16
17
|
const ChatPrivacyAuth = ({ message, isOperator }) => {
|
|
17
18
|
var _a;
|
|
@@ -21,6 +22,7 @@ const ChatPrivacyAuth = ({ message, isOperator }) => {
|
|
|
21
22
|
name: '',
|
|
22
23
|
cell_phone_number: ''
|
|
23
24
|
});
|
|
25
|
+
const [isAgeCheck, setIsAgeCheck] = useState(false);
|
|
24
26
|
const [isModify, setIsModify] = useState(false);
|
|
25
27
|
useEffect(() => {
|
|
26
28
|
var _a, _b, _c, _d;
|
|
@@ -46,7 +48,11 @@ const ChatPrivacyAuth = ({ message, isOperator }) => {
|
|
|
46
48
|
});
|
|
47
49
|
setIsModify(false);
|
|
48
50
|
});
|
|
51
|
+
const ageCheck = (e) => {
|
|
52
|
+
setIsAgeCheck(e.target.checked);
|
|
53
|
+
};
|
|
49
54
|
const goModify = () => {
|
|
55
|
+
setIsAgeCheck(false);
|
|
50
56
|
setIsModify(true);
|
|
51
57
|
};
|
|
52
58
|
if (!formData) {
|
|
@@ -60,11 +66,12 @@ const ChatPrivacyAuth = ({ message, isOperator }) => {
|
|
|
60
66
|
<Input1 onChange={handleInput} value={(_b = authObject[(_a = item.bindingKey) !== null && _a !== void 0 ? _a : '']) !== null && _b !== void 0 ? _b : ''} type={item.type} name={item.bindingKey || ''} readOnly={isModify ? false : ((_c = item.readOnly) !== null && _c !== void 0 ? _c : false)}/>
|
|
61
67
|
</div>);
|
|
62
68
|
})}
|
|
63
|
-
<
|
|
69
|
+
<CheckBox1 title={'(필수)만 14세 이상입니다.'} checked={isAgeCheck} onChange={ageCheck}/>
|
|
70
|
+
<Button1 type="button" onClick={update} isDisabled={!isAgeCheck}>
|
|
64
71
|
저장
|
|
65
72
|
</Button1>
|
|
66
73
|
</div>);
|
|
67
|
-
return (<ChatWrapper isOperator={isOperator}>
|
|
74
|
+
return (<ChatWrapper isOperator={isOperator} className={`!py-[16px]`}>
|
|
68
75
|
{/* 최초 요청 시 */}
|
|
69
76
|
{!formData.submittedAt && renderSetAuth()}
|
|
70
77
|
{/* 회원 정보 보여주기 */}
|
|
@@ -84,9 +91,6 @@ const ChatPrivacyAuth = ({ message, isOperator }) => {
|
|
|
84
91
|
<Button1 type={'button'} onClick={goModify}>
|
|
85
92
|
정보수정
|
|
86
93
|
</Button1>
|
|
87
|
-
{/*<div className="w-full whitespace-normal break-all font-[400] leading-[140%] tracking-[-4%]">*/}
|
|
88
|
-
{/* 정보가 다를 경우 <b className="font-[700] underline">회원정보 수정페이지</b>에서 변경해주세요.*/}
|
|
89
|
-
{/*</div>*/}
|
|
90
94
|
</div>)}
|
|
91
95
|
|
|
92
96
|
{/* 회원 정보 수정 */}
|
|
@@ -4,6 +4,7 @@ import { Form, Message } from '../_types/message';
|
|
|
4
4
|
import Input1 from '../_ui/inputs/Input1';
|
|
5
5
|
import { useDaeryuntalk } from '../DaeryuntalkContext';
|
|
6
6
|
import Button1 from '../_ui/buttons/Button1';
|
|
7
|
+
import CheckBox1 from '../_ui/checkboxs/CheckBox1';
|
|
7
8
|
|
|
8
9
|
interface props {
|
|
9
10
|
message: Message;
|
|
@@ -23,6 +24,8 @@ const ChatPrivacyAuth = ({ message, isOperator }: props) => {
|
|
|
23
24
|
cell_phone_number: ''
|
|
24
25
|
});
|
|
25
26
|
|
|
27
|
+
const [isAgeCheck, setIsAgeCheck] = useState<boolean>(false);
|
|
28
|
+
|
|
26
29
|
const [isModify, setIsModify] = useState<boolean>(false);
|
|
27
30
|
|
|
28
31
|
useEffect(() => {
|
|
@@ -54,7 +57,12 @@ const ChatPrivacyAuth = ({ message, isOperator }: props) => {
|
|
|
54
57
|
setIsModify(false);
|
|
55
58
|
};
|
|
56
59
|
|
|
60
|
+
const ageCheck = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
61
|
+
setIsAgeCheck(e.target.checked);
|
|
62
|
+
};
|
|
63
|
+
|
|
57
64
|
const goModify = () => {
|
|
65
|
+
setIsAgeCheck(false);
|
|
58
66
|
setIsModify(true);
|
|
59
67
|
};
|
|
60
68
|
|
|
@@ -76,14 +84,15 @@ const ChatPrivacyAuth = ({ message, isOperator }: props) => {
|
|
|
76
84
|
/>
|
|
77
85
|
</div>
|
|
78
86
|
))}
|
|
79
|
-
<
|
|
87
|
+
<CheckBox1 title={'(필수)만 14세 이상입니다.'} checked={isAgeCheck} onChange={ageCheck} />
|
|
88
|
+
<Button1 type="button" onClick={update} isDisabled={!isAgeCheck}>
|
|
80
89
|
저장
|
|
81
90
|
</Button1>
|
|
82
91
|
</div>
|
|
83
92
|
);
|
|
84
93
|
|
|
85
94
|
return (
|
|
86
|
-
<ChatWrapper isOperator={isOperator}>
|
|
95
|
+
<ChatWrapper isOperator={isOperator} className={`!py-[16px]`}>
|
|
87
96
|
{/* 최초 요청 시 */}
|
|
88
97
|
{!formData.submittedAt && renderSetAuth()}
|
|
89
98
|
{/* 회원 정보 보여주기 */}
|
|
@@ -113,9 +122,6 @@ const ChatPrivacyAuth = ({ message, isOperator }: props) => {
|
|
|
113
122
|
<Button1 type={'button'} onClick={goModify}>
|
|
114
123
|
정보수정
|
|
115
124
|
</Button1>
|
|
116
|
-
{/*<div className="w-full whitespace-normal break-all font-[400] leading-[140%] tracking-[-4%]">*/}
|
|
117
|
-
{/* 정보가 다를 경우 <b className="font-[700] underline">회원정보 수정페이지</b>에서 변경해주세요.*/}
|
|
118
|
-
{/*</div>*/}
|
|
119
125
|
</div>
|
|
120
126
|
)}
|
|
121
127
|
|
|
@@ -3,6 +3,7 @@ const Button1 = ({ onClick, type = 'button', className = '', children, isDisable
|
|
|
3
3
|
return (<button disabled={isDisabled} type={type} onClick={onClick} className={`
|
|
4
4
|
h-[38px] rounded-[10px] bg-[#2E385B] text-center text-[14px]
|
|
5
5
|
font-[700] leading-[100%] tracking-[-4%] text-white
|
|
6
|
+
disabled:bg-drTalkDisabled
|
|
6
7
|
${className}
|
|
7
8
|
`}>
|
|
8
9
|
{children}
|
|
@@ -17,6 +17,7 @@ const Button1 = ({ onClick, type = 'button', className = '', children, isDisable
|
|
|
17
17
|
className={`
|
|
18
18
|
h-[38px] rounded-[10px] bg-[#2E385B] text-center text-[14px]
|
|
19
19
|
font-[700] leading-[100%] tracking-[-4%] text-white
|
|
20
|
+
disabled:bg-drTalkDisabled
|
|
20
21
|
${className}
|
|
21
22
|
`}
|
|
22
23
|
>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const CheckBox1 = ({ title, checked, onChange }) => {
|
|
3
|
+
return (<label className="flex cursor-pointer flex-row items-center gap-[4px]">
|
|
4
|
+
{/* 실제 체크박스는 숨김 */}
|
|
5
|
+
<input type="checkbox" checked={checked} onChange={onChange} className="hidden"/>
|
|
6
|
+
{/* 커스텀 체크박스 */}
|
|
7
|
+
{checked ? (<svg width="13.5" height="13.5" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8
|
+
<path d="M0.75 0.25H12.75C12.9489 0.25 13.1397 0.329018 13.2803 0.46967C13.421 0.610322 13.5 0.801088 13.5 1V13C13.5 13.1989 13.421 13.3897 13.2803 13.5303C13.1397 13.671 12.9489 13.75 12.75 13.75H0.75C0.551088 13.75 0.360322 13.671 0.21967 13.5303C0.0790176 13.3897 0 13.1989 0 13V1C0 0.801088 0.0790176 0.610322 0.21967 0.46967C0.360322 0.329018 0.551088 0.25 0.75 0.25ZM6.00225 10L11.3048 4.69675L10.245 3.63625L6.00225 7.879L3.8805 5.75725L2.82 6.81775L6.00225 10Z" fill="#2E385B"/>
|
|
9
|
+
</svg>) : (<svg width="13.5" height="13.5" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.75 0.25V13.75H0.25V0.25H13.75ZM12.25 1.75001H1.75001V12.25H12.25V1.75001Z" fill="#2E385B" fill-opacity="0.3"/>
|
|
11
|
+
</svg>)}
|
|
12
|
+
<span className="dr_talk_body_medium2">{title}</span>
|
|
13
|
+
</label>);
|
|
14
|
+
};
|
|
15
|
+
export default CheckBox1;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface CheckBox1Props {
|
|
4
|
+
title: string;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const CheckBox1: React.FC<CheckBox1Props> = ({ title, checked, onChange }) => {
|
|
10
|
+
return (
|
|
11
|
+
<label className="flex cursor-pointer flex-row items-center gap-[4px]">
|
|
12
|
+
{/* 실제 체크박스는 숨김 */}
|
|
13
|
+
<input type="checkbox" checked={checked} onChange={onChange} className="hidden" />
|
|
14
|
+
{/* 커스텀 체크박스 */}
|
|
15
|
+
{checked ? (
|
|
16
|
+
<svg width="13.5" height="13.5" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
17
|
+
<path
|
|
18
|
+
d="M0.75 0.25H12.75C12.9489 0.25 13.1397 0.329018 13.2803 0.46967C13.421 0.610322 13.5 0.801088 13.5 1V13C13.5 13.1989 13.421 13.3897 13.2803 13.5303C13.1397 13.671 12.9489 13.75 12.75 13.75H0.75C0.551088 13.75 0.360322 13.671 0.21967 13.5303C0.0790176 13.3897 0 13.1989 0 13V1C0 0.801088 0.0790176 0.610322 0.21967 0.46967C0.360322 0.329018 0.551088 0.25 0.75 0.25ZM6.00225 10L11.3048 4.69675L10.245 3.63625L6.00225 7.879L3.8805 5.75725L2.82 6.81775L6.00225 10Z"
|
|
19
|
+
fill="#2E385B"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
) : (
|
|
23
|
+
<svg width="13.5" height="13.5" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
24
|
+
<path
|
|
25
|
+
fill-rule="evenodd"
|
|
26
|
+
clip-rule="evenodd"
|
|
27
|
+
d="M13.75 0.25V13.75H0.25V0.25H13.75ZM12.25 1.75001H1.75001V12.25H12.25V1.75001Z"
|
|
28
|
+
fill="#2E385B"
|
|
29
|
+
fill-opacity="0.3"
|
|
30
|
+
/>
|
|
31
|
+
</svg>
|
|
32
|
+
)}
|
|
33
|
+
<span className="dr_talk_body_medium2">{title}</span>
|
|
34
|
+
</label>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default CheckBox1;
|
package/dist/styles/globals.css
CHANGED
|
@@ -4579,10 +4579,6 @@ html {
|
|
|
4579
4579
|
text-overflow: ellipsis;
|
|
4580
4580
|
}
|
|
4581
4581
|
|
|
4582
|
-
.whitespace-normal {
|
|
4583
|
-
white-space: normal;
|
|
4584
|
-
}
|
|
4585
|
-
|
|
4586
4582
|
.whitespace-nowrap {
|
|
4587
4583
|
white-space: nowrap;
|
|
4588
4584
|
}
|
|
@@ -6211,6 +6207,11 @@ html {
|
|
|
6211
6207
|
padding-bottom: 12.5px !important;
|
|
6212
6208
|
}
|
|
6213
6209
|
|
|
6210
|
+
.\!py-\[16px\] {
|
|
6211
|
+
padding-top: 16px !important;
|
|
6212
|
+
padding-bottom: 16px !important;
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6214
6215
|
.px-1 {
|
|
6215
6216
|
padding-left: 0.25rem;
|
|
6216
6217
|
padding-right: 0.25rem;
|