@ceed/cds 1.28.1 → 1.29.0-next.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 (63) hide show
  1. package/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -1
  2. package/dist/components/CurrencyInput/hooks/use-currency-setting.d.ts +2 -2
  3. package/dist/components/SearchBar/SearchBar.d.ts +21 -0
  4. package/dist/components/SearchBar/index.d.ts +3 -0
  5. package/dist/components/data-display/DataTable.md +1 -1
  6. package/dist/components/data-display/InfoSign.md +91 -74
  7. package/dist/components/data-display/Typography.md +94 -411
  8. package/dist/components/feedback/Dialog.md +62 -76
  9. package/dist/components/feedback/Modal.md +138 -430
  10. package/dist/components/feedback/llms.txt +0 -2
  11. package/dist/components/index.d.ts +2 -1
  12. package/dist/components/inputs/Autocomplete.md +107 -356
  13. package/dist/components/inputs/ButtonGroup.md +104 -115
  14. package/dist/components/inputs/CurrencyInput.md +5 -183
  15. package/dist/components/inputs/DatePicker.md +431 -108
  16. package/dist/components/inputs/DateRangePicker.md +492 -131
  17. package/dist/components/inputs/FilterableCheckboxGroup.md +19 -145
  18. package/dist/components/inputs/IconButton.md +88 -137
  19. package/dist/components/inputs/Input.md +73 -204
  20. package/dist/components/inputs/MonthPicker.md +422 -95
  21. package/dist/components/inputs/MonthRangePicker.md +466 -89
  22. package/dist/components/inputs/PercentageInput.md +16 -185
  23. package/dist/components/inputs/RadioButton.md +35 -163
  24. package/dist/components/inputs/SearchBar.md +44 -0
  25. package/dist/components/inputs/Select.md +326 -222
  26. package/dist/components/inputs/Switch.md +376 -143
  27. package/dist/components/inputs/Textarea.md +10 -213
  28. package/dist/components/inputs/Uploader/Uploader.md +66 -145
  29. package/dist/components/inputs/llms.txt +1 -4
  30. package/dist/components/navigation/Breadcrumbs.md +308 -57
  31. package/dist/components/navigation/Drawer.md +0 -180
  32. package/dist/components/navigation/Dropdown.md +215 -98
  33. package/dist/components/navigation/IconMenuButton.md +502 -40
  34. package/dist/components/navigation/InsetDrawer.md +650 -281
  35. package/dist/components/navigation/Link.md +348 -31
  36. package/dist/components/navigation/Menu.md +285 -92
  37. package/dist/components/navigation/MenuButton.md +448 -55
  38. package/dist/components/navigation/Pagination.md +338 -47
  39. package/dist/components/navigation/Stepper.md +28 -160
  40. package/dist/components/navigation/Tabs.md +316 -57
  41. package/dist/components/surfaces/Accordions.md +804 -49
  42. package/dist/components/surfaces/Card.md +157 -97
  43. package/dist/components/surfaces/Divider.md +234 -83
  44. package/dist/components/surfaces/Sheet.md +328 -153
  45. package/dist/index.cjs +411 -574
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.js +400 -507
  48. package/dist/llms.txt +1 -9
  49. package/framer/index.js +1 -1
  50. package/package.json +17 -22
  51. package/dist/chunks/rehype-accent-FZRUD7VI.js +0 -39
  52. package/dist/components/RadioTileGroup/RadioTileGroup.d.ts +0 -56
  53. package/dist/components/RadioTileGroup/index.d.ts +0 -3
  54. package/dist/components/feedback/CircularProgress.md +0 -257
  55. package/dist/components/feedback/Skeleton.md +0 -280
  56. package/dist/components/inputs/FormControl.md +0 -361
  57. package/dist/components/inputs/RadioList.md +0 -241
  58. package/dist/components/inputs/RadioTileGroup.md +0 -507
  59. package/dist/components/inputs/Slider.md +0 -334
  60. package/dist/guides/ThemeProvider.md +0 -89
  61. package/dist/guides/llms.txt +0 -9
  62. package/dist/index.browser.js +0 -224
  63. package/dist/index.browser.js.map +0 -7
@@ -1,10 +1,6 @@
1
1
  # Input
2
2
 
3
- ## Introduction
4
-
5
- The Input component is a fundamental form element for capturing text input from users. It supports various visual styles, sizes, and states to accommodate different use cases across forms, search fields, and data entry interfaces.
6
-
7
- Input comes with built-in form integration features such as labels, helper text, error states, and clearable functionality. It also provides specialized behavior for password fields with an automatic visibility toggle.
3
+ Input 컴포넌트는 사용자로부터 텍스트 입력을 받기 위한 기본 컴포넌트입니다. 다양한 스타일, 크기 및 기능을 지원합니다.
8
4
 
