@x-plat/design-system 0.6.1 → 0.7.1

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 (81) hide show
  1. package/dist/components/Accordion/index.css +10 -3
  2. package/dist/components/Alert/index.css +7 -0
  3. package/dist/components/AutoResizeTextArea/index.css +3 -0
  4. package/dist/components/Avatar/index.css +13 -1
  5. package/dist/components/Badge/index.cjs +10 -7
  6. package/dist/components/Badge/index.css +26 -15
  7. package/dist/components/Badge/index.d.cts +3 -19
  8. package/dist/components/Badge/index.d.ts +3 -19
  9. package/dist/components/Badge/index.js +8 -6
  10. package/dist/components/Box/index.css +8 -5
  11. package/dist/components/Breadcrumb/index.css +5 -1
  12. package/dist/components/Button/index.css +10 -1
  13. package/dist/components/Calendar/index.css +10 -6
  14. package/dist/components/CardTab/index.css +14 -2
  15. package/dist/components/Chart/index.css +32 -11
  16. package/dist/components/ChatInput/index.css +6 -0
  17. package/dist/components/CheckBox/index.css +10 -1
  18. package/dist/components/Chip/index.css +12 -0
  19. package/dist/components/DatePicker/index.css +51 -12
  20. package/dist/components/Drawer/index.css +14 -7
  21. package/dist/components/Dropdown/index.css +5 -1
  22. package/dist/components/Editor/index.css +49 -10
  23. package/dist/components/EmptyState/index.css +9 -2
  24. package/dist/components/FileUpload/index.css +9 -2
  25. package/dist/components/HtmlTypeWriter/index.cjs +2 -0
  26. package/dist/components/HtmlTypeWriter/index.css +13 -1
  27. package/dist/components/HtmlTypeWriter/index.d.cts +3 -3
  28. package/dist/components/HtmlTypeWriter/index.d.ts +3 -3
  29. package/dist/components/HtmlTypeWriter/index.js +1 -0
  30. package/dist/components/ImageSelector/index.css +8 -0
  31. package/dist/components/Input/index.css +12 -0
  32. package/dist/components/Modal/index.css +1 -1
  33. package/dist/components/NotificationBadge/index.cjs +68 -0
  34. package/dist/components/NotificationBadge/index.css +75 -0
  35. package/dist/components/NotificationBadge/index.d.cts +47 -0
  36. package/dist/components/NotificationBadge/index.d.ts +47 -0
  37. package/dist/components/NotificationBadge/index.js +40 -0
  38. package/dist/components/Pagination/index.css +25 -1
  39. package/dist/components/PopOver/index.css +1 -1
  40. package/dist/components/Progress/index.css +5 -2
  41. package/dist/components/Radio/index.css +9 -0
  42. package/dist/components/Select/index.css +20 -3
  43. package/dist/components/Steps/index.css +14 -4
  44. package/dist/components/Switch/index.css +1 -1
  45. package/dist/components/Tab/index.css +16 -1
  46. package/dist/components/Table/index.cjs +6 -1
  47. package/dist/components/Table/index.css +12 -0
  48. package/dist/components/Table/index.d.cts +4 -0
  49. package/dist/components/Table/index.d.ts +4 -0
  50. package/dist/components/Table/index.js +6 -1
  51. package/dist/components/Tag/index.css +12 -0
  52. package/dist/components/TextArea/index.css +9 -0
  53. package/dist/components/Toast/index.css +8 -1
  54. package/dist/components/Tooltip/index.css +8 -4
  55. package/dist/components/Video/index.css +30 -19
  56. package/dist/components/index.cjs +274 -265
  57. package/dist/components/index.css +547 -162
  58. package/dist/components/index.d.cts +2 -2
  59. package/dist/components/index.d.ts +2 -2
  60. package/dist/components/index.js +272 -265
  61. package/dist/index.cjs +274 -265
  62. package/dist/index.css +547 -162
  63. package/dist/index.d.cts +2 -2
  64. package/dist/index.d.ts +2 -2
  65. package/dist/index.js +272 -265
  66. package/dist/layout/index.css +40 -0
  67. package/guidelines/AGENT_PROMPT.md +1 -1
  68. package/guidelines/Guidelines.md +1 -1
  69. package/guidelines/components/accordion.md +1 -1
  70. package/guidelines/components/avatar.md +1 -1
  71. package/guidelines/components/card.md +1 -1
  72. package/guidelines/components/chart.md +1 -1
  73. package/guidelines/components/data-display.md +4 -4
  74. package/guidelines/components/dropdown.md +1 -1
  75. package/guidelines/components/feedback.md +39 -11
  76. package/guidelines/components/file-media.md +3 -3
  77. package/guidelines/components/html-typewriter.md +1 -1
  78. package/guidelines/components/navigation.md +144 -20
  79. package/guidelines/components/swiper.md +2 -2
  80. package/guidelines/components/table.md +68 -5
  81. package/package.json +1 -1
