@ceed/ads 1.35.0 → 1.36.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 (124) hide show
  1. package/README.md +85 -95
  2. package/dist/components/Accordions/Accordions.d.ts +1 -0
  3. package/dist/components/Alert/Alert.d.ts +5 -5
  4. package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
  5. package/dist/components/Avatar/Avatar.d.ts +7 -17
  6. package/dist/components/Box/Box.d.ts +1 -0
  7. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -5
  8. package/dist/components/Button/Button.d.ts +3 -2
  9. package/dist/components/Calendar/Calendar.d.ts +1 -0
  10. package/dist/components/Card/Card.d.ts +1 -0
  11. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  12. package/dist/components/Chip/Chip.d.ts +1 -0
  13. package/dist/components/Container/Container.d.ts +6 -1
  14. package/dist/components/DialogActions/DialogActions.d.ts +1 -0
  15. package/dist/components/DialogContent/DialogContent.d.ts +1 -0
  16. package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
  17. package/dist/components/DialogTitle/DialogTitle.d.ts +1 -0
  18. package/dist/components/Divider/Divider.d.ts +1 -0
  19. package/dist/components/Dropdown/Dropdown.d.ts +28 -1
  20. package/dist/components/FilterMenu/components/MonthRange.d.ts +11 -0
  21. package/dist/components/FilterMenu/types.d.ts +5 -1
  22. package/dist/components/FormControl/FormControl.d.ts +1 -0
  23. package/dist/components/FormHelperText/FormHelperText.d.ts +1 -0
  24. package/dist/components/FormLabel/FormLabel.d.ts +1 -0
  25. package/dist/components/Grid/Grid.d.ts +1 -0
  26. package/dist/components/IconButton/IconButton.d.ts +3 -2
  27. package/dist/components/IconMenuButton/IconMenuButton.d.ts +7 -6
  28. package/dist/components/InfoSign/InfoSign.d.ts +3 -2
  29. package/dist/components/Input/Input.d.ts +8 -22
  30. package/dist/components/InsetDrawer/InsetDrawer.d.ts +1 -0
  31. package/dist/components/Markdown/Markdown.d.ts +9 -24
  32. package/dist/components/Menu/Menu.d.ts +2 -1
  33. package/dist/components/MenuButton/MenuButton.d.ts +10 -8
  34. package/dist/components/Modal/Modal.d.ts +4 -2
  35. package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -2
  36. package/dist/components/NavigationItem/NavigationItem.d.ts +3 -2
  37. package/dist/components/Navigator/Navigator.d.ts +5 -4
  38. package/dist/components/Pagination/Pagination.d.ts +1 -1
  39. package/dist/components/ProfileMenu/ProfileMenu.d.ts +2 -2
  40. package/dist/components/Radio/Radio.d.ts +1 -0
  41. package/dist/components/RadioList/RadioList.d.ts +3 -2
  42. package/dist/components/SearchBar/SearchBar.d.ts +6 -5
  43. package/dist/components/SearchBar/index.d.ts +3 -2
  44. package/dist/components/Select/Select.d.ts +12 -10
  45. package/dist/components/Sheet/Sheet.d.ts +1 -0
  46. package/dist/components/Stack/Stack.d.ts +1 -0
  47. package/dist/components/Stepper/Stepper.d.ts +2 -1
  48. package/dist/components/Switch/Switch.d.ts +1 -0
  49. package/dist/components/Table/Table.d.ts +7 -5
  50. package/dist/components/Tabs/Tabs.d.ts +1 -0
  51. package/dist/components/Textarea/Textarea.d.ts +8 -20
  52. package/dist/components/ThemeProvider/ThemeProvider.d.ts +4 -2
  53. package/dist/components/Tooltip/Tooltip.d.ts +1 -0
  54. package/dist/components/Typography/Typography.d.ts +1 -0
  55. package/dist/components/Uploader/Uploader.d.ts +18 -17
  56. package/dist/components/data-display/Avatar.md +60 -72
  57. package/dist/components/data-display/Badge.md +197 -181
  58. package/dist/components/data-display/Chip.md +164 -142
  59. package/dist/components/data-display/DataTable.md +843 -338
  60. package/dist/components/data-display/InfoSign.md +1 -3
  61. package/dist/components/data-display/Markdown.md +93 -125
  62. package/dist/components/data-display/Table.md +1453 -1007
  63. package/dist/components/data-display/Typography.md +101 -104
  64. package/dist/components/feedback/Alert.md +80 -86
  65. package/dist/components/feedback/CircularProgress.md +32 -36
  66. package/dist/components/feedback/Dialog.md +25 -17
  67. package/dist/components/feedback/Modal.md +296 -265
  68. package/dist/components/feedback/Skeleton.md +125 -89
  69. package/dist/components/index.d.ts +61 -3
  70. package/dist/components/inputs/Autocomplete.md +191 -95
  71. package/dist/components/inputs/Button.md +83 -83
  72. package/dist/components/inputs/ButtonGroup.md +195 -185
  73. package/dist/components/inputs/Calendar.md +25 -28
  74. package/dist/components/inputs/Checkbox.md +11 -29
  75. package/dist/components/inputs/CurrencyInput.md +4 -4
  76. package/dist/components/inputs/DatePicker.md +229 -110
  77. package/dist/components/inputs/DateRangePicker.md +248 -137
  78. package/dist/components/inputs/FilterMenu.md +138 -8
  79. package/dist/components/inputs/FilterableCheckboxGroup.md +115 -55
  80. package/dist/components/inputs/FormControl.md +75 -69
  81. package/dist/components/inputs/IconButton.md +229 -205
  82. package/dist/components/inputs/Input.md +131 -98
  83. package/dist/components/inputs/MonthPicker.md +186 -84
  84. package/dist/components/inputs/MonthRangePicker.md +73 -49
  85. package/dist/components/inputs/PercentageInput.md +15 -31
  86. package/dist/components/inputs/RadioButton.md +320 -256
  87. package/dist/components/inputs/RadioList.md +66 -50
  88. package/dist/components/inputs/RadioTileGroup.md +287 -170
  89. package/dist/components/inputs/SearchBar.md +154 -55
  90. package/dist/components/inputs/Select.md +106 -95
  91. package/dist/components/inputs/Slider.md +153 -102
  92. package/dist/components/inputs/Switch.md +193 -138
  93. package/dist/components/inputs/Textarea.md +15 -20
  94. package/dist/components/inputs/Uploader/Uploader.md +68 -39
  95. package/dist/components/layout/Box.md +841 -662
  96. package/dist/components/layout/Container.md +3 -11
  97. package/dist/components/layout/Grid.md +480 -394
  98. package/dist/components/layout/Stack.md +739 -566
  99. package/dist/components/navigation/Breadcrumbs.md +182 -116
  100. package/dist/components/navigation/Dropdown.md +732 -391
  101. package/dist/components/navigation/IconMenuButton.md +14 -6
  102. package/dist/components/navigation/InsetDrawer.md +550 -378
  103. package/dist/components/navigation/Link.md +104 -94
  104. package/dist/components/navigation/Menu.md +623 -502
  105. package/dist/components/navigation/MenuButton.md +18 -10
  106. package/dist/components/navigation/NavigationGroup.md +19 -50
  107. package/dist/components/navigation/NavigationItem.md +6 -6
  108. package/dist/components/navigation/Navigator.md +26 -28
  109. package/dist/components/navigation/Pagination.md +86 -75
  110. package/dist/components/navigation/ProfileMenu.md +65 -43
  111. package/dist/components/navigation/Stepper.md +2 -12
  112. package/dist/components/navigation/Tabs.md +209 -183
  113. package/dist/components/surfaces/Accordions.md +89 -172
  114. package/dist/components/surfaces/Card.md +1094 -709
  115. package/dist/components/surfaces/Divider.md +562 -412
  116. package/dist/components/surfaces/Sheet.md +700 -518
  117. package/dist/guides/ThemeProvider.md +65 -40
  118. package/dist/index.browser.js +4 -4
  119. package/dist/index.browser.js.map +4 -4
  120. package/dist/index.cjs +1653 -1560
  121. package/dist/index.d.ts +1 -1
  122. package/dist/index.js +1316 -1215
  123. package/framer/index.js +1 -1
  124. package/package.json +32 -35
