@livechat/design-system-react-components 1.0.0-alpha.57 → 1.0.0-alpha.58
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/dist/{src/components → components}/Alert/Alert.d.ts +1 -1
- package/dist/{src/components → components}/Avatar/Avatar.d.ts +4 -4
- package/dist/{src/components → components}/Button/Button.d.ts +2 -2
- package/dist/{src/components → components}/Card/Card.d.ts +1 -1
- package/dist/{src/components → components}/DatePicker/helpers.d.ts +4 -4
- package/dist/{src/components → components}/DatePicker/types.d.ts +2 -2
- package/dist/{src/components → components}/FieldDescription/FieldDescription.d.ts +1 -1
- package/dist/{src/components → components}/FieldError/FieldError.d.ts +1 -1
- package/dist/components/FileUploadProgress/FileUploadProgress.d.ts +42 -0
- package/dist/components/FormField/FormField.d.ts +40 -0
- package/dist/components/Icon/Icon.d.ts +14 -0
- package/dist/{src/components → components}/Loader/Loader.d.ts +12 -2
- package/dist/{src/components → components}/NumericInput/NumericInput.d.ts +1 -1
- package/dist/{src/components → components}/Picker/Picker.d.ts +1 -1
- package/dist/{src/components → components}/Progress/ProgressBar.d.ts +12 -0
- package/dist/{src/components → components}/Progress/ProgressCircle.d.ts +12 -0
- package/dist/components/Progress/constants.d.ts +4 -0
- package/dist/{src/components → components}/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/dist/{src/components → components}/Switch/Switch.d.ts +2 -2
- package/dist/{src/components → components}/Tab/Tab.d.ts +2 -2
- package/dist/{src/components → components}/TagInput/EmailTagInput.d.ts +1 -1
- package/dist/{src/components → components}/Toast/Toast.d.ts +2 -2
- package/dist/{src/components → components}/Toast/ToastWrapper.d.ts +3 -3
- package/dist/{src/components → components}/Typography/Heading.d.ts +1 -1
- package/dist/{src/components → components}/Typography/Text.d.ts +1 -1
- package/dist/components/UploadBar/UploadBar.d.ts +49 -0
- package/dist/dsrc.cjs.js +8 -8
- package/dist/dsrc.es.js +3053 -3686
- package/dist/dsrc.umd.js +8 -8
- package/dist/preview-stats.json +2170 -0
- package/dist/style.css +1 -1
- package/dist/{src/themes → themes}/design-token.d.ts +2 -0
- package/dist/utils/constants.d.ts +1 -0
- package/package.json +20 -18
- package/dist/shadow/color-scheme.css +0 -14
- package/dist/shadow/color-scheme.css.map +0 -1
- package/dist/shadow/shadow.css +0 -39
- package/dist/shadow/shadow.css.map +0 -1
- package/dist/shadow/spacing.css +0 -19
- package/dist/shadow/spacing.css.map +0 -1
- package/dist/spacing/color-scheme.css +0 -14
- package/dist/spacing/color-scheme.css.map +0 -1
- package/dist/spacing/shadow.css +0 -39
- package/dist/spacing/shadow.css.map +0 -1
- package/dist/spacing/spacing.css +0 -19
- package/dist/spacing/spacing.css.map +0 -1
- package/dist/src/components/FileUploadProgress/FileUploadProgress.d.ts +0 -15
- package/dist/src/components/FormField/FormField.d.ts +0 -13
- package/dist/src/components/Icon/Icon.d.ts +0 -14
- package/dist/src/components/Progress/constants.d.ts +0 -4
- package/dist/src/components/UploadBar/UploadBar.d.ts +0 -16
- package/dist/src/global.d.ts +0 -4
- package/dist/src/utils/constants.d.ts +0 -1
- package/dist/src/vite-env.d.ts +0 -1
- package/dist/themes/dark.css +0 -253
- package/dist/themes/dark.css.map +0 -1
- package/dist/themes/legacy.css +0 -254
- package/dist/themes/legacy.css.map +0 -1
- package/dist/themes/light.css +0 -253
- package/dist/themes/light.css.map +0 -1
- /package/dist/{src/components → components}/ActionMenu/ActionMenu.d.ts +0 -0
- /package/dist/{src/components → components}/ActionMenu/index.d.ts +0 -0
- /package/dist/{src/components → components}/Alert/index.d.ts +0 -0
- /package/dist/{src/components → components}/Avatar/Avatar.helpers.d.ts +0 -0
- /package/dist/{src/components → components}/Avatar/index.d.ts +0 -0
- /package/dist/{src/components → components}/Badge/Badge.d.ts +0 -0
- /package/dist/{src/components → components}/Badge/Badge.helpers.d.ts +0 -0
- /package/dist/{src/components → components}/Badge/index.d.ts +0 -0
- /package/dist/{src/components → components}/Button/index.d.ts +0 -0
- /package/dist/{src/components → components}/Card/index.d.ts +0 -0
- /package/dist/{src/components → components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{src/components → components}/Checkbox/index.d.ts +0 -0
- /package/dist/{src/components → components}/DatePicker/DatePicker.d.ts +0 -0
- /package/dist/{src/components → components}/DatePicker/DatePickerNavbar.d.ts +0 -0
- /package/dist/{src/components → components}/DatePicker/RangeDatePicker.d.ts +0 -0
- /package/dist/{src/components → components}/DatePicker/hooks.d.ts +0 -0
- /package/dist/{src/components → components}/DatePicker/index.d.ts +0 -0
- /package/dist/{src/components → components}/FieldDescription/index.d.ts +0 -0
- /package/dist/{src/components → components}/FieldError/index.d.ts +0 -0
- /package/dist/{src/components → components}/FieldGroup/FieldGroup.d.ts +0 -0
- /package/dist/{src/components → components}/FieldGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/FileUploadProgress/FileUploadProgressActions.d.ts +0 -0
- /package/dist/{src/components → components}/FileUploadProgress/index.d.ts +0 -0
- /package/dist/{src/components → components}/Form/Form.d.ts +0 -0
- /package/dist/{src/components → components}/Form/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormField/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormGroup/FormGroup.d.ts +0 -0
- /package/dist/{src/components → components}/FormGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/Icon/index.d.ts +0 -0
- /package/dist/{src/components → components}/Input/Input.d.ts +0 -0
- /package/dist/{src/components → components}/Input/index.d.ts +0 -0
- /package/dist/{src/components → components}/Link/Link.d.ts +0 -0
- /package/dist/{src/components → components}/Link/index.d.ts +0 -0
- /package/dist/{src/components → components}/Loader/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Modal.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/ModalBase.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/ModalCloseButton.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/ModalPortal.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/index.d.ts +0 -0
- /package/dist/{src/components → components}/NumericInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/Picker/PickerList.d.ts +0 -0
- /package/dist/{src/components → components}/Picker/Trigger.d.ts +0 -0
- /package/dist/{src/components → components}/Picker/TriggerBody.d.ts +0 -0
- /package/dist/{src/components → components}/Picker/constants.d.ts +0 -0
- /package/dist/{src/components → components}/Picker/index.d.ts +0 -0
- /package/dist/{src/components → components}/Popover/Popover.d.ts +0 -0
- /package/dist/{src/components → components}/Popover/index.d.ts +0 -0
- /package/dist/{src/components → components}/Progress/helpers.d.ts +0 -0
- /package/dist/{src/components → components}/Progress/index.d.ts +0 -0
- /package/dist/{src/components → components}/PromoBanner/PromoBanner.d.ts +0 -0
- /package/dist/{src/components → components}/PromoBanner/index.d.ts +0 -0
- /package/dist/{src/components → components}/RadioButton/RadioButton.d.ts +0 -0
- /package/dist/{src/components → components}/RadioButton/index.d.ts +0 -0
- /package/dist/{src/components → components}/Search/Search.d.ts +0 -0
- /package/dist/{src/components → components}/Search/index.d.ts +0 -0
- /package/dist/{src/components → components}/SegmentedControl/index.d.ts +0 -0
- /package/dist/{src/components → components}/Switch/index.d.ts +0 -0
- /package/dist/{src/components → components}/Tab/TabsWrapper.d.ts +0 -0
- /package/dist/{src/components → components}/Tab/index.d.ts +0 -0
- /package/dist/{src/components → components}/Tag/Tag.d.ts +0 -0
- /package/dist/{src/components → components}/Tag/index.d.ts +0 -0
- /package/dist/{src/components → components}/TagInput/EditableTag.d.ts +0 -0
- /package/dist/{src/components → components}/TagInput/EditableTagContent.d.ts +0 -0
- /package/dist/{src/components → components}/TagInput/TagInput.d.ts +0 -0
- /package/dist/{src/components → components}/TagInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/Textarea.d.ts +0 -0
- /package/dist/{src/components → components}/Textarea/index.d.ts +0 -0
- /package/dist/{src/components → components}/Toast/index.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/Info.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/Interactive.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/Simple.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/SpotlightOverlay.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/Tooltip.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/UserGuide.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/helpers.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/index.d.ts +0 -0
- /package/dist/{src/components → components}/Tooltip/virtualElementReference.d.ts +0 -0
- /package/dist/{src/components → components}/Typography/index.d.ts +0 -0
- /package/dist/{src/components → components}/UploadBar/index.d.ts +0 -0
- /package/dist/{src/foundations → foundations}/shadow-token.d.ts +0 -0
- /package/dist/{src/foundations → foundations}/spacing-token.d.ts +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/utils → utils}/index.d.ts +0 -0
- /package/dist/{src/utils → utils}/keyCodes.d.ts +0 -0
- /package/dist/{src/utils → utils}/noop.d.ts +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type AvatarShape = 'circle' | 'rounded-square';
|
|
3
|
+
type AvatarSize = 'xxxsmall' | 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
|
|
4
|
+
type AvatarStatus = 'available' | 'unavailable' | 'unknown';
|
|
5
|
+
type AvatarType = 'image' | 'text';
|
|
6
6
|
export interface AvatarProps {
|
|
7
7
|
/**
|
|
8
8
|
* Alternate text for an image avatar
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Size } from 'utils';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ButtonKind = 'basic' | 'primary' | 'secondary' | 'destructive' | 'text' | 'plain' | 'plain-light' | 'subtle' | 'float' | 'dotted';
|
|
4
|
+
export type ButtonProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Specify the button kind
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button';
|
|
3
|
-
export
|
|
3
|
+
export type CardButtonOptions = Pick<ButtonProps, 'children' | 'kind' | 'onClick'>;
|
|
4
4
|
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Alternate text for an image card
|
|
@@ -5,12 +5,12 @@ export declare const isDateWithinRange: (date: Date, range: {
|
|
|
5
5
|
from?: Date;
|
|
6
6
|
to?: Date;
|
|
7
7
|
}) => boolean;
|
|
8
|
-
export declare const calculateDatePickerMonth: (initialFromDate?: Date
|
|
9
|
-
export declare const getRangeDatePickerModifiers: (from?: Date
|
|
8
|
+
export declare const calculateDatePickerMonth: (initialFromDate?: Date, initialToDate?: Date, toMonth?: Date) => Date;
|
|
9
|
+
export declare const getRangeDatePickerModifiers: (from?: Date, to?: Date) => Partial<Modifiers>;
|
|
10
10
|
export declare const getSelectedOption: (itemId: string | null, options: IRangeDatePickerOption[]) => IRangeDatePickerOption | undefined;
|
|
11
|
-
export declare const isSelectingFirstDay: (from?: Date
|
|
11
|
+
export declare const isSelectingFirstDay: (from?: Date, to?: Date) => boolean;
|
|
12
12
|
export declare const getInitialStateFromProps: (props: IRangeDatePickerProps) => Partial<IRangeDatePickerState>;
|
|
13
|
-
export declare const getDatePickerClassNames: (range?: boolean
|
|
13
|
+
export declare const getDatePickerClassNames: (range?: boolean, classNames?: ClassNames) => {
|
|
14
14
|
container: string;
|
|
15
15
|
wrapper: string;
|
|
16
16
|
interactionDisabled: string;
|
|
@@ -29,7 +29,7 @@ export declare enum RangeDatePickerAction {
|
|
|
29
29
|
SELECT_SECOND_DAY_AS_TO = "SELECT_SECOND_DAY_AS_TO",
|
|
30
30
|
CURRENT_MONTH_CHANGE = "CURRENT_MONTH_CHANGE"
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type IRangeDatePickerReducerAction = {
|
|
33
33
|
type: RangeDatePickerAction.NEW_SELECTED_ITEM;
|
|
34
34
|
payload: {
|
|
35
35
|
selectedItem: string | null;
|
|
@@ -52,7 +52,7 @@ export interface IRangeDatePickerState {
|
|
|
52
52
|
temporaryTo?: Date;
|
|
53
53
|
currentMonth: Date;
|
|
54
54
|
}
|
|
55
|
-
export
|
|
55
|
+
export type RangeDatePickerReducer = Reducer<IRangeDatePickerState, IRangeDatePickerReducerAction>;
|
|
56
56
|
export interface IRangeDatePickerOption {
|
|
57
57
|
id: string;
|
|
58
58
|
label: string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ProgressSize, ProgressStatus } from '../Progress/constants';
|
|
3
|
+
export type UploadProgressActionState = 'visible' | 'hover' | 'hidden';
|
|
4
|
+
export interface FileUploadProgressProps {
|
|
5
|
+
/**
|
|
6
|
+
* Define if action buttons should be visible, visible on hover, or hidden
|
|
7
|
+
*/
|
|
8
|
+
actionsVisibility?: UploadProgressActionState;
|
|
9
|
+
/**
|
|
10
|
+
* The CSS class for progress bar
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Renders given element
|
|
15
|
+
*/
|
|
16
|
+
icon?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Specify the uploading file name
|
|
19
|
+
*/
|
|
20
|
+
title: string;
|
|
21
|
+
/**
|
|
22
|
+
* Specify the value of current file upload progress (0-100)
|
|
23
|
+
*/
|
|
24
|
+
progressValue: number;
|
|
25
|
+
/**
|
|
26
|
+
* Specify the progress bar size
|
|
27
|
+
*/
|
|
28
|
+
size?: ProgressSize;
|
|
29
|
+
/**
|
|
30
|
+
* Specify the uploading file status
|
|
31
|
+
*/
|
|
32
|
+
status?: ProgressStatus;
|
|
33
|
+
/**
|
|
34
|
+
* The event handler for close icon click
|
|
35
|
+
*/
|
|
36
|
+
onCloseButtonClick?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* The event handler for retry icon click
|
|
39
|
+
*/
|
|
40
|
+
onRetryButtonClick?: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare const FileUploadProgress: React.ExoticComponent<FileUploadProgressProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface FormFieldProps {
|
|
3
|
+
/**
|
|
4
|
+
* Define label text
|
|
5
|
+
*/
|
|
6
|
+
labelText?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Renders given element aligned to label, `inline` will affect
|
|
9
|
+
*/
|
|
10
|
+
labelAdornment?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Define to associate the label with the field
|
|
13
|
+
*/
|
|
14
|
+
labelFor?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The CSS class for field container
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Set the label to inline version
|
|
21
|
+
*/
|
|
22
|
+
inline?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Define error text
|
|
25
|
+
*/
|
|
26
|
+
error?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Define the description text
|
|
29
|
+
*/
|
|
30
|
+
description?: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Wrapped element
|
|
33
|
+
*/
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Renders given element above the filed
|
|
37
|
+
*/
|
|
38
|
+
labelRightNode?: React.ReactNode;
|
|
39
|
+
}
|
|
40
|
+
export declare const FormField: React.FC<FormFieldProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type IconSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
3
|
+
export type IconKind = 'primary' | 'subtle' | 'inverted' | 'inverted-subtle' | 'link' | 'success' | 'warning' | 'error';
|
|
4
|
+
export type IconSource = React.FC<React.SVGProps<SVGSVGElement>> & React.ReactElement;
|
|
5
|
+
export interface IconProps {
|
|
6
|
+
source: IconSource;
|
|
7
|
+
size?: IconSize;
|
|
8
|
+
kind?: IconKind;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
customColor?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Icon: React.FC<IconProps>;
|
|
14
|
+
export default Icon;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface LoaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the loader size
|
|
5
|
+
*/
|
|
3
6
|
size?: 'small' | 'medium' | 'large';
|
|
7
|
+
/**
|
|
8
|
+
* Specify the loader label
|
|
9
|
+
*/
|
|
4
10
|
label?: string;
|
|
5
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Set the loader highlight color
|
|
13
|
+
*/
|
|
6
14
|
primaryColor?: string;
|
|
7
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Set the loader color
|
|
17
|
+
*/
|
|
8
18
|
secondaryColor?: string;
|
|
9
19
|
}
|
|
10
20
|
export declare const Loader: React.FC<LoaderProps>;
|
|
@@ -9,6 +9,6 @@ interface Props {
|
|
|
9
9
|
noControls?: boolean;
|
|
10
10
|
onChange: (value: string) => void;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type NumericInputProps = React.InputHTMLAttributes<HTMLInputElement> & Props;
|
|
13
13
|
export declare const NumericInput: React.FC<NumericInputProps>;
|
|
14
14
|
export {};
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { IPickerListItem } from './PickerList';
|
|
3
3
|
import { IconSize } from '../Icon';
|
|
4
4
|
import { Size } from 'utils';
|
|
5
|
-
export
|
|
5
|
+
export type PickerType = 'single' | 'multi';
|
|
6
6
|
export interface IPickerProps {
|
|
7
7
|
/**
|
|
8
8
|
* Specify the custom id
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ProgressSize, ProgressStatus } from './constants';
|
|
3
3
|
export interface ProgressBarProps {
|
|
4
|
+
/**
|
|
5
|
+
* The CSS class for container
|
|
6
|
+
*/
|
|
4
7
|
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Specify the value of current progress bar (0-100)
|
|
10
|
+
*/
|
|
5
11
|
percent: number;
|
|
12
|
+
/**
|
|
13
|
+
* Specify the progress bar status
|
|
14
|
+
*/
|
|
6
15
|
status?: ProgressStatus;
|
|
16
|
+
/**
|
|
17
|
+
* Specify the progress bar size
|
|
18
|
+
*/
|
|
7
19
|
size?: ProgressSize;
|
|
8
20
|
}
|
|
9
21
|
export declare const ProgressBar: React.ExoticComponent<ProgressBarProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ProgressSize, ProgressStatus } from './constants';
|
|
3
3
|
export interface ProgressCircleProps {
|
|
4
|
+
/**
|
|
5
|
+
* The CSS class for container
|
|
6
|
+
*/
|
|
4
7
|
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Specify the value of current progress circle (0-100)
|
|
10
|
+
*/
|
|
5
11
|
progressValue: number;
|
|
12
|
+
/**
|
|
13
|
+
* Specify the progress circle status
|
|
14
|
+
*/
|
|
6
15
|
status?: ProgressStatus;
|
|
16
|
+
/**
|
|
17
|
+
* Specify the progress circle size
|
|
18
|
+
*/
|
|
7
19
|
size?: ProgressSize;
|
|
8
20
|
}
|
|
9
21
|
export declare const ProgressCircle: React.ExoticComponent<ProgressCircleProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button';
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type ButtonSize = 'compact' | 'medium' | 'large';
|
|
4
|
+
type ButtonElement = {
|
|
5
5
|
id: string;
|
|
6
6
|
label: string;
|
|
7
7
|
} & Pick<ButtonProps, 'disabled' | 'loading' | 'icon'>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export declare const baseClass = "switch";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type SwitchSize = 'compact' | 'medium' | 'large';
|
|
4
|
+
export type SwitchState = 'regular' | 'loading' | 'locked';
|
|
5
5
|
export interface SwitchProps {
|
|
6
6
|
ariaLabel?: string;
|
|
7
7
|
className?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Size } from 'utils';
|
|
3
|
-
|
|
3
|
+
type HTMLProps = (React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
4
4
|
href: string;
|
|
5
5
|
}) | (React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
6
6
|
href?: never;
|
|
7
7
|
});
|
|
8
|
-
export
|
|
8
|
+
export type TabProps = HTMLProps & {
|
|
9
9
|
count?: number;
|
|
10
10
|
isSelected?: boolean;
|
|
11
11
|
asBadge?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TagInputProps } from './TagInput';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export
|
|
3
|
+
export type EmailTagInputProps = Omit<TagInputProps, 'validator'>;
|
|
4
4
|
export declare const emailRegex: RegExp;
|
|
5
5
|
export declare const EmailTagInput: React.FC<EmailTagInputProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type ToastKind = 'success' | 'warning' | 'error' | 'info';
|
|
3
|
+
type ToastAction = {
|
|
4
4
|
onClick: () => void;
|
|
5
5
|
label: string;
|
|
6
6
|
closesOnClick?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ToastProps, Toast } from './Toast';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type HorizontalPosition = 'left' | 'center' | 'right';
|
|
4
|
+
type VerticalPosition = 'top' | 'bottom';
|
|
5
5
|
export declare const ANIMATION_TIME = 200;
|
|
6
|
-
interface Toast extends ToastProps {
|
|
6
|
+
interface Toast extends Omit<ToastProps, 'content'> {
|
|
7
7
|
id: string;
|
|
8
8
|
content: React.ReactElement | string;
|
|
9
9
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ProgressStatus, ProgressSize } from '../Progress/constants';
|
|
3
|
+
export interface UploadBarProps {
|
|
4
|
+
/**
|
|
5
|
+
* The CSS class for container
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Specify the value of current progress circle (0-100)
|
|
10
|
+
*/
|
|
11
|
+
progressValue: number;
|
|
12
|
+
/**
|
|
13
|
+
* Specify the upload bar title
|
|
14
|
+
*/
|
|
15
|
+
title: string;
|
|
16
|
+
/**
|
|
17
|
+
* Define if upload bar should be open
|
|
18
|
+
*/
|
|
19
|
+
isExpanded?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Specify the error message
|
|
22
|
+
*/
|
|
23
|
+
errorMessage?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Specify the upload bar status
|
|
26
|
+
*/
|
|
27
|
+
status?: ProgressStatus;
|
|
28
|
+
/**
|
|
29
|
+
* Renders given element
|
|
30
|
+
*/
|
|
31
|
+
icon?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Specify the upload bar size
|
|
34
|
+
*/
|
|
35
|
+
size?: ProgressSize;
|
|
36
|
+
/**
|
|
37
|
+
* Set the component's mode to `multiple` to specify whether the upload bar should display multiple elements
|
|
38
|
+
*/
|
|
39
|
+
mode?: 'single' | 'multiple';
|
|
40
|
+
/**
|
|
41
|
+
* The event handler for close icon click
|
|
42
|
+
*/
|
|
43
|
+
onCloseButtonClick?: () => void;
|
|
44
|
+
/**
|
|
45
|
+
* The event handler for retry icon click
|
|
46
|
+
*/
|
|
47
|
+
onRetryButtonClick?: () => void;
|
|
48
|
+
}
|
|
49
|
+
export declare const UploadBar: React.FC<React.PropsWithChildren<UploadBarProps>>;
|