@uniai-fe/uds-primitives 0.4.1 → 0.4.2

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.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "UNIAI Design System; Primitives Components Package",
5
5
  "type": "module",
6
6
  "private": false,
@@ -103,7 +103,7 @@
103
103
  "@uniai-fe/util-functions": "workspace:*",
104
104
  "eslint": "^9.39.2",
105
105
  "prettier": "^3.8.1",
106
- "react-hook-form": "^7.71.2",
106
+ "react-hook-form": "^7.72.0",
107
107
  "sass": "^1.98.0",
108
108
  "typescript": "~5.9.3"
109
109
  }
@@ -19,6 +19,7 @@ import { Slot } from "../../../slot";
19
19
  export default function FormFieldHeader({
20
20
  className,
21
21
  label,
22
+ labelJsx,
22
23
  labelAs: LabelTag = "h5",
23
24
  labelId,
24
25
  labelProps = {},
@@ -26,12 +27,15 @@ export default function FormFieldHeader({
26
27
  children,
27
28
  ...headerAttrs
28
29
  }: FormFieldHeaderProps) {
30
+ const resolvedLabel =
31
+ labelJsx ?? (label ? <Slot.Text>{label}</Slot.Text> : null);
32
+
29
33
  return (
30
34
  <header className={clsx("form-field-header", className)} {...headerAttrs}>
31
- {label && (
35
+ {resolvedLabel && (
32
36
  <LabelTag className="form-field-label" {...labelProps} id={labelId}>
33
- {/* 변경: label 텍스트 래핑 규칙을 Slot.Text로 통일한다. */}
34
- <Slot.Text>{label}</Slot.Text>
37
+ {/* JSX 라벨은 그대로 렌더하고, 문자열/숫자만 Slot.Text로 감싼다. */}
38
+ {resolvedLabel}
35
39
  {required && <span className="form-field-required">*</span>}
36
40
  </LabelTag>
37
41
  )}