@livechat/design-system-react-components 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +753 -2151
- 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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ModalProps, ModalPortalProps } from './index';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ModalProps & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Modal: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ModalProps>;
|
|
8
|
+
export declare const ModalWithCustomHeader: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ModalProps>;
|
|
9
|
+
export declare const ModalWithLabeledHeader: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ModalProps>;
|
|
10
|
+
export declare const ModalWithFullSpaceContent: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ModalProps>;
|
|
11
|
+
export declare const ModalPortal: {
|
|
12
|
+
({ children, ...args }: ModalPortalProps): React.ReactElement;
|
|
13
|
+
args: ModalPortalProps;
|
|
14
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ModalBaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* The event handler for close button
|
|
5
|
+
*/
|
|
6
|
+
onClose(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Triggers the onClose event on `esc` key press
|
|
9
|
+
*/
|
|
10
|
+
closeOnEscPress?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Triggers the onClose event on overlay click
|
|
13
|
+
*/
|
|
14
|
+
closeOnOverlayPress?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Removes the spacing inside the main container
|
|
17
|
+
*/
|
|
18
|
+
fullSpaceContent?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const ModalBase: React.FC<React.PropsWithChildren<ModalBaseProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AvatarProps } from '../../Avatar';
|
|
3
|
+
import { IconProps } from '../../Icon';
|
|
4
|
+
export interface ModalHeaderProps {
|
|
5
|
+
/**
|
|
6
|
+
* Set the header title
|
|
7
|
+
*/
|
|
8
|
+
title?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Set to display the icon
|
|
11
|
+
*/
|
|
12
|
+
iconProps?: IconProps;
|
|
13
|
+
/**
|
|
14
|
+
* Set to display avatar
|
|
15
|
+
*/
|
|
16
|
+
avatarProps?: AvatarProps;
|
|
17
|
+
/**
|
|
18
|
+
* Children element
|
|
19
|
+
*/
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Define class name for container
|
|
23
|
+
*/
|
|
24
|
+
className?: 'string';
|
|
25
|
+
}
|
|
26
|
+
export declare const ModalHeader: React.FC<ModalHeaderProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { Modal } from './Modal';
|
|
2
|
+
export { ModalBase } from './components/ModalBase';
|
|
3
|
+
export { ModalCloseButton } from './components/ModalCloseButton';
|
|
4
|
+
export { ModalPortal } from './components/ModalPortal';
|
|
5
|
+
export { ModalHeader } from './components/ModalHeader';
|
|
6
|
+
export type { ModalProps } from './Modal';
|
|
7
|
+
export type { ModalBaseProps } from './components/ModalBase';
|
|
8
|
+
export type { ModalCloseButtonProps } from './components/ModalCloseButton';
|
|
9
|
+
export type { ModalPortalProps } from './components/ModalPortal';
|
|
10
|
+
export type { ModalHeaderProps } from './components/ModalHeader';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type NumericInputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
value: string;
|
|
6
|
+
max?: number;
|
|
7
|
+
min?: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
noControls?: boolean;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const NumericInput: React.FC<NumericInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { NumericInputProps } from './NumericInput';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, React.InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
error?: string | undefined;
|
|
6
|
+
value: string;
|
|
7
|
+
max?: number | undefined;
|
|
8
|
+
min?: number | undefined;
|
|
9
|
+
disabled?: boolean | undefined;
|
|
10
|
+
noControls?: boolean | undefined;
|
|
11
|
+
onChange: (value: string) => void;
|
|
12
|
+
} & {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}>;
|
|
15
|
+
export default _default;
|
|
16
|
+
export declare const NumericInput: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, NumericInputProps>;
|
|
17
|
+
export declare const NumericInputWithMinAndMaxValues: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, NumericInputProps>;
|
|
18
|
+
export declare const NumericInputWithNoControls: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, NumericInputProps>;
|
|
19
|
+
export declare const NumericInputWithDisabled: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, NumericInputProps>;
|
|
20
|
+
export declare const NumericInputWithError: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, NumericInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NumericInput } from './NumericInput';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Size } from 'utils';
|
|
3
|
+
import { IPickerListItem, PickerType } from './types';
|
|
4
|
+
export interface IPickerProps {
|
|
5
|
+
/**
|
|
6
|
+
* Specify the custom id
|
|
7
|
+
*/
|
|
8
|
+
id?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The CSS class for picker container
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Specify whether the picker should be disabled
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Specify whether the picker should be in error state
|
|
19
|
+
*/
|
|
20
|
+
error?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Array of picker options
|
|
23
|
+
*/
|
|
24
|
+
options: IPickerListItem[];
|
|
25
|
+
/**
|
|
26
|
+
* Array of picker selected options
|
|
27
|
+
*/
|
|
28
|
+
selected?: IPickerListItem[] | null;
|
|
29
|
+
/**
|
|
30
|
+
* Specify the picker size
|
|
31
|
+
*/
|
|
32
|
+
size?: Size;
|
|
33
|
+
/**
|
|
34
|
+
* Specify the placeholder for search input
|
|
35
|
+
*/
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Specify whether the option select is required
|
|
39
|
+
*/
|
|
40
|
+
isRequired?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Text if no search result were found
|
|
43
|
+
*/
|
|
44
|
+
noSearchResultText?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Text for `select all` option which will be visible if defined in multi select mode
|
|
47
|
+
*/
|
|
48
|
+
selectAllOptionText?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Set `multi` to specify whether the picker should allow to multi selection
|
|
51
|
+
*/
|
|
52
|
+
type?: PickerType;
|
|
53
|
+
/**
|
|
54
|
+
* Set to disable search input
|
|
55
|
+
*/
|
|
56
|
+
searchDisabled?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Set to hide clear selection button
|
|
59
|
+
*/
|
|
60
|
+
hideClearButton?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Will open picker on component initialization
|
|
63
|
+
*/
|
|
64
|
+
openedOnInit?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Test id passed to the picker trigger element
|
|
67
|
+
*/
|
|
68
|
+
['data-testid']?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Callback called after item selection
|
|
71
|
+
*/
|
|
72
|
+
onSelect: (selectedItems: IPickerListItem[] | null) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Clears the search input after item select
|
|
75
|
+
*/
|
|
76
|
+
clearSearchAfterSelection?: boolean;
|
|
77
|
+
}
|
|
78
|
+
export declare const Picker: React.FC<IPickerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IPickerProps } from './Picker';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, IPickerProps & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, IPickerProps>;
|
|
8
|
+
export declare const States: () => React.ReactElement;
|
|
9
|
+
export declare const PickerWithGroupedOptions: () => React.ReactElement;
|
|
10
|
+
export declare const PickerWithMoreOptions: () => React.ReactElement;
|
|
11
|
+
export declare const PickerWithOptionsAsCustomElements: () => React.ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IPickerListItem } from './types';
|
|
3
|
+
export interface IPickerListProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
items: IPickerListItem[];
|
|
6
|
+
selectedItemsKeys: string[] | null;
|
|
7
|
+
emptyStateText?: string;
|
|
8
|
+
selectAllOptionText?: string;
|
|
9
|
+
isMultiSelect?: boolean;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
onSelect: (item: IPickerListItem) => void;
|
|
12
|
+
onSelectAll: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const PickerList: React.FC<IPickerListProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IPickerListItem } from './types';
|
|
3
|
+
interface IProps {
|
|
4
|
+
item: IPickerListItem;
|
|
5
|
+
isItemSelected: boolean;
|
|
6
|
+
currentItemKey: string | null;
|
|
7
|
+
isAdjacentStyleApplied: 'top' | 'middle' | 'bottom';
|
|
8
|
+
onSelect: (item: IPickerListItem) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const PickerListItem: React.FC<IProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Size } from 'utils';
|
|
3
|
+
export interface ITriggerProps {
|
|
4
|
+
isSearchDisabled: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
isError?: boolean;
|
|
7
|
+
isItemSelected: boolean;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
isRequired?: boolean;
|
|
10
|
+
isMultiSelect?: boolean;
|
|
11
|
+
size?: Size;
|
|
12
|
+
hideClearButton?: boolean;
|
|
13
|
+
onTrigger: (e: React.MouseEvent | KeyboardEvent) => void;
|
|
14
|
+
onClear: () => void;
|
|
15
|
+
testId?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const Trigger: React.FC<React.PropsWithChildren<ITriggerProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Size } from 'utils';
|
|
3
|
+
import { PickerType, IPickerListItem } from './types';
|
|
4
|
+
export interface ITriggerBodyProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
isSearchDisabled?: boolean;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
items?: IPickerListItem[] | null;
|
|
10
|
+
type: PickerType;
|
|
11
|
+
clearSearchAfterSelection?: boolean;
|
|
12
|
+
size?: Size;
|
|
13
|
+
onItemRemove: (item: IPickerListItem) => void;
|
|
14
|
+
onFilter: (text: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const TriggerBody: React.FC<ITriggerBodyProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const DEFAULT_PICKER_OPTIONS: {
|
|
2
|
+
key: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const DEFAULT_EXTENDED_OPTIONS: ({
|
|
6
|
+
key: string;
|
|
7
|
+
name: string;
|
|
8
|
+
groupHeader: boolean;
|
|
9
|
+
disabled?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
key: string;
|
|
12
|
+
name: string;
|
|
13
|
+
groupHeader?: undefined;
|
|
14
|
+
disabled?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
key: string;
|
|
17
|
+
name: string;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
groupHeader?: undefined;
|
|
20
|
+
})[];
|
|
21
|
+
export declare const DEFAULT_MORE_PICKER_OPTIONS: ({
|
|
22
|
+
key: string;
|
|
23
|
+
name: string;
|
|
24
|
+
secondaryText: string;
|
|
25
|
+
showCheckbox?: undefined;
|
|
26
|
+
icon?: undefined;
|
|
27
|
+
avatarSrc?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
key: string;
|
|
30
|
+
name: string;
|
|
31
|
+
showCheckbox: boolean;
|
|
32
|
+
secondaryText?: undefined;
|
|
33
|
+
icon?: undefined;
|
|
34
|
+
avatarSrc?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
key: string;
|
|
37
|
+
name: string;
|
|
38
|
+
icon: (props: import("react").SVGProps<SVGSVGElement>) => JSX.Element;
|
|
39
|
+
secondaryText?: undefined;
|
|
40
|
+
showCheckbox?: undefined;
|
|
41
|
+
avatarSrc?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
key: string;
|
|
44
|
+
name: string;
|
|
45
|
+
avatarSrc: string;
|
|
46
|
+
secondaryText?: undefined;
|
|
47
|
+
showCheckbox?: undefined;
|
|
48
|
+
icon?: undefined;
|
|
49
|
+
})[];
|
|
50
|
+
export declare const SELECT_ALL_OPTION_KEY = "select-all";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconSource } from '../Icon';
|
|
3
|
+
export interface IPickerListItem {
|
|
4
|
+
key: string;
|
|
5
|
+
name: string;
|
|
6
|
+
customElement?: {
|
|
7
|
+
listItemBody: React.ReactElement;
|
|
8
|
+
selectedItemBody: React.ReactElement;
|
|
9
|
+
};
|
|
10
|
+
groupHeader?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
icon?: IconSource;
|
|
13
|
+
avatarSrc?: string;
|
|
14
|
+
secondaryText?: string;
|
|
15
|
+
showCheckbox?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export type PickerType = 'single' | 'multi';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StoryFn } from '@storybook/react';
|
|
3
|
+
import type { IPopoverProps } from './types';
|
|
4
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, IPopoverProps & {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Default: {
|
|
9
|
+
(args: IPopoverProps): React.ReactElement;
|
|
10
|
+
decorators: ((Story: StoryFn) => React.JSX.Element)[];
|
|
11
|
+
args: {
|
|
12
|
+
placement: string;
|
|
13
|
+
isVisible: undefined;
|
|
14
|
+
openedOnInit: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Placement, UseClickProps, UseDismissProps, FlipOptions } from '@floating-ui/react';
|
|
3
|
+
export interface IPopoverProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* The CSS class for popover container
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The CSS class for trigger container
|
|
11
|
+
*/
|
|
12
|
+
triggerClassName?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The popover placement related to the trigger element
|
|
15
|
+
*/
|
|
16
|
+
placement?: Placement;
|
|
17
|
+
/**
|
|
18
|
+
* Optional handler called on tooltip hide
|
|
19
|
+
*/
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Optional handler called on tooltip show
|
|
23
|
+
*/
|
|
24
|
+
onOpen?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Set popover visibility
|
|
27
|
+
*/
|
|
28
|
+
isVisible?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Will open menu on component initialization
|
|
31
|
+
*/
|
|
32
|
+
openedOnInit?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Set the popover placement to keep it in view
|
|
35
|
+
*/
|
|
36
|
+
flipOptions?: FlipOptions;
|
|
37
|
+
/**
|
|
38
|
+
* Set the popover offset
|
|
39
|
+
*/
|
|
40
|
+
offsetSize?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Set `false` if the menu is not to be closed with an esc press
|
|
43
|
+
*/
|
|
44
|
+
closeOnEsc?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Trigger element
|
|
47
|
+
*/
|
|
48
|
+
triggerRenderer: React.ReactElement | (() => React.ReactNode);
|
|
49
|
+
/**
|
|
50
|
+
* Set the `floating-ui` useDismiss hook params if you need more control
|
|
51
|
+
* https://floating-ui.com/docs/usedismiss
|
|
52
|
+
*/
|
|
53
|
+
useDismissHookProps?: UseDismissProps;
|
|
54
|
+
/**
|
|
55
|
+
* Set the `floating-ui` useClick hook params if you need more control
|
|
56
|
+
* https://floating-ui.com/docs/useclick
|
|
57
|
+
*/
|
|
58
|
+
useClickHookProps?: UseClickProps;
|
|
59
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ProgressSize, ProgressStatus } from './constants';
|
|
3
|
+
export interface ProgressBarProps {
|
|
4
|
+
/**
|
|
5
|
+
* The CSS class for container
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Specify the value of current progress bar (0-100)
|
|
10
|
+
*/
|
|
11
|
+
percent: number;
|
|
12
|
+
/**
|
|
13
|
+
* Specify the progress bar status
|
|
14
|
+
*/
|
|
15
|
+
status?: ProgressStatus;
|
|
16
|
+
/**
|
|
17
|
+
* Specify the progress bar size
|
|
18
|
+
*/
|
|
19
|
+
size?: ProgressSize;
|
|
20
|
+
}
|
|
21
|
+
export declare const ProgressBar: React.ExoticComponent<ProgressBarProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ProgressBarProps } from './ProgressBar';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ProgressBarProps & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const ProgressBar: {
|
|
6
|
+
(args: ProgressBarProps): React.ReactElement;
|
|
7
|
+
args: {
|
|
8
|
+
percent: number;
|
|
9
|
+
status: string;
|
|
10
|
+
size: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ProgressSize, ProgressStatus } from './constants';
|
|
3
|
+
export interface ProgressCircleProps {
|
|
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 progress circle status
|
|
14
|
+
*/
|
|
15
|
+
status?: ProgressStatus;
|
|
16
|
+
/**
|
|
17
|
+
* Specify the progress circle size
|
|
18
|
+
*/
|
|
19
|
+
size?: ProgressSize;
|
|
20
|
+
}
|
|
21
|
+
export declare const ProgressCircle: React.ExoticComponent<ProgressCircleProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ProgressCircleProps } from './ProgressCircle';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, ProgressCircleProps & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const ProgressCircle: {
|
|
6
|
+
(args: ProgressCircleProps): React.ReactElement;
|
|
7
|
+
args: {
|
|
8
|
+
progressValue: number;
|
|
9
|
+
status: string;
|
|
10
|
+
size: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface PromoBannerProps {
|
|
3
|
+
/**
|
|
4
|
+
* Specify an optional className to be applied to the container node
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Set the primary button text
|
|
9
|
+
*/
|
|
10
|
+
buttonText?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Set the header text
|
|
13
|
+
*/
|
|
14
|
+
header: string;
|
|
15
|
+
/**
|
|
16
|
+
* Set the image source to display it
|
|
17
|
+
*/
|
|
18
|
+
img?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Specify whether the banner should use a light-themed design
|
|
21
|
+
*/
|
|
22
|
+
light?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Set the link button text
|
|
25
|
+
*/
|
|
26
|
+
linkText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Event handler for primary button press
|
|
29
|
+
*/
|
|
30
|
+
onButtonClick?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Event handler for close button press
|
|
33
|
+
*/
|
|
34
|
+
onClose?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Event handler for link button press
|
|
37
|
+
*/
|
|
38
|
+
onLinkClick?: () => void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Since version 1.0.0. Will be deleted in version 2.0.0. Use {@link PromoBannerV2} instead.
|
|
42
|
+
*/
|
|
43
|
+
export declare const PromoBanner: React.FC<React.PropsWithChildren<PromoBannerProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PromoBannerProps } from './PromoBanner';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, PromoBannerProps & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const PromoBanner: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PromoBannerProps>;
|
|
8
|
+
export declare const WithButtons: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PromoBannerProps>;
|
|
9
|
+
export declare const WithImage: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PromoBannerProps>;
|
|
10
|
+
export declare const WithClose: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PromoBannerProps>;
|
|
11
|
+
export declare const WithLight: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PromoBannerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PromoBanner } from './PromoBanner';
|