maru_design2 0.0.1 → 0.0.2
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/atoms/button/Button.d.ts +26 -5
- package/dist/components/atoms/button/index.d.ts +1 -1
- package/dist/components/atoms/checkbox/Checkbox.d.ts +22 -0
- package/dist/components/atoms/checkbox/index.d.ts +1 -0
- package/dist/components/atoms/chip/Chip.d.ts +25 -0
- package/dist/components/atoms/chip/index.d.ts +1 -0
- package/dist/components/atoms/icon/Icon.d.ts +18 -0
- package/dist/components/atoms/icon/iconmap.d.ts +188 -0
- package/dist/components/atoms/icon/index.d.ts +1 -0
- package/dist/components/atoms/input/Input.d.ts +32 -0
- package/dist/components/atoms/input/index.d.ts +1 -0
- package/dist/components/atoms/popover/Popover.d.ts +24 -0
- package/dist/components/atoms/popover/index.d.ts +1 -0
- package/dist/components/atoms/radio/Radio.d.ts +13 -0
- package/dist/components/atoms/radio/index.d.ts +1 -0
- package/dist/components/atoms/toggle/Toggle.d.ts +21 -0
- package/dist/components/atoms/toggle/index.d.ts +1 -0
- package/dist/components/atoms/tooltip/Tooltip.d.ts +23 -0
- package/dist/components/atoms/tooltip/index.d.ts +1 -0
- package/dist/components/molecules/dropdown/Dropdown.d.ts +89 -0
- package/dist/components/molecules/dropdown/Menu.d.ts +21 -0
- package/dist/components/molecules/dropdown/index.d.ts +1 -0
- package/dist/components/molecules/dropdown/toggles/Arrow.d.ts +7 -0
- package/dist/components/molecules/dropdown/toggles/Button.d.ts +24 -0
- package/dist/components/molecules/dropdown/toggles/Clear.d.ts +8 -0
- package/dist/components/molecules/dropdown/toggles/Input.d.ts +24 -0
- package/dist/components/molecules/modal/Modal.d.ts +51 -0
- package/dist/components/molecules/modal/index.d.ts +1 -0
- package/dist/components/molecules/pagination/Pagination.d.ts +27 -0
- package/dist/components/molecules/pagination/index.d.ts +1 -0
- package/dist/components/styleProvider/StyleProvider.d.ts +10 -0
- package/dist/components/styleProvider/index.d.ts +1 -0
- package/dist/enums/color.d.ts +13 -0
- package/dist/enums/direction.d.ts +2 -0
- package/dist/enums/gap.d.ts +2 -0
- package/dist/enums/size.d.ts +10 -0
- package/dist/enums/type.d.ts +4 -0
- package/dist/enums/variant.d.ts +4 -0
- package/dist/hooks/useButtonState.d.ts +18 -0
- package/dist/hooks/useColor.d.ts +4 -0
- package/dist/hooks/useCombineRef.d.ts +1 -1
- package/dist/hooks/useCreatePortal.d.ts +1 -1
- package/dist/hooks/useId.d.ts +7 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +3281 -8
- package/package.json +21 -18
- package/scripts/svg-parser.js +224 -0
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { TColor } from '../../../enums/color';
|
|
3
|
+
import { TButtonSize } from '../../../enums/size';
|
|
4
|
+
import { TButtonVariant } from '../../../enums/variant';
|
|
5
|
+
import { IconProps } from '../icon/Icon';
|
|
6
|
+
import './button.scss';
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
8
|
children?: React.ReactNode;
|
|
4
9
|
/**
|
|
5
|
-
*
|
|
10
|
+
* ['primary', 'secondary', 'positive', 'warning', 'danger']. (@v1 variant)
|
|
6
11
|
*/
|
|
7
|
-
color?:
|
|
12
|
+
color?: TColor;
|
|
13
|
+
/**
|
|
14
|
+
* ['small', 'normal', 'large']. (@v1 kind)
|
|
15
|
+
*/
|
|
16
|
+
size?: TButtonSize;
|
|
17
|
+
/**
|
|
18
|
+
* ['default', 'default-light', 'outline', 'text', 'color-on-focus']. (@v1 kind)
|
|
19
|
+
*/
|
|
20
|
+
variant?: TButtonVariant;
|
|
21
|
+
/**
|
|
22
|
+
* 컴포넌트 시작점에 위치시킬 아이콘 (@v1 icon)
|
|
23
|
+
*/
|
|
24
|
+
startIcon?: IconProps;
|
|
25
|
+
/**
|
|
26
|
+
* 컴포넌트 끝점에 위치시킬 아이콘 (@v1 icon)
|
|
27
|
+
*/
|
|
28
|
+
endIcon?: IconProps;
|
|
8
29
|
}
|
|
9
|
-
|
|
10
|
-
export
|
|
30
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
31
|
+
export default Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TGap } from '../../../enums/gap';
|
|
3
|
+
import { TCheckboxSize } from '../../../enums/size';
|
|
4
|
+
import './checkbox.scss';
|
|
5
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'checked' | 'type'> {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* primary, secondary, positive, warning, danger + rgb. (@v1 variant)
|
|
9
|
+
*/
|
|
10
|
+
color?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 컴포넌트와 라벨 사이의 거리. ['8px', '4px']
|
|
13
|
+
*/
|
|
14
|
+
gap?: TGap;
|
|
15
|
+
label?: string;
|
|
16
|
+
/**
|
|
17
|
+
* [16, 18, 24]
|
|
18
|
+
*/
|
|
19
|
+
size?: TCheckboxSize;
|
|
20
|
+
}
|
|
21
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
22
|
+
export default Checkbox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TColor } from '../../../enums/color';
|
|
2
|
+
import { TChipSize } from '../../../enums/size';
|
|
3
|
+
import { TChipVariant } from '../../../enums/variant';
|
|
4
|
+
import './chip.scss';
|
|
5
|
+
export interface ChipProps {
|
|
6
|
+
/**
|
|
7
|
+
* 컴포넌트에 들어갈 내용. number인 경우 천의 자리마다 컴마(,) 표시됨. [string | number]. (@v1 children)
|
|
8
|
+
*/
|
|
9
|
+
content: string | number;
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* ['primary', 'secondary', 'positive', 'warning', 'danger']. (@v1 variant)
|
|
13
|
+
*/
|
|
14
|
+
color?: TColor;
|
|
15
|
+
/**
|
|
16
|
+
* ['small', 'normal']. (@v1 kind)
|
|
17
|
+
*/
|
|
18
|
+
size?: TChipSize;
|
|
19
|
+
/**
|
|
20
|
+
* ['default', 'outline', 'dot']. (@v1 kind)
|
|
21
|
+
*/
|
|
22
|
+
variant?: TChipVariant;
|
|
23
|
+
}
|
|
24
|
+
declare function Chip({ content, className, color, size, variant, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default Chip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Chip';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TIconSize } from '../../../enums/size';
|
|
2
|
+
import { TIcons } from './iconmap';
|
|
3
|
+
export interface IconProps {
|
|
4
|
+
/**
|
|
5
|
+
* 이름 뒤에 Thin이 있다면 Stroke 1.5이므로 14, 16, 18 사이즈 권장. (@v1 iconName)
|
|
6
|
+
*/
|
|
7
|
+
name: TIcons;
|
|
8
|
+
/**
|
|
9
|
+
* primary, secondary, positive, warning, danger + rgb. (@v1 fill)
|
|
10
|
+
*/
|
|
11
|
+
color?: string;
|
|
12
|
+
/**
|
|
13
|
+
* [14, 16, 18, 20, 24, 40, 48]. (@v1 width, height)
|
|
14
|
+
*/
|
|
15
|
+
size?: TIconSize;
|
|
16
|
+
}
|
|
17
|
+
declare function Icon({ name, color, size }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default Icon;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
export declare const iconmap: {
|
|
2
|
+
[key: string]: {
|
|
3
|
+
width: string;
|
|
4
|
+
height: string;
|
|
5
|
+
viewBox: string;
|
|
6
|
+
fill: string;
|
|
7
|
+
paths: {
|
|
8
|
+
d: string;
|
|
9
|
+
fill?: string;
|
|
10
|
+
fillRule?: string;
|
|
11
|
+
clipRule?: string;
|
|
12
|
+
stroke?: string;
|
|
13
|
+
strokeWidth?: string;
|
|
14
|
+
strokeLinecap?: string;
|
|
15
|
+
strokeLinejoin?: string;
|
|
16
|
+
}[];
|
|
17
|
+
circles: {
|
|
18
|
+
cx: string;
|
|
19
|
+
cy: string;
|
|
20
|
+
r: string;
|
|
21
|
+
fill: string;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const ICONS: {
|
|
26
|
+
readonly K: "K";
|
|
27
|
+
readonly T: "T";
|
|
28
|
+
readonly V: "V";
|
|
29
|
+
readonly AddLineThin: "AddLineThin";
|
|
30
|
+
readonly AlertCircleThin: "AlertCircleThin";
|
|
31
|
+
readonly AlertTriangleThin: "AlertTriangleThin";
|
|
32
|
+
readonly AlertTriangle: "AlertTriangle";
|
|
33
|
+
readonly ArrowRightThin: "ArrowRightThin";
|
|
34
|
+
readonly ArrowRight: "ArrowRight";
|
|
35
|
+
readonly Atom01Thin: "Atom01Thin";
|
|
36
|
+
readonly BarChart10: "BarChart10";
|
|
37
|
+
readonly BarChartSquare01: "BarChartSquare01";
|
|
38
|
+
readonly BookOpen02Thin: "BookOpen02Thin";
|
|
39
|
+
readonly BookOpen02: "BookOpen02";
|
|
40
|
+
readonly CalendarDate: "CalendarDate";
|
|
41
|
+
readonly CalendarThin: "CalendarThin";
|
|
42
|
+
readonly Calendar: "Calendar";
|
|
43
|
+
readonly CheckboxIndeterminateThin: "CheckboxIndeterminateThin";
|
|
44
|
+
readonly CheckboxIndeterminate: "CheckboxIndeterminate";
|
|
45
|
+
readonly CheckboxOffThin: "CheckboxOffThin";
|
|
46
|
+
readonly CheckboxOff: "CheckboxOff";
|
|
47
|
+
readonly CheckboxOnThin: "CheckboxOnThin";
|
|
48
|
+
readonly CheckboxOn: "CheckboxOn";
|
|
49
|
+
readonly ChevronDownThin: "ChevronDownThin";
|
|
50
|
+
readonly ChevronDown: "ChevronDown";
|
|
51
|
+
readonly ChevronLeftDoubleThin: "ChevronLeftDoubleThin";
|
|
52
|
+
readonly ChevronLeftThin: "ChevronLeftThin";
|
|
53
|
+
readonly ChevronLeft: "ChevronLeft";
|
|
54
|
+
readonly ChevronRightDoubleThin: "ChevronRightDoubleThin";
|
|
55
|
+
readonly ChevronRightThin: "ChevronRightThin";
|
|
56
|
+
readonly ChevronRight: "ChevronRight";
|
|
57
|
+
readonly ChevronSelectorVerticalThin: "ChevronSelectorVerticalThin";
|
|
58
|
+
readonly ChevronSelectorVertical: "ChevronSelectorVertical";
|
|
59
|
+
readonly ChevronUpThin: "ChevronUpThin";
|
|
60
|
+
readonly ChevronUp: "ChevronUp";
|
|
61
|
+
readonly ClipboardCheckThin: "ClipboardCheckThin";
|
|
62
|
+
readonly ClipboardCheck: "ClipboardCheck";
|
|
63
|
+
readonly ClipboardPlusThin: "ClipboardPlusThin";
|
|
64
|
+
readonly ClipboardPlus: "ClipboardPlus";
|
|
65
|
+
readonly ClipboardThin: "ClipboardThin";
|
|
66
|
+
readonly Clipboard: "Clipboard";
|
|
67
|
+
readonly CodeSnippet02: "CodeSnippet02";
|
|
68
|
+
readonly Copy03Thin: "Copy03Thin";
|
|
69
|
+
readonly Copy03: "Copy03";
|
|
70
|
+
readonly CornerDownRightThin: "CornerDownRightThin";
|
|
71
|
+
readonly CornerDownRight: "CornerDownRight";
|
|
72
|
+
readonly CornerUpLeft: "CornerUpLeft";
|
|
73
|
+
readonly CornerUpRight: "CornerUpRight";
|
|
74
|
+
readonly CurrencyDollar: "CurrencyDollar";
|
|
75
|
+
readonly Cursor04: "Cursor04";
|
|
76
|
+
readonly CursorBox: "CursorBox";
|
|
77
|
+
readonly Database01Thin: "Database01Thin";
|
|
78
|
+
readonly Database01: "Database01";
|
|
79
|
+
readonly Database02Thin: "Database02Thin";
|
|
80
|
+
readonly Database03Thin: "Database03Thin";
|
|
81
|
+
readonly Database03: "Database03";
|
|
82
|
+
readonly Dataflow01Thin: "Dataflow01Thin";
|
|
83
|
+
readonly Dataflow01: "Dataflow01";
|
|
84
|
+
readonly Dataflow04Thin: "Dataflow04Thin";
|
|
85
|
+
readonly Dataflow04: "Dataflow04";
|
|
86
|
+
readonly Dotpoints01: "Dotpoints01";
|
|
87
|
+
readonly DotsGridThin: "DotsGridThin";
|
|
88
|
+
readonly DotsGrid: "DotsGrid";
|
|
89
|
+
readonly DotsVerticalThin: "DotsVerticalThin";
|
|
90
|
+
readonly DotsVertical: "DotsVertical";
|
|
91
|
+
readonly DownThin: "DownThin";
|
|
92
|
+
readonly Download01Thin: "Download01Thin";
|
|
93
|
+
readonly Download01: "Download01";
|
|
94
|
+
readonly Downstream: "Downstream";
|
|
95
|
+
readonly Edit03Thin: "Edit03Thin";
|
|
96
|
+
readonly Edit03: "Edit03";
|
|
97
|
+
readonly Expand: "Expand";
|
|
98
|
+
readonly FiEyeOffThin: "FiEyeOffThin";
|
|
99
|
+
readonly FiEyeThin: "FiEyeThin";
|
|
100
|
+
readonly File02Thin: "File02Thin";
|
|
101
|
+
readonly File02: "File02";
|
|
102
|
+
readonly File06Thin: "File06Thin";
|
|
103
|
+
readonly File06: "File06";
|
|
104
|
+
readonly FileCheck02Thin: "FileCheck02Thin";
|
|
105
|
+
readonly FileCheck02: "FileCheck02";
|
|
106
|
+
readonly FileCheck03Thin: "FileCheck03Thin";
|
|
107
|
+
readonly FileCheck03: "FileCheck03";
|
|
108
|
+
readonly FilePlus02Thin: "FilePlus02Thin";
|
|
109
|
+
readonly FilePlus02: "FilePlus02";
|
|
110
|
+
readonly FileQuestion02Thin: "FileQuestion02Thin";
|
|
111
|
+
readonly FileQuestion02: "FileQuestion02";
|
|
112
|
+
readonly FileSearch02: "FileSearch02";
|
|
113
|
+
readonly FileX02Thin: "FileX02Thin";
|
|
114
|
+
readonly FilterLinesThin: "FilterLinesThin";
|
|
115
|
+
readonly FilterLines: "FilterLines";
|
|
116
|
+
readonly FolderUploadThin: "FolderUploadThin";
|
|
117
|
+
readonly FolderUpload: "FolderUpload";
|
|
118
|
+
readonly Globe01Thin: "Globe01Thin";
|
|
119
|
+
readonly GraduationHat01Thin: "GraduationHat01Thin";
|
|
120
|
+
readonly GraduationHat01: "GraduationHat01";
|
|
121
|
+
readonly InformationThin: "InformationThin";
|
|
122
|
+
readonly Information: "Information";
|
|
123
|
+
readonly LineChartDown01: "LineChartDown01";
|
|
124
|
+
readonly Loading02Thin: "Loading02Thin";
|
|
125
|
+
readonly Loading02: "Loading02";
|
|
126
|
+
readonly LogOut01Thin: "LogOut01Thin";
|
|
127
|
+
readonly MessageCheckSquare: "MessageCheckSquare";
|
|
128
|
+
readonly MessageCheckThin: "MessageCheckThin";
|
|
129
|
+
readonly MessageNotificationSquare: "MessageNotificationSquare";
|
|
130
|
+
readonly MessageNotificationThin: "MessageNotificationThin";
|
|
131
|
+
readonly MessageTextSquare02: "MessageTextSquare02";
|
|
132
|
+
readonly MessageTextThin: "MessageTextThin";
|
|
133
|
+
readonly MessageXSquare: "MessageXSquare";
|
|
134
|
+
readonly MessageXThin: "MessageXThin";
|
|
135
|
+
readonly Message: "Message";
|
|
136
|
+
readonly MoveThin: "MoveThin";
|
|
137
|
+
readonly Move: "Move";
|
|
138
|
+
readonly Network03: "Network03";
|
|
139
|
+
readonly Network04: "Network04";
|
|
140
|
+
readonly PauseThin: "PauseThin";
|
|
141
|
+
readonly Pause: "Pause";
|
|
142
|
+
readonly PieChart02: "PieChart02";
|
|
143
|
+
readonly PieChart03: "PieChart03";
|
|
144
|
+
readonly PlayCircle_left: "PlayCircle_left";
|
|
145
|
+
readonly PlayCircle_right: "PlayCircle_right";
|
|
146
|
+
readonly PlusCircleThin: "PlusCircleThin";
|
|
147
|
+
readonly PlusCircle: "PlusCircle";
|
|
148
|
+
readonly RadioOffThin: "RadioOffThin";
|
|
149
|
+
readonly RadioOnThin: "RadioOnThin";
|
|
150
|
+
readonly RefreshCcw02Thin: "RefreshCcw02Thin";
|
|
151
|
+
readonly RefreshCcw02: "RefreshCcw02";
|
|
152
|
+
readonly RefreshCw01Thin: "RefreshCw01Thin";
|
|
153
|
+
readonly RefreshCw02Thin: "RefreshCw02Thin";
|
|
154
|
+
readonly ReverseLeft: "ReverseLeft";
|
|
155
|
+
readonly SearchMdThin: "SearchMdThin";
|
|
156
|
+
readonly SearchMd: "SearchMd";
|
|
157
|
+
readonly Settings02Thin: "Settings02Thin";
|
|
158
|
+
readonly Share03Thin: "Share03Thin";
|
|
159
|
+
readonly Share03: "Share03";
|
|
160
|
+
readonly SortOutlineThin: "SortOutlineThin";
|
|
161
|
+
readonly SortOutline: "SortOutline";
|
|
162
|
+
readonly StateThin: "StateThin";
|
|
163
|
+
readonly StopCircleThin: "StopCircleThin";
|
|
164
|
+
readonly StopCircle: "StopCircle";
|
|
165
|
+
readonly SubtractLineThin: "SubtractLineThin";
|
|
166
|
+
readonly SuccessThin: "SuccessThin";
|
|
167
|
+
readonly SwitchHorizontal02Thin: "SwitchHorizontal02Thin";
|
|
168
|
+
readonly SwitchHorizontal02: "SwitchHorizontal02";
|
|
169
|
+
readonly Trash01Thin: "Trash01Thin";
|
|
170
|
+
readonly Trash01: "Trash01";
|
|
171
|
+
readonly Type01: "Type01";
|
|
172
|
+
readonly UpThin: "UpThin";
|
|
173
|
+
readonly Upload01Thin: "Upload01Thin";
|
|
174
|
+
readonly Upload01: "Upload01";
|
|
175
|
+
readonly UserCircleThin: "UserCircleThin";
|
|
176
|
+
readonly UserPlusThin: "UserPlusThin";
|
|
177
|
+
readonly Users01Thin: "Users01Thin";
|
|
178
|
+
readonly Users01: "Users01";
|
|
179
|
+
readonly XCircleThin: "XCircleThin";
|
|
180
|
+
readonly XCircle: "XCircle";
|
|
181
|
+
readonly XLargeThin: "XLargeThin";
|
|
182
|
+
readonly XLarge: "XLarge";
|
|
183
|
+
readonly XSmallThin: "XSmallThin";
|
|
184
|
+
readonly XSmall: "XSmall";
|
|
185
|
+
readonly ZoomIn: "ZoomIn";
|
|
186
|
+
readonly ZoomOut: "ZoomOut";
|
|
187
|
+
};
|
|
188
|
+
export type TIcons = (typeof ICONS)[keyof typeof ICONS];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Icon';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TInputType } from '../../../enums/type';
|
|
3
|
+
import './input.scss';
|
|
4
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
5
|
+
/**
|
|
6
|
+
* 에러났을때 메시지. (@v1 isValid, validMessage)
|
|
7
|
+
*/
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 초기화 함수 (@v1 hasClearBtn, onClear)
|
|
12
|
+
*/
|
|
13
|
+
onClear?: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* 데이터 타입. ['text', 'password', 'number']
|
|
16
|
+
*/
|
|
17
|
+
type?: TInputType;
|
|
18
|
+
/**
|
|
19
|
+
* input을 감싸고 있는 div의 ref, input은 일반 ref 사용
|
|
20
|
+
*/
|
|
21
|
+
wrapperRef?: React.RefObject<HTMLDivElement>;
|
|
22
|
+
/**
|
|
23
|
+
* 컴포넌트 시작점에 위치시킬 노드
|
|
24
|
+
*/
|
|
25
|
+
startNode?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* 컴포넌트 끝점에 위치시킬 노드(단, type이 password인 경우 무시됨)
|
|
28
|
+
*/
|
|
29
|
+
endNode?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
32
|
+
export default Input;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Input';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TDirection } from '../../../enums/direction';
|
|
3
|
+
import './popover.scss';
|
|
4
|
+
export interface PopoverProps {
|
|
5
|
+
/**
|
|
6
|
+
* 컴포넌트 위치의 기준이 될 엘리먼트
|
|
7
|
+
*/
|
|
8
|
+
anchorEl: HTMLElement | null;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
open: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 배경 클릭 시 컴포넌트 닫히는지 여부
|
|
13
|
+
*/
|
|
14
|
+
backdrop?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
direction?: TDirection;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* 컴포넌트 createPortal 여부. (@v1 isOnDocument)
|
|
20
|
+
*/
|
|
21
|
+
portal?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare function Popover({ anchorEl, children, open, backdrop, className, direction, onClose, portal, }: PopoverProps): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
export default Popover;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Popover';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TGap } from '../../../enums/gap';
|
|
3
|
+
import './radio.scss';
|
|
4
|
+
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'checked' | 'type'> {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* 컴포넌트와 라벨 사이의 거리. ['8px', '4px']
|
|
8
|
+
*/
|
|
9
|
+
gap?: TGap;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
13
|
+
export default Radio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Radio';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TColor } from '../../../enums/color';
|
|
2
|
+
import './toggle.scss';
|
|
3
|
+
export interface ToggleProps {
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onChange: (checked: boolean) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* ['primary', 'secondary', 'positive', 'warning', 'danger']. (@v1 variant)
|
|
9
|
+
*/
|
|
10
|
+
color?: TColor;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* 텍스트가 있는 토글.
|
|
14
|
+
*/
|
|
15
|
+
text?: {
|
|
16
|
+
left?: string;
|
|
17
|
+
right?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
declare function Toggle({ checked, onChange, className, color, disabled, text, }: ToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default Toggle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Toggle';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TTooltipColor } from '../../../enums/color';
|
|
3
|
+
import { TDirection } from '../../../enums/direction';
|
|
4
|
+
import './tooltip.scss';
|
|
5
|
+
export interface TooltipProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* 컴포넌트에 들어갈 내용
|
|
9
|
+
*/
|
|
10
|
+
content: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* ['default', 'danger']
|
|
14
|
+
*/
|
|
15
|
+
color?: TTooltipColor;
|
|
16
|
+
direction?: TDirection;
|
|
17
|
+
/**
|
|
18
|
+
* 컴포넌트 createPortal 여부. (@v1 isOnDocument)
|
|
19
|
+
*/
|
|
20
|
+
portal?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare function Tooltip({ children, content, className, color, direction, portal, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Tooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tooltip';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TColor } from '../../../enums/color';
|
|
3
|
+
import { TButtonType } from '../../../enums/type';
|
|
4
|
+
import './dropdown.scss';
|
|
5
|
+
interface DropdownProps<T extends Record<string, any>> {
|
|
6
|
+
data: T[];
|
|
7
|
+
/**
|
|
8
|
+
* 선택된 아이디
|
|
9
|
+
*/
|
|
10
|
+
selectedId: string | undefined;
|
|
11
|
+
onSelect: (id?: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* 아이디로 쓸 키
|
|
14
|
+
*/
|
|
15
|
+
idKey: string;
|
|
16
|
+
/**
|
|
17
|
+
* 노출로 쓸 키
|
|
18
|
+
*/
|
|
19
|
+
displayKey: string;
|
|
20
|
+
/**
|
|
21
|
+
* 컴포넌트 위치의 기준이 될 엘리먼트 사용자 정의. (@v1 portalAnchor)
|
|
22
|
+
*/
|
|
23
|
+
anchorEl?: HTMLElement;
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* ['primary', 'secondary', 'positive', 'warning', 'danger']
|
|
27
|
+
*/
|
|
28
|
+
color?: TColor;
|
|
29
|
+
/**
|
|
30
|
+
* 드롭다운 토글 버튼 사용자 정의 노드. (@v1 toggleChildren)
|
|
31
|
+
*/
|
|
32
|
+
customButton?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* 메뉴 아이템 사용자 정의 노드. (@v1 CustomMenuFormat)
|
|
35
|
+
*/
|
|
36
|
+
customMenuItem?: ({ children, rowId, }: {
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
rowId: string | number;
|
|
39
|
+
}) => JSX.Element;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 에러났을때 메시지. (@v1 isValid, validMessage)
|
|
43
|
+
*/
|
|
44
|
+
errorMessage?: string;
|
|
45
|
+
/**
|
|
46
|
+
* 토글 안 좌측 상단에 노출할 라벨. (@v1 insideLabel)
|
|
47
|
+
*/
|
|
48
|
+
inlineLabel?: string;
|
|
49
|
+
/**
|
|
50
|
+
* 메뉴 세로 크기(px). default=auto. (@v1 menuPosition.height)
|
|
51
|
+
*/
|
|
52
|
+
height?: number;
|
|
53
|
+
/**
|
|
54
|
+
* 메뉴 아이템의 방향이 가로방향인지 여부. true인 경우 메뉴 뜨는 위치는 토글의 bottom-end. (@v1 isHorizonMenu)
|
|
55
|
+
*/
|
|
56
|
+
horizonMenu?: boolean;
|
|
57
|
+
label?: string;
|
|
58
|
+
/**
|
|
59
|
+
* 데이터가 없을때 메시지
|
|
60
|
+
*/
|
|
61
|
+
noDataMessage?: string;
|
|
62
|
+
/**
|
|
63
|
+
* 검색 결과가 없을때 메시지
|
|
64
|
+
*/
|
|
65
|
+
noSearchedMessage?: string;
|
|
66
|
+
/**
|
|
67
|
+
* 초기화 함수 (@v1 hasClearBtn, onClear)
|
|
68
|
+
*/
|
|
69
|
+
onClear?: () => void;
|
|
70
|
+
placeholder?: string;
|
|
71
|
+
/**
|
|
72
|
+
* 토글 화살표의 위치를 컴포넌트 시작점에 위치시킬지 여부. (@v1 IsToggleArrowStart)
|
|
73
|
+
*/
|
|
74
|
+
startArrow?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* 드롭다운 토글 끝점에 위치시킬 노드. (@v1 endNode)
|
|
77
|
+
*/
|
|
78
|
+
toggleEndNode?: React.ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* 데이터 타입. ['button', 'input'] (@v1 isSearch)
|
|
81
|
+
*/
|
|
82
|
+
type?: TButtonType;
|
|
83
|
+
/**
|
|
84
|
+
* 토글, 메뉴 가로 크기(px). default=100%. (@v1 menuPosition.width)
|
|
85
|
+
*/
|
|
86
|
+
width?: number;
|
|
87
|
+
}
|
|
88
|
+
declare function Dropdown<T extends Record<string, any>>({ data, selectedId, onSelect, idKey, displayKey, anchorEl, className, color, customButton, customMenuItem, disabled, errorMessage, inlineLabel, height, horizonMenu, label, noDataMessage, noSearchedMessage, onClear, placeholder, startArrow, toggleEndNode, type, width, }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
export default Dropdown;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props<T extends Record<string, any>> {
|
|
3
|
+
parent: HTMLElement;
|
|
4
|
+
menuItemEls: HTMLButtonElement[];
|
|
5
|
+
selectedId: string | undefined;
|
|
6
|
+
idKey: string;
|
|
7
|
+
displayKey: string;
|
|
8
|
+
filteredData: T[];
|
|
9
|
+
horizonMenu?: boolean;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
noMessage?: string;
|
|
13
|
+
customMenuItem?: ({ children, rowId, }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
rowId: string | number;
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
onSelect: (id?: string) => void;
|
|
18
|
+
closeMenu: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare function DropdownMenu<T extends Record<string, any>>({ parent, menuItemEls, selectedId, idKey, displayKey, filteredData, horizonMenu, width, height, noMessage, customMenuItem: CustomMenuItem, onSelect, closeMenu, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default DropdownMenu;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Dropdown';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TColor } from '../../../../enums/color';
|
|
3
|
+
interface Props<T extends Record<string, any>> {
|
|
4
|
+
open: boolean;
|
|
5
|
+
selected: T | undefined;
|
|
6
|
+
displayKey: string;
|
|
7
|
+
color: TColor;
|
|
8
|
+
width?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
errored?: boolean;
|
|
12
|
+
inlineLabel?: string;
|
|
13
|
+
startArrow?: boolean;
|
|
14
|
+
toggleEndNode?: React.ReactNode;
|
|
15
|
+
customButton?: React.ReactNode;
|
|
16
|
+
initFilteredData: () => void;
|
|
17
|
+
toggleMenuOpen: () => void;
|
|
18
|
+
initInputValue: () => void;
|
|
19
|
+
clearSelected: () => void;
|
|
20
|
+
onClear?: () => void;
|
|
21
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
22
|
+
}
|
|
23
|
+
declare function DropdownToggleButton<T extends Record<string, any>>({ open, selected, displayKey, color, width, disabled, placeholder, errored, inlineLabel, startArrow, toggleEndNode, customButton, initFilteredData, toggleMenuOpen, initInputValue, clearSelected, onClear, onKeyDown, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default DropdownToggleButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
clearSelected: () => void;
|
|
3
|
+
initInputValue: () => void;
|
|
4
|
+
onClear: () => void;
|
|
5
|
+
initFilteredData: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare function Clear({ clearSelected, initInputValue, onClear, initFilteredData, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Clear;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TColor } from '../../../../enums/color';
|
|
3
|
+
interface Props<T extends Record<string, any>> {
|
|
4
|
+
open: boolean;
|
|
5
|
+
value: string;
|
|
6
|
+
selected: T | undefined;
|
|
7
|
+
color: TColor;
|
|
8
|
+
width?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
errored?: boolean;
|
|
12
|
+
inlineLabel?: string;
|
|
13
|
+
startArrow?: boolean;
|
|
14
|
+
toggleEndNode?: React.ReactNode;
|
|
15
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
initFilteredData: () => void;
|
|
17
|
+
toggleMenuOpen: () => void;
|
|
18
|
+
initInputValue: () => void;
|
|
19
|
+
clearSelected: () => void;
|
|
20
|
+
onClear?: () => void;
|
|
21
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
22
|
+
}
|
|
23
|
+
declare function DropdownToggleInput<T extends Record<string, any>>({ open, value, selected, color, width, disabled, placeholder, errored, inlineLabel, startArrow, toggleEndNode, onChange, initFilteredData, toggleMenuOpen, initInputValue, clearSelected, onClear, onKeyDown, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default DropdownToggleInput;
|