@ceed/cds 1.29.0 → 1.30.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 (62) hide show
  1. package/dist/Overview.md +5 -5
  2. package/dist/components/Calendar/utils/index.d.ts +1 -0
  3. package/dist/components/DatePicker/DatePicker.d.ts +4 -0
  4. package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
  5. package/dist/components/MonthRangePicker/MonthRangePicker.d.ts +8 -0
  6. package/dist/components/data-display/Avatar.md +110 -69
  7. package/dist/components/data-display/Badge.md +91 -39
  8. package/dist/components/data-display/Chip.md +49 -20
  9. package/dist/components/data-display/DataTable.md +93 -0
  10. package/dist/components/data-display/InfoSign.md +12 -0
  11. package/dist/components/data-display/Table.md +72 -55
  12. package/dist/components/data-display/Tooltip.md +40 -40
  13. package/dist/components/data-display/Typography.md +53 -70
  14. package/dist/components/feedback/Alert.md +88 -72
  15. package/dist/components/feedback/CircularProgress.md +17 -0
  16. package/dist/components/feedback/Skeleton.md +17 -0
  17. package/dist/components/inputs/Button.md +94 -68
  18. package/dist/components/inputs/ButtonGroup.md +17 -0
  19. package/dist/components/inputs/Calendar.md +118 -457
  20. package/dist/components/inputs/Checkbox.md +185 -430
  21. package/dist/components/inputs/CurrencyInput.md +22 -0
  22. package/dist/components/inputs/DatePicker.md +59 -5
  23. package/dist/components/inputs/DateRangePicker.md +46 -5
  24. package/dist/components/inputs/FilterableCheckboxGroup.md +20 -3
  25. package/dist/components/inputs/FormControl.md +32 -2
  26. package/dist/components/inputs/IconButton.md +18 -0
  27. package/dist/components/inputs/Input.md +198 -136
  28. package/dist/components/inputs/MonthPicker.md +59 -5
  29. package/dist/components/inputs/MonthRangePicker.md +44 -5
  30. package/dist/components/inputs/PercentageInput.md +25 -0
  31. package/dist/components/inputs/RadioButton.md +23 -0
  32. package/dist/components/inputs/RadioList.md +20 -1
  33. package/dist/components/inputs/RadioTileGroup.md +37 -3
  34. package/dist/components/inputs/Select.md +56 -0
  35. package/dist/components/inputs/Slider.md +23 -0
  36. package/dist/components/inputs/Switch.md +20 -0
  37. package/dist/components/inputs/Textarea.md +32 -8
  38. package/dist/components/inputs/Uploader/Uploader.md +21 -0
  39. package/dist/components/layout/Box.md +52 -41
  40. package/dist/components/layout/Grid.md +87 -81
  41. package/dist/components/layout/Stack.md +88 -68
  42. package/dist/components/navigation/Breadcrumbs.md +57 -46
  43. package/dist/components/navigation/Drawer.md +17 -0
  44. package/dist/components/navigation/Dropdown.md +13 -0
  45. package/dist/components/navigation/IconMenuButton.md +17 -0
  46. package/dist/components/navigation/InsetDrawer.md +130 -292
  47. package/dist/components/navigation/Link.md +78 -0
  48. package/dist/components/navigation/Menu.md +17 -0
  49. package/dist/components/navigation/MenuButton.md +18 -0
  50. package/dist/components/navigation/Pagination.md +13 -0
  51. package/dist/components/navigation/Stepper.md +15 -0
  52. package/dist/components/navigation/Tabs.md +27 -0
  53. package/dist/components/surfaces/Accordions.md +804 -49
  54. package/dist/components/surfaces/Card.md +173 -97
  55. package/dist/components/surfaces/Divider.md +246 -82
  56. package/dist/components/surfaces/Sheet.md +15 -0
  57. package/dist/index.browser.js +4 -4
  58. package/dist/index.browser.js.map +3 -3
  59. package/dist/index.cjs +99 -39
  60. package/dist/index.js +99 -39
  61. package/framer/index.js +1 -1
  62. package/package.json +1 -1