@@ -15,21 +15,33 @@
15
15
  .lib-xplat-table-wrapper.sm > .lib-xplat-table > tbody > tr > th,
16
16
  .lib-xplat-table-wrapper.sm > .lib-xplat-table > tbody > tr > td {
17
17
  padding: var(--spacing-space-1) var(--spacing-space-2);
18
+ font-family: var(--semantic-typo-caption-2-r-font);
18
19
  font-size: var(--semantic-typo-caption-2-r-size);
20
+ line-height: var(--semantic-typo-caption-2-r-lh);
21
+ font-weight: var(--semantic-typo-caption-2-r-weight);
22
+ letter-spacing: var(--semantic-typo-caption-2-r-ls);
19
23
  }
20
24
  .lib-xplat-table-wrapper.md > .lib-xplat-table > thead > tr > th,
21
25
  .lib-xplat-table-wrapper.md > .lib-xplat-table > thead > tr > td,
22
26
  .lib-xplat-table-wrapper.md > .lib-xplat-table > tbody > tr > th,
23
27
  .lib-xplat-table-wrapper.md > .lib-xplat-table > tbody > tr > td {
24
28
  padding: var(--spacing-space-2) var(--spacing-space-3);
29
+ font-family: var(--semantic-typo-caption-1-r-font);
25
30
  font-size: var(--semantic-typo-caption-1-r-size);
31
+ line-height: var(--semantic-typo-caption-1-r-lh);
32
+ font-weight: var(--semantic-typo-caption-1-r-weight);
33
+ letter-spacing: var(--semantic-typo-caption-1-r-ls);
26
34
  }
27
35
  .lib-xplat-table-wrapper.lg > .lib-xplat-table > thead > tr > th,
28
36
  .lib-xplat-table-wrapper.lg > .lib-xplat-table > thead > tr > td,
29
37
  .lib-xplat-table-wrapper.lg > .lib-xplat-table > tbody > tr > th,
30
38
  .lib-xplat-table-wrapper.lg > .lib-xplat-table > tbody > tr > td {
31
39
  padding: var(--spacing-space-3) var(--spacing-space-4);
40
+ font-family: var(--semantic-typo-label-2-m-font);
32
41
  font-size: var(--semantic-typo-label-2-m-size);
42
+ line-height: var(--semantic-typo-label-2-m-lh);
43
+ font-weight: var(--semantic-typo-label-2-m-weight);
44
+ letter-spacing: var(--semantic-typo-label-2-m-ls);
33
45
  }
