@ceed/cds 1.15.0-next.8 → 1.15.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.
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface FilterableCheckboxGroupOption {
3
3
  value: string;
4
4
  label: string;
5
+ disabled?: boolean;
5
6
  }
6
7
  export type FilterableCheckboxGroupProps = {
7
8
  value?: string[];
@@ -13,6 +14,7 @@ export type FilterableCheckboxGroupProps = {
13
14
  required?: boolean;
14
15
  onChange?: (value: string[]) => void;
15
16
  maxHeight?: string | number;
17
+ disabled?: boolean;
16
18
  };
17
19
  declare function FilterableCheckboxGroup(props: FilterableCheckboxGroupProps): React.JSX.Element;
18
20
  declare namespace FilterableCheckboxGroup {
@@ -21,7 +21,6 @@ interface PaginationProps extends React.ComponentProps<typeof PaginationRoot> {
21
21
  rowCount: number;
22
22
  onPageChange: (newPage: number) => void;
23
23
  size?: 'sm' | 'md' | 'lg';
24
- variant?: 'standard' | 'compact';
25
24
  }
26
25
  declare function Pagination(props: PaginationProps): React.JSX.Element;
27
26
  declare namespace Pagination {
@@ -161,6 +161,18 @@ function MyComponent() {
161
161
 
162
162
  ```tsx
163
163
  <Stack spacing={2}>
164
+ <Stack direction="row" spacing={1}>
165
+ <button type="button" onClick={() => {
166
+ setOptions([...options, {
167
+ value: `new-${Date.now()}`,
168
+ label: `New Item ${options.length - 11}`
169
+ }]);
170
+ }} style={{
171
+ padding: '4px 12px',
172
+ cursor: 'pointer'
173
+ }}>
174
+ Add New Option
175
+ </button>
164
176
  <button type="button" onClick={() => {
165
177
  setKey(prev => prev + 1);
166
178
  }} style={{
@@ -169,11 +181,12 @@ function MyComponent() {
169
181
  }}>
170
182
  Force Re-render
171
183
  </button>
172
- <FilterableCheckboxGroup key={key} label="Sorting Demo" placeholder="Search..." helperText="Initial sort: Selected (C,B,A,3,2,1) first, then unselected (X,Y,Z,7,8,9)" options={sortingOptions} value={value} onChange={setValue} />
184
+ </Stack>
185
+ <FilterableCheckboxGroup key={key} label="Sorting Demo" placeholder="Search..." helperText="Click 'Add New Option' to test sorting when options change" options={options} value={value} onChange={setValue} />
173
186
  <Typography level="body-sm" sx={{
174
187
  whiteSpace: 'pre-line'
175
188
  }}>
176
- {`Selected: ${value.length > 0 ? value.join(', ') : 'None'}\n\nClick "Force Re-render" button to remount the component.\nOrder should remain the same (sorted only on initial mount).`}
189
+ {`Selected: ${value.length > 0 ? value.join(', ') : 'None'}\n\nOptions count: ${options.length}\n\n- Add New Option: Add new item to test sorting when options change\n- Force Re-render: Remount component to test initial sorting\n\nAlphabet items (A-Z) appear first, then numbers (1-9).`}
177
190
  </Typography>
178
191
  </Stack>
179
192
  ```
@@ -2,8 +2,8 @@
2
2
 
3
3
  ## Introduction
4
4
 
5
- ```
6
- <Canvas of={Pagination.Default} />
5
+ ```text
6
+ // Unable to derive source for Default
7
7
  ```
8
8
 
9
9
  | Field | Description | Default |