@@ -249,6 +249,23 @@ function UserProfile({ loading, user }: { loading: boolean; user?: User }) {
249
249
  }
250
250
  ```
251
251
 
252
+ ## Props and Customization
253
+
254
+ ### Key Props
255
+
256
+ | Prop | Type | Default | Description |
257
+ | ----------- | ---------------------------------------------------------------- | ----------- | ---------------------------------------------- |
258
+ | `variant` | `'rectangular' \| 'circular' \| 'text' \| 'overlay' \| 'inline'` | `'overlay'` | Skeleton shape |
259
+ | `animation` | `'pulse' \| 'wave' \| false` | `'pulse'` | Animation type |
260
+ | `width` | `number \| string` | - | Skeleton width |
261
+ | `height` | `number \| string` | - | Skeleton height |
262
+ | `level` | Typography level | - | Matches text height for `text` variant |
263
+ | `loading` | `boolean` | `true` | When false, shows children instead of skeleton |
264
+ | `children` | `ReactNode` | - | Content to show when not loading |
265
+ | `sx` | `SxProps` | - | Custom styles |
266
+
267
+ > **Note**: Skeleton also accepts all Joy UI Skeleton props.
268
+
252
269
  ## Best Practices
253
270
 
254
271
  1. **Match the final layout**: Skeleton placeholders should closely approximate the size and position of the real content to prevent layout shifts.
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Introduction
4
4
 
5
- Button 컴포넌트는 사용자가 클릭하여 특정 작업을 수행할 있는 기본적인 UI 요소입니다. Joy UI Button 기반으로 하며, Framer Motion 애니메이션 지원이 추가되었습니다. 제출, 페이지 이동, 모달 열기/닫기, 데이터 처리 다양한 상호작용에 사용됩니다.
5
+ Button is the primary interactive element for triggering actions. Built on Joy UI's Button with Framer Motion animation support, it provides multiple visual variants, sizes, colors, loading states, and decorator slots. Use buttons for form submissions, navigation triggers, modal actions, and data operations.
6
6
 
7
7
  ```tsx
8
8
  <>
@@ -26,7 +26,7 @@ Button 컴포넌트는 사용자가 클릭하여 특정 작업을 수행할 수
26
26
  import { Button } from '@ceed/cds';
27
27
 
28
28
  function MyComponent() {
29
- return <Button onClick={() => console.log('클릭됨!')}>클릭하세요</Button>;
29
+ return <Button onClick={() => console.log('Clicked!')}>Click me</Button>;
30
30
  }
31
31
  ```
32
32
 
@@ -34,7 +34,7 @@ function MyComponent() {
34
34
 
35
35
  ### Basic Usage
36
36
 
37
- 가장 기본적인 버튼 사용법입니다.
37
+ The most basic button usage.
38
38
 
39
39
  ```tsx
40
40
  <>
