@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@sellgar/kit",
4
- "version": "0.0.47",
4
+ "version": "0.0.49",
5
5
  "description": "Sellgar storybook",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -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>>;
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  export interface IProps {
3
3
  title: string;
4
+ disabled?: boolean;
4
5
  }
5
6
  export declare const Option: React.FC<IProps>;
@@ -0,0 +1 @@
1
+ export { Placeholder } from './placeholder.tsx';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface IProps {
3
+ title: string;
4
+ }
5
+ export declare const Placeholder: React.FC<IProps>;
@@ -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;