@uniai-fe/uds-primitives 0.7.1 → 0.7.4

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/LICENSE ADDED
@@ -0,0 +1,27 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 UNIAI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ This project includes third-party software governed by additional licenses,
26
+ including Apache License 2.0. Refer to `THIRD_PARTY_NOTICES.md` for the full
27
+ text of those notices and any required attributions.
@@ -0,0 +1,25 @@
1
+ # Third Party Notices
2
+
3
+ Package: @uniai-fe/uds-primitives
4
+
5
+ This package declares the following direct third-party dependencies or peer dependencies.
6
+ Internal `@uniai-fe/*` packages are excluded from this notice file.
7
+
8
+ | Package | Relationship | Declared version | Installed metadata version | License |
9
+ | ------------------------------- | -------------------------- | ------------------ | -------------------------- | ------- |
10
+ | @mantine/core | peerDependency | ^8 | 8.3.18 | MIT |
11
+ | @mantine/dates | peerDependency | ^8 | 8.3.18 | MIT |
12
+ | @mantine/hooks | peerDependency | ^8 | 8.3.18 | MIT |
13
+ | @radix-ui/react-checkbox | dependency, peerDependency | ^1.3.3 | 1.3.4 | MIT |
14
+ | @radix-ui/react-dropdown-menu | dependency, peerDependency | ^2.1.16 | 2.1.17 | MIT |
15
+ | @radix-ui/react-popover | dependency, peerDependency | ^1.1.15 | 1.1.16 | MIT |
16
+ | @radix-ui/react-radio-group | dependency, peerDependency | ^1.3.8 | 1.4.0 | MIT |
17
+ | @radix-ui/react-tabs | dependency, peerDependency | ^1.1.13 | 1.1.14 | MIT |
18
+ | @radix-ui/react-tooltip | dependency, peerDependency | ^1.2.8 | 1.2.9 | MIT |
19
+ | @radix-ui/react-visually-hidden | dependency, peerDependency | ^1.2.4 | 1.2.5 | MIT |
20
+ | clsx | dependency, peerDependency | ^2.1.1 | 2.1.1 | MIT |
21
+ | dayjs | dependency, peerDependency | ^1.11.21, ^1.11.20 | 1.11.21 | MIT |
22
+ | react | peerDependency | ^19 | 19.2.7 | MIT |
23
+ | react-daum-postcode | dependency, peerDependency | ^4.0.0 | 4.0.0 | MIT |
24
+ | react-dom | peerDependency | ^19 | 19.2.7 | MIT |
25
+ | react-hook-form | peerDependency | ^7 | 7.78.0 | MIT |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/uds-primitives",
3
- "version": "0.7.1",
3
+ "version": "0.7.4",
4
4
  "description": "UNIAI Design System; Primitives Components Package",
5
5
  "type": "module",
6
6
  "private": false,
@@ -29,7 +29,8 @@
29
29
  "files": [
30
30
  "src",
31
31
  "dist",
32
- "styles.scss"
32
+ "styles.scss",
33
+ "THIRD_PARTY_NOTICES.md"
33
34
  ],
34
35
  "main": "./src/index.tsx",
35
36
  "module": "./src/index.tsx",
@@ -8,6 +8,7 @@ import { InfoBoxIcon } from "./Icon";
8
8
  * @component
9
9
  * @param {InfoBoxProps} props
10
10
  * @param {"info" | "caution" | "success" | "error"} [props.state="info"] 안내/상태 메시지 시각 축이다.
11
+ * @param {React.ReactNode} [props.icon] 상태 기본 아이콘을 대체할 서비스 주입 아이콘 콘텐츠.
11
12
  * @param {React.ReactNode} [props.heading] 상단 제목 영역.
12
13
  * @param {React.ReactNode} [props.children] 본문 콘텐츠.
13
14
  * @param {string} [props.className] 루트 section className.
@@ -16,9 +17,19 @@ import { InfoBoxIcon } from "./Icon";
16
17
  */
17
18
  const InfoBox = forwardRef<HTMLElementTagNameMap["section"], InfoBoxProps>(
18
19
  (
19
- { state = "info", heading, children, className, role, ...restProps },
20
+ { state = "info", icon, heading, children, className, role, ...restProps },
20
21
  ref,
21
22
  ) => {
23
+ const renderedIcon =
24
+ icon === undefined
25
+ ? createElement(
26
+ // 변경: InfoBoxState(success/error)를 아이콘 키(check/ban)와 명시적으로 매핑한다.
27
+ InfoBoxIcon[
28
+ state === "success" ? "check" : state === "error" ? "ban" : state
29
+ ],
30
+ )
31
+ : icon;
32
+
22
33
  return (
23
34
  <section
24
35
  {...restProps}
@@ -28,15 +39,11 @@ const InfoBox = forwardRef<HTMLElementTagNameMap["section"], InfoBoxProps>(
28
39
  // 변경: 기본 role은 인라인으로 note를 적용한다.
29
40
  role={role ?? "note"}
30
41
  >
31
- {/* 변경: 아이콘은 figure 래퍼 내부에서 상태별 Icon.tsx 맵으로 렌더링한다. */}
32
- <figure className="info-box-icon" aria-hidden="true">
33
- {createElement(
34
- // 변경: InfoBoxState(success/error)를 아이콘 키(check/ban)와 명시적으로 매핑한다.
35
- InfoBoxIcon[
36
- state === "success" ? "check" : state === "error" ? "ban" : state
37
- ],
38
- )}
39
- </figure>
42
+ {renderedIcon != null && typeof renderedIcon !== "boolean" ? (
43
+ <figure className="info-box-icon" aria-hidden="true">
44
+ {renderedIcon}
45
+ </figure>
46
+ ) : null}
40
47
  <div className="info-box-content">
41
48
  {heading ? (
42
49
  ["string", "number"].includes(typeof heading) ? (
@@ -8,6 +8,7 @@ type NativeSectionProps = Omit<ComponentPropsWithoutRef<"section">, "title">;
8
8
  /**
9
9
  * InfoBox Props; info-box 루트 속성
10
10
  * @property {"info" | "caution" | "success" | "error"} [state] info/caution/success/error 상태 축이다.
11
+ * @property {ReactNode} [icon] 상태 기본 아이콘을 대체할 서비스 주입 아이콘 콘텐츠
11
12
  * @property {ReactNode} [heading] 상단 제목 콘텐츠
12
13
  * @property {ReactNode} [children] 본문 콘텐츠
13
14
  * @property {string} [className] 루트 section className
@@ -19,6 +20,10 @@ export interface InfoBoxProps extends Omit<NativeSectionProps, "children"> {
19
20
  * - info, caution, success, error
20
21
  */
21
22
  state?: InfoBoxState;
23
+ /**
24
+ * 상태 기본 아이콘을 대체할 서비스 주입 아이콘 콘텐츠
25
+ */
26
+ icon?: ReactNode;
22
27
  /**
23
28
  * 상단 제목 콘텐츠
24
29
  */