@x-plat/design-system 0.8.3 → 0.10.0
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/AutoResizeTextArea/index.cjs +140 -4
- package/dist/components/AutoResizeTextArea/index.css +38 -0
- package/dist/components/AutoResizeTextArea/index.d.cts +4 -0
- package/dist/components/AutoResizeTextArea/index.d.ts +4 -0
- package/dist/components/AutoResizeTextArea/index.js +140 -4
- package/dist/components/Badge/index.cjs +5 -1
- package/dist/components/Badge/index.css +1 -0
- package/dist/components/Badge/index.d.cts +1 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.js +5 -1
- package/dist/components/Box/index.d.cts +3 -0
- package/dist/components/Box/index.d.ts +3 -0
- package/dist/components/Chart/index.cjs +7 -6
- package/dist/components/Chart/index.d.cts +12 -1
- package/dist/components/Chart/index.d.ts +12 -1
- package/dist/components/Chart/index.js +7 -6
- package/dist/components/ChatInput/index.cjs +150 -9
- package/dist/components/ChatInput/index.css +38 -0
- package/dist/components/ChatInput/index.d.cts +9 -0
- package/dist/components/ChatInput/index.d.ts +9 -0
- package/dist/components/ChatInput/index.js +151 -10
- package/dist/components/CheckBox/index.cjs +137 -6
- package/dist/components/CheckBox/index.css +40 -0
- package/dist/components/CheckBox/index.d.cts +13 -2
- package/dist/components/CheckBox/index.d.ts +13 -2
- package/dist/components/CheckBox/index.js +137 -6
- package/dist/components/Chip/index.d.cts +2 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/DatePicker/index.cjs +76 -62
- package/dist/components/DatePicker/index.css +38 -31
- package/dist/components/DatePicker/index.js +42 -28
- package/dist/components/Drawer/index.d.cts +1 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/FieldMessage/index.cjs +183 -0
- package/dist/components/FieldMessage/index.css +37 -0
- package/dist/components/FieldMessage/index.d.cts +37 -0
- package/dist/components/FieldMessage/index.d.ts +37 -0
- package/dist/components/FieldMessage/index.js +154 -0
- package/dist/components/FileUpload/index.cjs +135 -8
- package/dist/components/FileUpload/index.css +38 -0
- package/dist/components/FileUpload/index.d.cts +9 -0
- package/dist/components/FileUpload/index.d.ts +9 -0
- package/dist/components/FileUpload/index.js +135 -8
- package/dist/components/ImageSelector/index.cjs +153 -11
- package/dist/components/ImageSelector/index.css +38 -0
- package/dist/components/ImageSelector/index.d.cts +6 -0
- package/dist/components/ImageSelector/index.d.ts +6 -0
- package/dist/components/ImageSelector/index.js +153 -11
- package/dist/components/Input/index.cjs +38 -25
- package/dist/components/Input/index.css +38 -31
- package/dist/components/Input/index.d.cts +7 -8
- package/dist/components/Input/index.d.ts +7 -8
- package/dist/components/Input/index.js +36 -23
- package/dist/components/NotificationBadge/index.cjs +5 -1
- package/dist/components/NotificationBadge/index.css +1 -0
- package/dist/components/NotificationBadge/index.d.cts +6 -2
- package/dist/components/NotificationBadge/index.d.ts +6 -2
- package/dist/components/NotificationBadge/index.js +5 -1
- package/dist/components/Pagination/index.cjs +6 -2
- package/dist/components/Pagination/index.css +1 -0
- package/dist/components/Pagination/index.d.cts +13 -2
- package/dist/components/Pagination/index.d.ts +13 -2
- package/dist/components/Pagination/index.js +6 -2
- package/dist/components/Progress/index.cjs +6 -2
- package/dist/components/Progress/index.css +1 -0
- package/dist/components/Progress/index.d.cts +11 -2
- package/dist/components/Progress/index.d.ts +11 -2
- package/dist/components/Progress/index.js +6 -2
- package/dist/components/Radio/index.cjs +158 -10
- package/dist/components/Radio/index.css +40 -0
- package/dist/components/Radio/index.d.cts +14 -2
- package/dist/components/Radio/index.d.ts +14 -2
- package/dist/components/Radio/index.js +158 -10
- package/dist/components/Select/index.cjs +139 -13
- package/dist/components/Select/index.css +38 -0
- package/dist/components/Select/index.d.cts +8 -1
- package/dist/components/Select/index.d.ts +8 -1
- package/dist/components/Select/index.js +139 -13
- package/dist/components/Skeleton/index.d.cts +3 -0
- package/dist/components/Skeleton/index.d.ts +3 -0
- package/dist/components/Spinner/index.cjs +6 -2
- package/dist/components/Spinner/index.css +1 -0
- package/dist/components/Spinner/index.d.cts +8 -2
- package/dist/components/Spinner/index.d.ts +8 -2
- package/dist/components/Spinner/index.js +6 -2
- package/dist/components/Steps/index.cjs +6 -2
- package/dist/components/Steps/index.css +11 -0
- package/dist/components/Steps/index.d.cts +9 -2
- package/dist/components/Steps/index.d.ts +9 -2
- package/dist/components/Steps/index.js +6 -2
- package/dist/components/Switch/index.cjs +146 -6
- package/dist/components/Switch/index.css +40 -0
- package/dist/components/Switch/index.d.cts +13 -2
- package/dist/components/Switch/index.d.ts +13 -2
- package/dist/components/Switch/index.js +146 -6
- package/dist/components/Tab/index.cjs +4 -3
- package/dist/components/Tab/index.d.cts +12 -1
- package/dist/components/Tab/index.d.ts +12 -1
- package/dist/components/Tab/index.js +4 -3
- package/dist/components/Tag/index.cjs +5 -3
- package/dist/components/Tag/index.d.cts +12 -2
- package/dist/components/Tag/index.d.ts +12 -2
- package/dist/components/Tag/index.js +5 -3
- package/dist/components/TextArea/index.cjs +138 -2
- package/dist/components/TextArea/index.css +38 -0
- package/dist/components/TextArea/index.d.cts +6 -0
- package/dist/components/TextArea/index.d.ts +6 -0
- package/dist/components/TextArea/index.js +138 -2
- package/dist/components/Tooltip/index.cjs +4 -2
- package/dist/components/Tooltip/index.d.cts +11 -1
- package/dist/components/Tooltip/index.d.ts +11 -1
- package/dist/components/Tooltip/index.js +4 -2
- package/dist/components/index.cjs +479 -408
- package/dist/components/index.css +59 -31
- package/dist/components/index.d.cts +3 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +262 -194
- package/dist/index.cjs +484 -413
- package/dist/index.css +59 -31
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +264 -196
- package/dist/status-g_KP3qT6.d.cts +8 -0
- package/dist/status-g_KP3qT6.d.ts +8 -0
- package/dist/validation-Dqo1zqhT.d.cts +13 -0
- package/dist/validation-Dqo1zqhT.d.ts +13 -0
- package/guidelines/AGENT_PROMPT.md +15 -0
- package/guidelines/components/card.md +3 -3
- package/guidelines/components/feedback.md +1 -1
- package/guidelines/components/form.md +26 -0
- package/guidelines/components/navigation.md +16 -15
- package/guidelines/components/overlay.md +43 -4
- package/package.json +1 -1
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
/* src/components/FieldMessage/fieldMessage.scss */
|
|
2
|
+
.lib-xplat-field {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--spacing-space-2);
|
|
6
|
+
}
|
|
7
|
+
.lib-xplat-field-message-wrap {
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: var(--spacing-space-2);
|
|
10
|
+
margin-left: var(--spacing-space-1);
|
|
11
|
+
}
|
|
12
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message {
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: var(--spacing-space-1);
|
|
15
|
+
font-family: var(--semantic-typo-caption-2-r-font);
|
|
16
|
+
font-size: var(--semantic-typo-caption-2-r-size);
|
|
17
|
+
line-height: var(--semantic-typo-caption-2-r-lh);
|
|
18
|
+
font-weight: var(--semantic-typo-caption-2-r-weight);
|
|
19
|
+
letter-spacing: var(--semantic-typo-caption-2-r-ls);
|
|
20
|
+
align-items: center;
|
|
21
|
+
user-select: none;
|
|
22
|
+
}
|
|
23
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message.default {
|
|
24
|
+
color: var(--semantic-icon-secondary);
|
|
25
|
+
}
|
|
26
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message.success {
|
|
27
|
+
color: var(--semantic-text-success);
|
|
28
|
+
}
|
|
29
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message.warning {
|
|
30
|
+
color: var(--semantic-text-warning);
|
|
31
|
+
}
|
|
32
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message.error {
|
|
33
|
+
color: var(--semantic-text-error);
|
|
34
|
+
}
|
|
35
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message > .icon {
|
|
36
|
+
font-size: var(--semantic-typo-label-2-m-size);
|
|
37
|
+
}
|
|
38
|
+
|
|
1
39
|
/* src/components/FileUpload/fileupload.scss */
|
|
2
40
|
.lib-xplat-file-upload {
|
|
3
41
|
contain: content;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { V as Validation } from '../../validation-Dqo1zqhT.cjs';
|
|
2
3
|
|
|
3
4
|
interface FileUploadProps {
|
|
5
|
+
/** 고를 수 있는 파일 형식 (input 의 accept 와 같다) */
|
|
4
6
|
accept?: string;
|
|
7
|
+
/** 여러 개를 한 번에 고를 수 있게 한다 */
|
|
5
8
|
multiple?: boolean;
|
|
9
|
+
/** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
|
|
10
|
+
validations?: Validation[];
|
|
11
|
+
/** 바이트 단위 최대 크기. **초과분은 조용히 걸러진다** */
|
|
6
12
|
maxSize?: number;
|
|
13
|
+
/** 고른 파일 목록을 준다. maxSize 로 걸러진 것은 빠져 있다 */
|
|
7
14
|
onChange?: (files: File[]) => void;
|
|
15
|
+
/** 상자 안 큰 글자 */
|
|
8
16
|
label?: string;
|
|
17
|
+
/** 상자 안 작은 설명 */
|
|
9
18
|
description?: string;
|
|
10
19
|
}
|
|
11
20
|
declare const FileUpload: React.FC<FileUploadProps>;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { V as Validation } from '../../validation-Dqo1zqhT.js';
|
|
2
3
|
|
|
3
4
|
interface FileUploadProps {
|
|
5
|
+
/** 고를 수 있는 파일 형식 (input 의 accept 와 같다) */
|
|
4
6
|
accept?: string;
|
|
7
|
+
/** 여러 개를 한 번에 고를 수 있게 한다 */
|
|
5
8
|
multiple?: boolean;
|
|
9
|
+
/** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
|
|
10
|
+
validations?: Validation[];
|
|
11
|
+
/** 바이트 단위 최대 크기. **초과분은 조용히 걸러진다** */
|
|
6
12
|
maxSize?: number;
|
|
13
|
+
/** 고른 파일 목록을 준다. maxSize 로 걸러진 것은 빠져 있다 */
|
|
7
14
|
onChange?: (files: File[]) => void;
|
|
15
|
+
/** 상자 안 큰 글자 */
|
|
8
16
|
label?: string;
|
|
17
|
+
/** 상자 안 작은 설명 */
|
|
9
18
|
description?: string;
|
|
10
19
|
}
|
|
11
20
|
declare const FileUpload: React.FC<FileUploadProps>;
|
|
@@ -789,12 +789,83 @@ import { jsx as jsx253 } from "react/jsx-runtime";
|
|
|
789
789
|
|
|
790
790
|
// src/tokens/svg/status/ErrorIcon.tsx
|
|
791
791
|
import { jsx as jsx254, jsxs as jsxs160 } from "react/jsx-runtime";
|
|
792
|
+
var ErrorIcon = () => /* @__PURE__ */ jsxs160(
|
|
793
|
+
"svg",
|
|
794
|
+
{
|
|
795
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
796
|
+
width: "1em",
|
|
797
|
+
height: "1em",
|
|
798
|
+
viewBox: "0 0 16 16",
|
|
799
|
+
fill: "none",
|
|
800
|
+
children: [
|
|
801
|
+
/* @__PURE__ */ jsxs160("g", { clipPath: "url(#clip0_1196_9603)", children: [
|
|
802
|
+
/* @__PURE__ */ jsx254(
|
|
803
|
+
"path",
|
|
804
|
+
{
|
|
805
|
+
d: "M9.57588 5.57559C9.81019 5.34127 10.19 5.34127 10.4243 5.57559C10.6586 5.8099 10.6586 6.18971 10.4243 6.42402L8.84854 7.9998L10.4243 9.57559C10.6586 9.8099 10.6586 10.1897 10.4243 10.424C10.19 10.6583 9.81019 10.6583 9.57588 10.424L8.0001 8.84824L6.42432 10.424C6.19 10.6583 5.81019 10.6583 5.57588 10.424C5.34156 10.1897 5.34156 9.8099 5.57588 9.57559L7.15166 7.9998L5.57588 6.42402C5.34156 6.18971 5.34156 5.8099 5.57588 5.57559C5.81019 5.34127 6.19 5.34127 6.42432 5.57559L8.0001 7.15137L9.57588 5.57559Z",
|
|
806
|
+
fill: "currentColor"
|
|
807
|
+
}
|
|
808
|
+
),
|
|
809
|
+
/* @__PURE__ */ jsx254(
|
|
810
|
+
"path",
|
|
811
|
+
{
|
|
812
|
+
fillRule: "evenodd",
|
|
813
|
+
clipRule: "evenodd",
|
|
814
|
+
d: "M8.0001 0.733398C12.0131 0.73361 15.2671 3.98679 15.2673 7.9998C15.2672 12.0129 12.0131 15.2668 8.0001 15.267C3.98701 15.2669 0.733016 12.0129 0.73291 7.9998C0.733051 3.98674 3.98704 0.733539 8.0001 0.733398ZM8.0001 1.9334C4.64978 1.93354 1.93383 4.64948 1.93369 7.9998C1.9338 11.3502 4.64975 14.0669 8.0001 14.067C11.3504 14.0668 14.0672 11.3501 14.0673 7.9998C14.0671 4.64953 11.3504 1.93361 8.0001 1.9334Z",
|
|
815
|
+
fill: "currentColor"
|
|
816
|
+
}
|
|
817
|
+
)
|
|
818
|
+
] }),
|
|
819
|
+
/* @__PURE__ */ jsx254("defs", { children: /* @__PURE__ */ jsx254("clipPath", { id: "clip0_1196_9603", children: /* @__PURE__ */ jsx254("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
820
|
+
]
|
|
821
|
+
}
|
|
822
|
+
);
|
|
823
|
+
var ErrorIcon_default = ErrorIcon;
|
|
792
824
|
|
|
793
825
|
// src/tokens/svg/status/HelpCircleIcon.tsx
|
|
794
826
|
import { jsx as jsx255, jsxs as jsxs161 } from "react/jsx-runtime";
|
|
795
827
|
|
|
796
828
|
// src/tokens/svg/status/InfoIcon.tsx
|
|
797
829
|
import { jsx as jsx256, jsxs as jsxs162 } from "react/jsx-runtime";
|
|
830
|
+
var InfoIcon = () => /* @__PURE__ */ jsxs162(
|
|
831
|
+
"svg",
|
|
832
|
+
{
|
|
833
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
834
|
+
width: "1em",
|
|
835
|
+
height: "1em",
|
|
836
|
+
viewBox: "0 0 16 16",
|
|
837
|
+
fill: "none",
|
|
838
|
+
children: [
|
|
839
|
+
/* @__PURE__ */ jsxs162("g", { clipPath: "url(#clip0_1188_11261)", children: [
|
|
840
|
+
/* @__PURE__ */ jsx256(
|
|
841
|
+
"path",
|
|
842
|
+
{
|
|
843
|
+
d: "M8.00156 7.39999C8.33293 7.39999 8.60156 7.66862 8.60156 7.99999V10.6664C8.60156 10.9978 8.33293 11.2664 8.00156 11.2664C7.67019 11.2664 7.40156 10.9978 7.40156 10.6664V7.99999C7.40156 7.66862 7.67019 7.39999 8.00156 7.39999Z",
|
|
844
|
+
fill: "currentColor"
|
|
845
|
+
}
|
|
846
|
+
),
|
|
847
|
+
/* @__PURE__ */ jsx256(
|
|
848
|
+
"path",
|
|
849
|
+
{
|
|
850
|
+
d: "M8.00859 4.73358C8.3398 4.73378 8.60859 5.00233 8.60859 5.33358C8.60849 5.66474 8.33973 5.93338 8.00859 5.93358H8.00156C7.67026 5.93358 7.40167 5.66486 7.40156 5.33358C7.40156 5.00221 7.67019 4.73358 8.00156 4.73358H8.00859Z",
|
|
851
|
+
fill: "currentColor"
|
|
852
|
+
}
|
|
853
|
+
),
|
|
854
|
+
/* @__PURE__ */ jsx256(
|
|
855
|
+
"path",
|
|
856
|
+
{
|
|
857
|
+
fillRule: "evenodd",
|
|
858
|
+
clipRule: "evenodd",
|
|
859
|
+
d: "M8.00156 0.733582C12.0146 0.733793 15.2686 3.98697 15.2688 7.99999C15.2686 12.013 12.0146 15.267 8.00156 15.2672C3.98848 15.267 0.734481 12.0131 0.734375 7.99999C0.734516 3.98693 3.9885 0.733722 8.00156 0.733582ZM8.00156 1.93358C4.65124 1.93372 1.9353 4.64967 1.93516 7.99999C1.93526 11.3503 4.65122 14.067 8.00156 14.0672C11.3518 14.067 14.0686 11.3503 14.0688 7.99999C14.0686 4.64971 11.3518 1.93379 8.00156 1.93358Z",
|
|
860
|
+
fill: "currentColor"
|
|
861
|
+
}
|
|
862
|
+
)
|
|
863
|
+
] }),
|
|
864
|
+
/* @__PURE__ */ jsx256("defs", { children: /* @__PURE__ */ jsx256("clipPath", { id: "clip0_1188_11261", children: /* @__PURE__ */ jsx256("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
865
|
+
]
|
|
866
|
+
}
|
|
867
|
+
);
|
|
868
|
+
var InfoIcon_default = InfoIcon;
|
|
798
869
|
|
|
799
870
|
// src/tokens/svg/status/LoaderIcon.tsx
|
|
800
871
|
import { jsx as jsx257, jsxs as jsxs163 } from "react/jsx-runtime";
|
|
@@ -819,6 +890,24 @@ import { jsx as jsx263, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
|
819
890
|
|
|
820
891
|
// src/tokens/svg/status/SuccessIcon.tsx
|
|
821
892
|
import { jsx as jsx264 } from "react/jsx-runtime";
|
|
893
|
+
var SuccessIcon = () => /* @__PURE__ */ jsx264(
|
|
894
|
+
"svg",
|
|
895
|
+
{
|
|
896
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
897
|
+
width: "1em",
|
|
898
|
+
height: "1em",
|
|
899
|
+
viewBox: "0 0 16 16",
|
|
900
|
+
fill: "none",
|
|
901
|
+
children: /* @__PURE__ */ jsx264(
|
|
902
|
+
"path",
|
|
903
|
+
{
|
|
904
|
+
d: "M12.9084 3.57597C13.1426 3.34172 13.5225 3.34185 13.7568 3.57597C13.9911 3.81028 13.9911 4.19009 13.7568 4.4244L6.424 11.758C6.31157 11.8703 6.15869 11.9337 5.99978 11.9338C5.8409 11.9337 5.68798 11.8703 5.57556 11.758L2.24197 8.4244C2.00782 8.19018 2.00795 7.81028 2.24197 7.57597C2.47626 7.34167 2.85609 7.34172 3.09041 7.57597L5.999 10.4846L12.9084 3.57597Z",
|
|
905
|
+
fill: "currentColor"
|
|
906
|
+
}
|
|
907
|
+
)
|
|
908
|
+
}
|
|
909
|
+
);
|
|
910
|
+
var SuccessIcon_default = SuccessIcon;
|
|
822
911
|
|
|
823
912
|
// src/tokens/svg/status/XCircleIcon.tsx
|
|
824
913
|
import { jsx as jsx265, jsxs as jsxs168 } from "react/jsx-runtime";
|
|
@@ -926,8 +1015,43 @@ function clsx() {
|
|
|
926
1015
|
}
|
|
927
1016
|
var clsx_default = clsx;
|
|
928
1017
|
|
|
1018
|
+
// src/components/FieldMessage/FieldMessage.tsx
|
|
1019
|
+
import { Fragment, jsx as jsx295, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
1020
|
+
var ICON = {
|
|
1021
|
+
default: /* @__PURE__ */ jsx295(InfoIcon_default, {}),
|
|
1022
|
+
success: /* @__PURE__ */ jsx295(SuccessIcon_default, {}),
|
|
1023
|
+
warning: /* @__PURE__ */ jsx295(InfoIcon_default, {}),
|
|
1024
|
+
error: /* @__PURE__ */ jsx295(ErrorIcon_default, {})
|
|
1025
|
+
};
|
|
1026
|
+
var FieldMessage = (props) => {
|
|
1027
|
+
const { validations } = props;
|
|
1028
|
+
if (!validations || validations.length === 0) return null;
|
|
1029
|
+
return /* @__PURE__ */ jsx295("div", { className: "lib-xplat-field-message-wrap", children: validations.map((v, idx) => /* @__PURE__ */ jsxs189(
|
|
1030
|
+
"div",
|
|
1031
|
+
{
|
|
1032
|
+
className: clsx_default("lib-xplat-field-message", v.status),
|
|
1033
|
+
children: [
|
|
1034
|
+
/* @__PURE__ */ jsx295("div", { className: "icon", children: ICON[v.status] }),
|
|
1035
|
+
/* @__PURE__ */ jsx295("span", { children: v.message })
|
|
1036
|
+
]
|
|
1037
|
+
},
|
|
1038
|
+
`${v.message}_${idx}`
|
|
1039
|
+
)) });
|
|
1040
|
+
};
|
|
1041
|
+
FieldMessage.displayName = "FieldMessage";
|
|
1042
|
+
var Field = (props) => {
|
|
1043
|
+
const { validations, children } = props;
|
|
1044
|
+
if (!validations || validations.length === 0) return /* @__PURE__ */ jsx295(Fragment, { children });
|
|
1045
|
+
return /* @__PURE__ */ jsxs189("div", { className: "lib-xplat-field", children: [
|
|
1046
|
+
children,
|
|
1047
|
+
/* @__PURE__ */ jsx295(FieldMessage, { validations })
|
|
1048
|
+
] });
|
|
1049
|
+
};
|
|
1050
|
+
Field.displayName = "Field";
|
|
1051
|
+
var hasError = (validations) => !!validations?.some((v) => v.status === "error");
|
|
1052
|
+
|
|
929
1053
|
// src/components/FileUpload/FileUpload.tsx
|
|
930
|
-
import { jsx as
|
|
1054
|
+
import { jsx as jsx296, jsxs as jsxs190 } from "react/jsx-runtime";
|
|
931
1055
|
var FileUpload = (props) => {
|
|
932
1056
|
const {
|
|
933
1057
|
accept,
|
|
@@ -935,7 +1059,8 @@ var FileUpload = (props) => {
|
|
|
935
1059
|
maxSize,
|
|
936
1060
|
onChange,
|
|
937
1061
|
label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
|
|
938
|
-
description
|
|
1062
|
+
description,
|
|
1063
|
+
validations
|
|
939
1064
|
} = props;
|
|
940
1065
|
const [isDragOver, setIsDragOver] = React.useState(false);
|
|
941
1066
|
const inputRef = React.useRef(null);
|
|
@@ -968,7 +1093,7 @@ var FileUpload = (props) => {
|
|
|
968
1093
|
handleFiles(e.target.files);
|
|
969
1094
|
}
|
|
970
1095
|
};
|
|
971
|
-
|
|
1096
|
+
const control = /* @__PURE__ */ jsxs190(
|
|
972
1097
|
"div",
|
|
973
1098
|
{
|
|
974
1099
|
className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
|
|
@@ -977,22 +1102,24 @@ var FileUpload = (props) => {
|
|
|
977
1102
|
onDragLeave: handleDragLeave,
|
|
978
1103
|
onClick: () => inputRef.current?.click(),
|
|
979
1104
|
children: [
|
|
980
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ jsx296(
|
|
981
1106
|
"input",
|
|
982
1107
|
{
|
|
983
1108
|
ref: inputRef,
|
|
984
1109
|
type: "file",
|
|
985
1110
|
accept,
|
|
986
1111
|
multiple,
|
|
987
|
-
onChange: handleChange
|
|
1112
|
+
onChange: handleChange,
|
|
1113
|
+
"aria-invalid": hasError(validations) || void 0
|
|
988
1114
|
}
|
|
989
1115
|
),
|
|
990
|
-
/* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
description && /* @__PURE__ */
|
|
1116
|
+
/* @__PURE__ */ jsx296("div", { className: "upload-icon", children: /* @__PURE__ */ jsx296(UploadIcon_default, {}) }),
|
|
1117
|
+
/* @__PURE__ */ jsx296("p", { className: "upload-label", children: label }),
|
|
1118
|
+
description && /* @__PURE__ */ jsx296("p", { className: "upload-description", children: description })
|
|
993
1119
|
]
|
|
994
1120
|
}
|
|
995
1121
|
);
|
|
1122
|
+
return /* @__PURE__ */ jsx296(Field, { validations, children: control });
|
|
996
1123
|
};
|
|
997
1124
|
FileUpload.displayName = "FileUpload";
|
|
998
1125
|
var FileUpload_default = FileUpload;
|
|
@@ -892,12 +892,83 @@ var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
|
892
892
|
|
|
893
893
|
// src/tokens/svg/status/ErrorIcon.tsx
|
|
894
894
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
895
|
+
var ErrorIcon = () => /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(
|
|
896
|
+
"svg",
|
|
897
|
+
{
|
|
898
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
899
|
+
width: "1em",
|
|
900
|
+
height: "1em",
|
|
901
|
+
viewBox: "0 0 16 16",
|
|
902
|
+
fill: "none",
|
|
903
|
+
children: [
|
|
904
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("g", { clipPath: "url(#clip0_1196_9603)", children: [
|
|
905
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
906
|
+
"path",
|
|
907
|
+
{
|
|
908
|
+
d: "M9.57588 5.57559C9.81019 5.34127 10.19 5.34127 10.4243 5.57559C10.6586 5.8099 10.6586 6.18971 10.4243 6.42402L8.84854 7.9998L10.4243 9.57559C10.6586 9.8099 10.6586 10.1897 10.4243 10.424C10.19 10.6583 9.81019 10.6583 9.57588 10.424L8.0001 8.84824L6.42432 10.424C6.19 10.6583 5.81019 10.6583 5.57588 10.424C5.34156 10.1897 5.34156 9.8099 5.57588 9.57559L7.15166 7.9998L5.57588 6.42402C5.34156 6.18971 5.34156 5.8099 5.57588 5.57559C5.81019 5.34127 6.19 5.34127 6.42432 5.57559L8.0001 7.15137L9.57588 5.57559Z",
|
|
909
|
+
fill: "currentColor"
|
|
910
|
+
}
|
|
911
|
+
),
|
|
912
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
913
|
+
"path",
|
|
914
|
+
{
|
|
915
|
+
fillRule: "evenodd",
|
|
916
|
+
clipRule: "evenodd",
|
|
917
|
+
d: "M8.0001 0.733398C12.0131 0.73361 15.2671 3.98679 15.2673 7.9998C15.2672 12.0129 12.0131 15.2668 8.0001 15.267C3.98701 15.2669 0.733016 12.0129 0.73291 7.9998C0.733051 3.98674 3.98704 0.733539 8.0001 0.733398ZM8.0001 1.9334C4.64978 1.93354 1.93383 4.64948 1.93369 7.9998C1.9338 11.3502 4.64975 14.0669 8.0001 14.067C11.3504 14.0668 14.0672 11.3501 14.0673 7.9998C14.0671 4.64953 11.3504 1.93361 8.0001 1.9334Z",
|
|
918
|
+
fill: "currentColor"
|
|
919
|
+
}
|
|
920
|
+
)
|
|
921
|
+
] }),
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("clipPath", { id: "clip0_1196_9603", children: /* @__PURE__ */ (0, import_jsx_runtime254.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
923
|
+
]
|
|
924
|
+
}
|
|
925
|
+
);
|
|
926
|
+
var ErrorIcon_default = ErrorIcon;
|
|
895
927
|
|
|
896
928
|
// src/tokens/svg/status/HelpCircleIcon.tsx
|
|
897
929
|
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
898
930
|
|
|
899
931
|
// src/tokens/svg/status/InfoIcon.tsx
|
|
900
932
|
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
933
|
+
var InfoIcon = () => /* @__PURE__ */ (0, import_jsx_runtime256.jsxs)(
|
|
934
|
+
"svg",
|
|
935
|
+
{
|
|
936
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
937
|
+
width: "1em",
|
|
938
|
+
height: "1em",
|
|
939
|
+
viewBox: "0 0 16 16",
|
|
940
|
+
fill: "none",
|
|
941
|
+
children: [
|
|
942
|
+
/* @__PURE__ */ (0, import_jsx_runtime256.jsxs)("g", { clipPath: "url(#clip0_1188_11261)", children: [
|
|
943
|
+
/* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
|
|
944
|
+
"path",
|
|
945
|
+
{
|
|
946
|
+
d: "M8.00156 7.39999C8.33293 7.39999 8.60156 7.66862 8.60156 7.99999V10.6664C8.60156 10.9978 8.33293 11.2664 8.00156 11.2664C7.67019 11.2664 7.40156 10.9978 7.40156 10.6664V7.99999C7.40156 7.66862 7.67019 7.39999 8.00156 7.39999Z",
|
|
947
|
+
fill: "currentColor"
|
|
948
|
+
}
|
|
949
|
+
),
|
|
950
|
+
/* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
|
|
951
|
+
"path",
|
|
952
|
+
{
|
|
953
|
+
d: "M8.00859 4.73358C8.3398 4.73378 8.60859 5.00233 8.60859 5.33358C8.60849 5.66474 8.33973 5.93338 8.00859 5.93358H8.00156C7.67026 5.93358 7.40167 5.66486 7.40156 5.33358C7.40156 5.00221 7.67019 4.73358 8.00156 4.73358H8.00859Z",
|
|
954
|
+
fill: "currentColor"
|
|
955
|
+
}
|
|
956
|
+
),
|
|
957
|
+
/* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
|
|
958
|
+
"path",
|
|
959
|
+
{
|
|
960
|
+
fillRule: "evenodd",
|
|
961
|
+
clipRule: "evenodd",
|
|
962
|
+
d: "M8.00156 0.733582C12.0146 0.733793 15.2686 3.98697 15.2688 7.99999C15.2686 12.013 12.0146 15.267 8.00156 15.2672C3.98848 15.267 0.734481 12.0131 0.734375 7.99999C0.734516 3.98693 3.9885 0.733722 8.00156 0.733582ZM8.00156 1.93358C4.65124 1.93372 1.9353 4.64967 1.93516 7.99999C1.93526 11.3503 4.65122 14.067 8.00156 14.0672C11.3518 14.067 14.0686 11.3503 14.0688 7.99999C14.0686 4.64971 11.3518 1.93379 8.00156 1.93358Z",
|
|
963
|
+
fill: "currentColor"
|
|
964
|
+
}
|
|
965
|
+
)
|
|
966
|
+
] }),
|
|
967
|
+
/* @__PURE__ */ (0, import_jsx_runtime256.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime256.jsx)("clipPath", { id: "clip0_1188_11261", children: /* @__PURE__ */ (0, import_jsx_runtime256.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
968
|
+
]
|
|
969
|
+
}
|
|
970
|
+
);
|
|
971
|
+
var InfoIcon_default = InfoIcon;
|
|
901
972
|
|
|
902
973
|
// src/tokens/svg/status/LoaderIcon.tsx
|
|
903
974
|
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
@@ -922,6 +993,24 @@ var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
|
922
993
|
|
|
923
994
|
// src/tokens/svg/status/SuccessIcon.tsx
|
|
924
995
|
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
996
|
+
var SuccessIcon = () => /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
|
|
997
|
+
"svg",
|
|
998
|
+
{
|
|
999
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1000
|
+
width: "1em",
|
|
1001
|
+
height: "1em",
|
|
1002
|
+
viewBox: "0 0 16 16",
|
|
1003
|
+
fill: "none",
|
|
1004
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
|
|
1005
|
+
"path",
|
|
1006
|
+
{
|
|
1007
|
+
d: "M12.9084 3.57597C13.1426 3.34172 13.5225 3.34185 13.7568 3.57597C13.9911 3.81028 13.9911 4.19009 13.7568 4.4244L6.424 11.758C6.31157 11.8703 6.15869 11.9337 5.99978 11.9338C5.8409 11.9337 5.68798 11.8703 5.57556 11.758L2.24197 8.4244C2.00782 8.19018 2.00795 7.81028 2.24197 7.57597C2.47626 7.34167 2.85609 7.34172 3.09041 7.57597L5.999 10.4846L12.9084 3.57597Z",
|
|
1008
|
+
fill: "currentColor"
|
|
1009
|
+
}
|
|
1010
|
+
)
|
|
1011
|
+
}
|
|
1012
|
+
);
|
|
1013
|
+
var SuccessIcon_default = SuccessIcon;
|
|
925
1014
|
|
|
926
1015
|
// src/tokens/svg/status/XCircleIcon.tsx
|
|
927
1016
|
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
@@ -1013,10 +1102,61 @@ var import_jsx_runtime293 = require("react/jsx-runtime");
|
|
|
1013
1102
|
// src/tokens/svg/weather/WindIcon.tsx
|
|
1014
1103
|
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
1015
1104
|
|
|
1016
|
-
//
|
|
1105
|
+
// ../../node_modules/clsx/dist/clsx.mjs
|
|
1106
|
+
function r(e) {
|
|
1107
|
+
var t, f, n = "";
|
|
1108
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
1109
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
1110
|
+
var o = e.length;
|
|
1111
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
1112
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
1113
|
+
return n;
|
|
1114
|
+
}
|
|
1115
|
+
function clsx() {
|
|
1116
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
1117
|
+
return n;
|
|
1118
|
+
}
|
|
1119
|
+
var clsx_default = clsx;
|
|
1120
|
+
|
|
1121
|
+
// src/components/FieldMessage/FieldMessage.tsx
|
|
1017
1122
|
var import_jsx_runtime295 = require("react/jsx-runtime");
|
|
1123
|
+
var ICON = {
|
|
1124
|
+
default: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(InfoIcon_default, {}),
|
|
1125
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(SuccessIcon_default, {}),
|
|
1126
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(InfoIcon_default, {}),
|
|
1127
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ErrorIcon_default, {})
|
|
1128
|
+
};
|
|
1129
|
+
var FieldMessage = (props) => {
|
|
1130
|
+
const { validations } = props;
|
|
1131
|
+
if (!validations || validations.length === 0) return null;
|
|
1132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: "lib-xplat-field-message-wrap", children: validations.map((v, idx) => /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(
|
|
1133
|
+
"div",
|
|
1134
|
+
{
|
|
1135
|
+
className: clsx_default("lib-xplat-field-message", v.status),
|
|
1136
|
+
children: [
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: "icon", children: ICON[v.status] }),
|
|
1138
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("span", { children: v.message })
|
|
1139
|
+
]
|
|
1140
|
+
},
|
|
1141
|
+
`${v.message}_${idx}`
|
|
1142
|
+
)) });
|
|
1143
|
+
};
|
|
1144
|
+
FieldMessage.displayName = "FieldMessage";
|
|
1145
|
+
var Field = (props) => {
|
|
1146
|
+
const { validations, children } = props;
|
|
1147
|
+
if (!validations || validations.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_jsx_runtime295.Fragment, { children });
|
|
1148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { className: "lib-xplat-field", children: [
|
|
1149
|
+
children,
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)(FieldMessage, { validations })
|
|
1151
|
+
] });
|
|
1152
|
+
};
|
|
1153
|
+
Field.displayName = "Field";
|
|
1154
|
+
var hasError = (validations) => !!validations?.some((v) => v.status === "error");
|
|
1155
|
+
|
|
1156
|
+
// src/components/ImageSelector/ImageSelector.tsx
|
|
1157
|
+
var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
1018
1158
|
var ImageSelector = (props) => {
|
|
1019
|
-
const { value, label, onChange } = props;
|
|
1159
|
+
const { value, label, onChange, validations } = props;
|
|
1020
1160
|
const [previewUrl, setPreviewUrl] = import_react.default.useState();
|
|
1021
1161
|
import_react.default.useEffect(() => {
|
|
1022
1162
|
if (!value) {
|
|
@@ -1040,26 +1180,28 @@ var ImageSelector = (props) => {
|
|
|
1040
1180
|
const handleOpenFileDialog = () => {
|
|
1041
1181
|
inputRef.current?.click();
|
|
1042
1182
|
};
|
|
1043
|
-
|
|
1044
|
-
/* @__PURE__ */ (0,
|
|
1183
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
1045
1185
|
"input",
|
|
1046
1186
|
{
|
|
1047
1187
|
type: "file",
|
|
1048
1188
|
accept: "image/*",
|
|
1049
1189
|
id: "image-input",
|
|
1050
1190
|
onChange: handleFileChange,
|
|
1051
|
-
ref: inputRef
|
|
1191
|
+
ref: inputRef,
|
|
1192
|
+
"aria-invalid": hasError(validations) || void 0
|
|
1052
1193
|
}
|
|
1053
1194
|
),
|
|
1054
|
-
value && /* @__PURE__ */ (0,
|
|
1055
|
-
/* @__PURE__ */ (0,
|
|
1056
|
-
/* @__PURE__ */ (0,
|
|
1195
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "action-bar", children: [
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(UploadIcon_default, {}) }),
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(DeleteIcon_default, {}) })
|
|
1057
1198
|
] }),
|
|
1058
|
-
/* @__PURE__ */ (0,
|
|
1059
|
-
/* @__PURE__ */ (0,
|
|
1060
|
-
/* @__PURE__ */ (0,
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "content", children: previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime296.jsx)("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(ImageIcon_default, {}) }),
|
|
1201
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
1061
1202
|
] }) })
|
|
1062
1203
|
] });
|
|
1204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Field, { validations, children: control });
|
|
1063
1205
|
};
|
|
1064
1206
|
ImageSelector.displayName = "ImageSelector";
|
|
1065
1207
|
var ImageSelector_default = ImageSelector;
|
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
/* src/components/FieldMessage/fieldMessage.scss */
|
|
2
|
+
.lib-xplat-field {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--spacing-space-2);
|
|
6
|
+
}
|
|
7
|
+
.lib-xplat-field-message-wrap {
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: var(--spacing-space-2);
|
|
10
|
+
margin-left: var(--spacing-space-1);
|
|
11
|
+
}
|
|
12
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message {
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: var(--spacing-space-1);
|
|
15
|
+
font-family: var(--semantic-typo-caption-2-r-font);
|
|
16
|
+
font-size: var(--semantic-typo-caption-2-r-size);
|
|
17
|
+
line-height: var(--semantic-typo-caption-2-r-lh);
|
|
18
|
+
font-weight: var(--semantic-typo-caption-2-r-weight);
|
|
19
|
+
letter-spacing: var(--semantic-typo-caption-2-r-ls);
|
|
20
|
+
align-items: center;
|
|
21
|
+
user-select: none;
|
|
22
|
+
}
|
|
23
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message.default {
|
|
24
|
+
color: var(--semantic-icon-secondary);
|
|
25
|
+
}
|
|
26
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message.success {
|
|
27
|
+
color: var(--semantic-text-success);
|
|
28
|
+
}
|
|
29
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message.warning {
|
|
30
|
+
color: var(--semantic-text-warning);
|
|
31
|
+
}
|
|
32
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message.error {
|
|
33
|
+
color: var(--semantic-text-error);
|
|
34
|
+
}
|
|
35
|
+
.lib-xplat-field-message-wrap > .lib-xplat-field-message > .icon {
|
|
36
|
+
font-size: var(--semantic-typo-label-2-m-size);
|
|
37
|
+
}
|
|
38
|
+
|
|
1
39
|
/* src/components/ImageSelector/imageselector.scss */
|
|
2
40
|
.lib-xplat-imageselector {
|
|
3
41
|
display: flex;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { V as Validation } from '../../validation-Dqo1zqhT.cjs';
|
|
2
3
|
|
|
3
4
|
interface ImageSelectorProps {
|
|
5
|
+
/** 선택된 이미지 파일. 주면 미리보기가 나온다 */
|
|
4
6
|
value?: File;
|
|
7
|
+
/** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
|
|
8
|
+
validations?: Validation[];
|
|
9
|
+
/** 비어 있을 때 표시할 안내 글자 */
|
|
5
10
|
label?: string;
|
|
11
|
+
/** 이미지를 고르거나 지우면 호출된다. 지우면 undefined 가 온다 */
|
|
6
12
|
onChange?: (value: File | undefined) => void;
|
|
7
13
|
}
|
|
8
14
|
declare const ImageSelector: React.FC<ImageSelectorProps>;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { V as Validation } from '../../validation-Dqo1zqhT.js';
|
|
2
3
|
|
|
3
4
|
interface ImageSelectorProps {
|
|
5
|
+
/** 선택된 이미지 파일. 주면 미리보기가 나온다 */
|
|
4
6
|
value?: File;
|
|
7
|
+
/** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
|
|
8
|
+
validations?: Validation[];
|
|
9
|
+
/** 비어 있을 때 표시할 안내 글자 */
|
|
5
10
|
label?: string;
|
|
11
|
+
/** 이미지를 고르거나 지우면 호출된다. 지우면 undefined 가 온다 */
|
|
6
12
|
onChange?: (value: File | undefined) => void;
|
|
7
13
|
}
|
|
8
14
|
declare const ImageSelector: React.FC<ImageSelectorProps>;
|