9
5
  ```tsx
10
6
  <Input />
@@ -33,52 +29,17 @@ Input comes with built-in form integration features such as labels, helper text,
33
29
  | sx | — | — |
34
30
  | className | — | — |
35
31
 
36
- > **Use built-in form props**
37
- >
38
- > This component natively supports `label`, `helperText`, `error`, and `required` props.
39
- > When building forms, use these built-in props instead of manually composing labels and helper text with Typography or FormControl.
40
- >
41
- > ```tsx
42
- > // Recommended: use built-in props
43
- > <Input label="Email" helperText="We'll never share your email." error={!isValid} />
44
- >
45
- > // Not recommended: manual composition with Typography
46
- > <FormControl>
47
- > <Typography component="label">Email</Typography>
48
- > <Input />
49
- > <Typography level="body-xs">We'll never share your email.</Typography>
50
- > </FormControl>
51
- > ```
52
-
53
- ## Usage
54
-
55
- ```tsx
56
- import { Input } from '@ceed/cds';
57
-
58
- function MyComponent() {
59
- return (
60
- <Input
61
- label="Username"
62
- placeholder="Enter your username"
63
- helperText="Must be at least 3 characters"
64
- />
65
- );
66
- }
67
- ```
68
-
69
- ## Examples
32
+ ## 기본형
70
33
 
71
- ### Basic Input
72
-
73
- The default Input renders a single-line text field. Without any additional props, it uses the `outlined` variant at `md` size.
34
+ Input의 기본 형태입니다. 사용자의 텍스트 입력을 받는 단일 라인 필드입니다.
74
35
 
75
36
  ```tsx
76
37
  <Input />
77
38
  ```
78
39
 
79
- ### Variants
40
+ ## 변형(Variants)
80
41
 
81
- Input supports four visual variants: `solid`, `soft`, `outlined`, and `plain`. Use `outlined` (default) for most form contexts, and `soft` or `plain` for inline or subtle placements.
42
+ Input 가지 변형을 지원합니다: `solid`, `soft`, `outlined`, `plain`
82
43
 
83
44
  ```tsx
84
45
  <>
@@ -89,9 +50,9 @@ Input supports four visual variants: `solid`, `soft`, `outlined`, and `plain`. U
89
50
  </>
90
51
  ```
91
52
 
92
- ### Sizes
53
+ ## 크기(Sizes)
93
54
 
94
- Input comes in three sizes: `sm`, `md`, and `lg`. Choose a size that fits the surrounding UI density.
55
+ Input 가지 크기를 지원합니다: `sm`, `md`, `lg`
95
56
 
96
57
  ```tsx
97
58
  <>
@@ -101,11 +62,13 @@ Input comes in three sizes: `sm`, `md`, and `lg`. Choose a size that fits the su
101
62
  </>
102
63
  ```
103
64
 
104
- ## Label and Helper Text
65
+ ## 레이블 도움말 텍스트
66
+
67
+ Input 컴포넌트에 `label`과 `helperText` 속성을 추가하여 사용자에게 추가 정보를 제공할 수 있습니다.
105
68
 
106
- ### Label
69
+ ### 레이블(Label)
107
70
 
108
- Use the `label` prop to display a label above the Input. This is the recommended way to associate a label with the input field.
71
+ `label` 속성을 사용하여 Input 위에 레이블을 표시할 있습니다.
109
72
 
110
73
  ```tsx
111
74
  <>
@@ -113,9 +76,9 @@ Use the `label` prop to display a label above the Input. This is the recommended
113
76
  </>
114
77
  ```
115
78
 
116
- ### Helper Text
79
+ ### 도움말 텍스트(Helper Text)
117
80
 
118
- Use the `helperText` prop to provide additional guidance below the Input.
81
+ `helperText` 속성을 사용하여 Input 아래에 추가 정보를 제공할 수 있습니다.
119
82
 
120
83
  ```tsx
121
84
  <>
@@ -123,19 +86,19 @@ Use the `helperText` prop to provide additional guidance below the Input.
123
86
  </>
124
87
  ```
125
88
 
126
- ## States
89
+ ## 상태(States)
127
90
 
128
- ### Disabled
91
+ ### 비활성화(Disabled)
129
92
 
130
- Set `disabled` to prevent user interaction. Disabled inputs are visually dimmed and do not receive focus.
93
+ `disabled` 속성을 사용하여 Input을 비활성화할 있습니다.
131
94
 
132
95
  ```tsx
