@wavv/ui 2.0.0-alpha.0 → 2.0.0-alpha.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 +6 -6
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/components/InputHelpers.d.ts +20 -1
- package/build/cjs/types/components/Select.d.ts +65 -0
- package/build/cjs/types/index.d.ts +15 -14
- package/build/esm/index.js +6 -6
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/components/InputHelpers.d.ts +20 -1
- package/build/esm/types/components/Select.d.ts +65 -0
- package/build/esm/types/index.d.ts +15 -14
- package/build/index.d.ts +149 -105
- package/build/types/components/InputHelpers.d.ts +20 -1
- package/build/types/components/Select.d.ts +65 -0
- package/build/types/index.d.ts +15 -14
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { InputFocusEvent, ThemeProp } from './types';
|
|
2
|
+
import { InputFocusEvent, MarginPadding, ThemeProp, WidthHeight } from './types';
|
|
3
3
|
type FocusCallBack = (event?: InputFocusEvent) => void;
|
|
4
4
|
export declare const useInputFocus: (onFocus?: FocusCallBack, onBlur?: FocusCallBack, focusCondition?: boolean) => {
|
|
5
5
|
focused: boolean;
|
|
@@ -7,6 +7,21 @@ export declare const useInputFocus: (onFocus?: FocusCallBack, onBlur?: FocusCall
|
|
|
7
7
|
handleBlur: (event?: InputFocusEvent) => void;
|
|
8
8
|
};
|
|
9
9
|
export declare const isInputFilled: (value?: string | number) => boolean;
|
|
10
|
+
export type InputContainerProps = {
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
borderRadius?: number | string;
|
|
13
|
+
borderless?: boolean;
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
fontSize?: number | string;
|
|
16
|
+
placeholderColor?: string;
|
|
17
|
+
pointer?: boolean;
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
textOnly?: boolean;
|
|
20
|
+
focused?: boolean;
|
|
21
|
+
invalid?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
hasLabel?: boolean;
|
|
24
|
+
} & WidthHeight & MarginPadding & ThemeProp;
|
|
10
25
|
export declare const InputContainer: import("@emotion/styled").StyledComponent<{
|
|
11
26
|
theme?: import("@emotion/react").Theme | undefined;
|
|
12
27
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
@@ -15,6 +30,8 @@ export declare const InputContainer: import("@emotion/styled").StyledComponent<{
|
|
|
15
30
|
borderRadius?: string | number | undefined;
|
|
16
31
|
borderless?: boolean | undefined;
|
|
17
32
|
borderColor?: string | undefined;
|
|
33
|
+
fontSize?: string | number | undefined;
|
|
34
|
+
placeholderColor?: string | undefined;
|
|
18
35
|
pointer?: boolean | undefined;
|
|
19
36
|
readOnly?: boolean | undefined;
|
|
20
37
|
textOnly?: boolean | undefined;
|
|
@@ -52,6 +69,8 @@ declare const _default: {
|
|
|
52
69
|
borderRadius?: string | number | undefined;
|
|
53
70
|
borderless?: boolean | undefined;
|
|
54
71
|
borderColor?: string | undefined;
|
|
72
|
+
fontSize?: string | number | undefined;
|
|
73
|
+
placeholderColor?: string | undefined;
|
|
55
74
|
pointer?: boolean | undefined;
|
|
56
75
|
readOnly?: boolean | undefined;
|
|
57
76
|
textOnly?: boolean | undefined;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { OptionItem } from './Dropdown/DropdownUtils';
|
|
3
|
+
import { Margin, WidthHeight } from './types';
|
|
4
|
+
type SelectProps<OptionType> = {
|
|
5
|
+
/** The function to be called when an option is selected */
|
|
6
|
+
onChange?: (item: OptionType | null) => void;
|
|
7
|
+
/** The value of the Select */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** The function to be called when the Select is opened */
|
|
10
|
+
afterShow?: () => void;
|
|
11
|
+
/** The function to be called when the Select is closed */
|
|
12
|
+
afterHide?: () => void;
|
|
13
|
+
/** Sets the input placeholder text */
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
/** Sets the input placeholder color */
|
|
16
|
+
placeholderColor?: string;
|
|
17
|
+
/** The options to be displayed */
|
|
18
|
+
options?: OptionType[];
|
|
19
|
+
/** Removes the border from the Select input */
|
|
20
|
+
borderless?: boolean;
|
|
21
|
+
/** Sets the input borderColor */
|
|
22
|
+
borderColor?: string;
|
|
23
|
+
/** Sets the input backgroundColor */
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
/** Removes the border and background-color from the Select input */
|
|
26
|
+
textOnly?: boolean;
|
|
27
|
+
/** Adds a label to the Select input */
|
|
28
|
+
label?: string;
|
|
29
|
+
/** Sets the id of the Select input or trigger */
|
|
30
|
+
id?: string;
|
|
31
|
+
/** Sets the Select fontSize */
|
|
32
|
+
fontSize?: number | string;
|
|
33
|
+
/** Places a description message below the Select */
|
|
34
|
+
description?: string;
|
|
35
|
+
/** Disables the Select */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Sets the Select's bottom border and description text to red */
|
|
38
|
+
invalid?: boolean;
|
|
39
|
+
/** zIndex of the menu's portal container */
|
|
40
|
+
zIndex?: number;
|
|
41
|
+
/** Controls the open state of the menu */
|
|
42
|
+
open?: boolean;
|
|
43
|
+
} & WidthHeight & Margin;
|
|
44
|
+
declare const Select: <OptionType extends OptionItem>({ onChange, afterShow, afterHide, placeholder, placeholderColor, value, options, borderless, borderColor, backgroundColor, textOnly, width, label, id, fontSize, description, disabled, invalid, zIndex, open, ...props }: SelectProps<OptionType>) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const Trigger: import("@emotion/styled").StyledComponent<{
|
|
46
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
47
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
48
|
+
} & {
|
|
49
|
+
backgroundColor?: string | undefined;
|
|
50
|
+
borderRadius?: string | number | undefined;
|
|
51
|
+
borderless?: boolean | undefined;
|
|
52
|
+
borderColor?: string | undefined;
|
|
53
|
+
fontSize?: string | number | undefined;
|
|
54
|
+
placeholderColor?: string | undefined;
|
|
55
|
+
pointer?: boolean | undefined;
|
|
56
|
+
readOnly?: boolean | undefined;
|
|
57
|
+
textOnly?: boolean | undefined;
|
|
58
|
+
focused?: boolean | undefined;
|
|
59
|
+
invalid?: boolean | undefined;
|
|
60
|
+
disabled?: boolean | undefined;
|
|
61
|
+
hasLabel?: boolean | undefined;
|
|
62
|
+
} & import("./types").Width & import("./types").Height & Margin & import("./types").Padding & import("./types").ThemeProp & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
63
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
64
|
+
}, {}, {}>;
|
|
65
|
+
export default Select;
|
|
@@ -29,36 +29,37 @@ export { default as Pagination } from './components/Pagination';
|
|
|
29
29
|
export { default as PieChart } from './components/PieChart';
|
|
30
30
|
export { default as Progress } from './components/Progress';
|
|
31
31
|
export { default as Radio } from './components/Radio';
|
|
32
|
-
export { default as
|
|
33
|
-
export { default as ScrollbarStyles } from './global-styles/ScrollbarStyles';
|
|
34
|
-
export { default as ToastStyles } from './global-styles/ToastStyles';
|
|
32
|
+
export { default as Select } from './components/Select';
|
|
35
33
|
export { default as Slider } from './components/Slider';
|
|
36
34
|
export { default as Spacer } from './components/Spacer';
|
|
37
35
|
export { default as Spinner } from './components/Spinner';
|
|
38
|
-
export { default as TransferList } from './components/TransferList';
|
|
39
36
|
export { default as Table } from './components/Table';
|
|
37
|
+
export { default as Tabs } from './components/Tabs';
|
|
40
38
|
export { default as Toggle } from './components/Toggle';
|
|
41
39
|
export { default as Tooltip } from './components/Tooltip';
|
|
42
|
-
export { default as
|
|
40
|
+
export { default as TransferList } from './components/TransferList';
|
|
41
|
+
export { default as ResetStyles } from './global-styles/ResetStyles';
|
|
42
|
+
export { default as ScrollbarStyles } from './global-styles/ScrollbarStyles';
|
|
43
|
+
export { default as ToastStyles } from './global-styles/ToastStyles';
|
|
43
44
|
export { default as theme } from './theme';
|
|
44
45
|
export { default as colors } from './theme/colors';
|
|
45
46
|
export { default as darkScale } from './theme/darkScale';
|
|
46
47
|
export { default as lightScale } from './theme/lightScale';
|
|
47
|
-
export type {
|
|
48
|
+
export type { DropdownOption } from './components/Dropdown';
|
|
48
49
|
export type { IconNames } from './components/Icon/icons';
|
|
49
50
|
export type { TabItem } from './components/Tabs';
|
|
50
|
-
export type {
|
|
51
|
-
export type {
|
|
52
|
-
export type {
|
|
51
|
+
export type { Action as TransferAction, Item as TransferItem, Next as TransferNext } from './components/TransferList';
|
|
52
|
+
export type { AsProp as As, AudioRef, DraftEditorRef, FlexPosition, Height, InputRef, Margin, MarginPadding, MaxHeight, MaxWidth, MaxWidthHeight, MinHeight, MinWidth, MinWidthHeight, MultiSelectRef, Padding, Position, Width, WidthHeight, } from './components/types';
|
|
53
|
+
export type { ITheme, ThemeProp } from './theme/ThemeTypes';
|
|
54
|
+
export { default as useConfirm } from './hooks/useConfirm';
|
|
55
|
+
export { default as useElementObserver } from './hooks/useElementObserver';
|
|
53
56
|
export { default as useEventListener } from './hooks/useEventListener';
|
|
54
57
|
export { default as useOnClickOutside } from './hooks/useOnClickOutside';
|
|
58
|
+
export { default as usePrevious } from './hooks/usePrevious';
|
|
55
59
|
export { default as useSelect } from './hooks/useSelect';
|
|
56
60
|
export { default as useSelectAll } from './hooks/useSelectAll';
|
|
57
61
|
export { default as useWindowSize } from './hooks/useWindowSize';
|
|
58
|
-
export {
|
|
59
|
-
export { default as useElementObserver } from './hooks/useElementObserver';
|
|
60
|
-
export { default as usePrevious } from './hooks/usePrevious';
|
|
61
|
-
export { default as formatDate } from './utils/formatDate';
|
|
62
|
+
export { marginProps, paddingProps, positionProps, widthHeightProps } from './components/helpers/styledProps';
|
|
62
63
|
export { default as copyToClipboard } from './utils/copyToClipboard';
|
|
64
|
+
export { default as formatDate } from './utils/formatDate';
|
|
63
65
|
export { default as numberWithCommas } from './utils/numberWithCommas';
|
|
64
|
-
export { widthHeightProps, paddingProps, marginProps, positionProps } from './components/helpers/styledProps';
|