@sellgar/kit 0.0.47 → 0.0.49
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/index.css +1 -1
- package/dist/index.js +2769 -2726
- package/package.json +1 -1
- package/types/components/helpers/select/select.d.ts +4 -0
- package/types/components/symbols/select/input/input.d.ts +2 -0
- package/types/components/symbols/select/option/option.d.ts +1 -0
- package/types/components/symbols/select/placeholder/index.d.ts +1 -0
- package/types/components/symbols/select/placeholder/placeholder.d.ts +5 -0
- package/types/components/symbols/select/select.d.ts +3 -1
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ interface IOptions {
|
|
|
4
4
|
initialOpen?: boolean;
|
|
5
5
|
initialSelectedIndex?: number;
|
|
6
6
|
open?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
7
8
|
setOpen?(open: boolean): void;
|
|
8
9
|
}
|
|
9
10
|
declare const useSelect: (options: IOptions) => {
|
|
@@ -55,6 +56,7 @@ declare const useSelect: (options: IOptions) => {
|
|
|
55
56
|
};
|
|
56
57
|
};
|
|
57
58
|
interactions: import('@floating-ui/react').UseInteractionsReturn;
|
|
59
|
+
disabled: boolean | undefined;
|
|
58
60
|
};
|
|
59
61
|
type TSelectContext = ReturnType<typeof useSelect>;
|
|
60
62
|
export declare const useSelectContext: () => {
|
|
@@ -106,11 +108,13 @@ export declare const useSelectContext: () => {
|
|
|
106
108
|
};
|
|
107
109
|
};
|
|
108
110
|
interactions: import('@floating-ui/react').UseInteractionsReturn;
|
|
111
|
+
disabled: boolean | undefined;
|
|
109
112
|
};
|
|
110
113
|
interface IProps {
|
|
111
114
|
initialOpen?: boolean;
|
|
112
115
|
initialSelectedIndex?: number;
|
|
113
116
|
open?: boolean;
|
|
117
|
+
disabled?: boolean;
|
|
114
118
|
setOpen?(open: boolean): void;
|
|
115
119
|
}
|
|
116
120
|
declare const SelectWrapper: React.FC<React.PropsWithChildren<IProps>>;
|
|
@@ -7,5 +7,7 @@ export interface IProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
7
7
|
size?: 'xs' | 'md';
|
|
8
8
|
target?: 'destructive';
|
|
9
9
|
isFocused?: boolean;
|
|
10
|
+
isClearable?: boolean;
|
|
11
|
+
onClear?(): void;
|
|
10
12
|
}
|
|
11
13
|
export declare const Input: React.FC<React.PropsWithChildren<IProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Placeholder } from './placeholder.tsx';
|
|
@@ -9,10 +9,12 @@ export interface IProps<T extends Record<string, any>, K extends keyof T> {
|
|
|
9
9
|
optionValue: K;
|
|
10
10
|
options: T[];
|
|
11
11
|
value?: T[K];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
isClearable?: boolean;
|
|
12
14
|
templateValue?(option?: T): React.ReactNode;
|
|
13
15
|
templateOption?(option: T): React.ReactNode;
|
|
14
16
|
onChange?: (value: T[K] | undefined) => void;
|
|
15
17
|
onFocus?: () => void;
|
|
16
18
|
onBlur?: () => void;
|
|
17
19
|
}
|
|
18
|
-
export declare const Select: <T extends Record<string, any>, K extends keyof T>({ value, options, optionKey, optionValue, templateValue, templateOption, onBlur, onFocus, onChange, ...props }: IProps<T, K>) => React.JSX.Element;
|
|
20
|
+
export declare const Select: <T extends Record<string, any>, K extends keyof T>({ value, options, optionKey, optionValue, templateValue, templateOption, onBlur, onFocus, onChange, disabled, isClearable, ...props }: IProps<T, K>) => React.JSX.Element;
|