133
96
  <Input disabled />
134
97
  ```
135
98
 
136
- ### Error
99
+ ### 오류 상태(Error)
137
100
 
138
- Set `error` to indicate a validation failure. Combine with `helperText` to explain the error.
101
+ `error` 속성을 사용하여 오류 상태를 표시할 있습니다.
139
102
 
140
103
  ```tsx
141
104
  <>
@@ -143,9 +106,9 @@ Set `error` to indicate a validation failure. Combine with `helperText` to expla
143
106
  </>
144
107
  ```
145
108
 
146
- ### Required
109
+ ### 필수 값(Required)
147
110
 
148
- Set `required` to mark the field as mandatory. This adds a visual indicator to the label.
111
+ `required` 속성을 사용하여 필수 입력 필드임을 표시할 있습니다.
149
112
 
150
113
  ```tsx
151
114
  <Input
@@ -156,20 +119,9 @@ Set `required` to mark the field as mandatory. This adds a visual indicator to t
156
119
  />
157
120
  ```
158
121
 
159
- ## Form Control
160
-
161
- Combine `label`, `helperText`, and `error` props to build a complete form control. This is the recommended pattern for form fields.
162
-
163
- ```tsx
164
- <>
165
- <Input placeholder="Type in here..." helperText="I'm helper text" label="Label" />
166
- <Input placeholder="Invalid input" helperText="I'm helper text" label="Label" error />
167
- </>
168
- ```
169
-
170
- ## Decorators
122
+ ## 장식자(Decorators)
171
123
 
172
- Use `startDecorator` and `endDecorator` to place icons, buttons, or other elements at the start and end of the input field.
124
+ Input 컴포넌트는 `startDecorator`와 `endDecorator` 속성을 통해 입력 필드의 시작과 부분에 아이콘, 버튼 또는 기타 요소를 추가할 있습니다.
173
125
 
174
126
  ```tsx
175
127
  <Stack spacing={3}>
@@ -209,7 +161,7 @@ width: 300
209
161
  </Stack>
210
162
  ```
211
163
 
212
- When using `endDecorator` together with `enableClearable`, the clear button is placed before the end decorator:
164
+ `endDecorator`와 `enableClearable`을 함께 사용하면 다음과 같습니다:
213
165
 
214
166
  ```tsx
215
167
  <Input
@@ -220,9 +172,9 @@ When using `endDecorator` together with `enableClearable`, the clear button is p
220
172
  />
221
173
  ```
222
174
 
223
- ## Clearable Input
175
+ ## 지울 수 있는 입력(Clearable Input)
224
176
 
225
- Set `enableClearable` to show a clear button when the input has a value. Clicking the button clears the input and returns focus to the field.
177
+ `enableClearable` 속성을 사용하여 Input에 내용을 지울 있는 버튼을 추가할 있습니다.
226
178
 
227
179
  ```tsx
228
180
  <>
@@ -230,9 +182,9 @@ Set `enableClearable` to show a clear button when the input has a value. Clickin
230
182
  </>
231
183
  ```
232
184
 
233
- ## Password Input
185
+ ## 비밀번호 입력(Password Input)
234
186
 
235
- Setting `type="password"` automatically adds a visibility toggle button, allowing users to reveal or hide their password.
187
+ `type="password"` 속성을 사용하면 비밀번호 입력 필드가 생성되며, 자동으로 비밀번호 표시/숨김 토글 버튼이 추가됩니다.
236
188
 
237
189
  ```tsx
238
190
  <Stack spacing={3}>
@@ -247,168 +199,85 @@ Setting `type="password"` automatically adds a visibility toggle button, allowin
247
199
  </Stack>
248
200
  ```
249
201
 
250
- ### Password Limitations
202
+ ### 비밀번호 토글 비활성화
251
203
 
252
- When `type="password"` is used, the `endDecorator` prop is not supported because the password toggle button occupies that position.
204
+ 비밀번호 입력 필드의 토글 버튼은 `disableTogglePasswordButton` 속성을 사용하여 비활성화할 있습니다.
253
205
 
254
206
  ```tsx
255
207
  <Stack spacing={3}>
