@trackunit/react-components 0.0.36
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/README.md +36 -0
- package/common/CommonProps.d.ts +17 -0
- package/common/StorybookProps.d.ts +6 -0
- package/common/index.d.ts +3 -0
- package/common/useContainerProps.d.ts +8 -0
- package/components/NumberField/NumberField.d.ts +15 -0
- package/components/NumberInput/NumberInput.d.ts +12 -0
- package/components/TextInput/TextInput.d.ts +12 -0
- package/components/alert/Alert.d.ts +69 -0
- package/components/alert/index.d.ts +1 -0
- package/components/badge/Badge.d.ts +74 -0
- package/components/badge/index.d.ts +1 -0
- package/components/baseInput/BaseInput.d.ts +82 -0
- package/components/baseInput/index.d.ts +1 -0
- package/components/buttons/button/Button.d.ts +55 -0
- package/components/buttons/icon-button/IconButton.d.ts +33 -0
- package/components/buttons/index.d.ts +4 -0
- package/components/buttons/shared/ButtonProps.d.ts +61 -0
- package/components/buttons/shared/helpers.d.ts +9 -0
- package/components/buttons/star-button/StarButton.d.ts +7 -0
- package/components/card/Card.d.ts +33 -0
- package/components/card/CardBody.d.ts +21 -0
- package/components/card/CardFooter.d.ts +16 -0
- package/components/card/CardHeader.d.ts +39 -0
- package/components/card/DensityContainer.d.ts +36 -0
- package/components/card/index.d.ts +5 -0
- package/components/chart/Chart.d.ts +105 -0
- package/components/chart/index.d.ts +1 -0
- package/components/checkbox/CheckIcon.d.ts +4 -0
- package/components/checkbox/Checkbox.d.ts +53 -0
- package/components/checkbox/IndeterminateIcon.d.ts +4 -0
- package/components/checkbox/index.d.ts +1 -0
- package/components/collapse/Collapse.d.ts +33 -0
- package/components/collapse/index.d.ts +1 -0
- package/components/copyableText/CopyableText.d.ts +8 -0
- package/components/copyableText/index.d.ts +1 -0
- package/components/dateField/DateField.d.ts +46 -0
- package/components/dateField/index.d.ts +1 -0
- package/components/dayPicker/DayPicker.d.ts +9 -0
- package/components/dayPicker/DayPickerPopover.d.ts +16 -0
- package/components/dayPicker/DayRangePicker.d.ts +11 -0
- package/components/dayPicker/index.d.ts +21 -0
- package/components/dayPicker/useLocale.d.ts +2 -0
- package/components/drawer/Drawer.d.ts +32 -0
- package/components/drawer/index.d.ts +1 -0
- package/components/formGroup/FormGroup.d.ts +42 -0
- package/components/heading/Heading.d.ts +34 -0
- package/components/heading/index.d.ts +1 -0
- package/components/icon/Icon.d.ts +49 -0
- package/components/index.d.ts +37 -0
- package/components/indicator/Indicator.d.ts +34 -0
- package/components/indicator/index.d.ts +1 -0
- package/components/label/Label.d.ts +33 -0
- package/components/label/index.d.ts +1 -0
- package/components/legendItem/LegendItem.d.ts +11 -0
- package/components/legendItem/index.d.ts +1 -0
- package/components/menu/MenuButton.d.ts +7 -0
- package/components/menu/MenuItem.d.ts +9 -0
- package/components/menu/MenuList.d.ts +11 -0
- package/components/menu/index.d.ts +3 -0
- package/components/modal/Modal.d.ts +42 -0
- package/components/modal/ModalBackdrop.d.ts +7 -0
- package/components/modal/index.d.ts +3 -0
- package/components/modal/useModal.d.ts +15 -0
- package/components/multiRowTableCell/MultiRowTableCell.d.ts +30 -0
- package/components/multiRowTableCell/index.d.ts +1 -0
- package/components/pageHeading/PageHeading.d.ts +9 -0
- package/components/pageHeading/index.d.ts +1 -0
- package/components/popover/AnimatedPopover.d.ts +15 -0
- package/components/popover/PopoverList.d.ts +6 -0
- package/components/popover/PopoverListItem.d.ts +16 -0
- package/components/popover/PopoverTitle.d.ts +8 -0
- package/components/popover/index.d.ts +5 -0
- package/components/popover/usePopover.d.ts +24 -0
- package/components/prompt/Prompt.d.ts +10 -0
- package/components/prompt/index.d.ts +1 -0
- package/components/radioGroup/RadioGroup.d.ts +14 -0
- package/components/radioGroup/RadioGroupContext.d.ts +10 -0
- package/components/radioGroup/RadioItem.d.ts +8 -0
- package/components/radioGroup/index.d.ts +2 -0
- package/components/select/CreatableSelect.d.ts +4 -0
- package/components/select/FieldContainer.d.ts +14 -0
- package/components/select/Select.d.ts +4 -0
- package/components/select/index.d.ts +3 -0
- package/components/select/shared.d.ts +83 -0
- package/components/skeletonLines/SkeletonLines.d.ts +41 -0
- package/components/skeletonLines/index.d.ts +1 -0
- package/components/spacer/Spacer.d.ts +21 -0
- package/components/spacer/index.d.ts +1 -0
- package/components/spinner/Spinner.d.ts +24 -0
- package/components/spinner/index.d.ts +1 -0
- package/components/text/Text.d.ts +79 -0
- package/components/text/index.d.ts +1 -0
- package/components/textArea/TextArea.d.ts +25 -0
- package/components/textArea/index.d.ts +1 -0
- package/components/textField/TextField.d.ts +23 -0
- package/components/textField/TextLenghtIndicator.d.ts +6 -0
- package/components/textField/index.d.ts +1 -0
- package/components/theme/DefaultTheme.d.ts +2 -0
- package/components/theme/index.d.ts +1 -0
- package/components/tip/Tip.d.ts +13 -0
- package/components/tip/index.d.ts +1 -0
- package/components/toggle/Toggle.d.ts +15 -0
- package/components/toggle/index.d.ts +1 -0
- package/components/tooltip/Tooltip.d.ts +69 -0
- package/components/tooltip/index.d.ts +1 -0
- package/constants/colors.d.ts +65 -0
- package/constants/index.d.ts +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/useDebounce.d.ts +1 -0
- package/hooks/useLocalStorage.d.ts +2 -0
- package/hooks/useTimeout.d.ts +9 -0
- package/index.d.ts +5 -0
- package/index.js +3829 -0
- package/layout/helper/MinTopFullContentLayout.d.ts +12 -0
- package/layout/index.d.ts +7 -0
- package/layout/responsive/FilterListMapLayout.d.ts +19 -0
- package/layout/responsive/FullWidthRepeatingLayout.d.ts +16 -0
- package/layout/responsive/GridArea.d.ts +12 -0
- package/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +26 -0
- package/layout/responsive/TitleNavContentLayout.d.ts +6 -0
- package/layout/responsive/TwoColumnLayout.d.ts +6 -0
- package/package.json +32 -0
- package/test-config/jest.setup.d.ts +1 -0
- package/test-utils/hooks.d.ts +4 -0
- package/test-utils/test-utils.d.ts +5 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ILegendItem {
|
|
3
|
+
label: string;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
color: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
dataTestId?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const LegendItem: ({ className, label, disabled, selected, onClick, color, dataTestId }: ILegendItem) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LegendItem";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IMenuItemProps {
|
|
3
|
+
icon?: JSX.Element;
|
|
4
|
+
label?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
dataTestId?: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const MenuItem: ({ className, dataTestId, label, icon, onClick }: IMenuItemProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IMenuItemProps } from "./MenuItem";
|
|
3
|
+
export interface IMenuListItemProps extends IMenuItemProps {
|
|
4
|
+
showDivider?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface IMenuListProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
dataTestId?: string;
|
|
9
|
+
menuItems: IMenuListItemProps[];
|
|
10
|
+
}
|
|
11
|
+
export declare const MenuList: ({ dataTestId, className, menuItems }: IMenuListProps) => JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
declare type ModalWidth = "slim" | "narrow" | "normal" | "wide" | "full";
|
|
4
|
+
export interface ModalProps extends CommonProps {
|
|
5
|
+
/**
|
|
6
|
+
* Whether modal is open or not.
|
|
7
|
+
*
|
|
8
|
+
* @type {boolean}
|
|
9
|
+
* @memberof ModalProps
|
|
10
|
+
*/
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether modal should be closed when clicked outside of it.
|
|
14
|
+
*
|
|
15
|
+
* @memberof ModalProps
|
|
16
|
+
*/
|
|
17
|
+
onDismissClick?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Child elements to be rendered inside the modal.
|
|
20
|
+
*
|
|
21
|
+
* @type React.ReactNode
|
|
22
|
+
* @memberof ModalProps
|
|
23
|
+
*/
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Test id to be applied to the modal.
|
|
27
|
+
*
|
|
28
|
+
* @type string
|
|
29
|
+
* @memberof ModalProps
|
|
30
|
+
*/
|
|
31
|
+
dataTestId?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Maximum width of the modal.
|
|
34
|
+
*
|
|
35
|
+
* @type {ModalWidth}
|
|
36
|
+
* @memberof ModalProps
|
|
37
|
+
*/
|
|
38
|
+
maxWidth?: ModalWidth;
|
|
39
|
+
}
|
|
40
|
+
/** Preferred usage is with useModal(), so the modal is placed at highest level. */
|
|
41
|
+
export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ModalProps } from "./Modal";
|
|
3
|
+
export interface UseModalProps {
|
|
4
|
+
closeOnOutsideClick?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const useModal: ({ closeOnOutsideClick }?: UseModalProps) => {
|
|
7
|
+
Modal: {
|
|
8
|
+
(props: ModalProps): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
toggleModal: any;
|
|
12
|
+
openModal: any;
|
|
13
|
+
closeModal: any;
|
|
14
|
+
isOpen: any;
|
|
15
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
interface IMultiRowTableCellProps extends CommonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Main header.
|
|
6
|
+
*
|
|
7
|
+
* @type string
|
|
8
|
+
* @memberof IMultiRowTableCellProps
|
|
9
|
+
*/
|
|
10
|
+
main: string;
|
|
11
|
+
/**
|
|
12
|
+
* Secondary string.
|
|
13
|
+
*
|
|
14
|
+
* @type string
|
|
15
|
+
* @memberof IMultiRowTableCellProps
|
|
16
|
+
*/
|
|
17
|
+
secondary?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Grid area.
|
|
20
|
+
*
|
|
21
|
+
* @type string
|
|
22
|
+
* @memberof IMultiRowTableCellProps
|
|
23
|
+
*/
|
|
24
|
+
area?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Extending Table Cell component formats your content supporting 2 rows.
|
|
28
|
+
*/
|
|
29
|
+
export declare const MultiRowTableCell: ({ main, secondary, area, dataTestId }: IMultiRowTableCellProps) => JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MultiRowTableCell";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface PageHeadingProps {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
dataTestId?: string;
|
|
6
|
+
badge?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const PageHeading: ({ title, subtitle, dataTestId, badge }: PageHeadingProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./PageHeading";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
import { PopoverLifecycle } from "./usePopover";
|
|
4
|
+
export interface AnimatedPopoverProps extends CommonProps {
|
|
5
|
+
lifecycle: PopoverLifecycle;
|
|
6
|
+
onRequestClose: () => void;
|
|
7
|
+
onClosed: () => void;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
enterDelay?: number;
|
|
10
|
+
exitDelay?: number;
|
|
11
|
+
/** An element to use as the portal root for the popover component */
|
|
12
|
+
bindTo?: HTMLElement;
|
|
13
|
+
enableBackdrop?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const AnimatedPopover: React.ForwardRefExoticComponent<AnimatedPopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export interface PopoverListProps extends CommonProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const PopoverList: ({ className, children, dataTestId, }: PopoverListProps) => JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export interface PopoverListItemProps extends CommonProps {
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
/** Optional event handler for logging etc. Important: Please use the Url prop for navigation. */
|
|
8
|
+
onClick?: (event: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
|
|
9
|
+
/** Navigation Url for this item */
|
|
10
|
+
url?: string;
|
|
11
|
+
prefix?: React.ReactNode;
|
|
12
|
+
suffix?: React.ReactNode;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
renderAs?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
15
|
+
}
|
|
16
|
+
export declare const PopoverListItem: ({ selected, children, disabled, ariaLabel, url, onClick, prefix, suffix, renderAs, dataTestId, }: PopoverListItemProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export interface PopoverTitleProps extends CommonProps {
|
|
4
|
+
action?: React.ReactNode;
|
|
5
|
+
divider?: boolean;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const PopoverTitle: ({ children, action, divider, className, dataTestId }: PopoverTitleProps) => JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Placement } from "@popperjs/core";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare type PopoverPlacement = Placement;
|
|
4
|
+
export interface UsePopoverProps<T, Y> {
|
|
5
|
+
targetRef: React.RefObject<T>;
|
|
6
|
+
popoverRef: React.RefObject<Y>;
|
|
7
|
+
placement?: PopoverPlacement;
|
|
8
|
+
offset?: [number, number];
|
|
9
|
+
}
|
|
10
|
+
export declare enum PopoverLifecycle {
|
|
11
|
+
closed = "closed",
|
|
12
|
+
open = "open",
|
|
13
|
+
closing = "closing"
|
|
14
|
+
}
|
|
15
|
+
export declare const usePopover: <T extends HTMLElement, Y extends HTMLElement>({ targetRef, popoverRef, placement, offset, }: UsePopoverProps<T, Y>) => {
|
|
16
|
+
targetRef: React.RefObject<T>;
|
|
17
|
+
popoverRef: React.RefObject<Y>;
|
|
18
|
+
onShow: () => void;
|
|
19
|
+
onHide: () => void;
|
|
20
|
+
popoverProps: {
|
|
21
|
+
lifecycle: PopoverLifecycle;
|
|
22
|
+
onClosed: () => void;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Blocker } from "history";
|
|
2
|
+
interface IPromptProps {
|
|
3
|
+
when: boolean;
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function useInRouterContext(): boolean;
|
|
7
|
+
export declare function useBlocker(blocker: Blocker, when?: boolean): void;
|
|
8
|
+
export declare function usePrompt(message: string, when?: boolean): void;
|
|
9
|
+
export declare const Prompt: ({ when, message }: IPromptProps) => null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Prompt";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
interface RadioGroupProps extends CommonProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
id: string;
|
|
6
|
+
onChange: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
7
|
+
value: string | number;
|
|
8
|
+
name?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
inline?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const RadioGroup: ({ children, id, name, value, disabled, onChange, label, inline, className, dataTestId, }: RadioGroupProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface RadioGroupContextProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onChange: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const RadioGroupContext: React.Context<RadioGroupContextProps | null>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
interface RadioItemProps extends CommonProps {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
value: string | number;
|
|
6
|
+
}
|
|
7
|
+
export declare const RadioItem: ({ label, value, dataTestId, className }: RadioItemProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GroupBase } from "react-select";
|
|
3
|
+
import { SelectProps } from "./shared";
|
|
4
|
+
export declare const CreatableSelect: <Option, IsAsync extends boolean = false, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ dataTestId, size, id, label, hideLabel, description, error, info, isInvalid, maxMenuHeight, styles, components, ...props }: SelectProps<Option, IsAsync, IsMulti, Group>) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface SelectContainerProps {
|
|
3
|
+
children: React.ReactElement;
|
|
4
|
+
label?: string;
|
|
5
|
+
hideLabel?: boolean;
|
|
6
|
+
hasError?: boolean;
|
|
7
|
+
id?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
error?: React.ReactNode;
|
|
10
|
+
info?: React.ReactNode;
|
|
11
|
+
dataTestId?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const SelectContainer: ({ children, label, hideLabel, id, hasError, error, description, info, dataTestId, }: SelectContainerProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GroupBase } from "react-select";
|
|
3
|
+
import { SelectProps } from "./shared";
|
|
4
|
+
export declare const Select: <Option, IsAsync extends boolean = false, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ dataTestId, size, id, label, hideLabel, description, error, info, isInvalid, maxMenuHeight, styles, components, ...props }: SelectProps<Option, IsAsync, IsMulti, Group>) => JSX.Element;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GroupBase, Props, StylesConfig } from "react-select";
|
|
3
|
+
import { AsyncProps } from "react-select/async";
|
|
4
|
+
import { SelectComponents } from "react-select/dist/declarations/src/components";
|
|
5
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
6
|
+
export interface SelectOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
options?: SelectOption[];
|
|
10
|
+
}
|
|
11
|
+
export declare type SelectSize = "small" | "default";
|
|
12
|
+
export interface ISelectProps<Option, IsAsync extends boolean, IsMulti extends boolean, GroupType extends GroupBase<Option>> extends CommonProps, Props<Option, IsMulti, GroupType> {
|
|
13
|
+
/**
|
|
14
|
+
* Label to be displayed.
|
|
15
|
+
*
|
|
16
|
+
* @type string
|
|
17
|
+
* @memberof ISelectProps
|
|
18
|
+
*/
|
|
19
|
+
label?: string;
|
|
20
|
+
/**
|
|
21
|
+
* To hide the label.
|
|
22
|
+
*
|
|
23
|
+
* @type {boolean}
|
|
24
|
+
* @memberof ISelectProps
|
|
25
|
+
*/
|
|
26
|
+
hideLabel?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Description for the select component.
|
|
29
|
+
*
|
|
30
|
+
* @type string
|
|
31
|
+
* @memberof ISelectProps
|
|
32
|
+
*/
|
|
33
|
+
description?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the component is invalid.
|
|
36
|
+
*
|
|
37
|
+
* @type {boolean}
|
|
38
|
+
* @memberof ISelectProps
|
|
39
|
+
*/
|
|
40
|
+
isInvalid?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the component is disabled.
|
|
43
|
+
*
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof ISelectProps
|
|
46
|
+
*/
|
|
47
|
+
isDisabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Info of the select component.
|
|
50
|
+
*
|
|
51
|
+
* @type ThemeReactNode
|
|
52
|
+
* @memberof ISelectProps
|
|
53
|
+
*/
|
|
54
|
+
info?: React.ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Error of the select component.
|
|
57
|
+
*
|
|
58
|
+
* @type React.ReactNode
|
|
59
|
+
* @memberof ISelectProps
|
|
60
|
+
*/
|
|
61
|
+
error?: React.ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* Size of the component.
|
|
64
|
+
*
|
|
65
|
+
* @type {SelectSize}
|
|
66
|
+
* @memberof ISelectProps
|
|
67
|
+
*/
|
|
68
|
+
size?: SelectSize;
|
|
69
|
+
/**
|
|
70
|
+
* Whether component is asynchronous or not.
|
|
71
|
+
*
|
|
72
|
+
* @type {IsAsync}
|
|
73
|
+
* @memberof ISelectProps
|
|
74
|
+
*/
|
|
75
|
+
isAsync?: IsAsync;
|
|
76
|
+
}
|
|
77
|
+
export declare type SelectProps<Option, IsAsync extends boolean, IsMulti extends boolean, GroupType extends GroupBase<Option>> = IsAsync extends true ? AsyncProps<Option, IsMulti, GroupType> & ISelectProps<Option, IsAsync, IsMulti, GroupType> : ISelectProps<Option, IsAsync, IsMulti, GroupType>;
|
|
78
|
+
export declare const useCustomStyles: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(styles: StylesConfig<Option, IsMulti, Group> | undefined, hasError: boolean, isInvalid: boolean | undefined, size: SelectSize) => {
|
|
79
|
+
customStyles: StylesConfig<Option, IsMulti, Group>;
|
|
80
|
+
};
|
|
81
|
+
export declare const useCustomComponents: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(components: Partial<SelectComponents<Option, IsMulti, Group>> | undefined) => {
|
|
82
|
+
customComponents: Partial<SelectComponents<Option, IsMulti, Group>>;
|
|
83
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export interface ISkeletonLinesProps extends CommonProps {
|
|
4
|
+
/**
|
|
5
|
+
* The number of lines to display.
|
|
6
|
+
*
|
|
7
|
+
* @type {number}
|
|
8
|
+
* @memberof ISkeletonLinesProps
|
|
9
|
+
*/
|
|
10
|
+
lines?: number;
|
|
11
|
+
/**
|
|
12
|
+
* The height of lines. Can be a number or an array of numbers or string.
|
|
13
|
+
*
|
|
14
|
+
* @type {(number | number[] | string)}
|
|
15
|
+
* @memberof ISkeletonLinesProps
|
|
16
|
+
*/
|
|
17
|
+
height?: number | number[] | string;
|
|
18
|
+
/**
|
|
19
|
+
* The width of each lines. Can be a number or an array of numbers or string.
|
|
20
|
+
*
|
|
21
|
+
* @type {(number | number[] | string)}
|
|
22
|
+
* @memberof ISkeletonLinesProps
|
|
23
|
+
*/
|
|
24
|
+
width?: number | number[] | string;
|
|
25
|
+
/**
|
|
26
|
+
* Margin of lines.
|
|
27
|
+
*
|
|
28
|
+
* @type string
|
|
29
|
+
* @memberof ISkeletonLinesProps
|
|
30
|
+
*/
|
|
31
|
+
margin?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Additional CSS classes.
|
|
34
|
+
*
|
|
35
|
+
* @type string
|
|
36
|
+
* @memberof ISkeletonLinesProps
|
|
37
|
+
*/
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const SkeletonLines: import("react").MemoExoticComponent<({ margin, lines, height, width, className, dataTestId }: ISkeletonLinesProps) => JSX.Element>;
|
|
41
|
+
export default SkeletonLines;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SkeletonLines";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from "../../common";
|
|
3
|
+
interface SpacerProps extends CommonProps {
|
|
4
|
+
/**
|
|
5
|
+
* The minimum height of the spacer. Defaults to 1px.
|
|
6
|
+
* Possible values are "normal"(8px), and "large" (32px). Use className prop to use custom min-height values, example: min-h-[100px].
|
|
7
|
+
*
|
|
8
|
+
* @type {(number | string)}
|
|
9
|
+
* @memberof SpacerProps
|
|
10
|
+
*/
|
|
11
|
+
minHeight?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The border of the spacer.
|
|
14
|
+
*
|
|
15
|
+
* @type {boolean}
|
|
16
|
+
* @memberof SpacerProps
|
|
17
|
+
*/
|
|
18
|
+
border?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const Spacer: ({ minHeight, border, dataTestId }: SpacerProps) => JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Spacer";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export declare type SpinnerSize = "small" | "regular" | "large";
|
|
4
|
+
export interface SpinnerProps extends CommonProps {
|
|
5
|
+
/**
|
|
6
|
+
* Defines the size of the spinner.
|
|
7
|
+
*/
|
|
8
|
+
size?: SpinnerSize;
|
|
9
|
+
/**
|
|
10
|
+
* When true, the spinner will be centered in the parent element using css grid.
|
|
11
|
+
*/
|
|
12
|
+
centered?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Select either "light" or "dark" mode.
|
|
15
|
+
* Use "dark" when the spinner is used on a dark background.
|
|
16
|
+
*/
|
|
17
|
+
mode?: "light" | "dark";
|
|
18
|
+
/**
|
|
19
|
+
* Add custom className to the spinners container element.
|
|
20
|
+
* Useful for sizing to minimize jumping on load.
|
|
21
|
+
*/
|
|
22
|
+
containerClassName?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const Spinner: ({ mode, size, centered, className, containerClassName, dataTestId, }: SpinnerProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Spinner";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export declare type TextType = "p" | "span" | "div";
|
|
4
|
+
export declare type TextSize = "small" | "default" | "large";
|
|
5
|
+
export declare type TextAlign = "left" | "center" | "right";
|
|
6
|
+
export declare type TextWeight = "default" | "thick" | "bold";
|
|
7
|
+
export interface TextProps extends CommonProps {
|
|
8
|
+
/**
|
|
9
|
+
* Child nodes.
|
|
10
|
+
*
|
|
11
|
+
* @type React.ReactNode
|
|
12
|
+
* @memberof TextProps
|
|
13
|
+
*/
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Type of element. Element can be of types "p", "span", or "div".
|
|
17
|
+
*
|
|
18
|
+
* @type {TextType}
|
|
19
|
+
* @memberof TextProps
|
|
20
|
+
*/
|
|
21
|
+
type?: TextType;
|
|
22
|
+
/**
|
|
23
|
+
* Size of element. Values can be "default", "small", or "large".
|
|
24
|
+
*
|
|
25
|
+
* @type {TextSize}
|
|
26
|
+
* @memberof TextProps
|
|
27
|
+
*/
|
|
28
|
+
size?: TextSize;
|
|
29
|
+
/**
|
|
30
|
+
* Alignment of the text. Values can be "left", "center", or "right".
|
|
31
|
+
*
|
|
32
|
+
* @type {TextAlign}
|
|
33
|
+
* @memberof TextProps
|
|
34
|
+
*/
|
|
35
|
+
align?: TextAlign;
|
|
36
|
+
/**
|
|
37
|
+
* Weight of the text. Values can be "default", "thick", or "bold".
|
|
38
|
+
*
|
|
39
|
+
* @type {TextWeight}
|
|
40
|
+
* @memberof TextProps
|
|
41
|
+
*/
|
|
42
|
+
weight?: TextWeight;
|
|
43
|
+
/**
|
|
44
|
+
* Whether font styles are inverted.
|
|
45
|
+
*
|
|
46
|
+
* @type {boolean}
|
|
47
|
+
* @memberof TextProps
|
|
48
|
+
*/
|
|
49
|
+
inverted?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether font styles are subtle or not.
|
|
52
|
+
*
|
|
53
|
+
* @type {boolean}
|
|
54
|
+
* @memberof TextProps
|
|
55
|
+
*/
|
|
56
|
+
subtle?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Whether text is italicized.
|
|
59
|
+
*
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof TextProps
|
|
62
|
+
*/
|
|
63
|
+
italicize?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether text is uppercase.
|
|
66
|
+
*
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
* @memberof TextProps
|
|
69
|
+
*/
|
|
70
|
+
uppercase?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Whether text is underlined or not.
|
|
73
|
+
*
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @memberof TextProps
|
|
76
|
+
*/
|
|
77
|
+
underline?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export declare const Text: ({ children, type, size, align, weight, underline, inverted, subtle, italicize, uppercase, className, dataTestId, }: TextProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Text";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export declare type TextAreaResize = "none" | "vertical" | "horizontal" | "both";
|
|
4
|
+
export interface TextAreaProps extends CommonProps {
|
|
5
|
+
id?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
info?: React.ReactNode;
|
|
10
|
+
error?: React.ReactNode;
|
|
11
|
+
value?: React.ReactText;
|
|
12
|
+
tabIndex?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
rows?: number;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
onChange?: (event: React.SyntheticEvent<HTMLTextAreaElement>) => void;
|
|
18
|
+
onFocus?: (event: React.SyntheticEvent<HTMLTextAreaElement>) => void;
|
|
19
|
+
onBlur?: (event: React.SyntheticEvent<HTMLTextAreaElement>) => void;
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
resize?: TextAreaResize;
|
|
22
|
+
defaultValue?: React.ReactText;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./TextArea";
|