34
46
  .lib-xplat-table-wrapper > .lib-xplat-table {
35
47
  width: 100%;
@@ -29,6 +29,10 @@ interface TableCellProps {
29
29
  isSticky?: boolean;
30
30
  width?: string | number;
31
31
  nowrap?: boolean;
32
+ /** th 로 렌더될 때의 scope. 기본 "col" (thead 안에서만 의미가 있다) */
33
+ scope?: "col" | "row";
34
+ /** 가로로 합칠 칸 수. 합계 행처럼 표 안에서 칸을 합칠 때 쓴다 */
35
+ colSpan?: number;
32
36
  onClick?: (e: React.MouseEvent<HTMLTableCellElement>) => void;
33
37
  }
34
38
  declare const TableCell: React.NamedExoticComponent<TableCellProps>;
@@ -29,6 +29,10 @@ interface TableCellProps {
29
29
  isSticky?: boolean;
30
30
  width?: string | number;
31
31
  nowrap?: boolean;
32
+ /** th 로 렌더될 때의 scope. 기본 "col" (thead 안에서만 의미가 있다) */
33
+ scope?: "col" | "row";
34
+ /** 가로로 합칠 칸 수. 합계 행처럼 표 안에서 칸을 합칠 때 쓴다 */
35
+ colSpan?: number;
32
36
  onClick?: (e: React.MouseEvent<HTMLTableCellElement>) => void;
33
37
  }
34
38
  declare const TableCell: React.NamedExoticComponent<TableCellProps>;
@@ -93,6 +93,8 @@ var TableCell = React4.memo((props) => {
93
93
  isSticky = false,
94
94
  width,
95
95
  nowrap = false,
96
+ scope = "col",
97
+ colSpan,
96
98
  onClick
97
99
  } = props;
98
100
  const { registerStickyCell, stickyCells } = useTableRowContext();
@@ -124,7 +126,8 @@ var TableCell = React4.memo((props) => {
124
126
  }
125
127
  return () => observer.disconnect();
126
128
  }, [isSticky, registerStickyCell, calculateLeft]);
127
- const CellTag = cellRef.current?.tagName === "TH" ? "th" : "td";
129
+ const isHeaderCell = headContext !== null;
130
+ const CellTag = isHeaderCell ? "th" : "td";
128
131
  const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
129
132
  const enableHover = headContext && headContext.cellHover;
130
133
  return /* @__PURE__ */ jsx3(
@@ -139,6 +142,8 @@ var TableCell = React4.memo((props) => {
139
142
  enableHover && "cell-hover",
140
143
  nowrap && "nowrap"
141
144
  ),
145
+ scope: isHeaderCell ? scope : void 0,
146
+ colSpan,
142
147
  style: {
143
148
  ...isSticky ? { left } : null,
144
149
  ...width != null ? { width: typeof width === "number" ? `${width}px` : width } : null
@@ -9,17 +9,29 @@
9
9
  .lib-xplat-tag.sm {
10
10
  gap: var(--spacing-space-1);
11
11
  padding: 1px var(--spacing-space-2);
12
+ font-family: var(--semantic-typo-caption-2-r-font);
12
13
  font-size: var(--semantic-typo-caption-2-r-size);
14
+ line-height: var(--semantic-typo-caption-2-r-lh);
15
+ font-weight: var(--semantic-typo-caption-2-r-weight);
16
+ letter-spacing: var(--semantic-typo-caption-2-r-ls);
13
17
  }
14
18
  .lib-xplat-tag.md {
15
19
  gap: var(--spacing-space-1);
16
20
  padding: 2px var(--spacing-space-2);
21
+ font-family: var(--semantic-typo-caption-2-r-font);
17
22
  font-size: var(--semantic-typo-caption-2-r-size);
23
+ line-height: var(--semantic-typo-caption-2-r-lh);
24
+ font-weight: var(--semantic-typo-caption-2-r-weight);
25
+ letter-spacing: var(--semantic-typo-caption-2-r-ls);
18
26
  }
19
27
  .lib-xplat-tag.lg {
20
28
  gap: var(--spacing-space-1);
21
29
  padding: var(--spacing-space-1) var(--spacing-space-2);
30
+ font-family: var(--semantic-typo-caption-1-r-font);
22
31
  font-size: var(--semantic-typo-caption-1-r-size);
32
+ line-height: var(--semantic-typo-caption-1-r-lh);
33
+ font-weight: var(--semantic-typo-caption-1-r-weight);
34
+ letter-spacing: var(--semantic-typo-caption-1-r-ls);
23
35
  }
24
36
  .lib-xplat-tag.neutral {
25
37
  color: var(--semantic-text-tertiary);
@@ -16,18 +16,27 @@
16
16
  }
17
17
  .lib-xplat-textarea-wrap .lib-xplat-textarea.sm {
18
18
  padding: var(--spacing-space-2) var(--spacing-space-3);
19
+ font-family: var(--semantic-typo-caption-1-r-font);
19
20
  font-size: var(--semantic-typo-caption-1-r-size);
20
21
  line-height: var(--semantic-typo-caption-1-r-lh);
22
+ font-weight: var(--semantic-typo-caption-1-r-weight);
23
+ letter-spacing: var(--semantic-typo-caption-1-r-ls);
21
24
  }
22
25
  .lib-xplat-textarea-wrap .lib-xplat-textarea.md {
23
26
  padding: var(--spacing-space-2) var(--spacing-space-4);
27
+ font-family: var(--semantic-typo-label-2-m-font);
24
28
  font-size: var(--semantic-typo-label-2-m-size);
25
29
  line-height: var(--semantic-typo-label-2-m-lh);
30
+ font-weight: var(--semantic-typo-label-2-m-weight);
31
+ letter-spacing: var(--semantic-typo-label-2-m-ls);
26
32
  }
27
33
  .lib-xplat-textarea-wrap .lib-xplat-textarea.lg {
28
34
  padding: var(--spacing-space-3) var(--spacing-space-4);
35
+ font-family: var(--semantic-typo-label-1-m-font);
29
36
  font-size: var(--semantic-typo-label-1-m-size);
30
37
  line-height: var(--semantic-typo-label-1-m-lh);
38
+ font-weight: var(--semantic-typo-label-1-m-weight);
39
+ letter-spacing: var(--semantic-typo-label-1-m-ls);
31
40
  }
32
41
  .lib-xplat-textarea-wrap .lib-xplat-textarea:hover:not(.disabled):not(:focus) {
33
42
  border-color: var(--semantic-border-tertiary);
@@ -53,9 +53,12 @@
53
53
  gap: var(--spacing-space-2);
54
54
  padding: var(--spacing-space-3) var(--spacing-space-4);
55
55
  border-radius: var(--spacing-radius-md);
56
+ font-family: var(--semantic-typo-caption-1-r-font);
56
57
  font-size: var(--semantic-typo-caption-1-r-size);
57
58
  line-height: var(--semantic-typo-caption-1-r-lh);
58
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
59
+ font-weight: var(--semantic-typo-caption-1-r-weight);
60
+ letter-spacing: var(--semantic-typo-caption-1-r-ls);
61
+ box-shadow: var(--semantic-shadow-md);
59
62
  pointer-events: auto;
60
63
  animation: lib-xplat-toast-enter 0.2s ease;
61
64
  min-width: 240px;
@@ -73,7 +76,11 @@
73
76
  background: none;
74
77
  border: none;
75
78
  cursor: pointer;
79
+ font-family: var(--semantic-typo-label-1-m-font);
76
80
  font-size: var(--semantic-typo-label-1-m-size);
81
+ line-height: var(--semantic-typo-label-1-m-lh);
82
+ font-weight: var(--semantic-typo-label-1-m-weight);
83
+ letter-spacing: var(--semantic-typo-label-1-m-ls);
77
84
  line-height: 1;
78
85
  padding: 0;
79
86
  opacity: 0.6;
@@ -11,18 +11,22 @@
11
11
  animation: tooltip-show 120ms ease-out;
12
12
  }
13
13
  .lib-xplat-tooltip .tooltip-title {
14
+ font-family: var(--semantic-typo-caption-1-r-font);
14
15
  font-size: var(--semantic-typo-caption-1-r-size);
15
16
  line-height: var(--semantic-typo-caption-1-r-lh);
16
- font-weight: 400;
17
+ font-weight: var(--semantic-typo-caption-1-r-weight);
18
+ letter-spacing: var(--semantic-typo-caption-1-r-ls);
17
19
  }
18
20
  .lib-xplat-tooltip .tooltip-desc {
21
+ font-family: var(--semantic-typo-caption-2-r-font);
19
22
  font-size: var(--semantic-typo-caption-2-r-size);
20
23
  line-height: var(--semantic-typo-caption-2-r-lh);
21
- font-weight: 400;
24
+ font-weight: var(--semantic-typo-caption-2-r-weight);
25
+ letter-spacing: var(--semantic-typo-caption-2-r-ls);
22
26
  }
23
27
  .lib-xplat-tooltip.dark {
24
28
  background-color: var(--semantic-surface-neutral-tertiary);
25
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
29
+ box-shadow: var(--semantic-shadow-md);
26
30
  }
27
31
  .lib-xplat-tooltip.dark .tooltip-title,
28
32
  .lib-xplat-tooltip.dark .tooltip-desc {
@@ -30,7 +34,7 @@
30
34
  }
31
35
  .lib-xplat-tooltip.light {
32
36
  background-color: var(--semantic-surface-neutral-primary);
33
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
37
+ box-shadow: var(--semantic-shadow-md);
34
38
  }
35
39
  .lib-xplat-tooltip.light .tooltip-title,
36
40
  .lib-xplat-tooltip.light .tooltip-desc {
@@ -40,7 +40,7 @@
40
40
  content: "";
41
41
  position: absolute;
42
42
  inset: 0;
43
- background-color: rgba(0, 0, 0, 0.2);
43
+ background-color: var(--semantic-interaction-overlay-25);
44
44
  opacity: 0;
45
45
  transition: opacity 0.2s ease;
46
46
  }
@@ -49,7 +49,7 @@
49
49
  z-index: 1;
50
50
  display: flex;
51
51
  font-size: var(--semantic-typo-display-1-b-size);
52
- filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
52
+ filter: drop-shadow(0 2px 8px var(--semantic-interaction-overlay-50));
53
53
  }
54
54
  .lib-xplat-video > .center-play.is-playing {
55
55
  opacity: 0;
@@ -69,8 +69,8 @@
69
69
  background:
70
70
  linear-gradient(
71
71
  to top,
72
- rgba(0, 0, 0, 0.7),
73
- rgba(0, 0, 0, 0));
72
+ var(--semantic-interaction-overlay-75),
73
+ transparent);
74
74
  color: var(--semantic-icon-inverse);
75
75
  opacity: 0;
76
76
  transition: opacity 0.2s ease;
@@ -101,7 +101,7 @@
101
101
  transition: background-color 0.15s ease;
102
102
  }
103
103
  .lib-xplat-video .control-btn:hover {
104
- background-color: rgba(255, 255, 255, 0.15);
104
+ background-color: color-mix(in srgb, var(--semantic-icon-inverse) 15%, transparent);
105
105
  }
106
106
  .lib-xplat-video .control-btn:focus-visible {
107
107
  outline: 2px solid var(--semantic-interaction-focus-ring);
@@ -111,7 +111,7 @@
111
111
  margin-left: auto;
112
112
  }
113
113
  .lib-xplat-video .control-btn.is-active {
114
- background-color: rgba(255, 255, 255, 0.25);
114
+ background-color: color-mix(in srgb, var(--semantic-icon-inverse) 25%, transparent);
115
115
  }
116
116
  .lib-xplat-video .rate-group {
117
117
  position: relative;
@@ -119,8 +119,11 @@
119
119
  .lib-xplat-video .rate-group .rate-btn {
120
120
  width: auto;
121
121
  padding: 0 var(--spacing-space-2);
122
- font-size: var(--semantic-typo-caption-2-r-size);
123
- font-weight: 600;
122
+ font-family: var(--semantic-typo-caption-2-sb-font);
123
+ font-size: var(--semantic-typo-caption-2-sb-size);
124
+ line-height: var(--semantic-typo-caption-2-sb-lh);
125
+ font-weight: var(--semantic-typo-caption-2-sb-weight);
126
+ letter-spacing: var(--semantic-typo-caption-2-sb-ls);
124
127
  font-variant-numeric: tabular-nums;
125
128
  }
126
129
  .lib-xplat-video .rate-group .rate-menu {
@@ -130,7 +133,7 @@
130
133
  margin: 0;
131
134
  padding: var(--spacing-space-1);
132
135
  list-style: none;
133
- background-color: rgba(0, 0, 0, 0.85);
136
+ background-color: var(--semantic-interaction-overlay-85);
134
137
  border-radius: var(--spacing-radius-sm);
135
138
  min-width: 64px;
136
139
  }
@@ -143,18 +146,26 @@
143
146
  text-align: left;
144
147
  cursor: pointer;
145
148
  border-radius: var(--spacing-radius-sm);
149
+ font-family: var(--semantic-typo-caption-2-r-font);
146
150
  font-size: var(--semantic-typo-caption-2-r-size);
151
+ line-height: var(--semantic-typo-caption-2-r-lh);
152
+ font-weight: var(--semantic-typo-caption-2-r-weight);
153
+ letter-spacing: var(--semantic-typo-caption-2-r-ls);
147
154
  font-variant-numeric: tabular-nums;
148
155
  }
149
156
  .lib-xplat-video .rate-group .rate-menu .rate-item:hover {
150
- background-color: rgba(255, 255, 255, 0.15);
157
+ background-color: color-mix(in srgb, var(--semantic-icon-inverse) 15%, transparent);
151
158
  }
152
159
  .lib-xplat-video .rate-group .rate-menu .rate-item.is-active {
153
160
  color: var(--semantic-surface-brand-default);
154
- font-weight: 600;
161
+ font-weight: var(--semantic-typo-caption-2-sb-weight);
155
162
  }
156
163
  .lib-xplat-video .time {
164
+ font-family: var(--semantic-typo-caption-2-r-font);
157
165
  font-size: var(--semantic-typo-caption-2-r-size);
166
+ line-height: var(--semantic-typo-caption-2-r-lh);
167
+ font-weight: var(--semantic-typo-caption-2-r-weight);
168
+ letter-spacing: var(--semantic-typo-caption-2-r-ls);
158
169
  font-variant-numeric: tabular-nums;
159
170
  white-space: nowrap;
160
171
  }
@@ -220,15 +231,15 @@
220
231
  to right,
221
232
  var(--semantic-surface-brand-default) 0%,
222
233
  var(--semantic-surface-brand-default) var(--progress, 0%),
223
- rgba(255, 255, 255, 0.4) var(--progress, 0%),
224
- rgba(255, 255, 255, 0.4) var(--buffered, 0%),
225
- rgba(255, 255, 255, 0.2) var(--buffered, 0%),
226
- rgba(255, 255, 255, 0.2) 100%);
234
+ color-mix(in srgb, var(--semantic-icon-inverse) 40%, transparent) var(--progress, 0%),
235
+ color-mix(in srgb, var(--semantic-icon-inverse) 40%, transparent) var(--buffered, 0%),
236
+ color-mix(in srgb, var(--semantic-icon-inverse) 20%, transparent) var(--buffered, 0%),
237
+ color-mix(in srgb, var(--semantic-icon-inverse) 20%, transparent) 100%);
227
238
  }
