@ceed/ads 1.16.0-next.9 → 1.16.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.
- package/dist/components/FilterMenu/types.d.ts +2 -10
- package/dist/components/Pagination/Pagination.d.ts +0 -1
- package/dist/components/ProfileMenu/ProfileMenu.d.ts +1 -1
- package/dist/components/inputs/FilterMenu.md +0 -20
- package/dist/components/inputs/FilterableCheckboxGroup.md +15 -2
- package/dist/components/navigation/Pagination.md +2 -11
- package/dist/index.cjs +412 -538
- package/dist/index.js +186 -312
- package/framer/index.js +42 -42
- package/package.json +3 -4
- package/dist/components/FilterMenu/components/FilterableCheckboxGroup.d.ts +0 -11
|
@@ -2,7 +2,6 @@ import type { DateRangePickerProps } from '../DateRangePicker';
|
|
|
2
2
|
import type { CurrencyInputProps } from '../CurrencyInput';
|
|
3
3
|
import type { PercentageInputProps } from '../PercentageInput';
|
|
4
4
|
import type { AutocompleteProps } from '../Autocomplete';
|
|
5
|
-
import type { FilterableCheckboxGroupProps } from '../FilterableCheckboxGroup';
|
|
6
5
|
type DateTime = string;
|
|
7
6
|
export interface FilterBaseItem<V = never> {
|
|
8
7
|
id: string;
|
|
@@ -18,13 +17,6 @@ export interface FilterCheckboxGroupItem extends FilterBaseItem<(string | number
|
|
|
18
17
|
value: string | number;
|
|
19
18
|
}[];
|
|
20
19
|
}
|
|
21
|
-
export interface FilterableCheckboxGroupItem extends FilterBaseItem<string[]>, Pick<FilterableCheckboxGroupProps, 'placeholder' | 'maxHeight'> {
|
|
22
|
-
type: 'filterable-checkbox-group';
|
|
23
|
-
options: {
|
|
24
|
-
label: string;
|
|
25
|
-
value: string;
|
|
26
|
-
}[];
|
|
27
|
-
}
|
|
28
20
|
export interface FilterRadioGroupItem extends FilterBaseItem<string | number> {
|
|
29
21
|
type: 'radio-group';
|
|
30
22
|
options: {
|
|
@@ -32,7 +24,7 @@ export interface FilterRadioGroupItem extends FilterBaseItem<string | number> {
|
|
|
32
24
|
value: string | number;
|
|
33
25
|
}[];
|
|
34
26
|
}
|
|
35
|
-
export interface FilterDateRangeItem extends FilterBaseItem<[DateTime, DateTime]>, Pick<DateRangePickerProps, 'minDate' | 'maxDate' | 'disableFuture' | 'disablePast' | '
|
|
27
|
+
export interface FilterDateRangeItem extends FilterBaseItem<[DateTime, DateTime]>, Pick<DateRangePickerProps, 'minDate' | 'maxDate' | 'disableFuture' | 'disablePast' | 'displayFormat' | 'inputReadOnly' | 'hideClearButton'> {
|
|
36
28
|
type: 'date-range';
|
|
37
29
|
}
|
|
38
30
|
export interface FilterCurrencyInputItem extends FilterBaseItem<number>, Pick<CurrencyInputProps, 'max' | 'placeholder' | 'useMinorUnit' | 'currency'> {
|
|
@@ -50,5 +42,5 @@ export interface FilterPercentageRangeItem extends FilterBaseItem<[number, numbe
|
|
|
50
42
|
export interface FilterAutocompleteItem extends FilterBaseItem<string | number>, Pick<AutocompleteProps<any, boolean>, 'options' | 'multiple' | 'placeholder'> {
|
|
51
43
|
type: 'autocomplete';
|
|
52
44
|
}
|
|
53
|
-
export type FilterItem = FilterCheckboxGroupItem |
|
|
45
|
+
export type FilterItem = FilterCheckboxGroupItem | FilterRadioGroupItem | FilterDateRangeItem | FilterCurrencyInputItem | FilterCurrencyRangeItem | FilterPercentageInputItem | FilterPercentageRangeItem | FilterAutocompleteItem;
|
|
54
46
|
export {};
|
|
@@ -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 {
|
|
@@ -75,26 +75,6 @@ FilterMenu는 다음과 같은 필터 타입을 지원합니다:
|
|
|
75
75
|
}
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
### Filterable Checkbox Group
|
|
79
|
-
|
|
80
|
-
검색 기능이 포함된 체크박스 그룹 필터입니다. 옵션이 많을 때 유용합니다.
|
|
81
|
-
|
|
82
|
-
```tsx
|
|
83
|
-
{
|
|
84
|
-
id: 'categories',
|
|
85
|
-
type: 'filterable-checkbox-group',
|
|
86
|
-
label: 'Categories',
|
|
87
|
-
options: [
|
|
88
|
-
{ label: 'Electronics', value: 'electronics' },
|
|
89
|
-
{ label: 'Clothing', value: 'clothing' },
|
|
90
|
-
{ label: 'Food', value: 'food' },
|
|
91
|
-
{ label: 'Books', value: 'books' },
|
|
92
|
-
],
|
|
93
|
-
placeholder: 'Search categories...',
|
|
94
|
-
maxHeight: 300,
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
78
|
### Radio Group
|
|
99
79
|
|
|
100
80
|
단일 선택이 가능한 라디오 버튼 그룹 필터입니다.
|
|
@@ -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
|
```
|
|
@@ -2,17 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
```
|
|
6
|
-
|
|
7
|
-
<Stack spacing={1}>
|
|
8
|
-
<div>Standard</div>
|
|
9
|
-
<Pagination {...args} variant="standard" />
|
|
10
|
-
</Stack>
|
|
11
|
-
<Stack spacing={1}>
|
|
12
|
-
<div>Compact</div>
|
|
13
|
-
<Pagination {...args} variant="compact" />
|
|
14
|
-
</Stack>
|
|
15
|
-
</Stack>
|
|
5
|
+
```text
|
|
6
|
+
// Unable to derive source for Playground
|
|
16
7
|
```
|
|
17
8
|
|
|
18
9
|
| Field | Description | Default |
|