@wavv/ui 2.4.8-alpha.4 → 2.4.8-alpha.5

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.
@@ -64,14 +64,27 @@ type BaseSelectInputProps = {
64
64
  after?: ReactNode;
65
65
  maxHeight?: PopoverProps['maxHeight'];
66
66
  } & Omit<InputProps, 'iconRight'> & ShowHideCallbacks & Pick<PopoverProps, 'maxHeight'>;
67
- export type SelectInputProps = BaseSelectInputProps & {
67
+ type SingleSelectInputProps = BaseSelectInputProps & {
68
+ /** The selection mode for the select */
69
+ selectionMode?: 'single';
70
+ /** The controlled value of the input */
71
+ value?: Key;
72
+ /** The uncontrolled initial value of the input */
73
+ defaultValue?: Key;
74
+ /** The function to be called when an option is selected */
75
+ onChange?: (key: string) => void;
76
+ };
77
+ type MultipleSelectInputProps = BaseSelectInputProps & {
78
+ /** The selection mode for the select */
79
+ selectionMode: 'multiple';
68
80
  /** The controlled value of the input */
69
81
  value?: Key | Key[];
70
82
  /** The uncontrolled initial value of the input */
71
83
  defaultValue?: Key | Key[];
72
- /** The function to be called when an option is selected */
73
- onChange?: (key: string | string[]) => void;
84
+ /** The function to be called when options are selected */
85
+ onChange?: (keys: string | string[]) => void;
74
86
  };
87
+ export type SelectInputProps = SingleSelectInputProps | MultipleSelectInputProps;
75
88
  export type ComboBoxInputProps = BaseSelectInputProps & {
76
89
  /** The controlled value of the input */
77
90
  value?: Key;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavv/ui",
3
- "version": "2.4.8-alpha.4",
3
+ "version": "2.4.8-alpha.5",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {