@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.
- package/dist/components/FilterableCheckboxGroup/FilterableCheckboxGroup.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +0 -1
- package/dist/components/inputs/FilterableCheckboxGroup.md +15 -2
- package/dist/components/navigation/Pagination.md +2 -2
- package/dist/index.cjs +275 -319
- package/dist/index.js +98 -142
- package/framer/index.js +51 -51
- package/package.json +2 -3
|
@@ -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
|
-
|
|
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\
|
|
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
|
```
|