@x-plat/design-system 0.9.0 → 0.10.0

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.
Files changed (103) hide show
  1. package/dist/components/AutoResizeTextArea/index.d.cts +1 -0
  2. package/dist/components/AutoResizeTextArea/index.d.ts +1 -0
  3. package/dist/components/Badge/index.cjs +5 -1
  4. package/dist/components/Badge/index.css +1 -0
  5. package/dist/components/Badge/index.d.cts +1 -0
  6. package/dist/components/Badge/index.d.ts +1 -0
  7. package/dist/components/Badge/index.js +5 -1
  8. package/dist/components/Box/index.d.cts +3 -0
  9. package/dist/components/Box/index.d.ts +3 -0
  10. package/dist/components/Chart/index.cjs +7 -6
  11. package/dist/components/Chart/index.d.cts +12 -1
  12. package/dist/components/Chart/index.d.ts +12 -1
  13. package/dist/components/Chart/index.js +7 -6
  14. package/dist/components/ChatInput/index.d.cts +6 -0
  15. package/dist/components/ChatInput/index.d.ts +6 -0
  16. package/dist/components/CheckBox/index.cjs +6 -2
  17. package/dist/components/CheckBox/index.css +2 -0
  18. package/dist/components/CheckBox/index.d.cts +10 -2
  19. package/dist/components/CheckBox/index.d.ts +10 -2
  20. package/dist/components/CheckBox/index.js +6 -2
  21. package/dist/components/Chip/index.d.cts +2 -0
  22. package/dist/components/Chip/index.d.ts +2 -0
  23. package/dist/components/DatePicker/index.cjs +4 -3
  24. package/dist/components/DatePicker/index.js +4 -3
  25. package/dist/components/Drawer/index.d.cts +1 -0
  26. package/dist/components/Drawer/index.d.ts +1 -0
  27. package/dist/components/FileUpload/index.d.cts +6 -0
  28. package/dist/components/FileUpload/index.d.ts +6 -0
  29. package/dist/components/ImageSelector/index.d.cts +3 -0
  30. package/dist/components/ImageSelector/index.d.ts +3 -0
  31. package/dist/components/Input/index.d.cts +4 -0
  32. package/dist/components/Input/index.d.ts +4 -0
  33. package/dist/components/NotificationBadge/index.cjs +5 -1
  34. package/dist/components/NotificationBadge/index.css +1 -0
  35. package/dist/components/NotificationBadge/index.d.cts +6 -2
  36. package/dist/components/NotificationBadge/index.d.ts +6 -2
  37. package/dist/components/NotificationBadge/index.js +5 -1
  38. package/dist/components/Pagination/index.cjs +6 -2
  39. package/dist/components/Pagination/index.css +1 -0
  40. package/dist/components/Pagination/index.d.cts +13 -2
  41. package/dist/components/Pagination/index.d.ts +13 -2
  42. package/dist/components/Pagination/index.js +6 -2
  43. package/dist/components/Progress/index.cjs +6 -2
  44. package/dist/components/Progress/index.css +1 -0
  45. package/dist/components/Progress/index.d.cts +11 -2
  46. package/dist/components/Progress/index.d.ts +11 -2
  47. package/dist/components/Progress/index.js +6 -2
  48. package/dist/components/Radio/index.cjs +6 -2
  49. package/dist/components/Radio/index.css +2 -0
  50. package/dist/components/Radio/index.d.cts +11 -2
  51. package/dist/components/Radio/index.d.ts +11 -2
  52. package/dist/components/Radio/index.js +6 -2
  53. package/dist/components/Select/index.d.cts +5 -1
  54. package/dist/components/Select/index.d.ts +5 -1
  55. package/dist/components/Skeleton/index.d.cts +3 -0
  56. package/dist/components/Skeleton/index.d.ts +3 -0
  57. package/dist/components/Spinner/index.cjs +6 -2
  58. package/dist/components/Spinner/index.css +1 -0
  59. package/dist/components/Spinner/index.d.cts +8 -2
  60. package/dist/components/Spinner/index.d.ts +8 -2
  61. package/dist/components/Spinner/index.js +6 -2
  62. package/dist/components/Steps/index.cjs +6 -2
  63. package/dist/components/Steps/index.css +11 -0
  64. package/dist/components/Steps/index.d.cts +9 -2
  65. package/dist/components/Steps/index.d.ts +9 -2
  66. package/dist/components/Steps/index.js +6 -2
  67. package/dist/components/Switch/index.cjs +6 -2
  68. package/dist/components/Switch/index.css +2 -0
  69. package/dist/components/Switch/index.d.cts +10 -2
  70. package/dist/components/Switch/index.d.ts +10 -2
  71. package/dist/components/Switch/index.js +6 -2
  72. package/dist/components/Tab/index.cjs +4 -3
  73. package/dist/components/Tab/index.d.cts +12 -1
  74. package/dist/components/Tab/index.d.ts +12 -1
  75. package/dist/components/Tab/index.js +4 -3
  76. package/dist/components/Tag/index.cjs +5 -3
  77. package/dist/components/Tag/index.d.cts +12 -2
  78. package/dist/components/Tag/index.d.ts +12 -2
  79. package/dist/components/Tag/index.js +5 -3
  80. package/dist/components/TextArea/index.d.cts +3 -0
  81. package/dist/components/TextArea/index.d.ts +3 -0
  82. package/dist/components/Tooltip/index.cjs +4 -2
  83. package/dist/components/Tooltip/index.d.cts +11 -1
  84. package/dist/components/Tooltip/index.d.ts +11 -1
  85. package/dist/components/Tooltip/index.js +4 -2
  86. package/dist/components/index.cjs +46 -29
  87. package/dist/components/index.css +21 -0
  88. package/dist/components/index.d.cts +1 -0
  89. package/dist/components/index.d.ts +1 -0
  90. package/dist/components/index.js +46 -29
  91. package/dist/index.cjs +46 -29
  92. package/dist/index.css +21 -0
  93. package/dist/index.d.cts +1 -0
  94. package/dist/index.d.ts +1 -0
  95. package/dist/index.js +46 -29
  96. package/dist/status-g_KP3qT6.d.cts +8 -0
  97. package/dist/status-g_KP3qT6.d.ts +8 -0
  98. package/guidelines/AGENT_PROMPT.md +15 -0
  99. package/guidelines/components/card.md +3 -3
  100. package/guidelines/components/feedback.md +1 -1
  101. package/guidelines/components/navigation.md +16 -15
  102. package/guidelines/components/overlay.md +43 -4
  103. package/package.json +1 -1