@@ -46,7 +46,7 @@ function MyComponent() {
46
46
 
47
47
  ### Disabled State
48
48
 
49
- 비활성 상태의 버튼입니다. 사용자가 클릭할 없으며 시각적으로도 비활성 상태임을 나타냅니다.
49
+ A disabled button cannot be clicked and is visually dimmed.
50
50
 
51
51
  ```tsx
52
52
  <>
@@ -67,7 +67,7 @@ function MyComponent() {
67
67
 
68
68
  ### Loading State
69
69
 
70
- 로딩 중일 사용하는 버튼입니다. 비동기 작업 수행 중에 사용자에게 진행 상태를 알려줍니다.
70
+ Shows a loading indicator during async operations. The button is automatically disabled while loading.
71
71
 
72
72
  ```tsx
73
73
  <Button
@@ -84,7 +84,7 @@ function MyComponent() {
84
84
 
85
85
  ### Variants
86
86
 
87
- 버튼의 시각적 스타일을 다양하게 변경할 있습니다.
87
+ Four visual styles are available to indicate action importance.
88
88
 
89
89
  ```tsx
90
90
  <>
@@ -103,14 +103,14 @@ function MyComponent() {
103
103
  </>
104
104
  ```
105
105
 
106
- - **solid**: 강조가 필요한 주요 액션 (기본값)
107
- - **soft**: 부드러운 배경의 보조 액션
108
- - **outlined**: 테두리만 있는 중요도가 낮은 액션
109
- - **plain**: 텍스트만 있는 최소한의 스타일
106
+ - **solid**: High-emphasis primary actions (default)
107
+ - **soft**: Medium-emphasis secondary actions with a subtle background
108
+ - **outlined**: Low-emphasis actions with a border
109
+ - **plain**: Minimal actions with text only
110
110
 
111
111
  ### Sizes
112
112
 
113
- 버튼의 크기를 조절할 있습니다.
113
+ Three sizes are available: `sm`, `md` (default), and `lg`.
114
114
 
115
115
  ```tsx
116
116
  <>
@@ -126,13 +126,9 @@ function MyComponent() {
126
126
  </>
127
127
  ```
128
128
 
129
- - **sm**: 작은 크기 (제한된 공간에서 사용)
130
- - **md**: 중간 크기 (기본값)
131
- - **lg**: 큰 크기 (강조가 필요한 경우)
132
-
133
129
  ### Colors
134
130
 
135
- 다양한 색상 테마를 적용할 있습니다.
131
+ Apply semantic colors to communicate intent.
136
132
 
137
133
  ```tsx
138
134
  <>
@@ -154,15 +150,15 @@ function MyComponent() {
154
150
  </>
155
151
  ```
156
152
 
157
- - **primary**: 주요 액션 (기본값)
158
- - **neutral**: 중립적인 액션
159
- - **success**: 성공/확인 액션
160
- - **warning**: 주의가 필요한 액션
161
- - **danger**: 위험한/삭제 액션
153
+ - **primary**: Main actions (default)
154
+ - **neutral**: Neutral actions
155
+ - **success**: Confirmation or positive actions
156
+ - **warning**: Caution-required actions
157
+ - **danger**: Destructive or irreversible actions
162
158
 
163
159
  ### Decorators
164
160
 
165
- 버튼에 아이콘이나 다른 요소를 추가할 있습니다.
161
+ Add icons or other elements before or after the button text using `startDecorator` and `endDecorator`.
166
162
 
167
163
  ```tsx
168
164
  <>
@@ -177,7 +173,7 @@ function MyComponent() {
177
173
 
178
174
  ### Loading Indicator
179
175
 
180
- 로딩 표시기를 커스터마이징할 있습니다.
176
+ Customize the loading spinner with the `loadingIndicator` prop.
181
177
 
182
178
  ```tsx
183
179
  <>
@@ -192,7 +188,7 @@ function MyComponent() {
192
188
 
193
189
  ### Loading Position
194
190
 
195
- 로딩 표시기의 위치를 조절할 있습니다.
191
+ Control where the loading indicator appears with `loadingPosition`.
196
192
 
197
193
  ```tsx
198
194
  <>
@@ -212,15 +208,15 @@ function MyComponent() {
212
208
  ```tsx
213
209
  <form onSubmit={handleSubmit}>
214
210
  <Stack spacing={2}>
215
- <Input placeholder="이름을 입력하세요" />
216
- <Input placeholder="이메일을 입력하세요" />
211
+ <Input placeholder="Enter your name" />
212
+ <Input placeholder="Enter your email" />
217
213
 
218
214
  <Stack direction="row" spacing={2} justifyContent="flex-end">
219
215
  <Button variant="outlined" type="button" onClick={handleCancel}>
220
- 취소
216
+ Cancel
221
217
  </Button>
222
218
  <Button type="submit" loading={isSubmitting}>
223
- {isSubmitting ? '저장 중...' : '저장'}
219
+ {isSubmitting ? 'Saving...' : 'Save'}
224
220
  </Button>
225
221
  </Stack>
226
222
  </Stack>
@@ -233,15 +229,15 @@ function MyComponent() {
233
229
  <Modal open={open}>
234
230
  <ModalDialog>
235
231
  <ModalClose />
236
- <DialogTitle>삭제 확인</DialogTitle>
237
- <DialogContent>정말로 항목을 삭제하시겠습니까? 작업은 되돌릴 없습니다.</DialogContent>
232
+ <DialogTitle>Confirm Deletion</DialogTitle>
233
+ <DialogContent>Are you sure you want to delete this item? This action cannot be undone.</DialogContent>
238
234
 
239
235
  <DialogActions>
240
236
  <Button variant="outlined" onClick={handleClose}>
241
- 취소
237
+ Cancel
242
238
  </Button>
243
239
  <Button color="danger" onClick={handleDelete}>
244
- 삭제
240
+ Delete
245
241
  </Button>
246
242
  </DialogActions>
247
243
  </ModalDialog>
@@ -252,14 +248,14 @@ function MyComponent() {
252
248
 
253
249
  ```tsx
254
250
  <Stack direction="row" spacing={2}>
255
- <Button startDecorator={<AddIcon />}>새로 만들기</Button>
251
+ <Button startDecorator={<AddIcon />}>Create New</Button>
256
252
 
257
253
  <Button variant="outlined" startDecorator={<DownloadIcon />} onClick={handleDownload}>
258
- 다운로드
254
+ Download
259
255
  </Button>
260
256
 
261
257
  <Button variant="soft" color="success" startDecorator={<ShareIcon />}>
262
- 공유
258
+ Share
263
259
  </Button>
264
260
  </Stack>
265
261
  ```
@@ -274,9 +270,6 @@ function AsyncButton() {
274
270
  setLoading(true);
275
271
  try {
276
272
  await api.processData();
277
- // 성공 처리
278
- } catch (error) {
279
- // 에러 처리
280
273
  } finally {
281
274
  setLoading(false);
282
275
  }
@@ -284,51 +277,84 @@ function AsyncButton() {
284
277
 
285
278
  return (
286
279
  <Button loading={loading} onClick={handleAsyncAction} startDecorator={<ProcessIcon />}>
287
- 데이터 처리
280
+ Process Data
288
281
  </Button>
289
282
  );
290
283
  }
291
284
  ```
292
285
 
293
- ### Button Groups
286
+ ## Props and Customization
287
+
288
+ ### Key Props
289
+
290
+ | Prop | Type | Default | Description |
291
+ | ------------------ | -------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------------- |
292
+ | `children` | `ReactNode` | - | Button content (text, icons, etc.) |
293
+ | `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'solid'` | Visual style |
294
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Button size |
295
+ | `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'primary'` | Color scheme |
296
+ | `disabled` | `boolean` | `false` | Disables the button |
297
+ | `loading` | `boolean` | `false` | Shows a loading indicator and disables the button |
298
+ | `loadingIndicator` | `ReactNode` | `<CircularProgress />` | Custom loading indicator element |
299
+ | `loadingPosition` | `'start' \| 'end'` | `'start'` | Where the loading indicator appears |
300
+ | `startDecorator` | `ReactNode` | - | Content rendered before the button text |
301
+ | `endDecorator` | `ReactNode` | - | Content rendered after the button text |
302
+ | `fullWidth` | `boolean` | `false` | Stretches the button to fill its container width |
303
+ | `component` | `ElementType` | `'button'` | Root element type (polymorphic — can render as `a`, `Link`, etc.) |
304
+ | `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | HTML button type attribute |
305
+ | `onClick` | `(event: MouseEvent) => void` | - | Click event handler |
306
+ | `sx` | `SxProps` | - | Custom styles using the MUI system |
307
+
308
+ > **Note**: Button also accepts all Joy UI Button props and Framer Motion props.
309
+
310
+ ### Polymorphic Usage
311
+
312
+ Button supports the `component` prop to render as a different element:
294
313
 
295
314
  ```tsx
296
- <Stack direction="row" spacing={1}>
297
- <Button variant="soft" size="sm">
298
- 전체
299
- </Button>
300
- <Button variant="outlined" size="sm">
301
- 진행중
302
- </Button>
303
- <Button variant="outlined" size="sm">
304
- 완료
305
- </Button>
306
- </Stack>
315
+ // Render as an anchor tag
316
+ <Button component="a" href="/dashboard">Go to Dashboard</Button>
317
+
318
+ // Render as a React Router Link
319
+ <Button component={Link} to="/settings">Settings</Button>
307
320
  ```
308
321
 
309
322
  ## Best Practices
310
323
 
311
- 1. **명확한 라벨**: 버튼의 기능을 명확하게 나타내는 텍스트를 사용하세요.
324
+ 1. **Choose the right variant for the action hierarchy**:
325
+ - Primary action: `solid`
326
+ - Secondary action: `outlined` or `soft`
327
+ - Tertiary/minimal action: `plain`
312
328
 
313
- 2. **적절한 변형 선택**:
314
- - 주요 액션: `solid`
315
- - 보조 액션: `outlined` 또는 `soft`
316
- - 최소한의 액션: `plain`
329
+ 2. **Use consistent color semantics**:
330
+ - Destructive actions: `danger`
331
+ - Confirmations: `success`
332
+ - Caution: `warning`
317
333
 
318
- 3. **색상 의미 일관성**:
319
- - 위험한 작업: `danger`
320
- - 성공/확인: `success`
321
- - 주의 필요: `warning`
334
+ 3. **Use clear, specific labels.** The button text should describe exactly what happens when clicked.
322
335
 
323
- 4. **로딩 상태 표시**: 비동기 작업 시 사용자에게 피드백을 제공하세요.
336
+ ```tsx
337
+ // ✅ Good
338
+ <Button color="danger">Delete Account</Button>
324
339
 
325
- 5. **접근성**: 적절한 ARIA 라벨과 키보드 탐색을 지원하세요.
340
+ // Bad
341
+ <Button color="danger">OK</Button>
342
+ ```
326
343
 
327
- ## Accessibility
344
+ 4. **Show loading state during async operations** to provide user feedback.
328
345
 
329
- - 키보드로 접근 가능 (Tab, Space, Enter)
330
- - 스크린 리더 지원
331
- - 적절한 색상 대비
332
- - 비활성 상태에서 포커스 불가
346
+ ```tsx
347
+ <Button loading={isSubmitting} type="submit">
348
+ Save Changes
349
+ </Button>
350
+ ```
351
+
352
+ 5. **Limit the number of primary buttons** in a view. Typically one `solid` primary button per section.
353
+
354
+ ## Accessibility
333
355
 
334
- Button은 사용자 인터페이스에서 가장 기본적이면서도 중요한 상호작용 요소입니다. 적절한 스타일과 상태 관리를 통해 직관적이고 접근 가능한 사용자 경험을 제공할 수 있습니다.
356
+ - **Keyboard accessible**: Tab to focus, Space or Enter to activate.
357
+ - **Screen reader support**: Button text is announced as the accessible name.
358
+ - **Disabled state**: When `disabled`, the button is removed from the tab order.
359
+ - **Loading state**: When `loading`, the button is announced as disabled. Consider adding `aria-label` to describe the loading context if the loading indicator replaces the text.
360
+ - **Color contrast**: All color/variant combinations meet WCAG AA contrast ratios.
@@ -383,6 +383,23 @@ const [view, setView] = useState('list');
383
383
 
384
384
  5. **Consider vertical orientation for narrow layouts.** On mobile or in sidebars, `orientation="vertical"` prevents horizontal overflow and improves usability.
385
385
 
386
+ ## Props and Customization
387
+
388
+ ### Key Props
389
+
390
+ | Prop | Type | Default | Description |
391
+ | ------------- | -------------------------------------------------------------- | -------------- | ----------------------------------- |
392
+ | `children` | `ReactNode` | - | Button elements inside the group |
393
+ | `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'outlined'` | Visual style applied to all buttons |
394
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size applied to all buttons |
395
+ | `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color applied to all buttons |
396
+ | `disabled` | `boolean` | `false` | Disables all buttons in the group |
397
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Layout direction |
398
+ | `spacing` | `number \| string` | `0` | Gap between buttons |
399
+ | `sx` | `SxProps` | - | Custom styles using the MUI system |
400
+
401
+ > **Note**: ButtonGroup accepts all Joy UI ButtonGroup props.
402
+
386
403
  ## Accessibility
387
404
 
388
405
  - **Keyboard navigation**: All buttons within the group are focusable and navigable using the `Tab` key. Each button is a standard focusable element that responds to `Enter` and `Space`.