@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
@@ -43,7 +43,9 @@ function ConfirmationDialog({ open, onClose, onConfirm }) {
43
43
  <Button variant="plain" color="neutral" onClick={onClose}>
44
44
  Cancel
45
45
  </Button>
46
- <Button onClick={onConfirm}>Confirm</Button>
46
+ <Button onClick={onConfirm}>
47
+ Confirm
48
+ </Button>
47
49
  </>
48
50
  }
49
51
  >
@@ -92,61 +94,6 @@ Dialog Content
92
94
  </DialogFrame>
93
95
  ```
94
96
 
95
- ### Standalone Usage
96
-
97
- DialogFrame can be used without a Modal wrapper for embedding dialog-style layouts directly within a page.
98
-
99
- > ⚠️ **Important** ⚠️
100
- >
101
- > When using DialogFrame without Modal, the parent container **must** meet the following requirements:
102
- >
103
- > - `position: 'relative'` — DialogFrame uses absolute positioning internally
104
- > - Explicit `width` and `height` — `height` must be an absolute value (e.g., `300`, `'400px'`), not a relative value like `%` or `auto`
105
- >
106
- > DialogFrame inherits its dimensions from `ModalDialog`, which normally receives sizing from the Modal overlay. Without these constraints, the component will not render with correct dimensions.
107
-
108
- ```tsx
109
- <Box sx={{
110
- position: 'relative',
111
- width: 480,
112
- height: 300
113
- }}>
114
- <DialogFrame {...args} title="Standalone Dialog" actions={<>
115
- <Button variant="plain" color="neutral">
116
- Cancel
117
- </Button>
118
- <Button variant="plain">Confirm</Button>
119
- </>}>
120
- DialogFrame used without Modal. The parent container must provide explicit width and height.
121
- </DialogFrame>
122
- </Box>
123
- ```
124
-
125
- ```tsx
126
- import { DialogFrame, Button, Box } from '@ceed/cds';
127
-
128
- // Standalone usage requires explicit container dimensions
129
- function EmbeddedDialog() {
130
- return (
131
- <Box sx={{ position: 'relative', width: 480, height: 300 }}>
132
- <DialogFrame
133
- title="Settings"
134
- actions={
135
- <>
136
- <Button variant="plain" color="neutral">
137
- Cancel
138
- </Button>
139
- <Button>Save</Button>
140
- </>
141
- }
142
- >
143
- This dialog is embedded directly in the page layout.
144
- </DialogFrame>
145
- </Box>
146
- );
147
- }
148
- ```
149
-
150
97
  ## When to Use
151
98
 
152
99
  ### ✅ Good Use Cases
@@ -230,11 +177,21 @@ function QuickAddDialog({ open, onClose, onSubmit }) {
230
177
  <Stack gap={2}>
231
178
  <FormControl>
232
179
  <FormLabel>Name</FormLabel>
233
- <Input value={name} onChange={(e) => setName(e.target.value)} placeholder="Enter name" autoFocus />
180
+ <Input
181
+ value={name}
182
+ onChange={(e) => setName(e.target.value)}
183
+ placeholder="Enter name"
184
+ autoFocus
185
+ />
234
186
  </FormControl>
235
187
  <FormControl>
236
188
  <FormLabel>Email</FormLabel>
237
- <Input type="email" value={email} onChange={(e) => setEmail(e.target.value)} placeholder="Enter email" />
189
+ <Input
190
+ type="email"
191
+ value={email}
192
+ onChange={(e) => setEmail(e.target.value)}
193
+ placeholder="Enter email"
194
+ />
238
195
  </FormControl>
239
196
  </Stack>
240
197
  </DialogFrame>
@@ -259,11 +216,15 @@ function UnsavedChangesDialog({ open, onClose, onDiscard, onSave }) {
259
216
  <Button variant="outlined" color="danger" onClick={onDiscard}>
260
217
  Discard
261
218
  </Button>
262
- <Button onClick={onSave}>Save Changes</Button>
219
+ <Button onClick={onSave}>
220
+ Save Changes
221
+ </Button>
263
222
  </>
264
223
  }
265
224
  >
266
- <Typography>You have unsaved changes. Would you like to save them before leaving?</Typography>
225
+ <Typography>
226
+ You have unsaved changes. Would you like to save them before leaving?
227
+ </Typography>
267
228
  </DialogFrame>
268
229
  </Modal>
269
230
  );
@@ -276,7 +237,14 @@ function UnsavedChangesDialog({ open, onClose, onDiscard, onSave }) {
276
237
  function InfoDialog({ open, onClose, title, message }) {
277
238
  return (
278
239
  <Modal open={open} onClose={onClose}>
279
- <DialogFrame title={title} actions={<Button onClick={onClose}>Got it</Button>}>
240
+ <DialogFrame
241
+ title={title}
242
+ actions={
243
+ <Button onClick={onClose}>
244
+ Got it
245
+ </Button>
246
+ }
247
+ >
280
248
  <Typography>{message}</Typography>
281
249
  </DialogFrame>
282
250
  </Modal>
@@ -333,8 +301,18 @@ function ProcessingDialog({ open, status, onClose }) {
333
301
  return (
334
302
  <Modal open={open} onClose={isProcessing ? undefined : onClose}>
335
303
  <DialogFrame
336
- title={isProcessing ? 'Processing...' : isSuccess ? 'Success!' : 'Error'}
337
- actions={!isProcessing && <Button onClick={onClose}>{isSuccess ? 'Done' : 'Try Again'}</Button>}
304
+ title={
305
+ isProcessing ? 'Processing...' :
306
+ isSuccess ? 'Success!' :
307
+ 'Error'
308
+ }
309
+ actions={
310
+ !isProcessing && (
311
+ <Button onClick={onClose}>
312
+ {isSuccess ? 'Done' : 'Try Again'}
313
+ </Button>
314
+ )
315
+ }
338
316
  >
339
317
  <Box sx={{ textAlign: 'center', py: 2 }}>
340
318
  {isProcessing && <CircularProgress />}
@@ -479,7 +457,9 @@ DialogFrame should be wrapped in Modal for proper behavior:
479
457
  // Fullscreen for complex content or mobile
480
458
  <Modal open={open} onClose={onClose}>
481
459
  <DialogFrame fullscreen title="Edit Profile">
482
- <Box sx={{ p: 2 }}>{/* Large form or content */}</Box>
460
+ <Box sx={{ p: 2 }}>
461
+ {/* Large form or content */}
462
+ </Box>
483
463
  </DialogFrame>
484
464
  </Modal>
485
465
  ```