@@ -25,6 +25,9 @@ __export(NotificationBadge_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(NotificationBadge_exports);
27
27
 
28
+ // src/tokens/interface/status.ts
29
+ var normalizeStatus = (value) => value === "brand" ? "primary" : value;
30
+
28
31
  // ../../node_modules/clsx/dist/clsx.mjs
29
32
  function r(e) {
30
33
  var t, f, n = "";
@@ -52,11 +55,12 @@ var NotificationBadge = (props) => {
52
55
  dot = false,
53
56
  size = "md"
54
57
  } = props;
58
+ const statusType = normalizeStatus(type);
55
59
  const showBadge = dot || count !== void 0 && count > 0;
56
60
  const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
57
61
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
58
62
  children,
59
- showBadge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
63
+ showBadge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: clsx_default("badge-indicator", statusType, { dot }), children: !dot && displayCount })
60
64
  ] });
61
65
  };
62
66
  NotificationBadge.displayName = "NotificationBadge";
@@ -70,6 +70,7 @@
70
70
  .lib-xplat-notification-badge .badge-indicator.info {
71
71
  background-color: var(--semantic-surface-info-default);
72
72
  }
73
+ .lib-xplat-notification-badge .badge-indicator.primary,
73
74
  .lib-xplat-notification-badge .badge-indicator.brand {
74
75
  background-color: var(--semantic-surface-brand-default);
75
76
  }
@@ -1,7 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React from 'react';
3
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.cjs';
3
4
 
4
- type NotificationBadgeType = "error" | "success" | "warning" | "info" | "brand";
5
+ /** NotificationBadge 의 상태 색 */
6
+ type NotificationBadgeType = "primary" | "success" | "error" | "warning" | "info";
7
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
8
+ type NotificationBadgeTypeInput = NotificationBadgeType | LegacyStatusType;
5
9
  type NotificationBadgeSize = "sm" | "md" | "lg";
6
10
  /**
7
11
  * 알림 뱃지 — 다른 요소의 **우상단 모서리에 얹히는** 작은 원.
@@ -33,7 +37,7 @@ interface NotificationBadgeProps {
33
37
  /** 개수 대신 점만 표시한다. `count` 없이 "새 항목 있음" 만 알릴 때 쓴다 */
34
38
  dot?: boolean;
35
39
  /** 뱃지 색. 뱃지가 렌더될 때만 의미가 있다 */
