@ceed/cds 1.28.1 → 1.29.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 (60) hide show
  1. package/dist/Overview.md +5 -5
  2. package/dist/components/DatePicker/DatePicker.d.ts +10 -0
  3. package/dist/components/DateRangePicker/DateRangePicker.d.ts +10 -0
  4. package/dist/components/data-display/Avatar.md +110 -69
  5. package/dist/components/data-display/Badge.md +91 -39
  6. package/dist/components/data-display/Chip.md +49 -20
  7. package/dist/components/data-display/DataTable.md +93 -0
  8. package/dist/components/data-display/InfoSign.md +12 -0
  9. package/dist/components/data-display/Table.md +72 -55
  10. package/dist/components/data-display/Tooltip.md +40 -40
  11. package/dist/components/data-display/Typography.md +53 -70
  12. package/dist/components/feedback/Alert.md +88 -72
  13. package/dist/components/feedback/CircularProgress.md +17 -0
  14. package/dist/components/feedback/Skeleton.md +17 -0
  15. package/dist/components/inputs/Button.md +94 -68
  16. package/dist/components/inputs/ButtonGroup.md +17 -0
  17. package/dist/components/inputs/Calendar.md +118 -457
  18. package/dist/components/inputs/Checkbox.md +185 -430
  19. package/dist/components/inputs/CurrencyInput.md +22 -0
  20. package/dist/components/inputs/DatePicker.md +84 -0
  21. package/dist/components/inputs/DateRangePicker.md +88 -0
  22. package/dist/components/inputs/FilterableCheckboxGroup.md +20 -3
  23. package/dist/components/inputs/FormControl.md +32 -2
  24. package/dist/components/inputs/IconButton.md +18 -0
  25. package/dist/components/inputs/Input.md +198 -136
  26. package/dist/components/inputs/MonthPicker.md +25 -0
  27. package/dist/components/inputs/MonthRangePicker.md +23 -0
  28. package/dist/components/inputs/PercentageInput.md +25 -0
  29. package/dist/components/inputs/RadioButton.md +23 -0
  30. package/dist/components/inputs/RadioList.md +20 -1
  31. package/dist/components/inputs/RadioTileGroup.md +37 -3
  32. package/dist/components/inputs/Select.md +56 -0
  33. package/dist/components/inputs/Slider.md +23 -0
  34. package/dist/components/inputs/Switch.md +20 -0
  35. package/dist/components/inputs/Textarea.md +32 -8
  36. package/dist/components/inputs/Uploader/Uploader.md +21 -0
  37. package/dist/components/layout/Box.md +52 -41
  38. package/dist/components/layout/Grid.md +87 -81
  39. package/dist/components/layout/Stack.md +88 -68
  40. package/dist/components/navigation/Breadcrumbs.md +57 -46
  41. package/dist/components/navigation/Drawer.md +17 -0
  42. package/dist/components/navigation/Dropdown.md +13 -0
  43. package/dist/components/navigation/IconMenuButton.md +17 -0
  44. package/dist/components/navigation/InsetDrawer.md +130 -292
  45. package/dist/components/navigation/Link.md +78 -0
  46. package/dist/components/navigation/Menu.md +17 -0
  47. package/dist/components/navigation/MenuButton.md +18 -0
  48. package/dist/components/navigation/Pagination.md +13 -0
  49. package/dist/components/navigation/Stepper.md +15 -0
  50. package/dist/components/navigation/Tabs.md +27 -0
  51. package/dist/components/surfaces/Accordions.md +804 -49
  52. package/dist/components/surfaces/Card.md +173 -97
  53. package/dist/components/surfaces/Divider.md +246 -82
  54. package/dist/components/surfaces/Sheet.md +15 -0
  55. package/dist/index.browser.js +2 -2
  56. package/dist/index.browser.js.map +3 -3
  57. package/dist/index.cjs +173 -6
  58. package/dist/index.js +173 -6
  59. package/framer/index.js +1 -1
  60. package/package.json +1 -1