228
239
  .lib-xplat-video .seekbar::-moz-range-track {
229
240
  height: 4px;
230
241
  border-radius: 2px;
231
- background: rgba(255, 255, 255, 0.2);
242
+ background: color-mix(in srgb, var(--semantic-icon-inverse) 20%, transparent);
232
243
  }
233
244
  .lib-xplat-video .seekbar::-moz-range-progress {
234
245
  height: 4px;
@@ -246,13 +257,13 @@
246
257
  to right,
247
258
  var(--semantic-icon-inverse) 0%,
248
259
  var(--semantic-icon-inverse) var(--volume, 0%),
249
- rgba(255, 255, 255, 0.3) var(--volume, 0%),
250
- rgba(255, 255, 255, 0.3) 100%);
260
+ color-mix(in srgb, var(--semantic-icon-inverse) 30%, transparent) var(--volume, 0%),
261
+ color-mix(in srgb, var(--semantic-icon-inverse) 30%, transparent) 100%);
251
262
  }
252
263
  .lib-xplat-video .volume-slider::-moz-range-track {
253
264
  height: 4px;
254
265
  border-radius: 2px;
255
- background: rgba(255, 255, 255, 0.3);
266
+ background: color-mix(in srgb, var(--semantic-icon-inverse) 30%, transparent);
256
267
  }
257
268
  .lib-xplat-video .volume-slider::-moz-range-progress {
258
269
  height: 4px;