@uniai-fe/uds-primitives 0.2.9 → 0.2.10
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/styles.css +415 -0
- package/package.json +2 -1
- package/src/components/calendar/types/calendar.ts +5 -0
- package/src/components/input/markup/date/Template.tsx +36 -5
- package/src/components/input/markup/date/Trigger.tsx +22 -4
- package/src/components/input/markup/foundation/Input.tsx +19 -11
- package/src/components/input/markup/foundation/Utility.tsx +11 -7
- package/src/components/input/styles/date.scss +21 -0
- package/src/components/input/styles/foundation.scss +30 -0
- package/src/components/input/styles/variables.scss +11 -0
- package/src/components/input/types/date.ts +15 -0
- package/src/components/input/types/foundation.ts +18 -11
- package/src/components/input/utils/date.ts +15 -1
- package/src/components/select/markup/Default.tsx +6 -3
- package/src/components/select/markup/foundation/Base.tsx +1 -1
- package/src/components/select/markup/foundation/Icon.tsx +6 -1
- package/src/components/select/markup/multiple/Multiple.tsx +6 -3
- package/src/components/select/styles/select.scss +50 -0
- package/src/components/select/styles/variables.scss +26 -0
- package/src/components/select/types/base.ts +3 -2
- package/src/components/select/types/icon.ts +7 -6
- package/src/components/select/types/props.ts +1 -0
- package/src/components/select/types/trigger.ts +4 -0
- package/src/components/table/hooks/index.ts +0 -3
- package/src/components/table/index.tsx +5 -3
- package/src/components/table/markup/Container.tsx +126 -0
- package/src/components/table/markup/foundation/Body.tsx +24 -0
- package/src/components/table/markup/foundation/Cell.tsx +72 -0
- package/src/components/table/markup/foundation/Col.tsx +22 -0
- package/src/components/table/markup/foundation/Colgroup.tsx +29 -0
- package/src/components/table/markup/foundation/Foot.tsx +24 -0
- package/src/components/table/markup/foundation/Head.tsx +24 -0
- package/src/components/table/markup/foundation/Root.tsx +32 -0
- package/src/components/table/markup/foundation/Row.tsx +32 -0
- package/src/components/table/markup/foundation/Td.tsx +37 -0
- package/src/components/table/markup/foundation/Th.tsx +39 -0
- package/src/components/table/markup/foundation/index.tsx +30 -0
- package/src/components/table/markup/index.tsx +8 -2
- package/src/components/table/styles/foundation.scss +247 -0
- package/src/components/table/styles/index.scss +2 -0
- package/src/components/table/styles/variables.scss +29 -0
- package/src/components/table/types/foundation.ts +250 -0
- package/src/components/table/types/index.ts +1 -4
- package/src/components/tooltip/img/info.svg +5 -0
- package/src/components/tooltip/img/information.svg +9 -0
- package/src/components/tooltip/index.scss +1 -0
- package/src/components/tooltip/index.tsx +4 -0
- package/src/components/tooltip/markup/Message.tsx +70 -0
- package/src/components/tooltip/markup/Root.tsx +32 -0
- package/src/components/tooltip/markup/Template.tsx +46 -0
- package/src/components/tooltip/markup/Trigger.tsx +32 -0
- package/src/components/tooltip/markup/index.tsx +18 -0
- package/src/components/tooltip/styles/index.scss +2 -0
- package/src/components/tooltip/styles/tooltip.scss +47 -0
- package/src/components/tooltip/styles/variables.scss +14 -0
- package/src/components/tooltip/types/index.ts +1 -0
- package/src/components/tooltip/types/props.ts +118 -0
- package/src/index.scss +1 -0
- package/src/index.tsx +1 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import type { TableThProps } from "../../types";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Table Foundation; Th 마크업 컴포넌트
|
|
7
|
+
* @component
|
|
8
|
+
* @param {TableThProps} props
|
|
9
|
+
* @param {string} [props.className] th className
|
|
10
|
+
* @param {React.ReactNode} [props.children] 셀 콘텐츠
|
|
11
|
+
*/
|
|
12
|
+
const TableTh = forwardRef<HTMLTableCellElement, TableThProps>(
|
|
13
|
+
({ className, children, scope, style, ...cellProps }, ref) => {
|
|
14
|
+
return (
|
|
15
|
+
<th
|
|
16
|
+
{...cellProps}
|
|
17
|
+
ref={ref}
|
|
18
|
+
className={clsx("table-native-cell", "table-th", className)}
|
|
19
|
+
// th 기본 scope는 col로 유지한다.
|
|
20
|
+
scope={scope ?? "col"}
|
|
21
|
+
// 변경: th/td 레벨 text-align은 기본 left 고정으로 유지한다.
|
|
22
|
+
style={{ ...style, textAlign: "left" }}
|
|
23
|
+
>
|
|
24
|
+
{/* 변경: 태그 셀렉터 의존을 피하기 위해 className 기반 텍스트 노드를 사용한다. */}
|
|
25
|
+
{typeof children === "string" || typeof children === "number" ? (
|
|
26
|
+
<span className={clsx("table-native-cell-text", "table-th-text")}>
|
|
27
|
+
{children}
|
|
28
|
+
</span>
|
|
29
|
+
) : (
|
|
30
|
+
children
|
|
31
|
+
)}
|
|
32
|
+
</th>
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
TableTh.displayName = "TableFoundation.Th";
|
|
38
|
+
|
|
39
|
+
export default TableTh;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import TableBody from "./Body";
|
|
2
|
+
import TableCell from "./Cell";
|
|
3
|
+
import TableCol from "./Col";
|
|
4
|
+
import TableColgroup from "./Colgroup";
|
|
5
|
+
import TableFoot from "./Foot";
|
|
6
|
+
import TableHead from "./Head";
|
|
7
|
+
import TableTh from "./Th";
|
|
8
|
+
import TableRoot from "./Root";
|
|
9
|
+
import TableRow from "./Row";
|
|
10
|
+
import TableTd from "./Td";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Table Foundation; 기초 마크업 컴포넌트 세트
|
|
14
|
+
*/
|
|
15
|
+
export const TableFoundation = {
|
|
16
|
+
Root: TableRoot,
|
|
17
|
+
Colgroup: TableColgroup,
|
|
18
|
+
Col: TableCol,
|
|
19
|
+
Head: TableHead,
|
|
20
|
+
Body: TableBody,
|
|
21
|
+
Foot: TableFoot,
|
|
22
|
+
Row: TableRow,
|
|
23
|
+
Cell: TableCell,
|
|
24
|
+
Thead: TableHead,
|
|
25
|
+
Tbody: TableBody,
|
|
26
|
+
Tfoot: TableFoot,
|
|
27
|
+
Tr: TableRow,
|
|
28
|
+
Th: TableTh,
|
|
29
|
+
Td: TableTd,
|
|
30
|
+
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { TableFoundation } from "./foundation";
|
|
2
|
+
import TableContainer from "./Container";
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
5
|
+
* Table; 마크업 네임스페이스
|
|
3
6
|
*/
|
|
4
|
-
export {
|
|
7
|
+
export const Table = {
|
|
8
|
+
...TableFoundation,
|
|
9
|
+
Container: TableContainer,
|
|
10
|
+
};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
.table.table-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
border-collapse: collapse;
|
|
4
|
+
border-spacing: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.table.table-container .table-native-cell.table-th,
|
|
8
|
+
.table.table-container .table-native-cell.table-td {
|
|
9
|
+
vertical-align: middle;
|
|
10
|
+
background-color: var(--table-cell-background-color);
|
|
11
|
+
text-align: left;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// 변경: line 타입은 상/하 border 중심과 헤더/바디 높이 축을 고정한다.
|
|
15
|
+
.table.table-container[data-layout="line"] .table-native-cell.table-th,
|
|
16
|
+
.table.table-container[data-layout="line"] .table-native-cell.table-td {
|
|
17
|
+
// table cell 내부 field full-bleed 계산을 위해 padding 값을 변수로 노출한다.
|
|
18
|
+
--table-cell-padding-inline: var(--table-line-cell-padding-inline);
|
|
19
|
+
--table-cell-padding-block: var(--table-line-cell-padding-block);
|
|
20
|
+
border-bottom: 1px solid var(--table-border-color);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.table.table-container[data-layout="line"]
|
|
24
|
+
.table-head
|
|
25
|
+
.table-native-cell.table-th {
|
|
26
|
+
height: var(--table-line-cell-height-head);
|
|
27
|
+
border-top: 1px solid var(--table-border-color);
|
|
28
|
+
background-color: var(--table-line-head-background-color);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.table.table-container[data-layout="line"]
|
|
32
|
+
.table-body
|
|
33
|
+
.table-native-cell.table-td,
|
|
34
|
+
.table.table-container[data-layout="line"]
|
|
35
|
+
.table-foot
|
|
36
|
+
.table-native-cell.table-td {
|
|
37
|
+
height: var(--table-line-cell-height-body);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 변경: grid 타입은 모든 셀 border와 헤더 배경을 기본 제공한다.
|
|
41
|
+
.table.table-container[data-layout="grid"] .table-native-cell.table-th,
|
|
42
|
+
.table.table-container[data-layout="grid"] .table-native-cell.table-td {
|
|
43
|
+
// table cell 내부 field full-bleed 계산을 위해 padding 값을 변수로 노출한다.
|
|
44
|
+
--table-cell-padding-inline: var(--table-grid-cell-padding-inline);
|
|
45
|
+
--table-cell-padding-block: var(--table-grid-cell-padding-block);
|
|
46
|
+
border: 1px solid var(--table-border-color);
|
|
47
|
+
height: var(--table-grid-cell-height);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.table.table-container[data-layout="grid"] {
|
|
51
|
+
border-radius: var(--table-grid-border-radius);
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.table.table-container[data-layout="grid"]
|
|
56
|
+
.table-head
|
|
57
|
+
.table-native-cell.table-th {
|
|
58
|
+
background-color: var(--table-grid-head-background-color);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// 변경: tag selector 대신 className selector로 텍스트 스타일 적용 범위를 고정한다.
|
|
62
|
+
.table-native-cell.table-th .table-native-cell-text {
|
|
63
|
+
color: var(--table-th-text-color);
|
|
64
|
+
font-size: var(--table-th-text-size);
|
|
65
|
+
font-weight: var(--table-th-text-weight);
|
|
66
|
+
line-height: var(--table-th-text-line-height);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.table-native-cell.table-td .table-native-cell-text {
|
|
70
|
+
color: var(--table-td-text-color);
|
|
71
|
+
font-size: var(--table-td-text-size);
|
|
72
|
+
font-weight: var(--table-td-text-weight);
|
|
73
|
+
line-height: var(--table-td-text-line-height);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Cell 콘텐츠 래퍼는 다양한 입력 컴포넌트 정렬을 위한 공통 슬롯이다.
|
|
77
|
+
.table-cell-content {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
82
|
+
justify-content: flex-start;
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
padding-inline: var(--table-cell-padding-inline);
|
|
85
|
+
padding-block: var(--table-cell-padding-block);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.table-cell-content[data-padding="none"] {
|
|
89
|
+
padding: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.table-cell-content[data-no-padding="true"] {
|
|
93
|
+
padding: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 변경: table cell 내부에서는 input table이 셀 영역을 가득 채우도록 컨텍스트 규칙을 둔다.
|
|
97
|
+
.table-cell-content[data-padding="default"] .input[data-priority="table"] {
|
|
98
|
+
width: calc(100% + (var(--table-cell-padding-inline) * 2));
|
|
99
|
+
height: 100%;
|
|
100
|
+
min-height: calc(100% + (var(--table-cell-padding-block) * 2));
|
|
101
|
+
margin-inline: calc(var(--table-cell-padding-inline) * -1);
|
|
102
|
+
margin-block: calc(var(--table-cell-padding-block) * -1);
|
|
103
|
+
flex: 1 1 auto;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.table-cell-content[data-padding="default"]
|
|
107
|
+
:where(.input[data-priority="table"] .input-box),
|
|
108
|
+
.table-cell-content[data-padding="default"]
|
|
109
|
+
:where(.input[data-priority="table"] .input-field) {
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 100%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.table-cell-content[data-padding="default"] .input-date-field {
|
|
115
|
+
width: calc(100% + (var(--table-cell-padding-inline) * 2));
|
|
116
|
+
height: 100%;
|
|
117
|
+
min-height: calc(100% + (var(--table-cell-padding-block) * 2));
|
|
118
|
+
margin-inline: calc(var(--table-cell-padding-inline) * -1);
|
|
119
|
+
margin-block: calc(var(--table-cell-padding-block) * -1);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.table-cell-content[data-padding="default"] :where(.select.select-container) {
|
|
123
|
+
width: calc(100% + (var(--table-cell-padding-inline) * 2));
|
|
124
|
+
height: 100%;
|
|
125
|
+
min-height: calc(100% + (var(--table-cell-padding-block) * 2));
|
|
126
|
+
margin-inline: calc(var(--table-cell-padding-inline) * -1);
|
|
127
|
+
margin-block: calc(var(--table-cell-padding-block) * -1);
|
|
128
|
+
flex: 1 1 auto;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.table-cell-content[data-padding="default"]
|
|
132
|
+
:where(.select.select-container .select-button) {
|
|
133
|
+
width: 100%;
|
|
134
|
+
height: 100%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.table-cell-content[data-padding="none"]
|
|
138
|
+
:where(
|
|
139
|
+
.input[data-priority="table"],
|
|
140
|
+
.input[data-priority="table"] .input-box,
|
|
141
|
+
.input[data-priority="table"] .input-field,
|
|
142
|
+
.input-date-field,
|
|
143
|
+
.select.select-container,
|
|
144
|
+
.select.select-container .select-button
|
|
145
|
+
),
|
|
146
|
+
.table-cell-content[data-no-padding="true"]
|
|
147
|
+
:where(
|
|
148
|
+
.input[data-priority="table"],
|
|
149
|
+
.input[data-priority="table"] .input-box,
|
|
150
|
+
.input[data-priority="table"] .input-field,
|
|
151
|
+
.input-date-field,
|
|
152
|
+
.select.select-container,
|
|
153
|
+
.select.select-container .select-button
|
|
154
|
+
) {
|
|
155
|
+
width: 100%;
|
|
156
|
+
height: 100%;
|
|
157
|
+
min-height: 100%;
|
|
158
|
+
margin: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 변경: Cell 슬롯 텍스트도 className selector로 기본 타이포를 동일하게 맞춘다.
|
|
162
|
+
.table-cell-content .table-cell-text {
|
|
163
|
+
color: inherit;
|
|
164
|
+
font-size: inherit;
|
|
165
|
+
font-weight: inherit;
|
|
166
|
+
line-height: inherit;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// 변경: Cell.alignX/alignY로 콘텐츠 정렬을 제어한다.
|
|
170
|
+
.table-cell-content[data-align-x="left"],
|
|
171
|
+
.table-cell-content[data-align="left"] {
|
|
172
|
+
justify-content: flex-start;
|
|
173
|
+
text-align: left;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.table-cell-content[data-align-x="center"],
|
|
177
|
+
.table-cell-content[data-align="center"] {
|
|
178
|
+
justify-content: center;
|
|
179
|
+
text-align: center;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.table-cell-content[data-align-x="right"],
|
|
183
|
+
.table-cell-content[data-align="right"] {
|
|
184
|
+
justify-content: flex-end;
|
|
185
|
+
text-align: right;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.table-cell-content[data-align-y="top"] {
|
|
189
|
+
align-items: flex-start;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.table-cell-content[data-align-y="center"] {
|
|
193
|
+
align-items: center;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.table-cell-content[data-align-y="bottom"] {
|
|
197
|
+
align-items: flex-end;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// 변경: section 기반 Cell 텍스트는 native cell 토큰과 동일한 스케일을 따르게 한다.
|
|
201
|
+
.table-cell.table-head-cell .table-cell-text {
|
|
202
|
+
color: var(--table-th-text-color);
|
|
203
|
+
font-size: var(--table-th-text-size);
|
|
204
|
+
font-weight: var(--table-th-text-weight);
|
|
205
|
+
line-height: var(--table-th-text-line-height);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// 변경: table priority input/select는 size와 무관하게 table body 텍스트 스케일(15px)을 사용한다.
|
|
209
|
+
.table-cell .input[data-priority="table"] .input-element,
|
|
210
|
+
.table-cell
|
|
211
|
+
.select.select-container
|
|
212
|
+
.select-button[data-priority="table"]
|
|
213
|
+
.select-label,
|
|
214
|
+
.table-cell
|
|
215
|
+
.select.select-container
|
|
216
|
+
.select-button[data-priority="table"]
|
|
217
|
+
.select-label-placeholder {
|
|
218
|
+
color: var(--table-td-text-color);
|
|
219
|
+
font-size: var(--table-td-text-size);
|
|
220
|
+
font-weight: var(--table-td-text-weight);
|
|
221
|
+
line-height: var(--table-td-text-line-height);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// 변경: radio 라벨은 section 타이포를 따른다(head 13px / body-foot 15px).
|
|
225
|
+
.table-cell.table-head-cell .radio-label-text {
|
|
226
|
+
color: var(--table-th-text-color);
|
|
227
|
+
font-size: var(--table-th-text-size);
|
|
228
|
+
font-weight: var(--table-th-text-weight);
|
|
229
|
+
line-height: var(--table-th-text-line-height);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.table-cell.table-body-cell .table-cell-text,
|
|
233
|
+
.table-cell.table-foot-cell .table-cell-text {
|
|
234
|
+
color: var(--table-td-text-color);
|
|
235
|
+
font-size: var(--table-td-text-size);
|
|
236
|
+
font-weight: var(--table-td-text-weight);
|
|
237
|
+
line-height: var(--table-td-text-line-height);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// 변경: Cell(body/foot) 컨텍스트에서는 table priority input/select 텍스트를 15px 축으로 강제한다.
|
|
241
|
+
.table-cell.table-body-cell .radio-label-text,
|
|
242
|
+
.table-cell.table-foot-cell .radio-label-text {
|
|
243
|
+
color: var(--table-td-text-color);
|
|
244
|
+
font-size: var(--table-td-text-size);
|
|
245
|
+
font-weight: var(--table-td-text-weight);
|
|
246
|
+
line-height: var(--table-td-text-line-height);
|
|
247
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
// 변경: Figma(705:12000, 726:14739) 값을 foundation 토큰으로 역매핑한 table 모듈 전용 토큰 레이어.
|
|
3
|
+
--table-border-color: var(--color-border-standard-cool-gray);
|
|
4
|
+
--table-line-head-background-color: var(--color-surface-static-cool-gray);
|
|
5
|
+
--table-grid-head-background-color: var(
|
|
6
|
+
--color-background-alternative-cool-gray
|
|
7
|
+
);
|
|
8
|
+
--table-cell-background-color: var(--color-surface-static-white);
|
|
9
|
+
|
|
10
|
+
--table-line-cell-height-head: 44px;
|
|
11
|
+
--table-line-cell-height-body: 56px;
|
|
12
|
+
--table-grid-cell-height: 48px;
|
|
13
|
+
--table-grid-border-radius: var(--theme-radius-large-1);
|
|
14
|
+
|
|
15
|
+
--table-line-cell-padding-inline: var(--spacing-padding-6);
|
|
16
|
+
--table-line-cell-padding-block: 9px;
|
|
17
|
+
--table-grid-cell-padding-inline: var(--spacing-padding-6);
|
|
18
|
+
--table-grid-cell-padding-block: 9px;
|
|
19
|
+
|
|
20
|
+
--table-th-text-color: var(--color-label-standard);
|
|
21
|
+
--table-th-text-size: 13px;
|
|
22
|
+
--table-th-text-weight: var(--font-label-small-weight);
|
|
23
|
+
--table-th-text-line-height: var(--font-label-small-line-height);
|
|
24
|
+
|
|
25
|
+
--table-td-text-color: var(--color-label-standard);
|
|
26
|
+
--table-td-text-size: 15px;
|
|
27
|
+
--table-td-text-weight: var(--font-body-xsmall-weight);
|
|
28
|
+
--table-td-text-line-height: var(--font-body-xsmall-line-height);
|
|
29
|
+
}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
|
|
3
|
+
export const TABLE_CELL_ALIGN_OPTIONS = ["left", "center", "right"] as const;
|
|
4
|
+
export const TABLE_CELL_ALIGN_Y_OPTIONS = ["top", "center", "bottom"] as const;
|
|
5
|
+
export const TABLE_CELL_PADDING_OPTIONS = ["default", "none"] as const;
|
|
6
|
+
export const TABLE_SECTIONS = ["head", "body", "foot"] as const;
|
|
7
|
+
export const TABLE_LAYOUT_OPTIONS = ["line", "grid"] as const;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Table Types; Cell 정렬 값 타입
|
|
11
|
+
* @typedef {"left" | "center" | "right"} TableCellAlign
|
|
12
|
+
*/
|
|
13
|
+
export type TableCellAlign = (typeof TABLE_CELL_ALIGN_OPTIONS)[number];
|
|
14
|
+
/**
|
|
15
|
+
* Table Types; Cell 세로 정렬 값 타입
|
|
16
|
+
* @typedef {"top" | "center" | "bottom"} TableCellAlignY
|
|
17
|
+
*/
|
|
18
|
+
export type TableCellAlignY = (typeof TABLE_CELL_ALIGN_Y_OPTIONS)[number];
|
|
19
|
+
/**
|
|
20
|
+
* Table Types; Cell padding 제어 타입
|
|
21
|
+
* @typedef {"default" | "none"} TableCellPadding
|
|
22
|
+
*/
|
|
23
|
+
export type TableCellPadding = (typeof TABLE_CELL_PADDING_OPTIONS)[number];
|
|
24
|
+
/**
|
|
25
|
+
* Table Types; section 식별 타입
|
|
26
|
+
* @typedef {"head" | "body" | "foot"} TableSection
|
|
27
|
+
*/
|
|
28
|
+
export type TableSection = (typeof TABLE_SECTIONS)[number];
|
|
29
|
+
/**
|
|
30
|
+
* Table Types; layout 식별 타입
|
|
31
|
+
* @typedef {"line" | "grid"} TableLayout
|
|
32
|
+
*/
|
|
33
|
+
export type TableLayout = (typeof TABLE_LAYOUT_OPTIONS)[number];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Table Types; Root props
|
|
37
|
+
* @property {string} [className] table 루트 className
|
|
38
|
+
* @property {"line" | "grid"} [layout] 테이블 스타일 축
|
|
39
|
+
* @property {React.ReactNode} [children] table 내부 콘텐츠
|
|
40
|
+
*/
|
|
41
|
+
export interface TableRootProps extends ComponentPropsWithoutRef<"table"> {
|
|
42
|
+
/**
|
|
43
|
+
* 테이블 스타일 축
|
|
44
|
+
*/
|
|
45
|
+
layout?: TableLayout;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Table Types; Colgroup props
|
|
50
|
+
* @property {string} [className] colgroup className
|
|
51
|
+
* @property {React.ReactNode} [children] col 목록
|
|
52
|
+
*/
|
|
53
|
+
export interface TableColgroupProps extends ComponentPropsWithoutRef<"colgroup"> {}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Table Types; Colgroup column item
|
|
57
|
+
* @property {string} key column 고유 key
|
|
58
|
+
* @property {number | string} [width] width 값
|
|
59
|
+
* @property {string} [dataKey] data-key attr 값
|
|
60
|
+
* @property {string} [className] col className
|
|
61
|
+
* @property {number} [span] col span 값
|
|
62
|
+
*/
|
|
63
|
+
export interface TableColgroupColumn {
|
|
64
|
+
/**
|
|
65
|
+
* column 고유 key
|
|
66
|
+
*/
|
|
67
|
+
key: string;
|
|
68
|
+
/**
|
|
69
|
+
* width 값
|
|
70
|
+
*/
|
|
71
|
+
width?: number | string;
|
|
72
|
+
/**
|
|
73
|
+
* data-key attr 값
|
|
74
|
+
*/
|
|
75
|
+
dataKey?: string;
|
|
76
|
+
/**
|
|
77
|
+
* col className
|
|
78
|
+
*/
|
|
79
|
+
className?: string;
|
|
80
|
+
/**
|
|
81
|
+
* col span 값
|
|
82
|
+
*/
|
|
83
|
+
span?: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Table Types; Template column item
|
|
88
|
+
* @property {string} key column 고유 key
|
|
89
|
+
* @property {number | string} [width] width 값
|
|
90
|
+
* @property {string} [dataKey] data-key attr 값
|
|
91
|
+
* @property {string} [dataName] 헤더 식별자
|
|
92
|
+
* @property {React.ReactNode} [headContent] 헤더 셀 콘텐츠
|
|
93
|
+
* @property {React.ReactNode} [cellContents] ui-legacy 호환 헤더 콘텐츠
|
|
94
|
+
* @property {React.ReactNode} [cellChildren] 서비스 호환 헤더 콘텐츠
|
|
95
|
+
* @property {"left" | "center" | "right"} [align] 헤더 정렬
|
|
96
|
+
*/
|
|
97
|
+
export interface TableTemplateColumn extends TableColgroupColumn {
|
|
98
|
+
/**
|
|
99
|
+
* 헤더 식별자
|
|
100
|
+
*/
|
|
101
|
+
dataName?: string;
|
|
102
|
+
/**
|
|
103
|
+
* 헤더 셀 콘텐츠
|
|
104
|
+
*/
|
|
105
|
+
headContent?: React.ReactNode;
|
|
106
|
+
/**
|
|
107
|
+
* ui-legacy 호환 헤더 콘텐츠
|
|
108
|
+
*/
|
|
109
|
+
cellContents?: React.ReactNode;
|
|
110
|
+
/**
|
|
111
|
+
* 서비스 호환 헤더 콘텐츠
|
|
112
|
+
*/
|
|
113
|
+
cellChildren?: React.ReactNode;
|
|
114
|
+
/**
|
|
115
|
+
* 헤더 정렬
|
|
116
|
+
*/
|
|
117
|
+
align?: TableCellAlign;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Table Types; Template props
|
|
122
|
+
* @property {TableTemplateColumn[]} [columns] colgroup/head 자동 렌더링용 column 데이터
|
|
123
|
+
* @property {boolean} [isCustomBody] true면 body wrapper 없이 children을 직접 렌더링
|
|
124
|
+
* @property {"legacy-rem" | "raw"} [widthMode] number width 해석 방식
|
|
125
|
+
* @property {React.ReactNode} [footer] footer 노드
|
|
126
|
+
* @property {React.ReactNode} [children] body 콘텐츠
|
|
127
|
+
*/
|
|
128
|
+
export interface TableTemplateProps extends TableRootProps {
|
|
129
|
+
/**
|
|
130
|
+
* colgroup/head 자동 렌더링용 column 데이터
|
|
131
|
+
*/
|
|
132
|
+
columns?: TableTemplateColumn[];
|
|
133
|
+
/**
|
|
134
|
+
* true면 body wrapper 없이 children을 직접 렌더링
|
|
135
|
+
*/
|
|
136
|
+
isCustomBody?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* number width 해석 방식
|
|
139
|
+
*/
|
|
140
|
+
widthMode?: "legacy-rem" | "raw";
|
|
141
|
+
/**
|
|
142
|
+
* footer 노드
|
|
143
|
+
*/
|
|
144
|
+
footer?: React.ReactNode;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Table Types; Col props
|
|
149
|
+
* @property {string} [className] col className
|
|
150
|
+
*/
|
|
151
|
+
export interface TableColProps extends ComponentPropsWithoutRef<"col"> {}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Table Types; Thead props
|
|
155
|
+
* @property {string} [className] thead className
|
|
156
|
+
* @property {React.ReactNode} [children] thead 내부 콘텐츠
|
|
157
|
+
*/
|
|
158
|
+
export interface TableHeadProps extends ComponentPropsWithoutRef<"thead"> {}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Table Types; Tbody props
|
|
162
|
+
* @property {string} [className] tbody className
|
|
163
|
+
* @property {React.ReactNode} [children] tbody 내부 콘텐츠
|
|
164
|
+
*/
|
|
165
|
+
export interface TableBodyProps extends ComponentPropsWithoutRef<"tbody"> {}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Table Types; Tfoot props
|
|
169
|
+
* @property {string} [className] tfoot className
|
|
170
|
+
* @property {React.ReactNode} [children] tfoot 내부 콘텐츠
|
|
171
|
+
*/
|
|
172
|
+
export interface TableFootProps extends ComponentPropsWithoutRef<"tfoot"> {}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Table Types; Tr props
|
|
176
|
+
* @property {"head" | "body" | "foot"} [section] row 상위 섹션
|
|
177
|
+
* @property {string} [className] tr className
|
|
178
|
+
* @property {React.ReactNode} [children] row 내부 콘텐츠
|
|
179
|
+
*/
|
|
180
|
+
export interface TableRowProps extends ComponentPropsWithoutRef<"tr"> {
|
|
181
|
+
/**
|
|
182
|
+
* row 상위 섹션
|
|
183
|
+
*/
|
|
184
|
+
section?: TableSection;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Table Types; Th props
|
|
189
|
+
* @property {string} [className] th className
|
|
190
|
+
* @property {React.ReactNode} [children] header cell 콘텐츠
|
|
191
|
+
*/
|
|
192
|
+
export interface TableThProps extends ComponentPropsWithoutRef<"th"> {}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Table Types; Td props
|
|
196
|
+
* @property {string} [className] td className
|
|
197
|
+
* @property {React.ReactNode} [children] body cell 콘텐츠
|
|
198
|
+
*/
|
|
199
|
+
export interface TableTdProps extends ComponentPropsWithoutRef<"td"> {}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Table Types; Cell content props
|
|
203
|
+
* @property {"head" | "body" | "foot"} [section] cell 상위 섹션
|
|
204
|
+
* @property {"left" | "center" | "right"} [alignX] cell 콘텐츠 가로 정렬
|
|
205
|
+
* @property {"top" | "center" | "bottom"} [alignY] cell 콘텐츠 세로 정렬
|
|
206
|
+
* @property {boolean} [noPadding] true면 cell 내부 padding 제거
|
|
207
|
+
* @property {"default" | "none"} [padding] cell 내부 padding 제어
|
|
208
|
+
* @property {"left" | "center" | "right"} [align] cell 콘텐츠 가로 정렬(호환 alias)
|
|
209
|
+
* @property {string} [className] cell content className
|
|
210
|
+
* @property {React.ReactNode} [children] cell 내부 콘텐츠
|
|
211
|
+
*/
|
|
212
|
+
export interface TableCellContentProps extends ComponentPropsWithoutRef<"div"> {
|
|
213
|
+
/**
|
|
214
|
+
* cell 상위 섹션
|
|
215
|
+
*/
|
|
216
|
+
section?: TableSection;
|
|
217
|
+
/**
|
|
218
|
+
* cell 콘텐츠 가로 정렬
|
|
219
|
+
*/
|
|
220
|
+
alignX?: TableCellAlign;
|
|
221
|
+
/**
|
|
222
|
+
* cell 콘텐츠 세로 정렬
|
|
223
|
+
*/
|
|
224
|
+
alignY?: TableCellAlignY;
|
|
225
|
+
/**
|
|
226
|
+
* true면 cell 내부 padding 제거
|
|
227
|
+
*/
|
|
228
|
+
noPadding?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* cell 내부 padding 제어
|
|
231
|
+
*/
|
|
232
|
+
padding?: TableCellPadding;
|
|
233
|
+
/**
|
|
234
|
+
* cell 콘텐츠 가로 정렬(호환 alias)
|
|
235
|
+
* @deprecated `alignX` 사용을 권장한다.
|
|
236
|
+
*/
|
|
237
|
+
align?: TableCellAlign;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Table Types; HeadCell props (deprecated alias)
|
|
242
|
+
* @deprecated `TableThProps` 사용을 권장한다.
|
|
243
|
+
*/
|
|
244
|
+
export interface TableHeadCellProps extends TableThProps {}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Table Types; Body Cell props (deprecated alias)
|
|
248
|
+
* @deprecated `TableTdProps` 사용을 권장한다.
|
|
249
|
+
*/
|
|
250
|
+
export interface TableCellProps extends TableTdProps {}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M8.00004 6.7998C8.29459 6.7998 8.53324 7.03846 8.53324 7.33301V10.6663C8.53324 10.9609 8.29459 11.1995 8.00004 11.1995C7.70549 11.1995 7.46684 10.9609 7.46684 10.6663V7.33301C7.46684 7.03846 7.70549 6.7998 8.00004 6.7998Z" fill="#94989E"/>
|
|
3
|
+
<path d="M8.00004 4.66634C8.36823 4.66634 8.66671 4.96482 8.66671 5.33301C8.66671 5.7012 8.36823 5.99967 8.00004 5.99967C7.63185 5.99967 7.33337 5.7012 7.33337 5.33301C7.33337 4.96482 7.63185 4.66634 8.00004 4.66634Z" fill="#94989E"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00004 1.33301C11.6819 1.33301 14.6667 4.31778 14.6667 7.99967C14.6667 11.6816 11.6819 14.6663 8.00004 14.6663C4.31814 14.6663 1.33337 11.6816 1.33337 7.99967C1.33337 4.31778 4.31814 1.33301 8.00004 1.33301ZM8.00004 2.39941C4.90725 2.39941 2.39978 4.90688 2.39978 7.99967C2.39978 11.0925 4.90725 13.5999 8.00004 13.5999C11.0928 13.5999 13.6003 11.0925 13.6003 7.99967C13.6003 4.90688 11.0928 2.39941 8.00004 2.39941Z" fill="#94989E"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Icon/Information/Line">
|
|
3
|
+
<g id="Union">
|
|
4
|
+
<path d="M8 6.80013C8.29455 6.80013 8.5332 7.03878 8.5332 7.33333V10.6667C8.5332 10.9612 8.29455 11.1999 8 11.1999C7.70545 11.1999 7.4668 10.9612 7.4668 10.6667V7.33333C7.4668 7.03878 7.70545 6.80013 8 6.80013Z" fill="var(--fill-0, #94989E)"/>
|
|
5
|
+
<path d="M8 4.66667C8.36819 4.66667 8.66667 4.96514 8.66667 5.33333C8.66667 5.70152 8.36819 6 8 6C7.63181 6 7.33333 5.70152 7.33333 5.33333C7.33333 4.96514 7.63181 4.66667 8 4.66667Z" fill="var(--fill-0, #94989E)"/>
|
|
6
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 1.33333C11.6819 1.33333 14.6667 4.3181 14.6667 8C14.6667 11.6819 11.6819 14.6667 8 14.6667C4.3181 14.6667 1.33333 11.6819 1.33333 8C1.33333 4.3181 4.3181 1.33333 8 1.33333ZM8 2.39974C4.90721 2.39974 2.39974 4.90721 2.39974 8C2.39974 11.0928 4.90721 13.6003 8 13.6003C11.0928 13.6003 13.6003 11.0928 13.6003 8C13.6003 4.90721 11.0928 2.39974 8 2.39974Z" fill="var(--fill-0, #94989E)"/>
|
|
7
|
+
</g>
|
|
8
|
+
</g>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use "./styles/index.scss";
|