@ynput/ayon-react-components 1.11.0 → 1.12.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/Buttons/SwitchButton/SwitchButton.d.ts +1 -1
- package/dist/SearchFilter/SearchFilter.d.ts +2 -2
- package/dist/SearchFilter/SearchFilterDropdown/SearchFilterDropdown.d.ts +7 -2
- package/dist/SearchFilter/types.d.ts +3 -0
- package/dist/ayon-react-components.es.js +3074 -3059
- package/dist/ayon-react-components.umd.js +158 -156
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ export interface SwitchButtonProps extends Omit<ButtonProps, 'onChange' | 'label
|
|
|
5
5
|
label: React.ReactNode;
|
|
6
6
|
value: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
-
onClick
|
|
8
|
+
onClick?: () => void;
|
|
9
9
|
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
10
10
|
pt?: {
|
|
11
11
|
switch?: InputSwitchProps;
|
|
@@ -19,8 +19,8 @@ export interface SearchFilterProps extends Omit<React.HTMLAttributes<HTMLDivElem
|
|
|
19
19
|
disabledFilters?: string[];
|
|
20
20
|
preserveOrderFields?: string[];
|
|
21
21
|
pt?: {
|
|
22
|
-
dropdown?: SearchFilterDropdownProps
|
|
23
|
-
item?: SearchFilterItemProps
|
|
22
|
+
dropdown?: Partial<SearchFilterDropdownProps>;
|
|
23
|
+
item?: Partial<SearchFilterItemProps>;
|
|
24
24
|
searchBar?: React.HTMLAttributes<HTMLDivElement>;
|
|
25
25
|
backdrop?: React.HTMLAttributes<HTMLDivElement>;
|
|
26
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { Filter, FilterOperator, Option } from '../types';
|
|
3
3
|
type OnSelectConfig = {
|
|
4
4
|
confirm?: boolean;
|
|
@@ -16,6 +16,7 @@ export interface SearchFilterDropdownProps {
|
|
|
16
16
|
isInvertedAllowed?: boolean;
|
|
17
17
|
operatorChangeable?: boolean;
|
|
18
18
|
preserveOrderFields?: string[];
|
|
19
|
+
operationsTemplate?: ReactNode;
|
|
19
20
|
onSelect: (option: Option, config?: OnSelectConfig) => void;
|
|
20
21
|
onInvert: (id: string) => void;
|
|
21
22
|
onOperatorChange?: (id: string, operator: FilterOperator) => void;
|
|
@@ -23,7 +24,11 @@ export interface SearchFilterDropdownProps {
|
|
|
23
24
|
onSwitchFilter?: (direction: 'left' | 'right') => void;
|
|
24
25
|
pt?: {
|
|
25
26
|
search?: React.HTMLAttributes<HTMLDivElement>;
|
|
26
|
-
item?: React.HTMLAttributes<HTMLLIElement
|
|
27
|
+
item?: Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick'> & {
|
|
28
|
+
onClick?: (event: React.MouseEvent<HTMLLIElement>) => boolean;
|
|
29
|
+
};
|
|
30
|
+
hasSomeOption?: Partial<Option>;
|
|
31
|
+
hasNoOption?: Partial<Option>;
|
|
27
32
|
};
|
|
28
33
|
}
|
|
29
34
|
declare const SearchFilterDropdown: import("react").ForwardRefExoticComponent<SearchFilterDropdownProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export type FilterValue = {
|
|
2
3
|
id: string;
|
|
3
4
|
label: string;
|
|
@@ -32,4 +33,6 @@ export interface Option extends Filter {
|
|
|
32
33
|
parentId?: string | null;
|
|
33
34
|
searchOnly?: boolean;
|
|
34
35
|
searchLabel?: string;
|
|
36
|
+
contentBefore?: React.ReactNode;
|
|
37
|
+
contentAfter?: React.ReactNode;
|
|
35
38
|
}
|