@@ -67,6 +67,14 @@ function MyComponent() {
67
67
 
68
68
  ## Features
69
69
 
70
+ ### Basic Breadcrumbs
71
+
72
+ A simple breadcrumb trail with a few levels of hierarchy. The last item uses `type: 'text'` to indicate the current page.
73
+
74
+ ```
75
+ <Canvas of={Breadcrumbs.BasicExample} />
76
+ ```
77
+
70
78
  ### Sizes
71
79
 
72
80
  Breadcrumbs are available in three sizes -- `sm`, `md`, and `lg` -- allowing you to match the surrounding layout density.
@@ -83,39 +91,16 @@ Breadcrumbs are available in three sizes -- `sm`, `md`, and `lg` -- allowing you
83
91
 
84
92
  The separator character between items can be customized via the `separator` prop. Common choices include `/`, `>`, and `-`.
85
93
 
86
- ```tsx
87
- <Breadcrumbs
88
- crumbs={[{
89
- label: 'Home',
90
- type: 'link',
91
- linkHref: '/'
92
- }, {
93
- label: 'Catalog',
94
- type: 'link',
95
- linkHref: '/'
96
- }, {
97
- label: 'Category',
98
- type: 'link',
99
- linkHref: '/'
100
- }, {
101
- label: 'Subcategory',
102
- type: 'link',
103
- linkHref: '/'
104
- }, {
105
- label: 'Product',
106
- type: 'link',
107
- linkHref: '/'
108
- }, {
109
- label: 'Product Detail',
110
- type: 'link',
111
- linkHref: '/'
112
- }, {
113
- label: 'Owner',
114
- type: 'text'
115
- }]}
116
- collapsed
117
- separator="-"
118
- />
94
+ ```
95
+ <Canvas of={Breadcrumbs.CustomSeparator} />
96
+ ```
97
+
98
+ ### Collapsed Breadcrumbs
99
+
100
+ When paths are deep, the component automatically collapses middle items behind an ellipsis. You can control how many items appear at the start and end using `startCrumbCount` and `endCrumbCount`.
101
+
102
+ ```
103
+ <Canvas of={Breadcrumbs.CollapsedVariants} />
119
104
  ```
120
105
 
121
106
  ### Expanded View
@@ -170,42 +155,55 @@ The component handles the edge case of a single breadcrumb item gracefully.
170
155
  />
171
156
  ```
172
157
 
158
+ ### With Icons
159
+
160
+ Breadcrumb items can include icons alongside their labels.
161
+
162
+ ```
163
+ <Canvas of={Breadcrumbs.WithIcons} />
164
+ ```
165
+
173
166
  ## Common Use Cases
174
167
 
175
- ### Service Detail Page
168
+ ### Admin Dashboard Navigation
176
169
 
177
170
  ```tsx
178
- function ServiceDetailPage({ service, category }) {
171
+ function UserDetailPage({ user }) {
179
172
  const crumbs = [
180
- { label: 'Home', type: 'link', linkHref: '/' },
181
- { label: 'Services', type: 'link', linkHref: '/services' },
182
- { label: category.name, type: 'link', linkHref: `/services/${category.slug}` },
183
- { label: service.name, type: 'text' },
173
+ { label: 'Dashboard', type: 'link', linkHref: '/admin' },
174
+ { label: 'Users', type: 'link', linkHref: '/admin/users' },
175
+ { label: user.name, type: 'text' },
184
176
  ];
185
177
 
186
178
  return (
187
179
  <Box>
188
180
  <Breadcrumbs crumbs={crumbs} />
189
- <ServiceDetails service={service} />
181
+ <UserProfile user={user} />
190
182
  </Box>
191
183
  );
192
184
  }
193
185
  ```
194
186
 
195
- ### Account Settings
187
+ ### E-commerce Product Page
196
188
 
197
189
  ```tsx
198
- function AccountSettingsPage() {
190
+ function ProductPage({ product, category, subcategory }) {
199
191
  const crumbs = [
200
192
  { label: 'Home', type: 'link', linkHref: '/' },
201
- { label: 'Account', type: 'link', linkHref: '/account' },
202
- { label: 'Settings', type: 'text' },
193
+ { label: 'Shop', type: 'link', linkHref: '/shop' },
194
+ { label: category.name, type: 'link', linkHref: `/shop/${category.slug}` },
195
+ {
196
+ label: subcategory.name,
197
+ type: 'link',
198
+ linkHref: `/shop/${category.slug}/${subcategory.slug}`,
199
+ },
200
+ { label: product.name, type: 'text' },
203
201
  ];
204
202
 
205
203
  return (
206
204
  <Box>
207
- <Breadcrumbs crumbs={crumbs} size="sm" />
208
- <SettingsForm />
205
+ <Breadcrumbs crumbs={crumbs} collapsed={true} startCrumbCount={1} endCrumbCount={2} />
206
+ <ProductDetails product={product} />
209
207
  </Box>
210
208
  );
211
209
  }
@@ -231,6 +229,19 @@ function DynamicBreadcrumbs() {
231
229
  }
232
230
  ```
233
231
 
232
+ ## Props and Customization
233
+
234
+ ### Key Props
235
+
236
+ | Prop | Type | Default | Description |
237
+ | ----------------- | ---------------------------------------------------------------- | -------------------------------- | ---------------------------------------------------- |
238
+ | `crumbs` | `{ type: 'text' \| 'link'; label: string; linkHref?: string }[]` | (required) | Breadcrumb items |
239
+ | `collapsed` | `boolean` | `true` | Whether long crumb lists are collapsed with ellipsis |
240
+ | `startCrumbCount` | `number` | `1` | Number of crumbs shown at the start when collapsed |
241
+ | `endCrumbCount` | `number` | `3` | Number of crumbs shown at the end when collapsed |
242
+ | `slots` | `{ link?: ElementType }` | - | Custom component for link crumbs |
243
+ | `slotProps` | `{ link?: { color?: string } }` | `{ link: { color: 'neutral' } }` | Props passed to slot components |
244
+
234
245
  ## Best Practices
235
246
 
236
247
  - **Always start with a root item.** Begin the trail with "Home" or an equivalent top-level link so users can always navigate back to the starting point.
@@ -161,6 +161,23 @@ function FormDrawer({ open, onClose, onSubmit }) {
161
161
  }
162
162
  ```
163
163
 
164
+ ## Props and Customization
165
+
166
+ ### Key Props
167
+
168
+ | Prop | Type | Default | Description | |
169
+ | ---------- | -------------------------------------------------------------- | -------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
170
+ | `children` | `ReactNode` | - | Content rendered inside the drawer panel | |
171
+ | `open` | `boolean` | `false` | Controls whether the drawer is visible | |
172
+ | `onClose` | \`(event: React.SyntheticEvent | Event, reason: string) => void\` | - | Called when the drawer requests to close, such as backdrop click or Escape key |
173
+ | `anchor` | `'left' \| 'right' \| 'top' \| 'bottom'` | `'left'` | Edge of the screen from which the drawer slides in | |
174
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Preset drawer size used to control width or height depending on the anchor | |
175
+ | `variant` | `'plain' \| 'soft' \| 'outlined' \| 'solid'` | `'plain'` | Visual style inherited from Joy UI Drawer | |
176
+ | `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme inherited from Joy UI Drawer | |
177
+ | `sx` | `SxProps` | - | Custom styles using the MUI system | |
178
+
179
+ > **Note**: Drawer also accepts Joy UI `DrawerProps` and Framer Motion props because the component is a thin wrapper around Joy UI Drawer with motion support.
180
+
164
181
  ## Best Practices
165
182
 
166
183
  1. **Choose the right size**: Use `sm` (360px) for simple navigation, `md` (600px) for moderate content, and `lg` (900px) for complex detail views or forms.
@@ -583,6 +583,19 @@ const [open, setOpen] = useState(false);
583
583
  </Button>
584
584
  ```
585
585
 
586
+ ## Props and Customization
587
+
588
+ ### Key Props
589
+
590
+ | Prop | Type | Default | Description |
591
+ | -------------- | -------------------------------- | ------- | ------------------------------------ |
592
+ | `children` | `ReactNode` | - | Dropdown content (MenuButton + Menu) |
593
+ | `open` | `boolean` | - | Controlled open state |
594
+ | `defaultOpen` | `boolean` | `false` | Initial open state (uncontrolled) |
595
+ | `onOpenChange` | `(event, open: boolean) => void` | - | Callback when open state changes |
596
+
597
+ > **Note**: Dropdown accepts all Joy UI Dropdown props. It is a state management wrapper — style props go on Menu and MenuButton.
598
+
586
599
  ## Best Practices
587
600
 
588
601
  - **Use the right abstraction level.** If you only need a simple list of text items, prefer `MenuButton` or `IconMenuButton` standalone components. Use `Dropdown` + `Menu` when you need dividers, custom headers, or mixed content inside the menu.
@@ -225,6 +225,23 @@ function EditorToolbar({ onAction }) {
225
225
  }
226
226
  ```
227
227
 
228
+ ## Props and Customization
229
+
230
+ ### Key Props
231
+
232
+ | Prop | Type | Default | Description |
233
+ | ---------------------- | ---------------------------------------------------------------------- | ----------- | -------------------------------------------- |
234
+ | `icon` | `ReactNode` | (required) | Icon element to render in the trigger button |
235
+ | `items` | `{ text: string; component?: ElementType; componentProps?: object }[]` | - | Menu items |
236
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Button size |
237
+ | `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Button color |
238
+ | `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'plain'` | Button visual style |
239
+ | `disabled` | `boolean` | `false` | Disables the button |
240
+ | `loading` | `boolean` | `false` | Shows loading indicator |
241
+ | `placement` | `Placement` | `'bottom'` | Menu position |
242
+ | `buttonComponent` | `ElementType` | - | Custom trigger element |
243
+ | `buttonComponentProps` | `object` | - | Props passed to custom trigger |
244
+
228
245
  ## Best Practices
229
246
 
230
247
  - **Always provide `aria-label`.** Since IconMenuButton has no visible text, screen readers rely entirely on the `aria-label` to announce the button's purpose. Include context when possible.