@@ -8,10 +8,10 @@ By applying shared props like `color`, `variant`, `size`, and `orientation` at t
8
8
 
9
9
  ```tsx
10
10
  <ButtonGroup {...args}>
11
- <Button>첫번째</Button>
12
- <Button>두번째</Button>
13
- <Button>세번째</Button>
14
- </ButtonGroup>
11
+ <Button>첫번째</Button>
12
+ <Button>두번째</Button>
13
+ <Button>세번째</Button>
14
+ </ButtonGroup>
15
15
  ```
16
16
 
17
17
  | Field | Description | Default |
@@ -43,41 +43,43 @@ function MyComponent() {
43
43
  Apply a unified color theme to all buttons in the group using the `color` prop. Available colors are `primary`, `neutral`, `danger`, `success`, and `warning`.
44
44
 
45
45
  ```tsx
46
- <div style={{
47
- display: 'flex',
48
- gap: '1rem',
49
- flexDirection: 'column'
50
- }}>
51
- <ButtonGroup color="primary">
52
- <Button>Primary</Button>
53
- <Button>Button</Button>
54
- <Button>Group</Button>
55
- </ButtonGroup>
46
+ <div
47
+ style={{
48
+ display: "flex",
49
+ gap: "1rem",
50
+ flexDirection: "column"
51
+ }}
52
+ >
53
+ <ButtonGroup color="primary">
54
+ <Button>Primary</Button>
55
+ <Button>Button</Button>
56
+ <Button>Group</Button>
57
+ </ButtonGroup>
56
58
 
57
- <ButtonGroup color="neutral">
58
- <Button>Neutral</Button>
59
- <Button>Button</Button>
60
- <Button>Group</Button>
61
- </ButtonGroup>
59
+ <ButtonGroup color="neutral">
60
+ <Button>Neutral</Button>
61
+ <Button>Button</Button>
62
+ <Button>Group</Button>
63
+ </ButtonGroup>
62
64
 
63
- <ButtonGroup color="danger">
64
- <Button>Danger</Button>
65
- <Button>Button</Button>
66
- <Button>Group</Button>
67
- </ButtonGroup>
65
+ <ButtonGroup color="danger">
66
+ <Button>Danger</Button>
67
+ <Button>Button</Button>
68
+ <Button>Group</Button>
69
+ </ButtonGroup>
68
70
 
69
- <ButtonGroup color="success">
70
- <Button>Success</Button>
71
- <Button>Button</Button>
72
- <Button>Group</Button>
73
- </ButtonGroup>
71
+ <ButtonGroup color="success">
72
+ <Button>Success</Button>
73
+ <Button>Button</Button>
74
+ <Button>Group</Button>
75
+ </ButtonGroup>
74
76
 
75
- <ButtonGroup color="warning">
76
- <Button>Warning</Button>
77
- <Button>Button</Button>
78
- <Button>Group</Button>
79
- </ButtonGroup>
80
- </div>
77
+ <ButtonGroup color="warning">
78
+ <Button>Warning</Button>
79
+ <Button>Button</Button>
80
+ <Button>Group</Button>
81
+ </ButtonGroup>
82
+ </div>
81
83
  ```
82
84
 
83
85
  ## Variants
@@ -85,35 +87,37 @@ Apply a unified color theme to all buttons in the group using the `color` prop.
85
87
  ButtonGroup supports four visual variants: `solid`, `soft`, `outlined`, and `plain`. The variant prop propagates to all child buttons, ensuring a consistent look.
86
88
 
87
89
  ```tsx
88
- <div style={{
89
- display: 'flex',
90
- gap: '1rem',
91
- flexDirection: 'column'
92
- }}>
93
- <ButtonGroup variant="solid">
94
- <Button>Solid</Button>
95
- <Button>Button</Button>
96
- <Button>Group</Button>
97
- </ButtonGroup>
90
+ <div
91
+ style={{
92
+ display: "flex",
93
+ gap: "1rem",
94
+ flexDirection: "column"
95
+ }}
96
+ >
97
+ <ButtonGroup variant="solid">
98
+ <Button>Solid</Button>
99
+ <Button>Button</Button>
100
+ <Button>Group</Button>
101
+ </ButtonGroup>
98
102
 
99
- <ButtonGroup variant="soft">
100
- <Button>Soft</Button>
101
- <Button>Button</Button>
102
- <Button>Group</Button>
103
- </ButtonGroup>
103
+ <ButtonGroup variant="soft">
104
+ <Button>Soft</Button>
105
+ <Button>Button</Button>
106
+ <Button>Group</Button>
107
+ </ButtonGroup>
104
108
 
105
- <ButtonGroup variant="outlined">
106
- <Button>Outlined</Button>
107
- <Button>Button</Button>
108
- <Button>Group</Button>
109
- </ButtonGroup>
109
+ <ButtonGroup variant="outlined">
110
+ <Button>Outlined</Button>
111
+ <Button>Button</Button>
112
+ <Button>Group</Button>
113
+ </ButtonGroup>
110
114
 
111
- <ButtonGroup variant="plain">
112
- <Button>Plain</Button>
113
- <Button>Button</Button>
114
- <Button>Group</Button>
115
- </ButtonGroup>
116
- </div>
115
+ <ButtonGroup variant="plain">
116
+ <Button>Plain</Button>
117
+ <Button>Button</Button>
118
+ <Button>Group</Button>
119
+ </ButtonGroup>
120
+ </div>
117
121
  ```
118
122
 
119
123
  ## Sizes
@@ -121,30 +125,32 @@ ButtonGroup supports four visual variants: `solid`, `soft`, `outlined`, and `pla
121
125
  Control the size of all buttons in the group with the `size` prop. Available sizes are `sm`, `md` (default), and `lg`.
122
126
 
123
127
  ```tsx
124
- <div style={{
125
- display: 'flex',
126
- gap: '1rem',
127
- flexDirection: 'column',
128
- alignItems: 'flex-start'
129
- }}>
130
- <ButtonGroup size="sm">
131
- <Button>Small</Button>
132
- <Button>Button</Button>
133
- <Button>Group</Button>
134
- </ButtonGroup>
128
+ <div
129
+ style={{
130
+ display: "flex",
131
+ gap: "1rem",
132
+ flexDirection: "column",
133
+ alignItems: "flex-start"
134
+ }}
135
+ >
136
+ <ButtonGroup size="sm">
137
+ <Button>Small</Button>
138
+ <Button>Button</Button>
139
+ <Button>Group</Button>
140
+ </ButtonGroup>
135
141
 
136
- <ButtonGroup size="md">
137
- <Button>Medium</Button>
138
- <Button>Button</Button>
139
- <Button>Group</Button>
140
- </ButtonGroup>
142
+ <ButtonGroup size="md">
143
+ <Button>Medium</Button>
144
+ <Button>Button</Button>
145
+ <Button>Group</Button>
146
+ </ButtonGroup>
141
147
 
142
- <ButtonGroup size="lg">
143
- <Button>Large</Button>
144
- <Button>Button</Button>
145
- <Button>Group</Button>
146
- </ButtonGroup>
147
- </div>
148
+ <ButtonGroup size="lg">
149
+ <Button>Large</Button>
150
+ <Button>Button</Button>
151
+ <Button>Group</Button>
152
+ </ButtonGroup>
153
+ </div>
148
154
  ```
149
155
 
150
156
  ## Orientations
@@ -152,29 +158,31 @@ Control the size of all buttons in the group with the `size` prop. Available siz
152
158
  Buttons can be arranged horizontally (default) or vertically. Use `orientation="vertical"` for stacked layouts such as side panels or narrow containers.
153
159
 
154
160
  ```tsx
155
- <div style={{
156
- display: 'flex',
157
- gap: '2rem',
158
- alignItems: 'flex-start'
159
- }}>
160
- <div>
161
- <h4>Horizontal</h4>
162
- <ButtonGroup orientation="horizontal">
163
- <Button>첫번째</Button>
164
- <Button>두번째</Button>
165
- <Button>세번째</Button>
166
- </ButtonGroup>
167
- </div>
168
-
169
- <div>
170
- <h4>Vertical</h4>
171
- <ButtonGroup orientation="vertical">
172
- <Button>첫번째</Button>
173
- <Button>두번째</Button>
174
- <Button>세번째</Button>
175
- </ButtonGroup>
176
- </div>
177
- </div>
161
+ <div
162
+ style={{
163
+ display: "flex",
164
+ gap: "2rem",
165
+ alignItems: "flex-start"
166
+ }}
167
+ >
168
+ <div>
169
+ <h4>Horizontal</h4>
170
+ <ButtonGroup orientation="horizontal">
171
+ <Button>첫번째</Button>
172
+ <Button>두번째</Button>
173
+ <Button>세번째</Button>
174
+ </ButtonGroup>
175
+ </div>
176
+
177
+ <div>
178
+ <h4>Vertical</h4>
179
+ <ButtonGroup orientation="vertical">
180
+ <Button>첫번째</Button>
181
+ <Button>두번째</Button>
182
+ <Button>세번째</Button>
183
+ </ButtonGroup>
184
+ </div>
185
+ </div>
178
186
  ```
179
187
 
180
188
  ## With Icons
@@ -182,23 +190,25 @@ Buttons can be arranged horizontally (default) or vertically. Use `orientation="
182
190
  Combine text labels with icons using the `startDecorator` prop on individual buttons for a richer, more descriptive interface.
183
191
 
184
192
  ```tsx
185
- <div style={{
186
- display: 'flex',
187
- gap: '2rem',
188
- flexDirection: 'column'
189
- }}>
190
- <ButtonGroup>
191
- <Button startDecorator={<Add />}>추가</Button>
192
- <Button startDecorator={<Edit />}>편집</Button>
193
- <Button startDecorator={<Delete />}>삭제</Button>
194
- </ButtonGroup>
193
+ <div
194
+ style={{
195
+ display: "flex",
196
+ gap: "2rem",
197
+ flexDirection: "column"
198
+ }}
199
+ >
200
+ <ButtonGroup>
201
+ <Button startDecorator={<Add />}>추가</Button>
202
+ <Button startDecorator={<Edit />}>편집</Button>
203
+ <Button startDecorator={<Delete />}>삭제</Button>
204
+ </ButtonGroup>
195
205
 
196
- <ButtonGroup variant="outlined">
197
- <Button startDecorator={<Save />} />
198
- <Button startDecorator={<Share />} />
199
- <Button startDecorator={<Edit />} />
200
- </ButtonGroup>
201
- </div>
206
+ <ButtonGroup variant="outlined">
207
+ <Button startDecorator={<Save />} />
208
+ <Button startDecorator={<Share />} />
209
+ <Button startDecorator={<Edit />} />
210
+ </ButtonGroup>
211
+ </div>
202
212
  ```
203
213
 
204
214
  ## States
@@ -206,38 +216,40 @@ Combine text labels with icons using the `startDecorator` prop on individual but
206
216
  ButtonGroup supports disabled states at the group level (affecting all children) or on individual buttons for mixed-state scenarios.
207
217
 
208
218
  ```tsx
209
- <div style={{
210
- display: 'flex',
211
- gap: '2rem',
212
- flexDirection: 'column'
213
- }}>
214
- <div>
215
- <h4>Normal</h4>
216
- <ButtonGroup>
217
- <Button>첫번째</Button>
218
- <Button>두번째</Button>
219
- <Button>세번째</Button>
220
- </ButtonGroup>
221
- </div>
222
-
223
- <div>
224
- <h4>Disabled</h4>
225
- <ButtonGroup disabled>
226
- <Button>첫번째</Button>
227
- <Button>두번째</Button>
228
- <Button>세번째</Button>
229
- </ButtonGroup>
230
- </div>
231
-
232
- <div>
233
- <h4>Mixed States</h4>
234
- <ButtonGroup>
235
- <Button>활성</Button>
236
- <Button disabled>비활성</Button>
237
- <Button>활성</Button>
238
- </ButtonGroup>
239
- </div>
240
- </div>
219
+ <div
220
+ style={{
221
+ display: "flex",
222
+ gap: "2rem",
223
+ flexDirection: "column"
224
+ }}
225
+ >
226
+ <div>
227
+ <h4>Normal</h4>
228
+ <ButtonGroup>
229
+ <Button>첫번째</Button>
230
+ <Button>두번째</Button>
231
+ <Button>세번째</Button>
232
+ </ButtonGroup>
233
+ </div>
234
+
235
+ <div>
236
+ <h4>Disabled</h4>
237
+ <ButtonGroup disabled>
238
+ <Button>첫번째</Button>
239
+ <Button>두번째</Button>
240
+ <Button>세번째</Button>
241
+ </ButtonGroup>
242
+ </div>
243
+
244
+ <div>
245
+ <h4>Mixed States</h4>
246
+ <ButtonGroup>
247
+ <Button>활성</Button>
248
+ <Button disabled>비활성</Button>
249
+ <Button>활성</Button>
250
+ </ButtonGroup>
251
+ </div>
252
+ </div>
241
253
  ```
242
254
 
243
255
  ## Toggle Group
@@ -246,20 +258,29 @@ By dynamically switching the `variant` prop on individual buttons based on selec
246
258
 
247
259
  ```tsx
248
260
  <div>
249
- <h4>Toggle Group (Alignment)</h4>
250
- <ButtonGroup variant="outlined">
251
- <Button variant={selected === 'left' ? 'solid' : 'outlined'} onClick={() => setSelected('left')}>
252
- 왼쪽 정렬
253
- </Button>
254
- <Button variant={selected === 'center' ? 'solid' : 'outlined'} onClick={() => setSelected('center')}>
255
- 가운데 정렬
256
- </Button>
257
- <Button variant={selected === 'right' ? 'solid' : 'outlined'} onClick={() => setSelected('right')}>
258
- 오른쪽 정렬
259
- </Button>
260
- </ButtonGroup>
261
- <p>선택된 정렬: {selected}</p>
262
- </div>
261
+ <h4>Toggle Group (Alignment)</h4>
262
+ <ButtonGroup variant="outlined">
263
+ <Button
264
+ variant={selected === "left" ? "solid" : "outlined"}
265
+ onClick={() => setSelected("left")}
266
+ >
267
+ 왼쪽 정렬
268
+ </Button>
269
+ <Button
270
+ variant={selected === "center" ? "solid" : "outlined"}
271
+ onClick={() => setSelected("center")}
272
+ >
273
+ 가운데 정렬
274
+ </Button>
275
+ <Button
276
+ variant={selected === "right" ? "solid" : "outlined"}
277
+ onClick={() => setSelected("right")}
278
+ >
279
+ 오른쪽 정렬
280
+ </Button>
281
+ </ButtonGroup>
282
+ <p>선택된 정렬: {selected}</p>
283
+ </div>
263
284
  ```
264
285
 
265
286
  ## Toolbar Actions
@@ -274,7 +295,7 @@ import RedoIcon from '@mui/icons-material/Redo';
274
295
  <Button startDecorator={<SaveIcon />}>Save</Button>
275
296
  <Button startDecorator={<UndoIcon />}>Undo</Button>
276
297
  <Button startDecorator={<RedoIcon />}>Redo</Button>
277
- </ButtonGroup>
298
+ </ButtonGroup>;
278
299
  ```
279
300
 
280
301
  ## View Switcher
@@ -283,25 +304,16 @@ import RedoIcon from '@mui/icons-material/Redo';
283
304
  const [view, setView] = useState('list');
284
305
 
285
306
  <ButtonGroup variant="outlined" color="neutral">
286
- <Button
287
- variant={view === 'list' ? 'solid' : 'outlined'}
288
- onClick={() => setView('list')}
289
- >
307
+ <Button variant={view === 'list' ? 'solid' : 'outlined'} onClick={() => setView('list')}>
290
308
  List
291
309
  </Button>
292
- <Button
293
- variant={view === 'grid' ? 'solid' : 'outlined'}
294
- onClick={() => setView('grid')}
295
- >
310
+ <Button variant={view === 'grid' ? 'solid' : 'outlined'} onClick={() => setView('grid')}>
296
311
  Grid
297
312
  </Button>
298
- <Button
299
- variant={view === 'card' ? 'solid' : 'outlined'}
300
- onClick={() => setView('card')}
301
- >
313
+ <Button variant={view === 'card' ? 'solid' : 'outlined'} onClick={() => setView('card')}>
302
314
  Card
303
315
  </Button>
304
- </ButtonGroup>
316
+ </ButtonGroup>;
305
317
  ```
306
318
 
307
319
  ## Pagination Controls
@@ -312,9 +324,7 @@ const [view, setView] = useState('list');
312
324
  Previous
313
325
  </Button>
314
326
  <Button disabled>{page}</Button>
315
- <Button onClick={() => setPage(page + 1)}>
316
- Next
317
- </Button>
327
+ <Button onClick={() => setPage(page + 1)}>Next</Button>
318
328
  </ButtonGroup>
319
329
  ```
320
330
 
@@ -29,12 +29,7 @@ import { useState } from 'react';
29
29
  function DateSelector() {
30
30
  const [date, setDate] = useState<Date | null>(null);
31
31
 
32
- return (
33
- <Calendar
34
- value={date ? [date, undefined] : undefined}
35
- onChange={(dates) => setDate(dates[0] || null)}
36
- />
37
- );
32
+ return <Calendar value={date ? [date, undefined] : undefined} onChange={(dates) => setDate(dates[0] || null)} />;
38
33
  }
39
34
  ```
40
35
 
@@ -96,7 +91,11 @@ Show only the month grid for month-level navigation and selection.
96
91
  Enable both month and day views with navigation between them, giving users the flexibility to zoom in and out of the calendar.
97
92
 
98
93
  ```tsx
99
- <Calendar views={['month', 'day']} rangeSelection defaultValue={[new Date(2024, 2, 1), new Date(2024, 2, 20)]} />
94
+ <Calendar
95
+ views={["month", "day"]}
96
+ rangeSelection
97
+ defaultValue={[new Date(2024, 2, 1), new Date(2024, 2, 20)]}
98
+ />
100
99
  ```
101
100
 
102
101
  ### Month Selection
@@ -154,7 +153,7 @@ Use the `shouldDisableDate` callback to implement arbitrary disabling logic, suc
154
153
  Combine `shouldDisableDate` with `disablePast` to apply multiple restrictions simultaneously.
155
154
 
156
155
  ```tsx
157
- <Calendar shouldDisableDate={date => [0, 6].includes(date.getDay())} disablePast />
156
+ <Calendar shouldDisableDate={(date) => [0, 6].includes(date.getDay())} disablePast />
158
157
  ```
159
158
 
160
159
  ### Complex Date Restrictions
@@ -162,7 +161,13 @@ Combine `shouldDisableDate` with `disablePast` to apply multiple restrictions si
162
161
  Disable weekends, past dates, and limit selection to one week ahead by combining all restriction options.
163
162
 
164
163
  ```tsx
165
- <Calendar shouldDisableDate={date => [0, 6].includes(date.getDay()) || date.getTime() >= new Date().getTime() + 7 * 24 * 60 * 60 * 1000} disablePast />
164
+ <Calendar
165
+ shouldDisableDate={(date) =>
166
+ [0, 6].includes(date.getDay()) ||
167
+ date.getTime() >= new Date().getTime() + 7 * 24 * 60 * 60 * 1000
168
+ }
169
+ disablePast
170
+ />
166
171
  ```
167
172
 
168
173
  ## Embedded Calendar Widget
@@ -179,10 +184,7 @@ function CalendarWidget() {
179
184
  <Typography level="title-md" sx={{ mb: 2 }}>
180
185
  Select a Date
181
186
  </Typography>
182
- <Calendar
183
- value={[selectedDate, undefined]}
184
- onChange={(dates) => dates[0] && setSelectedDate(dates[0])}
185
- />
187
+ <Calendar value={[selectedDate, undefined]} onChange={(dates) => dates[0] && setSelectedDate(dates[0])} />
186
188
  <Typography level="body-sm" sx={{ mt: 2 }}>
187
189
  Selected: {selectedDate.toLocaleDateString()}
188
190
  </Typography>
@@ -197,19 +199,14 @@ function CalendarWidget() {
197
199
  function BookingCalendar({ blockedDates }) {
198
200
  const [selectedDate, setSelectedDate] = useState<Date | null>(null);
199
201
 
200
- const blockedSet = useMemo(
201
- () => new Set(blockedDates.map((d) => d.toDateString())),
202
- [blockedDates]
203
- );
202
+ const blockedSet = useMemo(() => new Set(blockedDates.map((d) => d.toDateString())), [blockedDates]);
204
203
 
205
204
  return (
206
205
  <Calendar
207
206
  value={selectedDate ? [selectedDate, undefined] : undefined}
208
207
  onChange={(dates) => setSelectedDate(dates[0] || null)}
209
208
  disablePast
210
- shouldDisableDate={(date) =>
211
- [0, 6].includes(date.getDay()) || blockedSet.has(date.toDateString())
212
- }
209
+ shouldDisableDate={(date) => [0, 6].includes(date.getDay()) || blockedSet.has(date.toDateString())}
213
210
  />
214
211
  );
215
212
  }
@@ -219,10 +216,7 @@ function BookingCalendar({ blockedDates }) {
219
216
 
220
217
  ```tsx
221
218
  function DateRangeSelector({ onRangeSelect }) {
222
- const [range, setRange] = useState<[Date | undefined, Date | undefined]>([
223
- undefined,
224
- undefined,
225
- ]);
219
+ const [range, setRange] = useState<[Date | undefined, Date | undefined]>([undefined, undefined]);
226
220
 
227
221
  const dayCount = useMemo(() => {
228
222
  if (!range[0] || !range[1]) return 0;
@@ -282,12 +276,15 @@ function DateRangeSelector({ onRangeSelect }) {
282
276
 
283
277
  ```tsx
284
278
  // ✅ Memoized disable function
285
- const shouldDisableDate = useCallback((date: Date) => {
286
- return [0, 6].includes(date.getDay()) || holidays.has(date.toDateString());
287
- }, [holidays]);
279
+ const shouldDisableDate = useCallback(
280
+ (date: Date) => {
281
+ return [0, 6].includes(date.getDay()) || holidays.has(date.toDateString());
282
+ },
283
+ [holidays],
284
+ );
288
285
 
289
286
  // ❌ Inline function recreated every render
290
- <Calendar shouldDisableDate={(date) => expensiveCheck(date)} />
287
+ <Calendar shouldDisableDate={(date) => expensiveCheck(date)} />;
291
288
  ```
292
289
 
293
290
  4. **Always use Date objects, not strings.** Calendar expects native `Date` objects for `value`, `defaultValue`, `minDate`, and `maxDate`.
@@ -25,13 +25,7 @@ import { Checkbox } from '@ceed/ads';
25
25
  function MyComponent() {
26
26
  const [checked, setChecked] = useState(false);
27
27
 
28
- return (
29
- <Checkbox
30
- label="I agree"
31
- checked={checked}
32
- onChange={(e) => setChecked(e.target.checked)}
33
- />
34
- );
28
+ return <Checkbox label="I agree" checked={checked} onChange={(e) => setChecked(e.target.checked)} />;
35
29
  }
36
30
  ```
37
31
 
@@ -87,11 +81,7 @@ Apply semantic colors to communicate meaning.
87
81
  Represents a partially selected state, commonly used in "select all" patterns where some but not all children are selected.
88
82
 
89
83
  ```tsx
90
- <Checkbox
91
- label="Partially selected"
92
- indeterminate
93
- onChange={handleChange}
94
- />
84
+ <Checkbox label="Partially selected" indeterminate onChange={handleChange} />
95
85
  ```
96
86
 
97
87
  ## Disabled Checkbox
@@ -130,10 +120,8 @@ function TermsForm() {
130
120
  marketing: false,
131
121
  });
132
122
 
133
- const handleChange = (key: keyof typeof agreements) => (
134
- event: React.ChangeEvent<HTMLInputElement>
135
- ) => {
136
- setAgreements(prev => ({ ...prev, [key]: event.target.checked }));
123
+ const handleChange = (key: keyof typeof agreements) => (event: React.ChangeEvent<HTMLInputElement>) => {
124
+ setAgreements((prev) => ({ ...prev, [key]: event.target.checked }));
137
125
  };
138
126
 
139
127
  return (
@@ -194,18 +182,16 @@ function SelectAllExample() {
194
182
  { id: 4, name: 'Item 4', selected: false },
195
183
  ]);
196
184
 
197
- const selectedCount = items.filter(item => item.selected).length;
185
+ const selectedCount = items.filter((item) => item.selected).length;
198
186
  const isAllSelected = selectedCount === items.length;
199
187
  const isIndeterminate = selectedCount > 0 && selectedCount < items.length;
200
188
 
201
189
  const handleSelectAll = (event: React.ChangeEvent<HTMLInputElement>) => {
202
- setItems(prev => prev.map(item => ({ ...item, selected: event.target.checked })));
190
+ setItems((prev) => prev.map((item) => ({ ...item, selected: event.target.checked })));
203
191
  };
204
192
 
205
193
  const handleItemToggle = (id: number) => {
206
- setItems(prev => prev.map(item =>
207
- item.id === id ? { ...item, selected: !item.selected } : item
208
- ));
194
+ setItems((prev) => prev.map((item) => (item.id === id ? { ...item, selected: !item.selected } : item)));
209
195
  };
210
196
 
211
197
  return (
@@ -222,7 +208,7 @@ function SelectAllExample() {
222
208
  <Divider />
223
209
 
224
210
  <Stack spacing={1} sx={{ pl: 2 }}>
225
- {items.map(item => (
211
+ {items.map((item) => (
226
212
  <Checkbox
227
213
  key={item.id}
228
214
  label={item.name}
@@ -245,14 +231,10 @@ function ProductFilter() {
245
231
  categories: [] as string[],
246
232
  });
247
233
 
248
- const handleCategoryChange = (category: string) => (
249
- event: React.ChangeEvent<HTMLInputElement>
250
- ) => {
251
- setFilters(prev => ({
234
+ const handleCategoryChange = (category: string) => (event: React.ChangeEvent<HTMLInputElement>) => {
235
+ setFilters((prev) => ({
252
236
  ...prev,
253
- categories: event.target.checked
254
- ? [...prev.categories, category]
255
- : prev.categories.filter(c => c !== category)
237
+ categories: event.target.checked ? [...prev.categories, category] : prev.categories.filter((c) => c !== category),
256
238
  }));
257
239
  };
258
240