@uniai-fe/uds-primitives 0.3.28 → 0.3.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/uds-primitives",
3
- "version": "0.3.28",
3
+ "version": "0.3.29",
4
4
  "description": "UNIAI Design System; Primitives Components Package",
5
5
  "type": "module",
6
6
  "private": false,
@@ -91,34 +91,42 @@ export interface TableColgroupProps extends ComponentPropsWithoutRef<"colgroup">
91
91
 
92
92
  /**
93
93
  * Table Types; Container column data
94
+ * @template RowData column dataKey가 참조할 row 데이터 타입
95
+ * @template DataKey row 데이터에서 허용할 key 타입
94
96
  * @property {string} key column 고유 key
97
+ * @property {string} dataKey column 데이터 property 키
98
+ * @property {React.ReactNode} cellContents 헤더 셀 콘텐츠
95
99
  * @property {number | string} [width] width 값
96
- * @property {string} [dataKey] tbody loop 렌더링 시 데이터 매핑(property key)용 식별자 및 data-key attr 값
97
- * @property {React.ReactNode} [cellContents] 헤더 셀 콘텐츠
98
100
  * @property {"left" | "center" | "right" | "normal" | "start" | "end" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch"} [alignX] 헤더 가로 정렬(CSS `justify-content` 값과 매핑)
99
101
  * @property {"top" | "center" | "bottom" | "normal" | "stretch" | "start" | "end" | "flex-start" | "flex-end" | "self-start" | "self-end" | "baseline"} [alignY] 헤더 세로 정렬(CSS `align-items` 값과 매핑)
100
102
  */
101
- export interface TableColumnData {
103
+ export interface TableColumnData<
104
+ RowData extends Record<string, unknown> = Record<string, unknown>,
105
+ DataKey extends Extract<keyof RowData, string> = Extract<
106
+ keyof RowData,
107
+ string
108
+ >,
109
+ > {
102
110
  /**
103
111
  * column 고유 key
104
112
  */
105
113
  key: string;
106
114
  /**
107
- * width
115
+ * column 데이터 property 키
108
116
  */
109
- width?: number | string;
117
+ dataKey: DataKey;
110
118
  /**
111
- * tbody loop 렌더링 시 데이터 매핑(property key)용 식별자 및 data-key attr 값
119
+ * 헤더 콘텐츠
112
120
  */
113
- dataKey?: string;
121
+ cellContents: React.ReactNode;
114
122
  /**
115
- * col className
123
+ * width
116
124
  */
117
- className?: string;
125
+ width?: number | string;
118
126
  /**
119
- * 헤더 셀 콘텐츠
127
+ * col className
120
128
  */
121
- cellContents?: React.ReactNode;
129
+ className?: string;
122
130
  /**
123
131
  * 헤더 가로 정렬
124
132
  */