36
- type?: NotificationBadgeType;
40
+ type?: NotificationBadgeTypeInput;
37
41
  /** `count` 가 이 값을 넘으면 `99+` 처럼 표시한다 */
38
42
  maxCount?: number;
39
43
  /** 뱃지 크기. 대상의 크기가 아니다 */
@@ -1,7 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React from 'react';
3
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.js';
3
4
 
4
- type NotificationBadgeType = "error" | "success" | "warning" | "info" | "brand";
5
+ /** NotificationBadge 의 상태 색 */
6
+ type NotificationBadgeType = "primary" | "success" | "error" | "warning" | "info";
7
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
8
+ type NotificationBadgeTypeInput = NotificationBadgeType | LegacyStatusType;
5
9
  type NotificationBadgeSize = "sm" | "md" | "lg";
6
10
  /**
7
11
  * 알림 뱃지 — 다른 요소의 **우상단 모서리에 얹히는** 작은 원.
@@ -33,7 +37,7 @@ interface NotificationBadgeProps {
33
37
  /** 개수 대신 점만 표시한다. `count` 없이 "새 항목 있음" 만 알릴 때 쓴다 */
34
38
  dot?: boolean;
35
39
  /** 뱃지 색. 뱃지가 렌더될 때만 의미가 있다 */
36
- type?: NotificationBadgeType;
40
+ type?: NotificationBadgeTypeInput;
37
41
  /** `count` 가 이 값을 넘으면 `99+` 처럼 표시한다 */
38
42
  maxCount?: number;
39
43
  /** 뱃지 크기. 대상의 크기가 아니다 */
@@ -1,3 +1,6 @@
1
+ // src/tokens/interface/status.ts
2
+ var normalizeStatus = (value) => value === "brand" ? "primary" : value;
3
+
1
4
  // ../../node_modules/clsx/dist/clsx.mjs
2
5
  function r(e) {
3
6
  var t, f, n = "";
@@ -25,11 +28,12 @@ var NotificationBadge = (props) => {
25
28
  dot = false,
26
29
  size = "md"
27
30
  } = props;
31
+ const statusType = normalizeStatus(type);
28
32
  const showBadge = dot || count !== void 0 && count > 0;
29
33
  const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
30
34
  return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
31
35
  children,
32
- showBadge && /* @__PURE__ */ jsx("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
36
+ showBadge && /* @__PURE__ */ jsx("span", { className: clsx_default("badge-indicator", statusType, { dot }), children: !dot && displayCount })
33
37
  ] });
34
38
  };
35
39
  NotificationBadge.displayName = "NotificationBadge";
