@uniai-fe/uds-primitives 0.2.8 → 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.
Files changed (72) hide show
  1. package/dist/styles.css +419 -0
  2. package/package.json +2 -1
  3. package/src/components/calendar/types/calendar.ts +5 -0
  4. package/src/components/dropdown/markup/Template.tsx +41 -17
  5. package/src/components/dropdown/markup/foundation/Container.tsx +14 -2
  6. package/src/components/dropdown/markup/foundation/MenuItem.tsx +20 -6
  7. package/src/components/dropdown/markup/foundation/Root.tsx +8 -1
  8. package/src/components/dropdown/markup/foundation/Trigger.tsx +7 -1
  9. package/src/components/dropdown/styles/dropdown.scss +4 -0
  10. package/src/components/dropdown/types/props.ts +5 -0
  11. package/src/components/input/markup/date/Template.tsx +36 -5
  12. package/src/components/input/markup/date/Trigger.tsx +22 -4
  13. package/src/components/input/markup/foundation/Input.tsx +19 -11
  14. package/src/components/input/markup/foundation/Utility.tsx +11 -7
  15. package/src/components/input/styles/date.scss +21 -0
  16. package/src/components/input/styles/foundation.scss +30 -0
  17. package/src/components/input/styles/variables.scss +11 -0
  18. package/src/components/input/types/date.ts +15 -0
  19. package/src/components/input/types/foundation.ts +18 -11
  20. package/src/components/input/utils/date.ts +15 -1
  21. package/src/components/select/hooks/index.ts +1 -45
  22. package/src/components/select/hooks/interaction.ts +62 -0
  23. package/src/components/select/markup/Default.tsx +59 -35
  24. package/src/components/select/markup/foundation/Base.tsx +12 -4
  25. package/src/components/select/markup/foundation/Container.tsx +37 -34
  26. package/src/components/select/markup/foundation/Icon.tsx +6 -1
  27. package/src/components/select/markup/multiple/Multiple.tsx +62 -35
  28. package/src/components/select/markup/multiple/SelectedChip.tsx +5 -2
  29. package/src/components/select/styles/select.scss +50 -0
  30. package/src/components/select/styles/variables.scss +26 -0
  31. package/src/components/select/types/base.ts +3 -2
  32. package/src/components/select/types/icon.ts +7 -6
  33. package/src/components/select/types/index.ts +1 -0
  34. package/src/components/select/types/interaction.ts +30 -0
  35. package/src/components/select/types/props.ts +8 -0
  36. package/src/components/select/types/trigger.ts +4 -0
  37. package/src/components/table/hooks/index.ts +0 -3
  38. package/src/components/table/index.tsx +5 -3
  39. package/src/components/table/markup/Container.tsx +126 -0
  40. package/src/components/table/markup/foundation/Body.tsx +24 -0
  41. package/src/components/table/markup/foundation/Cell.tsx +72 -0
  42. package/src/components/table/markup/foundation/Col.tsx +22 -0
  43. package/src/components/table/markup/foundation/Colgroup.tsx +29 -0
  44. package/src/components/table/markup/foundation/Foot.tsx +24 -0
  45. package/src/components/table/markup/foundation/Head.tsx +24 -0
  46. package/src/components/table/markup/foundation/Root.tsx +32 -0
  47. package/src/components/table/markup/foundation/Row.tsx +32 -0
  48. package/src/components/table/markup/foundation/Td.tsx +37 -0
  49. package/src/components/table/markup/foundation/Th.tsx +39 -0
  50. package/src/components/table/markup/foundation/index.tsx +30 -0
  51. package/src/components/table/markup/index.tsx +8 -2
  52. package/src/components/table/styles/foundation.scss +247 -0
  53. package/src/components/table/styles/index.scss +2 -0
  54. package/src/components/table/styles/variables.scss +29 -0
  55. package/src/components/table/types/foundation.ts +250 -0
  56. package/src/components/table/types/index.ts +1 -4
  57. package/src/components/tooltip/img/info.svg +5 -0
  58. package/src/components/tooltip/img/information.svg +9 -0
  59. package/src/components/tooltip/index.scss +1 -0
  60. package/src/components/tooltip/index.tsx +4 -0
  61. package/src/components/tooltip/markup/Message.tsx +70 -0
  62. package/src/components/tooltip/markup/Root.tsx +32 -0
  63. package/src/components/tooltip/markup/Template.tsx +46 -0
  64. package/src/components/tooltip/markup/Trigger.tsx +32 -0
  65. package/src/components/tooltip/markup/index.tsx +18 -0
  66. package/src/components/tooltip/styles/index.scss +2 -0
  67. package/src/components/tooltip/styles/tooltip.scss +47 -0
  68. package/src/components/tooltip/styles/variables.scss +14 -0
  69. package/src/components/tooltip/types/index.ts +1 -0
  70. package/src/components/tooltip/types/props.ts +118 -0
  71. package/src/index.scss +1 -0
  72. package/src/index.tsx +1 -0
