@x-plat/design-system 0.7.0 → 0.7.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.
Files changed (35) hide show
  1. package/dist/components/AutoResizeTextArea/index.css +1 -1
  2. package/dist/components/Badge/index.cjs +10 -7
  3. package/dist/components/Badge/index.css +13 -13
  4. package/dist/components/Badge/index.d.cts +3 -19
  5. package/dist/components/Badge/index.d.ts +3 -19
  6. package/dist/components/Badge/index.js +8 -6
  7. package/dist/components/ChatInput/index.css +2 -2
  8. package/dist/components/DatePicker/index.css +1 -1
  9. package/dist/components/Input/index.css +1 -1
  10. package/dist/components/NotificationBadge/index.cjs +68 -0
  11. package/dist/components/NotificationBadge/index.css +75 -0
  12. package/dist/components/NotificationBadge/index.d.cts +47 -0
  13. package/dist/components/NotificationBadge/index.d.ts +47 -0
  14. package/dist/components/NotificationBadge/index.js +40 -0
  15. package/dist/components/Select/index.css +4 -2
  16. package/dist/components/Table/index.cjs +2 -0
  17. package/dist/components/Table/index.d.cts +2 -0
  18. package/dist/components/Table/index.d.ts +2 -0
  19. package/dist/components/Table/index.js +2 -0
  20. package/dist/components/TextArea/index.css +1 -1
  21. package/dist/components/index.cjs +268 -264
  22. package/dist/components/index.css +84 -82
  23. package/dist/components/index.d.cts +1 -1
  24. package/dist/components/index.d.ts +1 -1
  25. package/dist/components/index.js +267 -264
  26. package/dist/index.cjs +268 -264
  27. package/dist/index.css +84 -82
  28. package/dist/index.d.cts +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +267 -264
  31. package/guidelines/AGENT_PROMPT.md +1 -1
  32. package/guidelines/Guidelines.md +1 -1
  33. package/guidelines/components/feedback.md +39 -11
  34. package/guidelines/components/table.md +68 -5
  35. package/package.json +1 -1
@@ -13,7 +13,7 @@
13
13
  overflow: hidden;
14
14
  background-color: var(--semantic-surface-neutral-primary);
15
15
  width: 100%;
16
- transition: border-color 0.15s, box-shadow 0.15s;
16
+ transition: border-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
17
17
  }