@@ -520,7 +500,9 @@ DialogFrame inherits accessibility features from Modal:
520
500
 
521
501
  ```tsx
522
502
  // Title provides context
523
- <DialogFrame title="Confirm Deletion">{/* Content is read after title */}</DialogFrame>
503
+ <DialogFrame title="Confirm Deletion">
504
+ {/* Content is read after title */}
505
+ </DialogFrame>
524
506
  ```
525
507
 
526
508
  ## Best Practices
@@ -548,7 +530,9 @@ DialogFrame inherits accessibility features from Modal:
548
530
  ```tsx
549
531
  // ✅ Good: Brief, scannable content
550
532
  <DialogFrame title="Delete Project">
551
- <Typography>This will permanently delete the project and all its data.</Typography>
533
+ <Typography>
534
+ This will permanently delete the project and all its data.
535
+ </Typography>
552
536
  </DialogFrame>
553
537
  ```
554
538
 
@@ -576,7 +560,7 @@ DialogFrame inherits accessibility features from Modal:
576
560
  // ❌ Bad: Dialog for simple feedback
577
561
  <DialogFrame title="Success">
578
562
  <Typography>Item saved!</Typography>
579
- </DialogFrame>;
563
+ </DialogFrame>
580
564
 
581
565
  // ✅ Good: Use Toast
582
566
  showToast({ message: 'Item saved!' });
@@ -586,7 +570,9 @@ showToast({ message: 'Item saved!' });
586
570
 
587
571
  ```tsx
588
572
  // ❌ Bad: Complex form in dialog
589
- <DialogFrame title="Create Account">{/* 20+ form fields */}</DialogFrame>
573
+ <DialogFrame title="Create Account">
574
+ {/* 20+ form fields */}
575
+ </DialogFrame>
590
576
  ```
591
577
 
592
578
  3. **Don't use vague button labels**: Be specific about actions
@@ -613,7 +599,9 @@ For dialogs with heavy content:
613
599
  function HeavyDialog({ open, onClose }) {
614
600
  return (
615
601
  <Modal open={open} onClose={onClose}>
616
- <DialogFrame title="Data Preview">{open && <HeavyDataComponent />}</DialogFrame>
602
+ <DialogFrame title="Data Preview">
603
+ {open && <HeavyDataComponent />}
604
+ </DialogFrame>
617
605
  </Modal>
618
606
  );
619
607
  }
@@ -637,13 +625,11 @@ const handleCancel = useCallback(() => {
637
625
  Unmount dialog completely when not needed:
638
626
 
639
627
  ```tsx
640
- {
641
- open && (
642
- <Modal open={open} onClose={onClose}>
643
- <DialogFrame>...</DialogFrame>
644
- </Modal>
645
- );
646
- }
628
+ {open && (
629
+ <Modal open={open} onClose={onClose}>
630
+ <DialogFrame>...</DialogFrame>
631
+ </Modal>
632
+ )}
647
633
  ```
648
634
 
649
635
  DialogFrame provides a consistent structure for dialog content. Combine it with Modal for proper overlay behavior, keep content concise and actionable, and always provide clear options for users to proceed or cancel.