@@ -0,0 +1,32 @@
1
+ import clsx from "clsx";
2
+ import { forwardRef } from "react";
3
+ import type { TableRowProps } from "../../types";
4
+
5
+ /**
6
+ * Table Foundation; Tr 마크업 컴포넌트
7
+ * @component
8
+ * @param {TableRowProps} props
9
+ * @param {string} [props.className] tr className
10
+ * @param {React.ReactNode} [props.children] row 내부 콘텐츠
11
+ */
12
+ const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(
13
+ ({ className, children, section, ...rowProps }, ref) => {
14
+ return (
15
+ <tr
16
+ {...rowProps}
17
+ ref={ref}
18
+ className={clsx(
19
+ "table-row",
20
+ section && `table-${section}-row`,
21
+ className,
22
+ )}
23
+ >
24
+ {children}
25
+ </tr>
26
+ );
27
+ },
28
+ );
29
+
30
+ TableRow.displayName = "TableFoundation.Row";
31
+
32
+ export default TableRow;
@@ -0,0 +1,37 @@
1
+ import clsx from "clsx";
2
+ import { forwardRef } from "react";
3
+ import type { TableTdProps } from "../../types";
4
+
5
+ /**
6
+ * Table Foundation; Td 마크업 컴포넌트
7
+ * @component
8
+ * @param {TableTdProps} props
9
+ * @param {string} [props.className] td className
10
+ * @param {React.ReactNode} [props.children] 셀 콘텐츠
11
+ */
12
+ const TableTd = forwardRef<HTMLTableCellElement, TableTdProps>(
13
+ ({ className, children, style, ...cellProps }, ref) => {
14
+ return (
15
+ <td
16
+ {...cellProps}
17
+ ref={ref}
18
+ className={clsx("table-native-cell", "table-td", className)}
19
+ // 변경: th/td 레벨 text-align은 기본 left 고정으로 유지한다.
20
+ style={{ ...style, textAlign: "left" }}
21
+ >
22
+ {/* 변경: 태그 셀렉터 의존을 피하기 위해 className 기반 텍스트 노드를 사용한다. */}
23
+ {typeof children === "string" || typeof children === "number" ? (
24
+ <span className={clsx("table-native-cell-text", "table-td-text")}>
25
+ {children}
26
+ </span>
27
+ ) : (
28
+ children
29
+ )}
30
+ </td>
31
+ );
32
+ },
33
+ );
34
+
35
+ TableTd.displayName = "TableFoundation.Td";
36
+
37
+ export default TableTd;
@@ -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
- * TODO(table): SOT 및 사용자 제약에 따라 컴포넌트를 구현한다.
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,2 @@
1
+ @use "./variables.scss";
2
+ @use "./foundation.scss";
@@ -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 {}
@@ -1,4 +1 @@
1
- /**
2
- * TODO(table): variant/slot 타입 정의를 작성한다.
3
- */
4
- export {};
1
+ export * from "./foundation";