18
18
  .lib-xplat-auto-resize-textarea-wrapper .lib-xplat-auto-resize-textarea:hover:not(.disabled):not(:focus-within) {
19
19
  border-color: var(--semantic-border-tertiary);
@@ -20,7 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/components/Badge/index.ts
21
21
  var Badge_exports = {};
22
22
  __export(Badge_exports, {
23
- Badge: () => Badge_default
23
+ Badge: () => NotificationBadge_default,
24
+ NotificationBadge: () => NotificationBadge_default,
25
+ default: () => NotificationBadge_default
24
26
  });
25
27
  module.exports = __toCommonJS(Badge_exports);
26
28
 
@@ -40,9 +42,9 @@ function clsx() {
40
42
  }
41
43
  var clsx_default = clsx;
42
44
 
43
- // src/components/Badge/Badge.tsx
45
+ // src/components/NotificationBadge/NotificationBadge.tsx
44
46
  var import_jsx_runtime = require("react/jsx-runtime");
45
- var Badge = (props) => {
47
+ var NotificationBadge = (props) => {
46
48
  const {
47
49
  children,
48
50
  type = "error",
@@ -53,14 +55,15 @@ var Badge = (props) => {
53
55
  } = props;
54
56
  const showBadge = dot || count !== void 0 && count > 0;
55
57
  const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
56
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx_default("lib-xplat-badge", size), children: [
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
57
59
  children,
58
60
  showBadge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
59
61
  ] });
60
62
  };
61
- Badge.displayName = "Badge";
62
- var Badge_default = Badge;
63
+ NotificationBadge.displayName = "NotificationBadge";
64
+ var NotificationBadge_default = NotificationBadge;
63
65
  // Annotate the CommonJS export names for ESM import in node:
64
66
  0 && (module.exports = {
65
- Badge
67
+ Badge,
68
+ NotificationBadge
66
69
  });
@@ -1,9 +1,9 @@
1
- /* src/components/Badge/badge.scss */
2
- .lib-xplat-badge {
1
+ /* src/components/NotificationBadge/notificationBadge.scss */
2
+ .lib-xplat-notification-badge {
3
3
  position: relative;
4
4
  display: inline-flex;
5
5
  }
6
- .lib-xplat-badge.sm .badge-indicator {
6
+ .lib-xplat-notification-badge.sm .badge-indicator {
7
7
  min-width: var(--spacing-space-4);
8
8
  height: var(--spacing-space-4);
9
9
  font-family: var(--semantic-typo-caption-2-r-font);
@@ -13,11 +13,11 @@
13
13
  letter-spacing: var(--semantic-typo-caption-2-r-ls);
14
14
  padding: 0 var(--spacing-space-1);
15
15
  }
16
- .lib-xplat-badge.sm .badge-indicator.dot {
16
+ .lib-xplat-notification-badge.sm .badge-indicator.dot {
17
17
  min-width: var(--spacing-space-2);
18
18
  height: var(--spacing-space-2);
19
19
  }
20
- .lib-xplat-badge.lg .badge-indicator {
20
+ .lib-xplat-notification-badge.lg .badge-indicator {
21
21
  min-width: var(--spacing-space-6);
22
22
  height: var(--spacing-space-6);
23
23
  font-family: var(--semantic-typo-caption-1-r-font);
@@ -27,11 +27,11 @@
27
27
  letter-spacing: var(--semantic-typo-caption-1-r-ls);
28
28
  padding: 0 var(--spacing-space-2);
29
29
  }
30
- .lib-xplat-badge.lg .badge-indicator.dot {
30
+ .lib-xplat-notification-badge.lg .badge-indicator.dot {
31
31
  min-width: var(--spacing-space-2);
32
32
  height: var(--spacing-space-2);
33
33
  }
34
- .lib-xplat-badge .badge-indicator {
34
+ .lib-xplat-notification-badge .badge-indicator {
35
35
  position: absolute;
36
36
  top: 0;
37
37
  right: 0;
@@ -52,24 +52,24 @@
52
52
  padding: 0 var(--spacing-space-1);
53
53
  box-sizing: border-box;
54
54
  }
55
- .lib-xplat-badge .badge-indicator.dot {
55
+ .lib-xplat-notification-badge .badge-indicator.dot {
56
56
  min-width: var(--spacing-space-2);
57
57
  height: var(--spacing-space-2);
58
58
  padding: 0;
59
59
  }
60
- .lib-xplat-badge .badge-indicator.error {
60
+ .lib-xplat-notification-badge .badge-indicator.error {
61
61
  background-color: var(--semantic-surface-error-default);
62
62
  }
63
- .lib-xplat-badge .badge-indicator.success {
63
+ .lib-xplat-notification-badge .badge-indicator.success {
64
64
  background-color: var(--semantic-surface-success-default);
65
65
  }
66
- .lib-xplat-badge .badge-indicator.warning {
66
+ .lib-xplat-notification-badge .badge-indicator.warning {
67
67
  background-color: var(--semantic-surface-warning-default);
68
68
  color: var(--semantic-text-primary);
69
69
  }
70
- .lib-xplat-badge .badge-indicator.info {
70
+ .lib-xplat-notification-badge .badge-indicator.info {
71
71
  background-color: var(--semantic-surface-info-default);
72
72
  }
73
- .lib-xplat-badge .badge-indicator.brand {
73
+ .lib-xplat-notification-badge .badge-indicator.brand {
74
74
  background-color: var(--semantic-surface-brand-default);
75
75
  }
@@ -1,19 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React from 'react';
3
-
4
- type BadgeType = "error" | "success" | "warning" | "info" | "brand";
5
- type BadgeSize = "sm" | "md" | "lg";
6
- interface BadgeProps {
7
- children: React.ReactNode;
8
- type?: BadgeType;
9
- count?: number;
10
- maxCount?: number;
11
- dot?: boolean;
12
- size?: BadgeSize;
13
- }
14
- declare const Badge: {
15
- (props: BadgeProps): react_jsx_runtime.JSX.Element;
16
- displayName: string;
17
- };
18
-
19
- export { Badge };
1
+ export { NotificationBadge as Badge, NotificationBadge, NotificationBadge as default } from '../NotificationBadge/index.cjs';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -1,19 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React from 'react';
3
-
4
- type BadgeType = "error" | "success" | "warning" | "info" | "brand";
5
- type BadgeSize = "sm" | "md" | "lg";
6
- interface BadgeProps {
7
- children: React.ReactNode;
8
- type?: BadgeType;
9
- count?: number;
10
- maxCount?: number;
11
- dot?: boolean;
12
- size?: BadgeSize;
13
- }
14
- declare const Badge: {
15
- (props: BadgeProps): react_jsx_runtime.JSX.Element;
16
- displayName: string;
17
- };
18
-
19
- export { Badge };
1
+ export { NotificationBadge as Badge, NotificationBadge, NotificationBadge as default } from '../NotificationBadge/index.js';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -14,9 +14,9 @@ function clsx() {
14
14
  }
15
15
  var clsx_default = clsx;
16
16
 
17
- // src/components/Badge/Badge.tsx
17
+ // src/components/NotificationBadge/NotificationBadge.tsx
18
18
  import { jsx, jsxs } from "react/jsx-runtime";
19
- var Badge = (props) => {
19
+ var NotificationBadge = (props) => {
20
20
  const {
21
21
  children,
22
22
  type = "error",
@@ -27,13 +27,15 @@ var Badge = (props) => {
27
27
  } = props;
28
28
  const showBadge = dot || count !== void 0 && count > 0;
29
29
  const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
30
- return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-badge", size), children: [
30
+ return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
31
31
  children,
32
32
  showBadge && /* @__PURE__ */ jsx("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
33
33
  ] });
34
34
  };
35
- Badge.displayName = "Badge";
36
- var Badge_default = Badge;
35
+ NotificationBadge.displayName = "NotificationBadge";
36
+ var NotificationBadge_default = NotificationBadge;
37
37
  export {
38
- Badge_default as Badge
38
+ NotificationBadge_default as Badge,
39
+ NotificationBadge_default as NotificationBadge,
40
+ NotificationBadge_default as default
39
41
  };
@@ -91,7 +91,7 @@
91
91
  overflow: hidden;
92
92
  background-color: var(--semantic-surface-neutral-primary);
93
93
  width: 100%;
94
- transition: border-color 0.15s, box-shadow 0.15s;
94
+ transition: border-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
95
95
  }
96
96
  .lib-xplat-auto-resize-textarea-wrapper .lib-xplat-auto-resize-textarea:hover:not(.disabled):not(:focus-within) {
97
97
  border-color: var(--semantic-border-tertiary);
@@ -136,7 +136,7 @@
136
136
  border: 1px solid var(--semantic-border-primary);
137
137
  border-radius: var(--spacing-radius-lg);
138
138
  background-color: var(--semantic-surface-neutral-primary);
139
- transition: border-color 0.15s, box-shadow 0.15s;
139
+ transition: border-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
140
140
  }
141
141
  .lib-xplat-chat-input:hover:not(.disabled):not(:focus-within) {
142
142
  border-color: var(--semantic-border-tertiary);
@@ -119,7 +119,7 @@
119
119
  background-color: var(--semantic-surface-neutral-primary);
120
120
  padding-right: var(--spacing-space-2);
121
121
  width: 100%;
122
- transition: border-color 0.15s, box-shadow 0.15s;
122
+ transition: border-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
123
123
  }
124
124
  .lib-xplat-input-wrap .lib-xplat-input:hover:not(.disabled):not(:focus-within) {
125
125
  border-color: var(--semantic-border-tertiary);
@@ -13,7 +13,7 @@
13
13
  background-color: var(--semantic-surface-neutral-primary);
14
14
  padding-right: var(--spacing-space-2);
15
15
  width: 100%;
16
- transition: border-color 0.15s, box-shadow 0.15s;
16
+ transition: border-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
17
17
  }
18
18
  .lib-xplat-input-wrap .lib-xplat-input:hover:not(.disabled):not(:focus-within) {
19
19
  border-color: var(--semantic-border-tertiary);
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/NotificationBadge/index.ts
21
+ var NotificationBadge_exports = {};
22
+ __export(NotificationBadge_exports, {
23
+ Badge: () => NotificationBadge_default,
24
+ NotificationBadge: () => NotificationBadge_default
25
+ });
26
+ module.exports = __toCommonJS(NotificationBadge_exports);
27
+
28
+ // ../../node_modules/clsx/dist/clsx.mjs
29
+ function r(e) {
30
+ var t, f, n = "";
31
+ if ("string" == typeof e || "number" == typeof e) n += e;
32
+ else if ("object" == typeof e) if (Array.isArray(e)) {
33
+ var o = e.length;
34
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
35
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
36
+ return n;
37
+ }
38
+ function clsx() {
39
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
40
+ return n;
41
+ }
42
+ var clsx_default = clsx;
43
+
44
+ // src/components/NotificationBadge/NotificationBadge.tsx
45
+ var import_jsx_runtime = require("react/jsx-runtime");
46
+ var NotificationBadge = (props) => {
47
+ const {
48
+ children,
49
+ type = "error",
50
+ count,
51
+ maxCount = 99,
52
+ dot = false,
53
+ size = "md"
54
+ } = props;
55
+ const showBadge = dot || count !== void 0 && count > 0;
56
+ const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
58
+ children,
59
+ showBadge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
60
+ ] });
61
+ };
62
+ NotificationBadge.displayName = "NotificationBadge";
63
+ var NotificationBadge_default = NotificationBadge;
64
+ // Annotate the CommonJS export names for ESM import in node:
65
+ 0 && (module.exports = {
66
+ Badge,
67
+ NotificationBadge
68
+ });
@@ -0,0 +1,75 @@
1
+ /* src/components/NotificationBadge/notificationBadge.scss */
2
+ .lib-xplat-notification-badge {
3
+ position: relative;
4
+ display: inline-flex;
5
+ }
6
+ .lib-xplat-notification-badge.sm .badge-indicator {
7
+ min-width: var(--spacing-space-4);
8
+ height: var(--spacing-space-4);
9
+ font-family: var(--semantic-typo-caption-2-r-font);
10
+ font-size: var(--semantic-typo-caption-2-r-size);
11
+ line-height: var(--semantic-typo-caption-2-r-lh);
12
+ font-weight: var(--semantic-typo-caption-2-r-weight);
13
+ letter-spacing: var(--semantic-typo-caption-2-r-ls);
14
+ padding: 0 var(--spacing-space-1);
15
+ }
16
+ .lib-xplat-notification-badge.sm .badge-indicator.dot {
17
+ min-width: var(--spacing-space-2);
18
+ height: var(--spacing-space-2);
19
+ }
20
+ .lib-xplat-notification-badge.lg .badge-indicator {
21
+ min-width: var(--spacing-space-6);
22
+ height: var(--spacing-space-6);
23
+ font-family: var(--semantic-typo-caption-1-r-font);
24
+ font-size: var(--semantic-typo-caption-1-r-size);
25
+ line-height: var(--semantic-typo-caption-1-r-lh);
26
+ font-weight: var(--semantic-typo-caption-1-r-weight);
27
+ letter-spacing: var(--semantic-typo-caption-1-r-ls);
28
+ padding: 0 var(--spacing-space-2);
29
+ }
30
+ .lib-xplat-notification-badge.lg .badge-indicator.dot {
31
+ min-width: var(--spacing-space-2);
32
+ height: var(--spacing-space-2);
33
+ }
34
+ .lib-xplat-notification-badge .badge-indicator {
35
+ position: absolute;
36
+ top: 0;
37
+ right: 0;
38
+ transform: translate(50%, -50%);
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ border-radius: var(--spacing-radius-full);
43
+ color: var(--semantic-text-inverse);
44
+ font-family: var(--semantic-typo-caption-2-sb-font);
45
+ font-size: var(--semantic-typo-caption-2-sb-size);
46
+ line-height: var(--semantic-typo-caption-2-sb-lh);
47
+ font-weight: var(--semantic-typo-caption-2-sb-weight);
48
+ letter-spacing: var(--semantic-typo-caption-2-sb-ls);
49
+ line-height: 1;
50
+ min-width: var(--spacing-space-4);
51
+ height: var(--spacing-space-4);
52
+ padding: 0 var(--spacing-space-1);
53
+ box-sizing: border-box;
54
+ }
55
+ .lib-xplat-notification-badge .badge-indicator.dot {
56
+ min-width: var(--spacing-space-2);
57
+ height: var(--spacing-space-2);
58
+ padding: 0;
59
+ }
60
+ .lib-xplat-notification-badge .badge-indicator.error {
61
+ background-color: var(--semantic-surface-error-default);
62
+ }
63
+ .lib-xplat-notification-badge .badge-indicator.success {
64
+ background-color: var(--semantic-surface-success-default);
65
+ }
66
+ .lib-xplat-notification-badge .badge-indicator.warning {
67
+ background-color: var(--semantic-surface-warning-default);
68
+ color: var(--semantic-text-primary);
69
+ }
70
+ .lib-xplat-notification-badge .badge-indicator.info {
71
+ background-color: var(--semantic-surface-info-default);
72
+ }
73
+ .lib-xplat-notification-badge .badge-indicator.brand {
74
+ background-color: var(--semantic-surface-brand-default);
75
+ }
@@ -0,0 +1,47 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React from 'react';
3
+
4
+ type NotificationBadgeType = "error" | "success" | "warning" | "info" | "brand";
5
+ type NotificationBadgeSize = "sm" | "md" | "lg";
6
+ /**
7
+ * 알림 뱃지 — 다른 요소의 **우상단 모서리에 얹히는** 작은 원.
8
+ *
9
+ * 아이콘이나 버튼 위에 읽지 않은 개수나 상태 점을 표시한다.
10
+ * 뱃지 자체는 `.badge-indicator` 하나이고, `children` 은 그 뱃지가 올라탈 대상이다.
11
+ *
12
+ * ```tsx
13
+ * <NotificationBadge count={3}><BellIcon /></NotificationBadge>
14
+ * <NotificationBadge dot type="error"><UserIcon /></NotificationBadge>
15
+ * ```
16
+ *
17
+ * 알약 모양 상태 라벨이 필요하면 이 컴포넌트가 아니라 `Chip`(정보 표시) 또는
18
+ * `Tag`(제거 가능)를 쓴다. `<NotificationBadge>진행중</NotificationBadge>` 처럼
19
+ * 쓰면 `count`/`dot` 이 없어 뱃지가 렌더되지 않고 글자만 그대로 통과한다.
20
+ */
21
+ interface NotificationBadgeProps {
22
+ /**
23
+ * 뱃지가 올라탈 **대상**. 뱃지에 표시할 내용이 아니다.
24
+ * 보통 아이콘이나 버튼을 넣는다.
25
+ */
26
+ children: React.ReactNode;
27
+ /**
28
+ * 표시할 개수. `count` 나 `dot` 중 하나가 없으면 **뱃지가 렌더되지 않는다**
29
+ * (`type` 을 줘도 아무 일도 일어나지 않는다).
30
+ * `count={0}` 도 표시하지 않는다 — 읽지 않은 항목이 없으면 숨기는 동작이다.
31
+ */
32
+ count?: number;
33
+ /** 개수 대신 점만 표시한다. `count` 없이 "새 항목 있음" 만 알릴 때 쓴다 */
34
+ dot?: boolean;
35
+ /** 뱃지 색. 뱃지가 렌더될 때만 의미가 있다 */
36
+ type?: NotificationBadgeType;
37
+ /** `count` 가 이 값을 넘으면 `99+` 처럼 표시한다 */
38
+ maxCount?: number;
39
+ /** 뱃지 크기. 대상의 크기가 아니다 */
40
+ size?: NotificationBadgeSize;
41
+ }
42
+ declare const NotificationBadge: {
43
+ (props: NotificationBadgeProps): react_jsx_runtime.JSX.Element;
44
+ displayName: string;
45
+ };
46
+
47
+ export { NotificationBadge as Badge, NotificationBadge };
@@ -0,0 +1,47 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React from 'react';
3
+
4
+ type NotificationBadgeType = "error" | "success" | "warning" | "info" | "brand";
5
+ type NotificationBadgeSize = "sm" | "md" | "lg";
6
+ /**
7
+ * 알림 뱃지 — 다른 요소의 **우상단 모서리에 얹히는** 작은 원.
8
+ *
9
+ * 아이콘이나 버튼 위에 읽지 않은 개수나 상태 점을 표시한다.
10
+ * 뱃지 자체는 `.badge-indicator` 하나이고, `children` 은 그 뱃지가 올라탈 대상이다.
11
+ *
12
+ * ```tsx
13
+ * <NotificationBadge count={3}><BellIcon /></NotificationBadge>
14
+ * <NotificationBadge dot type="error"><UserIcon /></NotificationBadge>
15
+ * ```
16
+ *
17
+ * 알약 모양 상태 라벨이 필요하면 이 컴포넌트가 아니라 `Chip`(정보 표시) 또는
18
+ * `Tag`(제거 가능)를 쓴다. `<NotificationBadge>진행중</NotificationBadge>` 처럼
19
+ * 쓰면 `count`/`dot` 이 없어 뱃지가 렌더되지 않고 글자만 그대로 통과한다.
20
+ */
21
+ interface NotificationBadgeProps {
22
+ /**
23
+ * 뱃지가 올라탈 **대상**. 뱃지에 표시할 내용이 아니다.
24
+ * 보통 아이콘이나 버튼을 넣는다.
25
+ */
26
+ children: React.ReactNode;
27
+ /**
28
+ * 표시할 개수. `count` 나 `dot` 중 하나가 없으면 **뱃지가 렌더되지 않는다**
29
+ * (`type` 을 줘도 아무 일도 일어나지 않는다).
30
+ * `count={0}` 도 표시하지 않는다 — 읽지 않은 항목이 없으면 숨기는 동작이다.
31
+ */
32
+ count?: number;
33
+ /** 개수 대신 점만 표시한다. `count` 없이 "새 항목 있음" 만 알릴 때 쓴다 */
34
+ dot?: boolean;
35
+ /** 뱃지 색. 뱃지가 렌더될 때만 의미가 있다 */
36
+ type?: NotificationBadgeType;
37
+ /** `count` 가 이 값을 넘으면 `99+` 처럼 표시한다 */
38
+ maxCount?: number;
39
+ /** 뱃지 크기. 대상의 크기가 아니다 */
40
+ size?: NotificationBadgeSize;
41
+ }
42
+ declare const NotificationBadge: {
43
+ (props: NotificationBadgeProps): react_jsx_runtime.JSX.Element;
44
+ displayName: string;
45
+ };
46
+
47
+ export { NotificationBadge as Badge, NotificationBadge };
@@ -0,0 +1,40 @@
1
+ // ../../node_modules/clsx/dist/clsx.mjs
2
+ function r(e) {
3
+ var t, f, n = "";
4
+ if ("string" == typeof e || "number" == typeof e) n += e;
5
+ else if ("object" == typeof e) if (Array.isArray(e)) {
6
+ var o = e.length;
7
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
8
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
9
+ return n;
10
+ }
11
+ function clsx() {
12
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
13
+ return n;
14
+ }
15
+ var clsx_default = clsx;
16
+
17
+ // src/components/NotificationBadge/NotificationBadge.tsx
18
+ import { jsx, jsxs } from "react/jsx-runtime";
19
+ var NotificationBadge = (props) => {
20
+ const {
21
+ children,
22
+ type = "error",
23
+ count,
24
+ maxCount = 99,
25
+ dot = false,
26
+ size = "md"
27
+ } = props;
28
+ const showBadge = dot || count !== void 0 && count > 0;
29
+ const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
30
+ return /* @__PURE__ */ jsxs("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
31
+ children,
32
+ showBadge && /* @__PURE__ */ jsx("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
33
+ ] });
34
+ };
35
+ NotificationBadge.displayName = "NotificationBadge";
36
+ var NotificationBadge_default = NotificationBadge;
37
+ export {
38
+ NotificationBadge_default as Badge,
39
+ NotificationBadge_default as NotificationBadge
40
+ };
@@ -48,7 +48,7 @@
48
48
  border-radius: var(--spacing-radius-md);
49
49
  background-color: var(--semantic-surface-neutral-primary);
50
50
  color: var(--semantic-text-primary);
51
- transition: border-color 0.15s;
51
+ transition: border-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
52
52
  }
53
53
  .lib-xplat-select .select-trigger:hover:not(.disabled) {
54
54
  border-color: var(--semantic-border-tertiary);
@@ -57,7 +57,9 @@
57
57
  border-color: var(--semantic-interaction-focus-ring);
58
58
  }
59
59
  .lib-xplat-select .select-trigger:focus-visible {
60
- outline: 2px solid var(--semantic-interaction-focus-ring);
60
+ border-color: var(--semantic-interaction-focus-ring);
61
+ box-shadow: 0 0 0 2px var(--semantic-interaction-overlay-10);
62
+ outline: 2px solid transparent;
61
63
  outline-offset: 2px;
62
64
  }
63
65
  .lib-xplat-select .select-trigger.disabled {
@@ -134,6 +134,7 @@ var TableCell = import_react4.default.memo((props) => {
134
134
  width,
135
135
  nowrap = false,
136
136
  scope = "col",
137
+ colSpan,
137
138
  onClick
138
139
  } = props;
139
140
  const { registerStickyCell, stickyCells } = useTableRowContext();
@@ -182,6 +183,7 @@ var TableCell = import_react4.default.memo((props) => {
182
183
  nowrap && "nowrap"
183
184
  ),
184
185
  scope: isHeaderCell ? scope : void 0,
186
+ colSpan,
185
187
  style: {
186
188
  ...isSticky ? { left } : null,
187
189
  ...width != null ? { width: typeof width === "number" ? `${width}px` : width } : null
@@ -31,6 +31,8 @@ interface TableCellProps {
31
31
  nowrap?: boolean;
32
32
  /** th 로 렌더될 때의 scope. 기본 "col" (thead 안에서만 의미가 있다) */
33
33
  scope?: "col" | "row";
34
+ /** 가로로 합칠 칸 수. 합계 행처럼 표 안에서 칸을 합칠 때 쓴다 */
35
+ colSpan?: number;
34
36
  onClick?: (e: React.MouseEvent<HTMLTableCellElement>) => void;
35
37
  }
36
38
  declare const TableCell: React.NamedExoticComponent<TableCellProps>;
@@ -31,6 +31,8 @@ interface TableCellProps {
31
31
  nowrap?: boolean;
32
32
  /** th 로 렌더될 때의 scope. 기본 "col" (thead 안에서만 의미가 있다) */
33
33
  scope?: "col" | "row";
34
+ /** 가로로 합칠 칸 수. 합계 행처럼 표 안에서 칸을 합칠 때 쓴다 */
35
+ colSpan?: number;
34
36
  onClick?: (e: React.MouseEvent<HTMLTableCellElement>) => void;
35
37
  }
36
38
  declare const TableCell: React.NamedExoticComponent<TableCellProps>;
@@ -94,6 +94,7 @@ var TableCell = React4.memo((props) => {
94
94
  width,
95
95
  nowrap = false,
96
96
  scope = "col",
97
+ colSpan,
97
98
  onClick
98
99
  } = props;
99
100
  const { registerStickyCell, stickyCells } = useTableRowContext();
@@ -142,6 +143,7 @@ var TableCell = React4.memo((props) => {
142
143
  nowrap && "nowrap"
143
144
  ),
144
145
  scope: isHeaderCell ? scope : void 0,
146
+ colSpan,
145
147
  style: {
146
148
  ...isSticky ? { left } : null,
147
149
  ...width != null ? { width: typeof width === "number" ? `${width}px` : width } : null
@@ -12,7 +12,7 @@
12
12
  color: var(--semantic-text-secondary);
13
13
  font-family: inherit;
14
14
  outline: none;
15
- transition: border-color 0.15s, box-shadow 0.15s;
15
+ transition: border-color 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
16
16
  }
17
17
  .lib-xplat-textarea-wrap .lib-xplat-textarea.sm {
18
18
  padding: var(--spacing-space-2) var(--spacing-space-3);