256
- <Typography level="body-md">When type="password", the endDecorator is not supported:</Typography>
257
- <Input {...args} placeholder="Enter password" type="password" label="Password with endDecorator (will show warning)" endDecorator={<Chip color="primary">Hi</Chip>} />
258
-
259
- <Typography level="body-md">The password toggle button takes precedence:</Typography>
208
+ <Typography level="body-md">Default password input with toggle button:</Typography>
260
209
  <Input {...args} placeholder="Enter password" type="password" label="Password" />
261
- </Stack>
262
- ```
263
210
 
264
- ## State Management
265
-
266
- ### Controlled Component
267
-
268
- Use `value` and `onChange` to manage the input state externally. This is useful when you need to synchronize the value with other components or perform validation on change.
211
+ <Typography level="body-md">Disabled password input:</Typography>
212
+ <Input {...args} placeholder="Enter password" type="password" label="Disabled Password" disabled />
269
213
 
270
- ```tsx
271
- <>
272
- <Input placeholder="Type in here…" label="Label" enableClearable value={value} onChange={handleChange} />
273
- </>
214
+ <Typography level="body-md">Password input with toggle button disabled:</Typography>
215
+ <Input {...args} placeholder="Enter password" type="password" label="No Toggle" disableTogglePasswordButton />
216
+ </Stack>
274
217
  ```
275
218
 
276
- ### Uncontrolled Component
219
+ ### 비밀번호 입력의 제한 사항
277
220
 
278
- Use `defaultValue` for simpler cases where you do not need to track the value in state. The input manages its own value internally.
221
+ 비밀번호 입력 필드(`type="password"`)에서는 `endDecorator`를 사용할 없습니다. 이는 비밀번호 토글 버튼이 해당 위치를 차지하기 때문입니다.
279
222
 
280
223
  ```tsx
281
- <Input defaultValue="Initial text" placeholder="Type in here..." />
224
+ <Stack spacing={3}>
225
+ <Typography level="body-md">When type="password", the endDecorator is not supported:</Typography>
226
+ <Input {...args} placeholder="Enter password" type="password" label="Password with endDecorator (will show warning)" endDecorator={<Chip color="primary">Hi</Chip>} />
227
+
228
+ <Typography level="body-md">The password toggle button takes precedence:</Typography>
229
+ <Input {...args} placeholder="Enter password" type="password" label="Password" />
230
+ </Stack>
282
231
  ```
283
232
 
284
- ## Common Use Cases
233
+ ## 컨트롤(Form Control)
285
234
 
286
- ### Login Form
235
+ Input 컴포넌트는 `label`, `helperText`, `error` 속성을 조합하여 완전한 폼 컨트롤을 구성할 수 있습니다.
287
236
 
288
237
  ```tsx
289
- function LoginForm() {
290
- const [email, setEmail] = useState('');
291
- const [password, setPassword] = useState('');
292
-
293
- return (
294
- <Stack spacing={2}>
295
- <Input
296
- label="Email"
297
- type="email"
298
- placeholder="you@example.com"
299
- required
300
- value={email}
301
- onChange={(e) => setEmail(e.target.value)}
302
- />
303
- <Input
304
- label="Password"
305
- type="password"
306
- placeholder="Enter your password"
307
- required
308
- value={password}
309
- onChange={(e) => setPassword(e.target.value)}
310
- />
311
- <Button type="submit">Sign In</Button>
312
- </Stack>
313
- );
314
- }
238
+ <>
239
+ <Input placeholder="Type in here..." helperText="I'm helper text" label="Label" />
240
+ <Input placeholder="Invalid input" helperText="I'm helper text" label="Label" error />
241
+ </>
315
242
  ```
316
243
 
317
- ### Search Field with Clear
244
+ ## 상태 관리
318
245
 
319
- ```tsx
320
- function SearchField({ onSearch }) {
321
- const [query, setQuery] = useState('');
322
-
323
- return (
324
- <Input
325
- placeholder="Search..."
326
- startDecorator={<SearchIcon />}
327
- enableClearable
328
- value={query}
329
- onChange={(e) => {
330
- setQuery(e.target.value);
331
- onSearch(e.target.value);
332
- }}
333
- />
334
- );
335
- }
336
- ```
246
+ ### 제어 컴포넌트(Controlled Component)
337
247
 
338
- ### Form with Validation
248
+ Input은 React의 제어 컴포넌트로 사용할 수 있습니다. `value`와 `onChange` 속성을 사용하여 상태를 관리합니다.
339
249
 
340
250
  ```tsx
