@uniai-fe/uds-primitives 0.3.53 → 0.3.54
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
CHANGED
|
@@ -533,7 +533,7 @@
|
|
|
533
533
|
--select-table-border-default-color: var(--input-border-table-default-color);
|
|
534
534
|
--select-table-border-focus-color: var(--input-border-active-color);
|
|
535
535
|
--select-table-border-error-color: var(--input-border-error-color);
|
|
536
|
-
--select-table-border-disabled-color:
|
|
536
|
+
--select-table-border-disabled-color: transparent;
|
|
537
537
|
--select-table-border-readonly-color: transparent;
|
|
538
538
|
--select-table-surface-color: transparent;
|
|
539
539
|
--select-table-surface-disabled-color: var(--input-surface-disabled-color);
|
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
--select-table-border-default-color: var(--input-border-table-default-color);
|
|
37
37
|
--select-table-border-focus-color: var(--input-border-active-color);
|
|
38
38
|
--select-table-border-error-color: var(--input-border-error-color);
|
|
39
|
-
--select-table-border-disabled-color:
|
|
39
|
+
--select-table-border-disabled-color: transparent;
|
|
40
40
|
--select-table-border-readonly-color: transparent;
|
|
41
41
|
--select-table-surface-color: transparent;
|
|
42
42
|
--select-table-surface-disabled-color: var(--input-surface-disabled-color);
|
|
@@ -7,6 +7,7 @@ import TableHead from "./foundation/Head";
|
|
|
7
7
|
import TableTh from "./foundation/Th";
|
|
8
8
|
import TableRoot from "./foundation/Root";
|
|
9
9
|
import TableRow from "./foundation/Row";
|
|
10
|
+
import { Slot } from "../../slot/markup";
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Table Preset; 기본 Container 조합 컴포넌트
|
|
@@ -45,6 +46,8 @@ const TableContainer = forwardRef<HTMLTableElement, TableContainerProps>(
|
|
|
45
46
|
isCustomBody = false,
|
|
46
47
|
scrollable = false,
|
|
47
48
|
scrollAxis = "x",
|
|
49
|
+
scrollAs = "div",
|
|
50
|
+
scrollProps,
|
|
48
51
|
scrollClassName,
|
|
49
52
|
footer,
|
|
50
53
|
children,
|
|
@@ -153,14 +156,16 @@ const TableContainer = forwardRef<HTMLTableElement, TableContainerProps>(
|
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
return (
|
|
156
|
-
<
|
|
159
|
+
<Slot.Base
|
|
160
|
+
as={scrollAs}
|
|
157
161
|
className={clsx("table-scroll-wrapper", scrollClassName)}
|
|
158
162
|
data-layout={tableProps?.layout ?? "line"}
|
|
159
163
|
data-role={tableProps?.role ?? "table"}
|
|
160
164
|
data-scroll-axis={scrollAxis}
|
|
165
|
+
{...scrollProps}
|
|
161
166
|
>
|
|
162
167
|
{tableNode}
|
|
163
|
-
</
|
|
168
|
+
</Slot.Base>
|
|
164
169
|
);
|
|
165
170
|
},
|
|
166
171
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef } from "react";
|
|
2
|
-
import type { SlotTextProps } from "../../slot";
|
|
1
|
+
import type { ComponentPropsWithoutRef, ElementType } from "react";
|
|
2
|
+
import type { SlotComponentProps, SlotTextProps } from "../../slot";
|
|
3
3
|
|
|
4
4
|
export const TABLE_CELL_ALIGN_OPTIONS = ["left", "center", "right"] as const;
|
|
5
5
|
export const TABLE_CELL_ALIGN_Y_OPTIONS = ["top", "center", "bottom"] as const;
|
|
@@ -154,6 +154,8 @@ export interface TableColumnData<
|
|
|
154
154
|
* @property {boolean} [isCustomBody] true면 body wrapper 없이 children을 직접 렌더링
|
|
155
155
|
* @property {boolean} [scrollable=false] true면 외부 스크롤 래퍼를 추가한다.
|
|
156
156
|
* @property {"x" | "y" | "both"} [scrollAxis="x"] scrollable일 때 스크롤 축
|
|
157
|
+
* @property {ElementType} [scrollAs="div"] scrollable wrapper element
|
|
158
|
+
* @property {Omit<SlotComponentProps<ElementType>, "as" | "children" | "className">} [scrollProps] scrollable wrapper native props
|
|
157
159
|
* @property {string} [scrollClassName] 스크롤 래퍼 className
|
|
158
160
|
* @property {React.ReactNode} [footer] footer 노드
|
|
159
161
|
* @property {React.ReactNode} [children] body 콘텐츠
|
|
@@ -177,6 +179,17 @@ export interface TableContainerProps<
|
|
|
177
179
|
* scrollable일 때 스크롤 축
|
|
178
180
|
*/
|
|
179
181
|
scrollAxis?: TableScrollAxis;
|
|
182
|
+
/**
|
|
183
|
+
* scrollable wrapper element
|
|
184
|
+
*/
|
|
185
|
+
scrollAs?: ElementType;
|
|
186
|
+
/**
|
|
187
|
+
* scrollable wrapper native props
|
|
188
|
+
*/
|
|
189
|
+
scrollProps?: Omit<
|
|
190
|
+
SlotComponentProps<ElementType>,
|
|
191
|
+
"as" | "children" | "className"
|
|
192
|
+
>;
|
|
180
193
|
/**
|
|
181
194
|
* 스크롤 래퍼 className
|
|
182
195
|
*/
|