@@ -24,6 +24,9 @@ __export(Pagination_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(Pagination_exports);
26
26
 
27
+ // src/tokens/interface/status.ts
28
+ var normalizeStatus = (value) => value === "brand" ? "primary" : value;
29
+
27
30
  // src/tokens/svg/action/CopyIcon.tsx
28
31
  var import_jsx_runtime = require("react/jsx-runtime");
29
32
 
@@ -981,8 +984,9 @@ var Pagination = (props) => {
981
984
  siblingCount = 1,
982
985
  onChange,
983
986
  size = "md",
984
- type = "brand"
987
+ type = "primary"
985
988
  } = props;
989
+ const statusType = normalizeStatus(type);
986
990
  const totalPages = Math.max(1, Math.ceil(total / pageSize));
987
991
  const pages = getPageRange(current, totalPages, siblingCount);
988
992
  const handleClick = (page) => {
@@ -990,7 +994,7 @@ var Pagination = (props) => {
990
994
  onChange?.(page);
991
995
  }
992
996
  };
993
- return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
997
+ return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("nav", { className: clsx_default("lib-xplat-pagination", size, statusType), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
994
998
  /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
995
999
  "button",
996
1000
  {
@@ -93,6 +93,7 @@
93
93
  .lib-xplat-pagination .page-btn svg {
94
94
  font-size: var(--semantic-typo-label-2-m-size);
95
95
  }
96
+ .lib-xplat-pagination.primary .page-btn.active,
96
97
  .lib-xplat-pagination.brand .page-btn.active {
97
98
  background-color: var(--semantic-surface-brand-default);
98
99
  }
@@ -1,15 +1,26 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.cjs';
2
3
 
3
4
  type PaginationSize = "sm" | "md" | "lg";
4
- type PaginationType = "brand" | "success" | "error" | "warning" | "info";
5
+ /** Pagination 의 상태 색 */
6
+ type PaginationType = "primary" | "success" | "error" | "warning" | "info";
7
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
8
+ type PaginationTypeInput = PaginationType | LegacyStatusType;
5
9
  interface PaginationProps {
10
+ /** 현재 페이지 (1부터 시작) */
6
11
  current: number;
12
+ /** **전체 아이템 수**. 페이지 수가 아니다 */
7
13
  total: number;
14
+ /** 한 페이지에 담기는 아이템 수. total 과 함께 페이지 수를 계산한다 */
8
15
  pageSize?: number;
16
+ /** 현재 페이지 좌우로 보여줄 번호 개수 */
9
17
  siblingCount?: number;
18
+ /** 페이지를 누르면 새 페이지 번호를 준다 */
10
19
  onChange?: (page: number) => void;
20
+ /** 버튼 크기 */
11
21
  size?: PaginationSize;
12
- type?: PaginationType;
22
+ /** 활성 페이지 색 */
23
+ type?: PaginationTypeInput;
13
24
  }
14
25
  declare const Pagination: {
15
26
  (props: PaginationProps): react_jsx_runtime.JSX.Element;
@@ -1,15 +1,26 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.js';
2
3
 
3
4
  type PaginationSize = "sm" | "md" | "lg";
4
- type PaginationType = "brand" | "success" | "error" | "warning" | "info";
5
+ /** Pagination 의 상태 색 */
6
+ type PaginationType = "primary" | "success" | "error" | "warning" | "info";
7
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
8
+ type PaginationTypeInput = PaginationType | LegacyStatusType;
5
9
  interface PaginationProps {
10
+ /** 현재 페이지 (1부터 시작) */
6
11
  current: number;
12
+ /** **전체 아이템 수**. 페이지 수가 아니다 */
7
13
  total: number;
14
+ /** 한 페이지에 담기는 아이템 수. total 과 함께 페이지 수를 계산한다 */
8
15
  pageSize?: number;
16
+ /** 현재 페이지 좌우로 보여줄 번호 개수 */
9
17
  siblingCount?: number;
18
+ /** 페이지를 누르면 새 페이지 번호를 준다 */
10
19
  onChange?: (page: number) => void;
20
+ /** 버튼 크기 */
11
21
  size?: PaginationSize;
12
- type?: PaginationType;
22
+ /** 활성 페이지 색 */
23
+ type?: PaginationTypeInput;
13
24
  }
14
25
  declare const Pagination: {
15
26
  (props: PaginationProps): react_jsx_runtime.JSX.Element;
@@ -1,3 +1,6 @@
1
+ // src/tokens/interface/status.ts
2
+ var normalizeStatus = (value) => value === "brand" ? "primary" : value;
3
+
1
4
  // src/tokens/svg/action/CopyIcon.tsx
2
5
  import { jsx, jsxs } from "react/jsx-runtime";
3
6
 
@@ -955,8 +958,9 @@ var Pagination = (props) => {
955
958
  siblingCount = 1,
956
959
  onChange,
957
960
  size = "md",
958
- type = "brand"
961
+ type = "primary"
959
962
  } = props;
963
+ const statusType = normalizeStatus(type);
960
964
  const totalPages = Math.max(1, Math.ceil(total / pageSize));
961
965
  const pages = getPageRange(current, totalPages, siblingCount);
962
966
  const handleClick = (page) => {
@@ -964,7 +968,7 @@ var Pagination = (props) => {
964
968
  onChange?.(page);
965
969
  }
966
970
  };
967
- return /* @__PURE__ */ jsxs189("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
971
+ return /* @__PURE__ */ jsxs189("nav", { className: clsx_default("lib-xplat-pagination", size, statusType), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
968
972
  /* @__PURE__ */ jsx295(
969
973
  "button",
970
974
  {
@@ -24,6 +24,9 @@ __export(Progress_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(Progress_exports);
26
26
 
27
+ // src/tokens/interface/status.ts
28
+ var normalizeStatus = (value) => value === "brand" ? "primary" : value;
29
+
27
30
  // ../../node_modules/clsx/dist/clsx.mjs
28
31
  function r(e) {
29
32
  var t, f, n = "";
@@ -47,11 +50,12 @@ var Progress = (props) => {
47
50
  value,
48
51
  max = 100,
49
52
  size = "md",
50
- type = "brand",
53
+ type = "primary",
51
54
  showLabel = false
52
55
  } = props;
56
+ const statusType = normalizeStatus(type);
53
57
  const percentage = Math.min(100, Math.max(0, value / max * 100));
54
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, statusType), children: [
55
59
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
60
  "div",
57
61
  {
@@ -25,6 +25,7 @@
25
25
  border-radius: var(--spacing-radius-full);
26
26
  transition: width 0.3s ease;
27
27
  }
28
+ .lib-xplat-progress.primary .bar,
28
29
  .lib-xplat-progress.brand .bar {
29
30
  background-color: var(--semantic-surface-brand-default);
30
31
  }
@@ -1,12 +1,21 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.cjs';
2
3
 
3
4
  type ProgressSize = "sm" | "md" | "lg";
4
- type ProgressType = "brand" | "success" | "error" | "warning" | "info";
5
+ /** Progress 의 상태 색 */
6
+ type ProgressType = "primary" | "success" | "error" | "warning" | "info";
7
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
8
+ type ProgressTypeInput = ProgressType | LegacyStatusType;
5
9
  interface ProgressProps {
10
+ /** 현재 값. max 에 대한 비율로 채워진다 */
6
11
  value: number;
12
+ /** 최대값. 기본 100 */
7
13
  max?: number;
14
+ /** 막대 두께 */
8
15
  size?: ProgressSize;
9
- type?: ProgressType;
16
+ /** 막대 색 */
17
+ type?: ProgressTypeInput;
18
+ /** 오른쪽에 퍼센트 글자를 표시한다 */
10
19
  showLabel?: boolean;
11
20
  }
12
21
  declare const Progress: {
@@ -1,12 +1,21 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.js';
2
3
 
3
4
  type ProgressSize = "sm" | "md" | "lg";
4
- type ProgressType = "brand" | "success" | "error" | "warning" | "info";
5
+ /** Progress 의 상태 색 */
6
+ type ProgressType = "primary" | "success" | "error" | "warning" | "info";
7
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
8
+ type ProgressTypeInput = ProgressType | LegacyStatusType;
5
9
  interface ProgressProps {
10
+ /** 현재 값. max 에 대한 비율로 채워진다 */
6
11
  value: number;
12
+ /** 최대값. 기본 100 */
7
13
  max?: number;
14
+ /** 막대 두께 */
8
15
  size?: ProgressSize;
9
- type?: ProgressType;
16
+ /** 막대 색 */
17
+ type?: ProgressTypeInput;
18
+ /** 오른쪽에 퍼센트 글자를 표시한다 */
10
19
  showLabel?: boolean;
11
20
  }
12
21
  declare const Progress: {
@@ -1,3 +1,6 @@
1
+ // src/tokens/interface/status.ts
2
+ var normalizeStatus = (value) => value === "brand" ? "primary" : value;
3
+
1
4
  // ../../node_modules/clsx/dist/clsx.mjs
2
5
  function r(e) {
3
6
  var t, f, n = "";
@@ -21,11 +24,12 @@ var Progress = (props) => {
21
24
  value,
22
25
  max = 100,
23
26
  size = "md",
24
- type = "brand",
27
+ type = "primary",
25
28
  showLabel = false
26
29
  } = props;
30
+ const statusType = normalizeStatus(type);
27
31
  const percentage = Math.min(100, Math.max(0, value / max * 100));
28
- return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
32
+ return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-progress", size, statusType), children: [
29
33
  /* @__PURE__ */ jsx(
30
34
  "div",
31
35
  {
@@ -35,6 +35,9 @@ __export(Radio_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(Radio_exports);
37
37
 
38
+ // src/tokens/interface/status.ts
39
+ var normalizeStatus = (value) => value === "brand" ? "primary" : value;
40
+
38
41
  // ../../node_modules/clsx/dist/clsx.mjs
39
42
  function r(e) {
40
43
  var t, f, n = "";
@@ -202,10 +205,11 @@ var Radio = (props) => {
202
205
  className,
203
206
  value,
204
207
  size: sizeProp,
205
- type = "brand",
208
+ type = "primary",
206
209
  validations,
207
210
  ...rest
208
211
  } = props;
212
+ const statusType = normalizeStatus(type);
209
213
  const context = useRadioGroupContext();
210
214
  const size = sizeProp ?? context?.size ?? "md";
211
215
  const isGroup = !!context;
@@ -221,7 +225,7 @@ var Radio = (props) => {
221
225
  className: clsx_default(
222
226
  "lib-xplat-radio",
223
227
  size,
224
- type,
228
+ statusType,
225
229
  localChecked ? "checked" : void 0,
226
230
  className
227
231
  ),
@@ -112,6 +112,7 @@
112
112
  border-color: var(--semantic-icon-primary);
113
113
  background-color: var(--semantic-surface-neutral-secondary);
114
114
  }
115
+ .lib-xplat-radio.primary > .circle.checked,
115
116
  .lib-xplat-radio.brand > .circle.checked {
116
117
  background-color: var(--semantic-surface-brand-default);
117
118
  border-color: var(--semantic-surface-brand-default);
@@ -132,6 +133,7 @@
132
133
  background-color: var(--semantic-surface-info-default);
133
134
  border-color: var(--semantic-surface-info-default);
134
135
  }
136
+ .lib-xplat-radio:hover.primary > .circle.checked,
135
137
  .lib-xplat-radio:hover.brand > .circle.checked {
136
138
  background-color: var(--semantic-surface-brand-strong);
137
139
  border-color: var(--semantic-surface-brand-strong);
@@ -1,10 +1,14 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { I as InputAttributes } from '../../attributes-DJIWir_0.cjs';
3
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.cjs';
3
4
  import { V as Validation } from '../../validation-Dqo1zqhT.cjs';
4
5
  import React from 'react';
5
6
 
6
7
  type RadioSize = "sm" | "md" | "lg";
7
- type RadioType = "brand" | "success" | "error" | "warning" | "info";
8
+ /** Radio 의 상태 색 */
9
+ type RadioType = "primary" | "success" | "error" | "warning" | "info";
10
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
11
+ type RadioTypeInput = RadioType | LegacyStatusType;
8
12
  interface RadioProps extends Omit<InputAttributes, "size"> {
9
13
  label?: string;
10
14
  /**
@@ -14,8 +18,10 @@ interface RadioProps extends Omit<InputAttributes, "size"> {
14
18
  value: string | number;
15
19
  /** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
16
20
  validations?: Validation[];
21
+ /** 컨트롤 크기 */
17
22
  size?: RadioSize;
18
- type?: RadioType;
23
+ /** 선택됐을 때의 색 */
24
+ type?: RadioTypeInput;
19
25
  }
20
26
  /**
21
27
  * 그룹모드 check 조건 : RadioGroup value === radio value
@@ -27,9 +33,12 @@ declare const Radio: {
27
33
  };
28
34
 
29
35
  interface RadioGroupContextProps {
36
+ /** 이 항목의 값. 그룹의 선택값과 비교된다 */
30
37
  value?: string | number;
38
+ /** 같은 name 끼리 한 그룹이 된다. RadioGroup 안에서는 자동으로 채워진다 */
31
39
  name: string;
32
40
  onChange: React.ChangeEventHandler<HTMLInputElement>;
41
+ /** 컨트롤 크기 */
33
42
  size?: "sm" | "md" | "lg";
34
43
  }
35
44
 
@@ -1,10 +1,14 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { I as InputAttributes } from '../../attributes-DJIWir_0.js';
3
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.js';
3
4
  import { V as Validation } from '../../validation-Dqo1zqhT.js';
4
5
  import React from 'react';
5
6
 
6
7
  type RadioSize = "sm" | "md" | "lg";
7
- type RadioType = "brand" | "success" | "error" | "warning" | "info";
8
+ /** Radio 의 상태 색 */
9
+ type RadioType = "primary" | "success" | "error" | "warning" | "info";
10
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
11
+ type RadioTypeInput = RadioType | LegacyStatusType;
8
12
  interface RadioProps extends Omit<InputAttributes, "size"> {
9
13
  label?: string;
10
14
  /**
@@ -14,8 +18,10 @@ interface RadioProps extends Omit<InputAttributes, "size"> {
14
18
  value: string | number;
15
19
  /** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
16
20
  validations?: Validation[];
21
+ /** 컨트롤 크기 */
17
22
  size?: RadioSize;
18
- type?: RadioType;
23
+ /** 선택됐을 때의 색 */
24
+ type?: RadioTypeInput;
19
25
  }
20
26
  /**
21
27
  * 그룹모드 check 조건 : RadioGroup value === radio value
@@ -27,9 +33,12 @@ declare const Radio: {
27
33
  };
28
34
 
29
35
  interface RadioGroupContextProps {
36
+ /** 이 항목의 값. 그룹의 선택값과 비교된다 */
30
37
  value?: string | number;
38
+ /** 같은 name 끼리 한 그룹이 된다. RadioGroup 안에서는 자동으로 채워진다 */
31
39
  name: string;
32
40
  onChange: React.ChangeEventHandler<HTMLInputElement>;
41
+ /** 컨트롤 크기 */
33
42
  size?: "sm" | "md" | "lg";
34
43
  }
35
44
 
@@ -1,3 +1,6 @@
1
+ // src/tokens/interface/status.ts
2
+ var normalizeStatus = (value) => value === "brand" ? "primary" : value;
3
+
1
4
  // ../../node_modules/clsx/dist/clsx.mjs
2
5
  function r(e) {
3
6
  var t, f, n = "";
@@ -165,10 +168,11 @@ var Radio = (props) => {
165
168
  className,
166
169
  value,
167
170
  size: sizeProp,
168
- type = "brand",
171
+ type = "primary",
169
172
  validations,
170
173
  ...rest
171
174
  } = props;
175
+ const statusType = normalizeStatus(type);
172
176
  const context = useRadioGroupContext();
173
177
  const size = sizeProp ?? context?.size ?? "md";
174
178
  const isGroup = !!context;
@@ -184,7 +188,7 @@ var Radio = (props) => {
184
188
  className: clsx_default(
185
189
  "lib-xplat-radio",
186
190
  size,
187
- type,
191
+ statusType,
188
192
  localChecked ? "checked" : void 0,
189
193
  className
190
194
  ),
@@ -8,6 +8,7 @@ interface SelectItemProps {
8
8
  value?: string | number;
9
9
  /** 클릭 시 추가로 실행할 핸들러 (선택 처리 후 호출) */
10
10
  onClick?: () => void;
11
+ /** 열리지 않게 막는다 */
11
12
  disabled?: boolean;
12
13
  }
13
14
  declare const SelectItem: {
@@ -18,7 +19,9 @@ declare const SelectItem: {
18
19
  /** Select.Item 으로만 만든 엘리먼트 (다른 컴포넌트/노드 넣으면 타입 오류) */
19
20
  type SelectItemElement = React.ReactElement<SelectItemProps, typeof SelectItem>;
20
21
  /** 값 변경 시 호출 (value: 아이템 value, label: 표시 텍스트) */
21
- type SelectChangeHandler = (value: string | number | undefined, label: React.ReactNode) => void;
22
+ type SelectChangeHandler = (
23
+ /** 선택된 값. 주면 controlled 가 된다 */
24
+ value: string | number | undefined, label: React.ReactNode) => void;
22
25
  type SelectSize = "sm" | "md" | "lg";
23
26
  interface SelectProps {
24
27
  /** 선택 전 표시할 문구 */
@@ -34,6 +37,7 @@ interface SelectProps {
34
37
  /** 에러 상태 */
35
38
  /** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
36
39
  validations?: Validation[];
40
+ /** 메시지 없이 테두리만 붉게 한다. validations 와 함께 쓰면 둘 중 하나만 참이어도 적용된다 */
37
41
  error?: boolean;
38
42
  /** 사이즈 */
39
43
  size?: SelectSize;
@@ -8,6 +8,7 @@ interface SelectItemProps {
8
8
  value?: string | number;
9
9
  /** 클릭 시 추가로 실행할 핸들러 (선택 처리 후 호출) */
10
10
  onClick?: () => void;
11
+ /** 열리지 않게 막는다 */
11
12
  disabled?: boolean;
12
13
  }
13
14
  declare const SelectItem: {
@@ -18,7 +19,9 @@ declare const SelectItem: {
18
19
  /** Select.Item 으로만 만든 엘리먼트 (다른 컴포넌트/노드 넣으면 타입 오류) */
19
20
  type SelectItemElement = React.ReactElement<SelectItemProps, typeof SelectItem>;
20
21
  /** 값 변경 시 호출 (value: 아이템 value, label: 표시 텍스트) */
21
- type SelectChangeHandler = (value: string | number | undefined, label: React.ReactNode) => void;
22
+ type SelectChangeHandler = (
23
+ /** 선택된 값. 주면 controlled 가 된다 */
24
+ value: string | number | undefined, label: React.ReactNode) => void;
22
25
  type SelectSize = "sm" | "md" | "lg";
23
26
  interface SelectProps {
24
27
  /** 선택 전 표시할 문구 */
@@ -34,6 +37,7 @@ interface SelectProps {
34
37
  /** 에러 상태 */
35
38
  /** 컨트롤 아래에 표시할 검증 메시지. DS 폼 컴포넌트 공통 */
36
39
  validations?: Validation[];
40
+ /** 메시지 없이 테두리만 붉게 한다. validations 와 함께 쓰면 둘 중 하나만 참이어도 적용된다 */
37
41
  error?: boolean;
38
42
  /** 사이즈 */
39
43
  size?: SelectSize;
@@ -3,8 +3,11 @@ import React from 'react';
3
3
  type SkeletonVariant = "text" | "circular" | "rectangular";
4
4
  type SizeToken = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
5
5
  interface SkeletonProps {
6
+ /** 자리표시자 모양 */
6
7
  variant?: SkeletonVariant;
8
+ /** 가로 크기 */
7
9
  width?: SizeToken;
10
+ /** 세로 크기 */
8
11
  height?: SizeToken;
9
12
  }
10
13
  declare const Skeleton: React.FC<SkeletonProps>;
@@ -3,8 +3,11 @@ import React from 'react';
3
3
  type SkeletonVariant = "text" | "circular" | "rectangular";
4
4
  type SizeToken = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
5
5
  interface SkeletonProps {
6
+ /** 자리표시자 모양 */
6
7
  variant?: SkeletonVariant;
8
+ /** 가로 크기 */
7
9
  width?: SizeToken;
10
+ /** 세로 크기 */
8
11
  height?: SizeToken;
9
12
  }
10
13
  declare const Skeleton: React.FC<SkeletonProps>;
@@ -24,6 +24,9 @@ __export(Spinner_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(Spinner_exports);
26
26
 
27
+ // src/tokens/interface/status.ts
28
+ var normalizeStatus = (value) => value === "brand" ? "primary" : value;
29
+
27
30
  // ../../node_modules/clsx/dist/clsx.mjs
28
31
  function r(e) {
29
32
  var t, f, n = "";
@@ -45,12 +48,13 @@ var import_jsx_runtime = require("react/jsx-runtime");
45
48
  var Spinner = (props) => {
46
49
  const {
47
50
  size = "md",
48
- type = "brand"
51
+ type = "primary"
49
52
  } = props;
53
+ const statusType = normalizeStatus(type);
50
54
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
55
  "div",
52
56
  {
53
- className: clsx_default("lib-xplat-spinner", size, type),
57
+ className: clsx_default("lib-xplat-spinner", size, statusType),
54
58
  role: "status",
55
59
  "aria-label": "\uB85C\uB529 \uC911",
56
60
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
@@ -33,6 +33,7 @@
33
33
  stroke-dasharray: 42;
34
34
  stroke-dashoffset: 28;
35
35
  }
36
+ .lib-xplat-spinner.primary .indicator,
36
37
  .lib-xplat-spinner.brand .indicator {
37
38
  stroke: var(--semantic-surface-brand-default);
38
39
  }
@@ -1,10 +1,16 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.cjs';
2
3
 
3
4
  type SpinnerSize = "sm" | "md" | "lg";
4
- type SpinnerType = "brand" | "success" | "error" | "warning" | "info";
5
+ /** Spinner 의 상태 색 */
6
+ type SpinnerType = "primary" | "success" | "error" | "warning" | "info";
7
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
8
+ type SpinnerTypeInput = SpinnerType | LegacyStatusType;
5
9
  interface SpinnerProps {
10
+ /** 스피너 지름 */
6
11
  size?: SpinnerSize;
7
- type?: SpinnerType;
12
+ /** 스피너 색 */
13
+ type?: SpinnerTypeInput;
8
14
  }
9
15
  declare const Spinner: {
10
16
  (props: SpinnerProps): react_jsx_runtime.JSX.Element;
@@ -1,10 +1,16 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { L as LegacyStatusType } from '../../status-g_KP3qT6.js';
2
3
 
3
4
  type SpinnerSize = "sm" | "md" | "lg";
4
- type SpinnerType = "brand" | "success" | "error" | "warning" | "info";
5
+ /** Spinner 의 상태 색 */
6
+ type SpinnerType = "primary" | "success" | "error" | "warning" | "info";
7
+ /** 입력으로는 예전 이름 `brand` 도 받는다 (= `primary`) */
8
+ type SpinnerTypeInput = SpinnerType | LegacyStatusType;
5
9
  interface SpinnerProps {
10
+ /** 스피너 지름 */
6
11
  size?: SpinnerSize;
7
- type?: SpinnerType;
12
+ /** 스피너 색 */
13
+ type?: SpinnerTypeInput;
8
14
  }
9
15
  declare const Spinner: {
10
16
  (props: SpinnerProps): react_jsx_runtime.JSX.Element;