@wavv/ui 1.2.5-beta.1 → 1.3.0-beta.2
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/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/components/MultiSelect.d.ts +2 -1
- package/build/cjs/types/hooks/useConfirm.d.ts +14 -0
- package/build/cjs/types/index.d.ts +1 -0
- package/build/esm/index.js +4 -4
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/components/MultiSelect.d.ts +2 -1
- package/build/esm/types/hooks/useConfirm.d.ts +14 -0
- package/build/esm/types/index.d.ts +1 -0
- package/build/index.d.ts +16 -2
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ declare type MultiSelectProps = {
|
|
|
24
24
|
restrictInput?: boolean | ((text: string) => boolean);
|
|
25
25
|
/** Disables the Dropdown */
|
|
26
26
|
disabled?: boolean;
|
|
27
|
+
compact?: boolean;
|
|
27
28
|
/** Function called after an item is selected */
|
|
28
29
|
addItem: (item: DropdownOption | null) => void;
|
|
29
30
|
/** Function called after an item is removed */
|
|
@@ -31,5 +32,5 @@ declare type MultiSelectProps = {
|
|
|
31
32
|
/** The function to be called when the input is updated */
|
|
32
33
|
onTextChange?: (text: string) => void;
|
|
33
34
|
} & Width & Margin;
|
|
34
|
-
declare const MultiSelect: ({ children, options, items, listLabel, listText, itemsTitle, maxItems, placeholder, width, filter, restrictInput, disabled, addItem, removeItem, onTextChange, ...props }: MultiSelectProps) => JSX.Element;
|
|
35
|
+
declare const MultiSelect: ({ children, options, items, listLabel, listText, itemsTitle, maxItems, placeholder, width, filter, restrictInput, disabled, compact, addItem, removeItem, onTextChange, ...props }: MultiSelectProps) => JSX.Element;
|
|
35
36
|
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';
|
package/build/index.d.ts
CHANGED
|
@@ -2367,6 +2367,7 @@ declare type MultiSelectProps = {
|
|
|
2367
2367
|
restrictInput?: boolean | ((text: string) => boolean);
|
|
2368
2368
|
/** Disables the Dropdown */
|
|
2369
2369
|
disabled?: boolean;
|
|
2370
|
+
compact?: boolean;
|
|
2370
2371
|
/** Function called after an item is selected */
|
|
2371
2372
|
addItem: (item: OptionItem | null) => void;
|
|
2372
2373
|
/** Function called after an item is removed */
|
|
@@ -2374,7 +2375,7 @@ declare type MultiSelectProps = {
|
|
|
2374
2375
|
/** The function to be called when the input is updated */
|
|
2375
2376
|
onTextChange?: (text: string) => void;
|
|
2376
2377
|
} & Width & Margin;
|
|
2377
|
-
declare const MultiSelect: ({ children, options, items, listLabel, listText, itemsTitle, maxItems, placeholder, width, filter, restrictInput, disabled, addItem, removeItem, onTextChange, ...props }: MultiSelectProps) => JSX.Element;
|
|
2378
|
+
declare const MultiSelect: ({ children, options, items, listLabel, listText, itemsTitle, maxItems, placeholder, width, filter, restrictInput, disabled, compact, addItem, removeItem, onTextChange, ...props }: MultiSelectProps) => JSX.Element;
|
|
2378
2379
|
|
|
2379
2380
|
declare const Notification: _emotion_styled.StyledComponent<{
|
|
2380
2381
|
theme?: _emotion_react.Theme | undefined;
|
|
@@ -2662,6 +2663,19 @@ declare const useWindowSize: () => {
|
|
|
2662
2663
|
height: number | null;
|
|
2663
2664
|
};
|
|
2664
2665
|
|
|
2666
|
+
declare type Props = {
|
|
2667
|
+
header?: string;
|
|
2668
|
+
text?: string;
|
|
2669
|
+
cancelText?: string;
|
|
2670
|
+
confirmText?: string;
|
|
2671
|
+
input?: boolean;
|
|
2672
|
+
inputLabel?: string;
|
|
2673
|
+
inputPlaceholder?: string;
|
|
2674
|
+
inputValue?: string;
|
|
2675
|
+
negative?: boolean;
|
|
2676
|
+
};
|
|
2677
|
+
declare const useConfirm: ({ header, text, cancelText, confirmText, negative, input, inputLabel, inputPlaceholder, inputValue, }: Props) => readonly [() => Promise<unknown>, () => JSX.Element];
|
|
2678
|
+
|
|
2665
2679
|
declare type TimeSpec = 'onlyTime' | 'withTime' | 'relative';
|
|
2666
2680
|
declare type TimeOptions = {
|
|
2667
2681
|
time?: TimeSpec;
|
|
@@ -2671,4 +2685,4 @@ declare const formatDate: (value: Date, option?: TimeSpec | TimeOptions) => stri
|
|
|
2671
2685
|
|
|
2672
2686
|
declare const copyToClipboard: (text: string) => void;
|
|
2673
2687
|
|
|
2674
|
-
export { Audio, AudioRef, Button, Calendar, Checkbox, Code, Table$1 as DocTable, DraftEditor, DraftEditorRef, Dropdown, OptionItem as DropdownOption, Form, Grid, ITheme, Icon, IconNames, ImageViewer, InlineCode, Input, InputRef, _default as InputUtils, Label, Menu, Message, MessageHr, Modal, MultiSelect, Notification, Options, Pagination, Progress, Radio, ResetStyles, ScrollbarStyles, Slider, Spacer, Spinner, Table, ThemeProp, ToastStyles, Toggle, Tooltip, Action as TransferAction, Item as TransferItem, TransferList, Next as TransferNext, copyToClipboard, formatDate, theme, useEventListener, useOnClickOutside, useSelect, useSelectAll, useWindowSize };
|
|
2688
|
+
export { Audio, AudioRef, Button, Calendar, Checkbox, Code, Table$1 as DocTable, DraftEditor, DraftEditorRef, Dropdown, OptionItem as DropdownOption, Form, Grid, ITheme, Icon, IconNames, ImageViewer, InlineCode, Input, InputRef, _default as InputUtils, Label, Menu, Message, MessageHr, Modal, MultiSelect, Notification, Options, Pagination, Progress, Radio, ResetStyles, ScrollbarStyles, Slider, Spacer, Spinner, Table, ThemeProp, ToastStyles, Toggle, Tooltip, Action as TransferAction, Item as TransferItem, TransferList, Next as TransferNext, copyToClipboard, formatDate, theme, useConfirm, useEventListener, useOnClickOutside, useSelect, useSelectAll, useWindowSize };
|