freemium-ui 1.0.138 → 1.0.142
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/lib/index.cjs.js +451 -18674
- package/lib/index.esm.js +451 -18609
- package/lib/types/components/Alert/Alert.d.ts +17 -0
- package/lib/types/components/Alert/index.d.ts +1 -0
- package/lib/types/components/BoxedRadio/boxedRadio.d.ts +8 -0
- package/lib/types/components/BoxedRadio/boxedRadioContext.d.ts +7 -0
- package/lib/types/components/BoxedRadio/boxedRadioGroup.d.ts +2 -0
- package/lib/types/components/BoxedRadio/index.d.ts +2 -0
- package/lib/types/components/Button/Buttons.d.ts +24 -0
- package/lib/types/components/Button/index.d.ts +1 -0
- package/lib/types/components/ButtonDropdown/ButtonDropdown.d.ts +19 -0
- package/lib/types/components/ButtonDropdown/index.d.ts +1 -0
- package/lib/types/components/Checkbox/Checkbox.d.ts +17 -0
- package/lib/types/components/Checkbox/index.d.ts +1 -0
- package/lib/types/components/Confirmation/Confirmation.d.ts +33 -0
- package/lib/types/components/Confirmation/index.d.ts +2 -0
- package/lib/types/components/Confirmation/useConfirmation.d.ts +10 -0
- package/lib/types/components/CssBaseLine/index.d.ts +1 -0
- package/lib/types/components/DatePicker/DatePicker.d.ts +14 -0
- package/lib/types/components/DatePicker/index.d.ts +1 -0
- package/lib/types/components/DateRangePicker/DateRangePicker.d.ts +16 -0
- package/lib/types/components/DateRangePicker/index.d.ts +1 -0
- package/lib/types/components/Drawer/Drawer.d.ts +16 -0
- package/lib/types/components/Drawer/index.d.ts +2 -0
- package/lib/types/components/Drawer/styles.d.ts +6 -0
- package/lib/types/components/Dropdown/DropdownButton.d.ts +14 -0
- package/lib/types/components/Dropdown/DropdownInput.d.ts +4 -0
- package/lib/types/components/Dropdown/DropdownMenu.d.ts +4 -0
- package/lib/types/components/Dropdown/index.d.ts +24 -0
- package/lib/types/components/Dropdown/withDownshift.d.ts +8 -0
- package/lib/types/components/Icons/Icons.d.ts +20 -0
- package/lib/types/components/Icons/index.d.ts +1 -0
- package/lib/types/components/Input/Input.d.ts +51 -0
- package/lib/types/components/Input/index.d.ts +1 -0
- package/lib/types/components/Loader/index.d.ts +1 -0
- package/lib/types/components/Loader/loader.d.ts +8 -0
- package/lib/types/components/Menu/Menu.d.ts +17 -0
- package/lib/types/components/Menu/index.d.ts +1 -0
- package/lib/types/components/Modal/Modal.d.ts +11 -0
- package/lib/types/components/Modal/index.d.ts +3 -0
- package/lib/types/components/Modal/styles.d.ts +12 -0
- package/lib/types/components/Modal/use-modal.d.ts +10 -0
- package/lib/types/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +19 -0
- package/lib/types/components/MultiSelectDropdown/index.d.ts +1 -0
- package/lib/types/components/Popover/Popover.d.ts +20 -0
- package/lib/types/components/Popover/index.d.ts +1 -0
- package/lib/types/components/Radio/Radio.d.ts +13 -0
- package/lib/types/components/Radio/index.d.ts +1 -0
- package/lib/types/components/RestTable/RestTable.d.ts +38 -0
- package/lib/types/components/RestTable/index.d.ts +1 -0
- package/lib/types/components/Table/Table.d.ts +129 -0
- package/lib/types/components/Table/index.d.ts +1 -0
- package/lib/types/components/Tabs/Tabs.d.ts +16 -0
- package/lib/types/components/Tabs/index.d.ts +1 -0
- package/lib/types/components/Tag/Tag.d.ts +7 -0
- package/lib/types/components/Tag/index.d.ts +1 -0
- package/lib/types/components/ThemeProvider/index.d.ts +12 -0
- package/lib/types/components/Toast/Toast.d.ts +14 -0
- package/lib/types/components/Toast/index.d.ts +3 -0
- package/lib/types/components/Toggle/Toggle.d.ts +15 -0
- package/lib/types/components/Toggle/index.d.ts +1 -0
- package/lib/types/components/Tooltip/Tooltip.d.ts +15 -0
- package/lib/types/components/Tooltip/index.d.ts +1 -0
- package/lib/types/components/Tooltip/tooltip-old.d.ts +14 -0
- package/lib/types/components/Transition/Transition.d.ts +14 -0
- package/lib/types/components/Transition/fade.d.ts +6 -0
- package/lib/types/components/Transition/index.d.ts +4 -0
- package/lib/types/components/Transition/slide-fade.d.ts +13 -0
- package/lib/types/components/Transition/slide.d.ts +11 -0
- package/lib/types/components/UiProvider/UiProvider.d.ts +2 -0
- package/lib/types/components/UiProvider/index.d.ts +1 -0
- package/lib/types/components/use-toasts/index.d.ts +1 -0
- package/lib/types/components/use-toasts/toast-container.d.ts +8 -0
- package/lib/types/components/use-toasts/toast-item.d.ts +15 -0
- package/lib/types/components/use-toasts/use-toast.d.ts +15 -0
- package/lib/types/index.d.ts +28 -29
- package/lib/types/theme/default/colors.d.ts +3 -0
- package/lib/types/theme/default/index.d.ts +7 -0
- package/lib/types/theme/default/palette.d.ts +3 -0
- package/lib/types/theme/default/typography.d.ts +3 -0
- package/lib/types/theme/freshstatus/colors.d.ts +3 -0
- package/lib/types/theme/freshstatus/index.d.ts +7 -0
- package/lib/types/theme/freshstatus/palette.d.ts +3 -0
- package/lib/types/theme/freshstatus/typography.d.ts +3 -0
- package/lib/types/theme/index.d.ts +352 -0
- package/lib/types/theme/shared.d.ts +2 -0
- package/lib/types/utils/date.d.ts +7 -0
- package/lib/types/utils/index.d.ts +1 -0
- package/lib/types/utils/use-current-state.d.ts +4 -0
- package/lib/types/utils/use-portal.d.ts +2 -0
- package/lib/types/utils/use-ssr.d.ts +6 -0
- package/lib/types/utils/use-ui-context.d.ts +11 -0
- package/lib/types/utils/with-defaults.d.ts +3 -0
- package/package.json +4 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare type LevelType = 'warning' | 'success' | 'error' | 'info';
|
|
3
|
+
interface AlertProps {
|
|
4
|
+
level?: LevelType;
|
|
5
|
+
canDismiss: boolean;
|
|
6
|
+
timeout?: number;
|
|
7
|
+
overideClassName?: string;
|
|
8
|
+
children?: any;
|
|
9
|
+
onClose: () => any;
|
|
10
|
+
onDisappear?: () => any;
|
|
11
|
+
}
|
|
12
|
+
export declare const Alert: React.ComponentType<Partial<{
|
|
13
|
+
canDismiss: boolean;
|
|
14
|
+
onClose: () => null;
|
|
15
|
+
level: string;
|
|
16
|
+
}> & Pick<AlertProps, "children" | "timeout" | "overideClassName" | "onDisappear">>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Alert';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const BUTTON_SIZE_VARIANTS: {
|
|
3
|
+
LARGE: string;
|
|
4
|
+
MINI: string;
|
|
5
|
+
NORMAL: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type ButtonSizeKey = 'large' | 'mini' | 'normal' | undefined;
|
|
8
|
+
export declare type buttonHTMLType = 'button' | 'reset' | 'submit' | undefined;
|
|
9
|
+
export declare type buttonType = 'primary' | 'secondary' | 'danger' | 'link';
|
|
10
|
+
export declare type ButtonProps = {
|
|
11
|
+
type?: buttonType;
|
|
12
|
+
htmlType?: buttonHTMLType;
|
|
13
|
+
size?: ButtonSizeKey;
|
|
14
|
+
inline?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
large?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
ref?: any;
|
|
19
|
+
onClick?: any;
|
|
20
|
+
overrideStyleClassName?: string;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
children: any;
|
|
23
|
+
};
|
|
24
|
+
export declare const Button: (props: ButtonProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Buttons';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import FreemiumUIThemes from '../../theme';
|
|
3
|
+
import { buttonHTMLType, buttonType, ButtonSizeKey } from '../Button';
|
|
4
|
+
declare type ButtonDropdownProps = {
|
|
5
|
+
theme?: FreemiumUIThemes;
|
|
6
|
+
onClick?: (item: unknown, event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
items?: Array<any>;
|
|
8
|
+
id: string;
|
|
9
|
+
type?: buttonType;
|
|
10
|
+
htmlType?: buttonHTMLType;
|
|
11
|
+
size?: ButtonSizeKey;
|
|
12
|
+
inline?: boolean;
|
|
13
|
+
idAccessor?: string;
|
|
14
|
+
defaultSelectedItem: any;
|
|
15
|
+
nameAccessor?: string;
|
|
16
|
+
position?: 'top' | 'bottom';
|
|
17
|
+
};
|
|
18
|
+
export declare const ButtonDropdown: React.ForwardRefExoticComponent<ButtonDropdownProps & React.RefAttributes<unknown>>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ButtonDropdown';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CheckboxProps {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
sizeVariant?: 'sm' | 'md';
|
|
7
|
+
children?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
value?: string | number;
|
|
10
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent<HTMLInputElement>, checked: boolean) => void;
|
|
11
|
+
id?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Checkbox: React.ComponentType<Partial<{
|
|
14
|
+
checked: boolean;
|
|
15
|
+
sizeVariant: string;
|
|
16
|
+
}> & Pick<CheckboxProps & React.RefAttributes<HTMLInputElement>, "ref" | "disabled" | "readOnly" | "children" | "name" | "value" | "onChange" | "id" | "key">>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import FreemiumUIThemes from '../../theme';
|
|
3
|
+
declare type ConfirmationProps = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onDismiss: () => void;
|
|
6
|
+
theme?: FreemiumUIThemes;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
title?: string;
|
|
9
|
+
bodyStyles?: any;
|
|
10
|
+
contentStyles?: any;
|
|
11
|
+
footerStyles?: any;
|
|
12
|
+
confirmButtonText?: string;
|
|
13
|
+
cancelButtonText?: string;
|
|
14
|
+
onConfirm?: () => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const Confirmation: React.ForwardRefExoticComponent<ConfirmationProps & React.RefAttributes<unknown>>;
|
|
17
|
+
export declare const ConfirmationContent: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<{
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
20
|
+
export declare const ConfirmationOverlay: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<{
|
|
21
|
+
allowPinchZoom?: boolean | undefined;
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
initialFocusRef?: React.RefObject<any> | undefined;
|
|
24
|
+
isOpen?: boolean | undefined;
|
|
25
|
+
onDismiss?: ((event?: React.SyntheticEvent<Element, Event> | undefined) => void) | undefined;
|
|
26
|
+
unstable_lockFocusAcrossFrames?: boolean | undefined;
|
|
27
|
+
} & React.HTMLAttributes<HTMLDivElement> & {
|
|
28
|
+
dangerouslyBypassFocusLock?: boolean | undefined;
|
|
29
|
+
dangerouslyBypassScrollLock?: boolean | undefined;
|
|
30
|
+
} & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
31
|
+
export declare const ConfirmationBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
32
|
+
export declare const ConfirmationFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
|
+
export declare const useConfirmation: (initialVisible?: boolean) => {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
setVisible: Dispatch<SetStateAction<boolean>>;
|
|
5
|
+
currentRef: MutableRefObject<boolean>;
|
|
6
|
+
bindings: {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
onDismiss: () => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CssBaseLine: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import 'react-dates/initialize';
|
|
3
|
+
declare type DateRangePickerProps = {
|
|
4
|
+
anchorDirection?: 'right' | 'left';
|
|
5
|
+
initialDate?: number;
|
|
6
|
+
onDateChange: (arg0: any) => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
minMonths?: number;
|
|
9
|
+
autoFocus?: any;
|
|
10
|
+
autoFocusEndDate?: boolean;
|
|
11
|
+
minimumNights?: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const DatePicker: (props: DateRangePickerProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DatePicker';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import 'react-dates/initialize';
|
|
3
|
+
import 'react-dates/lib/css/_datepicker.css';
|
|
4
|
+
declare type DateRangePickerProps = {
|
|
5
|
+
anchorDirection?: 'right' | 'left';
|
|
6
|
+
initialStartDate?: number;
|
|
7
|
+
initialEndDate?: number;
|
|
8
|
+
onRangeSelected: (arg0: any) => void;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
minMonths?: number;
|
|
11
|
+
autoFocus?: any;
|
|
12
|
+
autoFocusEndDate?: boolean;
|
|
13
|
+
minimumNights?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function DateRangePicker(props: DateRangePickerProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DateRangePicker';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ModalProps, MODALSIZE } from '../Modal';
|
|
3
|
+
import { SlideProps } from '../Transition';
|
|
4
|
+
export interface DrawerProps extends ModalProps {
|
|
5
|
+
placement?: SlideProps['placement'];
|
|
6
|
+
size?: MODALSIZE;
|
|
7
|
+
isFullHeight?: boolean;
|
|
8
|
+
clickOutToClose?: boolean;
|
|
9
|
+
hideDismissIcon?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function Drawer(props: DrawerProps): JSX.Element;
|
|
12
|
+
export declare const DrawerContent: React.SFC<{
|
|
13
|
+
size: MODALSIZE;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const DrawerOverlay: React.SFC<ModalProps>;
|
|
16
|
+
export default DrawerOverlay;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import FreemiumUIThemes from '../../theme';
|
|
2
|
+
export declare const DrawerBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const DismissIcon: import("styled-components").StyledComponent<"span", any, {
|
|
4
|
+
theme: FreemiumUIThemes;
|
|
5
|
+
}, never>;
|
|
6
|
+
export declare const DrawerFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="hoist-non-react-statics" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface DropdownButtonProps {
|
|
4
|
+
downshift: any;
|
|
5
|
+
itemToString: any;
|
|
6
|
+
isErrored: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
overrideStyles: any;
|
|
9
|
+
buttonLabelComponent: any;
|
|
10
|
+
children: any;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>> & import("hoist-non-react-statics").NonReactStatics<any, {}>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="hoist-non-react-statics" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const DropdownInput: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>> & import("hoist-non-react-statics").NonReactStatics<any, {}>;
|
|
4
|
+
export default DropdownInput;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="hoist-non-react-statics" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const DropdownMenu: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>> & import("hoist-non-react-statics").NonReactStatics<any, {}>;
|
|
4
|
+
export default DropdownMenu;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type DropdownProps = {
|
|
3
|
+
items: string[] | Record<string, unknown>[];
|
|
4
|
+
defaultSelectedItem: string | null | Record<string, unknown>;
|
|
5
|
+
onChange?: (value: any) => any;
|
|
6
|
+
itemToString?: (a: any) => any;
|
|
7
|
+
type?: 'button' | 'input';
|
|
8
|
+
filterKey?: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
width?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
itemComponent?: React.ReactNode;
|
|
14
|
+
name?: string;
|
|
15
|
+
errorText?: string;
|
|
16
|
+
children?: any;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
isErrored?: boolean;
|
|
19
|
+
isRequired?: boolean;
|
|
20
|
+
overrideButtonStyles?: any;
|
|
21
|
+
overrideContainerStyles?: any;
|
|
22
|
+
};
|
|
23
|
+
export declare const Dropdown: (props: DropdownProps) => JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
3
|
+
export declare const DROPDOWN_TYPES: {
|
|
4
|
+
BUTTON: string;
|
|
5
|
+
INPUT: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const DownshiftContext: React.Context<any>;
|
|
8
|
+
export declare function withDownshift(Component: any): React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>> & hoistNonReactStatics.NonReactStatics<any, {}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
glyph: string;
|
|
4
|
+
size?: number | string;
|
|
5
|
+
color?: string;
|
|
6
|
+
onClick?: any;
|
|
7
|
+
dataCy?: string;
|
|
8
|
+
viewBox?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const InlineSvg: import("styled-components").StyledComponent<"svg", any, {}, never>;
|
|
11
|
+
declare type SvgWrapperProps = {
|
|
12
|
+
size: number | string;
|
|
13
|
+
};
|
|
14
|
+
export declare const SvgWrapper: import("styled-components").StyledComponent<"div", any, SvgWrapperProps, never>;
|
|
15
|
+
declare type GlyphProps = {
|
|
16
|
+
glyph: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const Glyph: ({ glyph }: GlyphProps) => JSX.Element | null;
|
|
19
|
+
export declare const Icons: (props: Props) => JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Icons';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface InputProps extends React.HTMLAttributes<HTMLInputElement> {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
isErrored?: boolean;
|
|
5
|
+
showCount?: boolean;
|
|
6
|
+
errorText?: string;
|
|
7
|
+
maxLength?: any;
|
|
8
|
+
type?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
style?: any;
|
|
12
|
+
value?: any;
|
|
13
|
+
inputStyle?: any;
|
|
14
|
+
className?: string;
|
|
15
|
+
startLabel?: React.ReactNode | any;
|
|
16
|
+
startAdornment?: React.ReactNode | any;
|
|
17
|
+
endLabel?: React.ReactNode | any;
|
|
18
|
+
endAdornment?: React.ReactNode | any;
|
|
19
|
+
isRequired?: boolean;
|
|
20
|
+
inline?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface TextAreaProps extends React.HTMLAttributes<HTMLTextAreaElement> {
|
|
23
|
+
isErrored: boolean;
|
|
24
|
+
errorText?: string;
|
|
25
|
+
style?: any;
|
|
26
|
+
inputStyle?: any;
|
|
27
|
+
className?: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
startLabel?: React.ReactNode | any;
|
|
31
|
+
startAdornment?: React.ReactNode | any;
|
|
32
|
+
endLabel?: React.ReactNode | any;
|
|
33
|
+
endAdornment?: React.ReactNode | any;
|
|
34
|
+
isRequired?: boolean;
|
|
35
|
+
inline?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare const Input: React.ComponentType<Partial<{
|
|
38
|
+
isRequired: boolean;
|
|
39
|
+
showCount: boolean;
|
|
40
|
+
isErrored: boolean;
|
|
41
|
+
inline: boolean;
|
|
42
|
+
spellcheck: boolean;
|
|
43
|
+
}> & Pick<InputProps & React.RefAttributes<HTMLInputElement>, "label" | "slot" | "style" | "title" | "ref" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "errorText" | "disabled" | "maxLength" | "value" | "inputStyle" | "startLabel" | "startAdornment" | "endLabel" | "endAdornment">>;
|
|
44
|
+
export declare const TextArea: React.ComponentType<Partial<{
|
|
45
|
+
isRequired: boolean;
|
|
46
|
+
showCount: boolean;
|
|
47
|
+
isErrored: boolean;
|
|
48
|
+
inline: boolean;
|
|
49
|
+
spellcheck: boolean;
|
|
50
|
+
}> & Pick<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>, "label" | "slot" | "style" | "title" | "ref" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "errorText" | "inputStyle" | "startLabel" | "startAdornment" | "endLabel" | "endAdornment">>;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Loader';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import FreemiumUIThemes from '../../theme';
|
|
3
|
+
export interface MenuItemProps {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
declare type MenuProps = {
|
|
7
|
+
onSelect?: (option: MenuItemProps) => void;
|
|
8
|
+
closeMenuCallback?: () => void;
|
|
9
|
+
options?: Array<MenuItemProps>;
|
|
10
|
+
ref?: React.RefObject<HTMLUListElement> | null;
|
|
11
|
+
idAccessor?: string;
|
|
12
|
+
highlightedIndex?: number | null;
|
|
13
|
+
nameAccessor?: string;
|
|
14
|
+
theme?: FreemiumUIThemes;
|
|
15
|
+
};
|
|
16
|
+
export declare const Menu: ({ idAccessor, nameAccessor, highlightedIndex, options, onSelect, closeMenuCallback, }: MenuProps) => JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Menu';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MODALSIZE, POSITION, ALIGN } from './styles';
|
|
3
|
+
export interface ModalProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
align?: ALIGN;
|
|
7
|
+
position?: POSITION;
|
|
8
|
+
size?: MODALSIZE;
|
|
9
|
+
onDismiss: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const Modal: ({ children, isOpen, onDismiss, position, align, size, }: ModalProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ModalOverlay: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
|
|
3
|
+
export declare type ALIGN = 'top' | 'center' | 'bottom';
|
|
4
|
+
export declare type POSITION = 'left' | 'center' | 'right';
|
|
5
|
+
export declare type MODALSIZE = 'default' | 'medium' | 'small' | 'large' | 'x-large';
|
|
6
|
+
export declare const ModalContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
} & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {
|
|
9
|
+
size: MODALSIZE;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const ModalBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
|
+
export declare const ModalFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
|
+
export declare const useModal: (initialVisible?: boolean) => {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
setVisible: Dispatch<SetStateAction<boolean>>;
|
|
5
|
+
currentRef: MutableRefObject<boolean>;
|
|
6
|
+
bindings: {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
onDismiss: () => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type MultiSelectProps = {
|
|
3
|
+
name: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
items: any[];
|
|
6
|
+
selectedItem: any;
|
|
7
|
+
onChange: (items: any) => void;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
itemLabelIdentifier: string;
|
|
10
|
+
itemValueIdentifier: string;
|
|
11
|
+
errorText?: string;
|
|
12
|
+
isErrored?: boolean;
|
|
13
|
+
isRequired?: boolean;
|
|
14
|
+
customValues?: boolean;
|
|
15
|
+
renderCustomSuggestion?: any;
|
|
16
|
+
maxAllowedLength?: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const MultiSelectDropdown: (props: MultiSelectProps) => JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MultiSelectDropdown';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import FreemiumUIThemes from '../../theme';
|
|
3
|
+
declare type Origin = {
|
|
4
|
+
vertical?: 'top' | 'center' | 'bottom';
|
|
5
|
+
horizontal?: 'left' | 'center' | 'right';
|
|
6
|
+
};
|
|
7
|
+
declare type PopoverProps = {
|
|
8
|
+
onClose?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
9
|
+
anchorEl?: Element | null | undefined;
|
|
10
|
+
id: string;
|
|
11
|
+
hoverOutToClose?: boolean;
|
|
12
|
+
clickOutToClose?: boolean;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
anchorOrigin?: Origin;
|
|
15
|
+
transformOrigin?: Origin;
|
|
16
|
+
theme?: FreemiumUIThemes;
|
|
17
|
+
};
|
|
18
|
+
export declare const debounce: <F extends (...args: any) => any>(func: F, waitFor: number) => (...args: Parameters<F>) => ReturnType<F>;
|
|
19
|
+
export declare const Popover: (props: PopoverProps) => any;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Popover';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface RadioButtonProps {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
children: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
onChange: () => void;
|
|
8
|
+
id?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Radio: React.ComponentType<Partial<{
|
|
11
|
+
checked: boolean;
|
|
12
|
+
}> & Pick<RadioButtonProps & React.RefAttributes<HTMLInputElement>, "ref" | "children" | "name" | "value" | "onChange" | "id" | "key">>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Radio';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import FreemiumUIThemes from '../../theme';
|
|
3
|
+
declare type ColumnOptions = {
|
|
4
|
+
Header?: string;
|
|
5
|
+
accessor?: string;
|
|
6
|
+
disableSortBy?: boolean;
|
|
7
|
+
sortDescFirst?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare type TableInitialState = {
|
|
10
|
+
pageIndex?: number;
|
|
11
|
+
columnOrder?: Array<string>;
|
|
12
|
+
hiddenColumns?: Array<string>;
|
|
13
|
+
pageSize?: number;
|
|
14
|
+
selectedRowIds?: unknown;
|
|
15
|
+
sortBy?: Array<{
|
|
16
|
+
id?: string;
|
|
17
|
+
desc?: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
interface ColumnGroupOptions extends ColumnOptions {
|
|
21
|
+
columns?: Array<ColumnOptions>;
|
|
22
|
+
}
|
|
23
|
+
declare type RestTableProps = {
|
|
24
|
+
onRowSelect?: (row: unknown, index: number, checked: boolean) => void;
|
|
25
|
+
onRowClick?: (row: unknown, index: number, checked: boolean) => void;
|
|
26
|
+
onSelectAll?: (checked: boolean) => void;
|
|
27
|
+
columns?: Array<ColumnGroupOptions>;
|
|
28
|
+
data?: Array<unknown>;
|
|
29
|
+
sortable?: boolean;
|
|
30
|
+
stickyHeader?: boolean;
|
|
31
|
+
name?: string;
|
|
32
|
+
id: string;
|
|
33
|
+
paginationOptions?: Array<number>;
|
|
34
|
+
theme?: FreemiumUIThemes;
|
|
35
|
+
initialState?: TableInitialState;
|
|
36
|
+
};
|
|
37
|
+
export declare const RestTable: (props: RestTableProps) => JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RestTable';
|