@wavv/ui 1.2.4 → 1.3.0-beta.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.
@@ -7,7 +7,9 @@ declare type MultiSelectProps = {
7
7
  /** The list of selected options */
8
8
  items: DropdownOption[];
9
9
  /** A function that gives control of the list items to the user */
10
- children?: (listOpen: boolean) => ReactNode;
10
+ children?: (listOpen: boolean, disabled: boolean) => ReactNode;
11
+ /** Text to display in place of the conplete list of items */
12
+ listLabel?: string;
11
13
  /** Text to display in front of the list of selected items */
12
14
  listText?: string;
13
15
  /** The name of the items list to display (1/5 items) */
@@ -29,5 +31,5 @@ declare type MultiSelectProps = {
29
31
  /** The function to be called when the input is updated */
30
32
  onTextChange?: (text: string) => void;
31
33
  } & Width & Margin;
32
- declare const MultiSelect: ({ children, options, items, listText, itemsTitle, maxItems, placeholder, width, filter, restrictInput, disabled, addItem, removeItem, onTextChange, ...props }: MultiSelectProps) => JSX.Element;
34
+ declare const MultiSelect: ({ children, options, items, listLabel, listText, itemsTitle, maxItems, placeholder, width, filter, restrictInput, disabled, addItem, removeItem, onTextChange, ...props }: MultiSelectProps) => JSX.Element;
33
35
  export default MultiSelect;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ declare type Props = {
3
+ header?: string;
4
+ text?: string;
5
+ cancelText?: string;
6
+ confirmText?: string;
7
+ input?: boolean;
8
+ inputLabel?: string;
9
+ inputPlaceholder?: string;
10
+ inputValue?: string;
11
+ negative?: boolean;
12
+ };
13
+ declare const useConfirm: ({ header, text, cancelText, confirmText, negative, input, inputLabel, inputPlaceholder, inputValue, }: Props) => readonly [() => Promise<unknown>, () => JSX.Element];
14
+ export default useConfirm;
@@ -45,5 +45,6 @@ export { default as useOnClickOutside } from './hooks/useOnClickOutside';
45
45
  export { default as useSelect } from './hooks/useSelect';
46
46
  export { default as useSelectAll } from './hooks/useSelectAll';
47
47
  export { default as useWindowSize } from './hooks/useWindowSize';
48
+ export { default as useConfirm } from './hooks/useConfirm';
48
49
  export { default as formatDate } from './utils/formatDate';
49
50
  export { default as copyToClipboard } from './utils/copyToClipboard';