341
- function ProfileForm() {
342
- const [name, setName] = useState('');
343
- const [submitted, setSubmitted] = useState(false);
344
- const hasError = submitted && name.trim().length === 0;
345
-
346
- return (
347
- <Stack spacing={2}>
348
- <Input
349
- label="Full Name"
350
- required
351
- placeholder="John Doe"
352
- value={name}
353
- onChange={(e) => setName(e.target.value)}
354
- error={hasError}
355
- helperText={hasError ? 'Name is required' : 'Enter your legal name'}
356
- />
357
- <Button onClick={() => setSubmitted(true)}>Save</Button>
358
- </Stack>
359
- );
360
- }
251
+ <>
252
+ <Input placeholder="Type in here…" label="Label" enableClearable value={value} onChange={handleChange} />
253
+ </>
361
254
  ```
362
255
 
363
- ## Best Practices
256
+ ### 비제어 컴포넌트(Uncontrolled Component)
364
257
 
365
- 1. **Always provide a label**: Every input should have a visible label so users understand what to enter.
258
+ `defaultValue` 속성을 사용하여 비제어 컴포넌트로도 사용 가능합니다.
366
259
 
367
- ```tsx
368
- // ✅ Good: clear label
369
- <Input label="Email address" placeholder="you@example.com" />
260
+ ## 접근성(Accessibility)
370
261
 
371
- // Bad: placeholder only, no label
372
- <Input placeholder="Email address" />
373
- ```
262
+ Input 컴포넌트는 접근성 표준을 준수합니다:
374
263
 
375
- 2. **Use helper text for guidance, error text for problems**: Provide contextual help via `helperText`, and switch to error messaging when validation fails.
264
+ - 적절한 레이블과 연결되어 있습니다.
265
+ - 키보드 탐색이 가능합니다.
266
+ - 오류 상태는 시각적으로 명확하게 표시됩니다.
376
267
 
377
- ```tsx
378
- // ✅ Good: helpful context + error state
379
- <Input
380
- label="Password"
381
- type="password"
382
- helperText={hasError ? 'Must be at least 8 characters' : 'Choose a strong password'}
383
- error={hasError}
384
- />
268
+ ## 테스팅(Testing)
385
269
 
386
- // Bad: no guidance at all
387
- <Input label="Password" type="password" />
388
- ```
270
+ ### Testing Library 참고사항
389
271
 
390
- 3. **Choose the right input type**: Use `type` to match the expected data (e.g., `email`, `tel`, `password`, `number`). This enables appropriate browser behavior and mobile keyboards.
272
+ - `type="password"` 속성을 가진 Input을 Testing Library로 찾을 때는 항상 `textbox` 역할(role) 찾아야 합니다.
273
+ - 이는 ARIA 명세에 따라 `password` 입력이 특별한 role을 갖지 않고 기본적으로 `textbox` role을 사용하기 때문입니다.
391
274
 
392
275
  ```tsx
393
- // Good: appropriate type for email
394
- <Input label="Email" type="email" />
395
-
396
- // ❌ Bad: generic text type for email
397
- <Input label="Email" type="text" />
276
+ // 비밀번호 입력 필드를 찾는 예시
277
+ const passwordInput = screen.getByRole('textbox', { name: /비밀번호/i });
398
278
  ```
399
279
 
400
- 4. **Use `enableClearable` for search and filter inputs**: Allow users to quickly reset their input in search and filter contexts.
401
-
402
- 5. **Use built-in form props instead of manual composition**: Prefer `label`, `helperText`, `error`, and `required` props over wrapping with FormControl and Typography. This ensures consistent spacing, accessibility, and error handling.
403
-
404
- ## Accessibility
280
+ **참고 이슈:**
405
281
 
406
- - **Label association**: The `label` prop automatically creates a properly associated `<label>` element. If you cannot use the `label` prop, provide an `aria-label` or `aria-labelledby` attribute.
407
- - **Error announcement**: When `error` is set, the error state is conveyed to assistive technologies via `aria-invalid`. Combine with descriptive `helperText` so screen readers can announce the error message.
408
- - **Keyboard interaction**: Input supports standard keyboard behavior. The clear button and password toggle are focusable and can be activated with Enter or Space.
409
- - **Testing note**: When using Testing Library, find a `type="password"` input using the `textbox` role, as ARIA does not define a separate `password` role.
410
-
411
- ```tsx
412
- // Finding a password input in tests
413
- const passwordInput = screen.getByRole('textbox', { name: /password/i });
414
- ```
282
+ - [W3C ARIA: Should there be a role=password?](https://github.com/w3c/aria/issues/935)
283
+ - [Testing Library: How to find password inputs](https://github.com/testing-library/dom-testing-library/issues/567)