@livechat/design-system-react-components 1.6.1 → 1.6.3
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/components/ActionBar/ActionBar.d.ts +3 -0
- package/dist/components/ActionBar/ActionBar.spec.d.ts +1 -0
- package/dist/components/ActionBar/ActionBar.stories.d.ts +10 -0
- package/dist/components/ActionBar/ActionBarItem.d.ts +3 -0
- package/dist/components/ActionBar/index.d.ts +2 -0
- package/dist/components/ActionBar/types.d.ts +40 -0
- package/dist/components/ActionMenu/ActionMenu.d.ts +50 -0
- package/dist/components/ActionMenu/ActionMenu.spec.d.ts +1 -0
- package/dist/components/ActionMenu/ActionMenu.stories.d.ts +11 -0
- package/dist/components/ActionMenu/ActionMenuItem.d.ts +16 -0
- package/dist/components/ActionMenu/constants.d.ts +15 -0
- package/dist/components/ActionMenu/index.d.ts +3 -0
- package/dist/components/ActionMenu/types.d.ts +9 -0
- package/dist/components/Alert/Alert.d.ts +32 -0
- package/dist/components/Alert/Alert.spec.d.ts +1 -0
- package/dist/components/Alert/Alert.stories.d.ts +9 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Avatar/Avatar.d.ts +49 -0
- package/dist/components/Avatar/Avatar.helpers.d.ts +3 -0
- package/dist/components/Avatar/Avatar.helpers.spec.d.ts +1 -0
- package/dist/components/Avatar/Avatar.spec.d.ts +1 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +22 -0
- package/dist/components/Avatar/index.d.ts +3 -0
- package/dist/components/Badge/Badge.d.ts +24 -0
- package/dist/components/Badge/Badge.helpers.d.ts +1 -0
- package/dist/components/Badge/Badge.spec.d.ts +1 -0
- package/dist/components/Badge/Badge.stories.d.ts +12 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +63 -0
- package/dist/components/Button/Button.spec.d.ts +1 -0
- package/dist/components/Button/Button.stories.d.ts +42 -0
- package/dist/components/Button/helpers.d.ts +2 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/types.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +30 -0
- package/dist/components/Card/Card.spec.d.ts +1 -0
- package/dist/components/Card/Card.stories.d.ts +11 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +16 -0
- package/dist/components/Checkbox/Checkbox.spec.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +13 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.spec.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +7 -0
- package/dist/components/DatePicker/DatePickerNavbar.d.ts +4 -0
- package/dist/components/DatePicker/DatePickerRangeCalendarsWrapper.d.ts +2 -0
- package/dist/components/DatePicker/RangeDatePicker.d.ts +16 -0
- package/dist/components/DatePicker/RangeDatePicker.spec.d.ts +1 -0
- package/dist/components/DatePicker/RangeDatePicker.stories.d.ts +4 -0
- package/dist/components/DatePicker/helpers.d.ts +16 -0
- package/dist/components/DatePicker/hooks.d.ts +6 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/types.d.ts +100 -0
- package/dist/components/DetailsCard/DetailsCard.d.ts +32 -0
- package/dist/components/DetailsCard/DetailsCard.spec.d.ts +1 -0
- package/dist/components/DetailsCard/DetailsCard.stories.d.ts +17 -0
- package/dist/components/DetailsCard/index.d.ts +2 -0
- package/dist/components/DetailsCardInfo/DetailsCardInfo.d.ts +8 -0
- package/dist/components/DetailsCardInfo/index.d.ts +1 -0
- package/dist/components/FieldDescription/FieldDescription.d.ts +3 -0
- package/dist/components/FieldDescription/index.d.ts +1 -0
- package/dist/components/FieldError/FieldError.d.ts +3 -0
- package/dist/components/FieldError/index.d.ts +1 -0
- package/dist/components/FieldGroup/FieldGroup.d.ts +8 -0
- package/dist/components/FieldGroup/FieldGroup.spec.d.ts +1 -0
- package/dist/components/FieldGroup/FieldGroup.stories.d.ts +10 -0
- package/dist/components/FieldGroup/index.d.ts +1 -0
- package/dist/components/FileUploadProgress/FileUploadProgress.d.ts +42 -0
- package/dist/components/FileUploadProgress/FileUploadProgress.stories.d.ts +7 -0
- package/dist/components/FileUploadProgress/FileUploadProgressActions.d.ts +9 -0
- package/dist/components/FileUploadProgress/index.d.ts +2 -0
- package/dist/components/Form/Form.d.ts +16 -0
- package/dist/components/Form/Form.spec.d.ts +1 -0
- package/dist/components/Form/Form.stories.d.ts +8 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/FormField/FormField.d.ts +40 -0
- package/dist/components/FormField/FormField.spec.d.ts +1 -0
- package/dist/components/FormField/FormField.stories.d.ts +9 -0
- package/dist/components/FormField/index.d.ts +1 -0
- package/dist/components/FormGroup/FormGroup.d.ts +16 -0
- package/dist/components/FormGroup/FormGroup.spec.d.ts +1 -0
- package/dist/components/FormGroup/FormGroup.stories.d.ts +10 -0
- package/dist/components/FormGroup/index.d.ts +1 -0
- package/dist/components/Icon/Icon.d.ts +32 -0
- package/dist/components/Icon/Icon.stories.d.ts +15 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Icon/types.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +29 -0
- package/dist/components/Input/Input.spec.d.ts +1 -0
- package/dist/components/Input/Input.stories.d.ts +10 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Link/Link.d.ts +14 -0
- package/dist/components/Link/Link.stories.d.ts +12 -0
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/Loader/Loader.d.ts +20 -0
- package/dist/components/Loader/Loader.spec.d.ts +1 -0
- package/dist/components/Loader/Loader.stories.d.ts +10 -0
- package/dist/components/Loader/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +25 -0
- package/dist/components/Modal/Modal.spec.d.ts +1 -0
- package/dist/components/Modal/Modal.stories.d.ts +14 -0
- package/dist/components/Modal/StoriesComponents.d.ts +4 -0
- package/dist/components/Modal/components/ModalBase.d.ts +20 -0
- package/dist/components/Modal/components/ModalBase.spec.d.ts +1 -0
- package/dist/components/Modal/components/ModalCloseButton.d.ts +7 -0
- package/dist/components/Modal/components/ModalHeader.d.ts +26 -0
- package/dist/components/Modal/components/ModalPortal.d.ts +7 -0
- package/dist/components/Modal/index.d.ts +10 -0
- package/dist/components/NumericInput/NumericInput.d.ts +12 -0
- package/dist/components/NumericInput/NumericInput.spec.d.ts +1 -0
- package/dist/components/NumericInput/NumericInput.stories.d.ts +20 -0
- package/dist/components/NumericInput/index.d.ts +1 -0
- package/dist/components/Picker/Picker.d.ts +78 -0
- package/dist/components/Picker/Picker.spec.d.ts +1 -0
- package/dist/components/Picker/Picker.stories.d.ts +11 -0
- package/dist/components/Picker/PickerList.d.ts +14 -0
- package/dist/components/Picker/PickerList.spec.d.ts +1 -0
- package/dist/components/Picker/PickerListItem.d.ts +11 -0
- package/dist/components/Picker/Trigger.d.ts +17 -0
- package/dist/components/Picker/Trigger.spec.d.ts +1 -0
- package/dist/components/Picker/TriggerBody.d.ts +16 -0
- package/dist/components/Picker/TriggerBody.spec.d.ts +1 -0
- package/dist/components/Picker/constants.d.ts +50 -0
- package/dist/components/Picker/helpers.d.ts +2 -0
- package/dist/components/Picker/index.d.ts +3 -0
- package/dist/components/Picker/types.d.ts +17 -0
- package/dist/components/Popover/Popover.d.ts +3 -0
- package/dist/components/Popover/Popover.spec.d.ts +1 -0
- package/dist/components/Popover/Popover.stories.d.ts +16 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/types.d.ts +59 -0
- package/dist/components/Progress/ProgressBar.d.ts +21 -0
- package/dist/components/Progress/ProgressBar.spec.d.ts +1 -0
- package/dist/components/Progress/ProgressBar.stories.d.ts +12 -0
- package/dist/components/Progress/ProgressCircle.d.ts +21 -0
- package/dist/components/Progress/ProgressCircle.spec.d.ts +1 -0
- package/dist/components/Progress/ProgressCircle.stories.d.ts +12 -0
- package/dist/components/Progress/constants.d.ts +4 -0
- package/dist/components/Progress/helpers.d.ts +3 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/PromoBanner/PromoBanner.d.ts +43 -0
- package/dist/components/PromoBanner/PromoBanner.spec.d.ts +1 -0
- package/dist/components/PromoBanner/PromoBanner.stories.d.ts +11 -0
- package/dist/components/PromoBanner/index.d.ts +1 -0
- package/dist/components/PromoBannerV2/PromoBannerV2.d.ts +33 -0
- package/dist/components/PromoBannerV2/PromoBannerV2.spec.d.ts +1 -0
- package/dist/components/PromoBannerV2/PromoBannerV2.stories.d.ts +23 -0
- package/dist/components/PromoBannerV2/constants.d.ts +1 -0
- package/dist/components/PromoBannerV2/index.d.ts +2 -0
- package/dist/components/RadioButton/RadioButton.d.ts +7 -0
- package/dist/components/RadioButton/RadioButton.spec.d.ts +1 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +13 -0
- package/dist/components/RadioButton/index.d.ts +1 -0
- package/dist/components/Search/Search.d.ts +36 -0
- package/dist/components/Search/Search.spec.d.ts +1 -0
- package/dist/components/Search/Search.stories.d.ts +19 -0
- package/dist/components/Search/index.d.ts +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +39 -0
- package/dist/components/SegmentedControl/SegmentedControl.spec.d.ts +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.stories.d.ts +9 -0
- package/dist/components/SegmentedControl/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +47 -0
- package/dist/components/Switch/Switch.spec.d.ts +1 -0
- package/dist/components/Switch/Switch.stories.d.ts +11 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Tab/Tab.d.ts +15 -0
- package/dist/components/Tab/Tab.spec.d.ts +1 -0
- package/dist/components/Tab/Tab.stories.d.ts +29 -0
- package/dist/components/Tab/TabsWrapper.d.ts +3 -0
- package/dist/components/Tab/TabsWrapper.spec.d.ts +1 -0
- package/dist/components/Tab/TabsWrapper.stories.d.ts +18 -0
- package/dist/components/Tab/index.d.ts +2 -0
- package/dist/components/Tag/Tag.d.ts +36 -0
- package/dist/components/Tag/Tag.spec.d.ts +1 -0
- package/dist/components/Tag/Tag.stories.d.ts +26 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/TagInput/EditableTag.d.ts +11 -0
- package/dist/components/TagInput/EditableTagContent.d.ts +11 -0
- package/dist/components/TagInput/EmailTagInput.d.ts +5 -0
- package/dist/components/TagInput/TagInput.d.ts +40 -0
- package/dist/components/TagInput/TagInput.spec.d.ts +1 -0
- package/dist/components/TagInput/TagInput.stories.d.ts +10 -0
- package/dist/components/TagInput/index.d.ts +4 -0
- package/dist/components/Textarea/Textarea.d.ts +6 -0
- package/dist/components/Textarea/Textarea.spec.d.ts +1 -0
- package/dist/components/Textarea/Textarea.stories.d.ts +7 -0
- package/dist/components/Textarea/index.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +16 -0
- package/dist/components/Toast/Toast.spec.d.ts +1 -0
- package/dist/components/Toast/Toast.stories.d.ts +14 -0
- package/dist/components/Toast/ToastWrapper.d.ts +20 -0
- package/dist/components/Toast/ToastWrapper.spec.d.ts +1 -0
- package/dist/components/Toast/ToastWrapper.stories.d.ts +34 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.spec.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +52 -0
- package/dist/components/Tooltip/components/Info.d.ts +10 -0
- package/dist/components/Tooltip/components/Interactive.d.ts +15 -0
- package/dist/components/Tooltip/components/Reports.d.ts +7 -0
- package/dist/components/Tooltip/components/Simple.d.ts +4 -0
- package/dist/components/Tooltip/components/UserGuide/SpotlightOverlay.d.ts +8 -0
- package/dist/components/Tooltip/components/UserGuide/UserGuide.d.ts +12 -0
- package/dist/components/Tooltip/components/UserGuide/UserGuideStep.d.ts +16 -0
- package/dist/components/Tooltip/components/UserGuide/index.d.ts +1 -0
- package/dist/components/Tooltip/components/UserGuide/virtualElementReference.d.ts +9 -0
- package/dist/components/Tooltip/components/index.d.ts +5 -0
- package/dist/components/Tooltip/helpers.d.ts +6 -0
- package/dist/components/Tooltip/index.d.ts +4 -0
- package/dist/components/Tooltip/types.d.ts +119 -0
- package/dist/components/Typography/Display.d.ts +10 -0
- package/dist/components/Typography/Heading.d.ts +11 -0
- package/dist/components/Typography/Text.d.ts +15 -0
- package/dist/components/Typography/index.d.ts +3 -0
- package/dist/components/UploadBar/UploadBar.d.ts +49 -0
- package/dist/components/UploadBar/UploadBar.stories.d.ts +7 -0
- package/dist/components/UploadBar/index.d.ts +1 -0
- package/dist/dsrc.cjs.js +1 -1
- package/dist/dsrc.es.js +2 -2
- package/dist/foundations/radius-token.d.ts +6 -0
- package/dist/foundations/shadow-token.d.ts +17 -0
- package/dist/foundations/spacing-token.d.ts +17 -0
- package/dist/index.d.ts +47 -0
- package/dist/preview-stats.json +666 -2064
- package/dist/stories/components/BlockColumns.d.ts +8 -0
- package/dist/stories/components/ColorTokens.d.ts +2 -0
- package/dist/stories/components/Radius.d.ts +2 -0
- package/dist/stories/components/RadiusExamples.d.ts +2 -0
- package/dist/stories/components/Spacing.d.ts +2 -0
- package/dist/stories/components/SpacingExamples.d.ts +2 -0
- package/dist/stories/components/StoryDescriptor.d.ts +6 -0
- package/dist/stories/components/TablerIconsShowcase.d.ts +6 -0
- package/dist/style.css +1 -1
- package/dist/test/setup.d.ts +0 -0
- package/dist/test/utils.d.ts +3 -0
- package/dist/themes/design-token.d.ts +276 -0
- package/dist/utils/PdfIcon.d.ts +2 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/getDesignTokenWithOpacity.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/keyCodes.d.ts +12 -0
- package/dist/utils/noop.d.ts +1 -0
- package/dist/utils/story-parameters.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonKind } from '../Button';
|
|
3
|
+
export interface IPromoBannerV2Props {
|
|
4
|
+
/**
|
|
5
|
+
* Specify an optional className to be applied to the main container node
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Element with additional content for second column
|
|
10
|
+
*/
|
|
11
|
+
additionalContent?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Shows the primary CTA button
|
|
14
|
+
*/
|
|
15
|
+
primaryButton?: {
|
|
16
|
+
handleClick: () => void;
|
|
17
|
+
label: string;
|
|
18
|
+
kind?: ButtonKind;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Shows the secondary CTA button
|
|
22
|
+
*/
|
|
23
|
+
secondaryButton?: {
|
|
24
|
+
handleClick: () => void;
|
|
25
|
+
label: string;
|
|
26
|
+
kind?: ButtonKind;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Event handler for close button press
|
|
30
|
+
*/
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const PromoBannerV2: React.FC<React.PropsWithChildren<IPromoBannerV2Props>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<React.PropsWithChildren<import("./PromoBannerV2").IPromoBannerV2Props>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
primaryButton: {
|
|
7
|
+
control: boolean;
|
|
8
|
+
};
|
|
9
|
+
secondaryButton: {
|
|
10
|
+
control: boolean;
|
|
11
|
+
};
|
|
12
|
+
additionalContent: {
|
|
13
|
+
control: boolean;
|
|
14
|
+
};
|
|
15
|
+
onClose: {
|
|
16
|
+
action: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
21
|
+
export declare const Default: () => React.ReactElement;
|
|
22
|
+
export declare const WithStyledAdditionalContent: () => React.ReactElement;
|
|
23
|
+
export declare const WithStyledMainContent: () => React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SMALL_CONTAINER_WIDTH_TRESHOLD = 559;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface RadioButtonProps extends React.HTMLAttributes<HTMLInputElement> {
|
|
3
|
+
description?: string;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RadioButtonProps } from './RadioButton';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const RadioButton: {
|
|
6
|
+
({ children, ...args }: RadioButtonProps): React.ReactElement;
|
|
7
|
+
args: {
|
|
8
|
+
checked: boolean;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
description: string;
|
|
11
|
+
children: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RadioButton } from './RadioButton';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ISearchInputProps {
|
|
3
|
+
/**
|
|
4
|
+
* Makes search expandable after focusing the icon
|
|
5
|
+
*/
|
|
6
|
+
isCollapsable?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Specify whether the search should be disabled
|
|
9
|
+
*/
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Specify whether the search should have loader visible
|
|
13
|
+
*/
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Optional text for placeholder
|
|
17
|
+
*/
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Specify the search size
|
|
21
|
+
*/
|
|
22
|
+
size?: 'compact' | 'medium' | 'large';
|
|
23
|
+
/**
|
|
24
|
+
* Specify the search value
|
|
25
|
+
*/
|
|
26
|
+
value: string;
|
|
27
|
+
/**
|
|
28
|
+
* Specify an optional className to be applied to the container node
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The event handler for onChange
|
|
33
|
+
*/
|
|
34
|
+
onChange: (value: string) => void;
|
|
35
|
+
}
|
|
36
|
+
export declare const SearchInput: React.FC<ISearchInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ISearchInputProps } from './Search';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ISearchInputProps & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Search: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ISearchInputProps>;
|
|
8
|
+
export declare const States: {
|
|
9
|
+
(args: ISearchInputProps): React.ReactElement;
|
|
10
|
+
args: {};
|
|
11
|
+
};
|
|
12
|
+
export declare const Sizes: {
|
|
13
|
+
(args: ISearchInputProps): React.ReactElement;
|
|
14
|
+
args: {};
|
|
15
|
+
};
|
|
16
|
+
export declare const CollapsableSearch: {
|
|
17
|
+
(args: ISearchInputProps): React.ReactElement;
|
|
18
|
+
args: {};
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchInput } from './Search';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
export type ButtonSize = 'compact' | 'medium' | 'large';
|
|
4
|
+
type ButtonElement = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
} & Pick<ButtonProps, 'disabled' | 'loading' | 'icon'>;
|
|
8
|
+
export interface SegmentedControlProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional className to be applied to the container node
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Array of buttons
|
|
15
|
+
*/
|
|
16
|
+
buttons: ButtonElement[];
|
|
17
|
+
/**
|
|
18
|
+
* Set to make buttons fill the container if there is free space
|
|
19
|
+
*/
|
|
20
|
+
fullWidth?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Specify the buttons size
|
|
23
|
+
*/
|
|
24
|
+
size?: ButtonSize;
|
|
25
|
+
/**
|
|
26
|
+
* Id of initially selected button
|
|
27
|
+
*/
|
|
28
|
+
initialId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Id of current selected button
|
|
31
|
+
*/
|
|
32
|
+
currentId?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Handler for onClick on specific button
|
|
35
|
+
*/
|
|
36
|
+
onButtonClick?: (id: string, event: React.MouseEvent<HTMLElement>) => void;
|
|
37
|
+
}
|
|
38
|
+
export declare const SegmentedControl: React.FC<SegmentedControlProps>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { SegmentedControlProps } from './SegmentedControl';
|
|
4
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, SegmentedControlProps & {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Default: Story<SegmentedControlProps>;
|
|
9
|
+
export declare const Uncontrolled: Story<SegmentedControlProps>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const baseClass = "switch";
|
|
3
|
+
export type SwitchSize = 'compact' | 'medium' | 'large';
|
|
4
|
+
export type SwitchState = 'regular' | 'loading' | 'locked';
|
|
5
|
+
export interface SwitchProps {
|
|
6
|
+
/**
|
|
7
|
+
* Specify the label for the switch input
|
|
8
|
+
*/
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The CSS class for switch container
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Will set the switch to "on" on component initialization
|
|
16
|
+
*/
|
|
17
|
+
defaultOn?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Specify whether the switch should be disabled
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Ref object
|
|
24
|
+
*/
|
|
25
|
+
innerRef?: React.LegacyRef<HTMLInputElement> | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Specify the switch input name
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Define if switch is "on"
|
|
32
|
+
*/
|
|
33
|
+
on?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The event handler for onChange
|
|
36
|
+
*/
|
|
37
|
+
onChange?(e: React.FormEvent, value: boolean): void;
|
|
38
|
+
/**
|
|
39
|
+
* Specify the switch size
|
|
40
|
+
*/
|
|
41
|
+
size?: SwitchSize;
|
|
42
|
+
/**
|
|
43
|
+
* Specify the switch state
|
|
44
|
+
*/
|
|
45
|
+
state?: SwitchState;
|
|
46
|
+
}
|
|
47
|
+
export declare const Switch: React.FC<SwitchProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { SwitchProps } from './Switch';
|
|
4
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, SwitchProps & {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Default: Story<SwitchProps>;
|
|
9
|
+
export declare const States: Story;
|
|
10
|
+
export declare const Availability: Story;
|
|
11
|
+
export declare const Sizes: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Switch } from './Switch';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Size } from 'utils';
|
|
3
|
+
type HTMLProps = (React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
4
|
+
href: string;
|
|
5
|
+
}) | (React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
6
|
+
href?: never;
|
|
7
|
+
});
|
|
8
|
+
export type TabProps = HTMLProps & {
|
|
9
|
+
count?: number;
|
|
10
|
+
isSelected?: boolean;
|
|
11
|
+
asBadge?: boolean;
|
|
12
|
+
size?: Size;
|
|
13
|
+
};
|
|
14
|
+
export declare const Tab: React.FC<React.PropsWithChildren<TabProps>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TabProps } from './Tab';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
4
|
+
href: string;
|
|
5
|
+
} & {
|
|
6
|
+
count?: number | undefined;
|
|
7
|
+
isSelected?: boolean | undefined;
|
|
8
|
+
asBadge?: boolean | undefined;
|
|
9
|
+
size?: import("../..").Size | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}> | import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
13
|
+
href?: undefined;
|
|
14
|
+
} & {
|
|
15
|
+
count?: number | undefined;
|
|
16
|
+
isSelected?: boolean | undefined;
|
|
17
|
+
asBadge?: boolean | undefined;
|
|
18
|
+
size?: import("../..").Size | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
}>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type ITabArgs = TabProps;
|
|
24
|
+
export declare const Tab: {
|
|
25
|
+
(args: ITabArgs): React.ReactElement;
|
|
26
|
+
args: TabProps;
|
|
27
|
+
};
|
|
28
|
+
export declare const StatesAndVariants: () => React.ReactElement;
|
|
29
|
+
export declare const Sizes: () => React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}>;
|
|
5
|
+
export default _default;
|
|
6
|
+
type ITabArgs = {
|
|
7
|
+
items: Array<{
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
count: number;
|
|
11
|
+
asBadge?: boolean;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export declare const TabsWrapper: {
|
|
16
|
+
({ items }: ITabArgs): React.ReactElement;
|
|
17
|
+
args: ITabArgs;
|
|
18
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the tag kind
|
|
5
|
+
*/
|
|
6
|
+
kind?: 'default' | 'info' | 'warning' | 'success' | 'error' | 'purple' | 'black';
|
|
7
|
+
/**
|
|
8
|
+
* Specify the tag size
|
|
9
|
+
*/
|
|
10
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
11
|
+
/**
|
|
12
|
+
* Set the tag custom color
|
|
13
|
+
*/
|
|
14
|
+
customColor?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Set to show close icon
|
|
17
|
+
*/
|
|
18
|
+
dismissible?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Outlined version of tag
|
|
21
|
+
*/
|
|
22
|
+
outline?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The event handler for close icon click
|
|
25
|
+
*/
|
|
26
|
+
onRemove?(): void;
|
|
27
|
+
/**
|
|
28
|
+
* React node element to show on the left
|
|
29
|
+
*/
|
|
30
|
+
leftNode?: React.ReactElement;
|
|
31
|
+
/**
|
|
32
|
+
* React node element to show on the right
|
|
33
|
+
*/
|
|
34
|
+
rightNode?: React.ReactElement;
|
|
35
|
+
}
|
|
36
|
+
export declare const Tag: React.FC<React.PropsWithChildren<TagProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TagProps } from './Tag';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, TagProps & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Default: {
|
|
8
|
+
({ children, ...args }: TagProps): React.ReactElement;
|
|
9
|
+
args: TagProps;
|
|
10
|
+
};
|
|
11
|
+
export declare const Kinds: {
|
|
12
|
+
({ children, ...args }: TagProps): React.ReactElement;
|
|
13
|
+
args: {
|
|
14
|
+
children: string;
|
|
15
|
+
leftNode: React.JSX.Element;
|
|
16
|
+
rightNode: React.JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const Sizes: {
|
|
20
|
+
({ children, ...args }: TagProps): React.ReactElement;
|
|
21
|
+
args: {
|
|
22
|
+
children: string;
|
|
23
|
+
leftNode: React.JSX.Element;
|
|
24
|
+
rightNode: React.JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface EditableTagProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
|
4
|
+
index: number;
|
|
5
|
+
update: (idx: number, value: string) => void;
|
|
6
|
+
remove: (idx: number) => void;
|
|
7
|
+
validator?: (val: string) => boolean;
|
|
8
|
+
children: string;
|
|
9
|
+
size: 'medium' | 'large';
|
|
10
|
+
}
|
|
11
|
+
export declare const EditableTag: React.FC<EditableTagProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface EditableTagContentProps {
|
|
3
|
+
value: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
innerEditableRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
|
7
|
+
change: (value: string) => void;
|
|
8
|
+
remove: () => void;
|
|
9
|
+
validator?: (value: string) => boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const EditableTagContent: React.FC<EditableTagContentProps>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TagInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'> {
|
|
3
|
+
/**
|
|
4
|
+
* Set the id for input
|
|
5
|
+
*/
|
|
6
|
+
id?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Set the error message
|
|
9
|
+
*/
|
|
10
|
+
error?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Array of defined tags
|
|
13
|
+
*/
|
|
14
|
+
tags?: string[];
|
|
15
|
+
/**
|
|
16
|
+
* The event handler for modify tags array
|
|
17
|
+
*/
|
|
18
|
+
onChange: (tags: string[]) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Set the input placeholder
|
|
21
|
+
*/
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Set the custom validation for provided items
|
|
25
|
+
*/
|
|
26
|
+
validator?: (val: string) => boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Specify the input size
|
|
29
|
+
*/
|
|
30
|
+
size?: 'medium' | 'large';
|
|
31
|
+
/**
|
|
32
|
+
* Set the input custom class
|
|
33
|
+
*/
|
|
34
|
+
inputClassName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Add Tag on blur
|
|
37
|
+
*/
|
|
38
|
+
addOnBlur?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare const TagInput: React.FC<TagInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TagInputProps, EmailTagInputProps } from './index';
|
|
4
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, TagInputProps & {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const DefaultTagInput: Story<TagInputProps>;
|
|
9
|
+
export declare const DefaultEmailTagInput: Story<EmailTagInputProps>;
|
|
10
|
+
export declare const Sizes: () => React.ReactElement;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
className?: string;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { TextareaProps } from './Textarea';
|
|
4
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: Story<TextareaProps>;
|
|
7
|
+
export declare const States: () => React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Textarea } from './Textarea';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type ToastKind = 'success' | 'warning' | 'error' | 'info';
|
|
3
|
+
type ToastAction = {
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
label: string;
|
|
6
|
+
closesOnClick?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export interface ToastProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
action?: ToastAction;
|
|
10
|
+
className?: string;
|
|
11
|
+
removable?: boolean;
|
|
12
|
+
kind?: ToastKind;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const Toast: React.FC<React.PropsWithChildren<ToastProps>>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Story } from '@storybook/react';
|
|
3
|
+
import { ToastProps } from './Toast';
|
|
4
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ToastProps & {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Default: Story<ToastProps>;
|
|
9
|
+
export declare const Kinds: Story;
|
|
10
|
+
export declare const WithCloseIcon: Story;
|
|
11
|
+
export declare const WithCustomAction: {
|
|
12
|
+
(): React.ReactElement;
|
|
13
|
+
parameters: import("@storybook/types").Parameters;
|
|
14
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ToastProps, Toast } from './Toast';
|
|
3
|
+
type HorizontalPosition = 'left' | 'center' | 'right';
|
|
4
|
+
type VerticalPosition = 'top' | 'bottom';
|
|
5
|
+
export declare const ANIMATION_TIME = 200;
|
|
6
|
+
interface Toast extends Omit<ToastProps, 'content'> {
|
|
7
|
+
id: string;
|
|
8
|
+
content: React.ReactElement | string;
|
|
9
|
+
}
|
|
10
|
+
export interface ToastWrapperProps {
|
|
11
|
+
className?: string;
|
|
12
|
+
toasts: Toast[];
|
|
13
|
+
fixed?: boolean;
|
|
14
|
+
block?: boolean;
|
|
15
|
+
animationType?: string;
|
|
16
|
+
verticalPosition?: VerticalPosition;
|
|
17
|
+
horizontalPosition?: HorizontalPosition;
|
|
18
|
+
}
|
|
19
|
+
export declare const ToastWrapper: React.FC<ToastWrapperProps>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|