@uniai-fe/uds-primitives 0.3.52 → 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: var(--input-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/uds-primitives",
3
- "version": "0.3.52",
3
+ "version": "0.3.54",
4
4
  "description": "UNIAI Design System; Primitives Components Package",
5
5
  "type": "module",
6
6
  "private": false,
@@ -56,12 +56,16 @@ const SelectTriggerSelected = ({
56
56
 
57
57
  // 2) placeholder/label은 text input에 들어갈 수 있는 문자열로 정규화한다.
58
58
  const resolvedPlaceholder = toInputText(placeholder);
59
- const resolvedLabelText = valueText || toInputText(label);
59
+ // 변경 설명: readOnly + customOptions 조합에서 valueText 비어도 inputProps.value를 표시 문자열로 사용한다.
60
+ const resolvedInputValueText = toInputText(inputProps?.value as ReactNode);
61
+ const resolvedLabelText =
62
+ valueText || resolvedInputValueText || toInputText(label);
60
63
  const isLabelTextLike =
61
64
  typeof label === "string" || typeof label === "number";
62
65
  // 변경 설명: readOnly에서 non-text label을 직접 렌더링하되, placeholder 상태일 때는 input placeholder 경로를 유지한다.
66
+ // custom mode처럼 valueText가 있는 경우에는 input 렌더 경로를 유지해 값 표시를 보장한다.
63
67
  const shouldRenderReadonlyLabelNode =
64
- readOnly && !isLabelTextLike && !isPlaceholder;
68
+ readOnly && !isLabelTextLike && !isPlaceholder && !resolvedLabelText;
65
69
 
66
70
  // 3) custom mode 활성 시에만 label input focus를 부여한다.
67
71
  useEffect(() => {
@@ -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: var(--input-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
- <div
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
- </div>
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
  */