@livechat/design-system-react-components 1.0.0-y.0 → 1.1.0
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 +25 -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 +15 -0
- package/dist/components/ActionBar/index.d.ts +2 -0
- package/dist/components/ActionMenu/ActionMenu.d.ts +34 -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 +21 -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/Avatar/Avatar.d.ts +49 -0
- package/dist/{src/components → components}/Avatar/Avatar.helpers.d.ts +1 -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/{src/components → components}/Badge/Badge.d.ts +15 -0
- package/dist/components/Badge/Badge.spec.d.ts +1 -0
- package/dist/components/Badge/Badge.stories.d.ts +12 -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/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/{src/components → components}/Checkbox/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox/Checkbox.spec.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +13 -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/DatePickerRangeCalendarsWrapper.d.ts +2 -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/{src/components → components}/DatePicker/types.d.ts +5 -5
- package/dist/components/DetailsCard/DetailsCard.d.ts +28 -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/{src/components → components}/FieldDescription/FieldDescription.d.ts +1 -1
- package/dist/{src/components → components}/FieldError/FieldError.d.ts +1 -1
- package/dist/{src/components → components}/FieldGroup/FieldGroup.d.ts +1 -1
- package/dist/components/FieldGroup/FieldGroup.spec.d.ts +1 -0
- package/dist/components/FieldGroup/FieldGroup.stories.d.ts +10 -0
- package/dist/components/FileUploadProgress/FileUploadProgress.d.ts +42 -0
- package/dist/components/FileUploadProgress/FileUploadProgress.stories.d.ts +7 -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/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/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/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/{src/components → components}/Input/Input.d.ts +17 -2
- package/dist/components/Input/Input.spec.d.ts +1 -0
- package/dist/components/Input/Input.stories.d.ts +10 -0
- package/dist/components/Link/Link.stories.d.ts +12 -0
- package/dist/{src/components → components}/Loader/Loader.d.ts +12 -2
- package/dist/components/Loader/Loader.spec.d.ts +1 -0
- package/dist/components/Loader/Loader.stories.d.ts +10 -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/{src/components/Modal → components/Modal/components}/ModalCloseButton.d.ts +2 -1
- package/dist/components/Modal/components/ModalHeader.d.ts +26 -0
- package/dist/components/Modal/index.d.ts +10 -0
- package/dist/{src/components → components}/NumericInput/NumericInput.d.ts +2 -4
- package/dist/components/NumericInput/NumericInput.spec.d.ts +1 -0
- package/dist/components/NumericInput/NumericInput.stories.d.ts +20 -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/{src/components → components}/Picker/PickerList.d.ts +1 -10
- package/dist/components/Picker/PickerList.spec.d.ts +1 -0
- package/dist/components/Picker/PickerListItem.d.ts +11 -0
- package/dist/{src/components → components}/Picker/Trigger.d.ts +3 -1
- package/dist/components/Picker/Trigger.spec.d.ts +1 -0
- package/dist/{src/components → components}/Picker/TriggerBody.d.ts +4 -4
- 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 +38 -0
- package/dist/components/Popover/Popover.spec.d.ts +1 -0
- package/dist/components/Popover/Popover.stories.d.ts +13 -0
- package/dist/{src/components → components}/Progress/ProgressBar.d.ts +12 -0
- package/dist/components/Progress/ProgressBar.spec.d.ts +1 -0
- package/dist/components/Progress/ProgressBar.stories.d.ts +12 -0
- package/dist/{src/components → components}/Progress/ProgressCircle.d.ts +12 -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/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/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.spec.d.ts +1 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +13 -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/{src/components → components}/SegmentedControl/SegmentedControl.d.ts +23 -2
- package/dist/components/SegmentedControl/SegmentedControl.spec.d.ts +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.stories.d.ts +9 -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/{src/components → components}/Tab/Tab.d.ts +3 -3
- 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.spec.d.ts +1 -0
- package/dist/components/Tab/TabsWrapper.stories.d.ts +18 -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/{src/components → components}/TagInput/EmailTagInput.d.ts +2 -2
- package/dist/components/TagInput/TagInput.d.ts +32 -0
- package/dist/components/TagInput/TagInput.spec.d.ts +1 -0
- package/dist/components/TagInput/TagInput.stories.d.ts +10 -0
- package/dist/components/Textarea/Textarea.spec.d.ts +1 -0
- package/dist/components/Textarea/Textarea.stories.d.ts +7 -0
- package/dist/{src/components → components}/Toast/Toast.d.ts +3 -3
- package/dist/components/Toast/Toast.spec.d.ts +1 -0
- package/dist/components/Toast/Toast.stories.d.ts +14 -0
- package/dist/{src/components → components}/Toast/ToastWrapper.d.ts +3 -3
- package/dist/components/Toast/ToastWrapper.spec.d.ts +1 -0
- package/dist/components/Toast/ToastWrapper.stories.d.ts +34 -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 +41 -0
- package/dist/components/Tooltip/components/FloatingComponent.d.ts +18 -0
- package/dist/{src/components/Tooltip → components/Tooltip/components}/Info.d.ts +3 -2
- package/dist/{src/components/Tooltip → components/Tooltip/components}/Interactive.d.ts +5 -4
- package/dist/components/Tooltip/components/Reports.d.ts +7 -0
- package/dist/{src/components/Tooltip → components/Tooltip/components/UserGuide}/SpotlightOverlay.d.ts +2 -1
- package/dist/{src/components/Tooltip → components/Tooltip/components/UserGuide}/UserGuide.d.ts +2 -2
- package/dist/components/Tooltip/components/UserGuide/UserGuideStep.d.ts +16 -0
- package/dist/components/Tooltip/components/UserGuide/index.d.ts +1 -0
- package/dist/{src/components/Tooltip → components/Tooltip/components}/index.d.ts +1 -1
- package/dist/components/Tooltip/helpers.d.ts +4 -0
- package/dist/components/Tooltip/index.d.ts +4 -0
- package/dist/{src/components/Tooltip/Tooltip.d.ts → components/Tooltip/types.d.ts} +10 -2
- package/dist/components/Typography/Display.d.ts +10 -0
- package/dist/{src/components → components}/Typography/Heading.d.ts +2 -2
- package/dist/{src/components → components}/Typography/Text.d.ts +2 -2
- package/dist/{src/components → components}/Typography/index.d.ts +1 -0
- package/dist/components/UploadBar/UploadBar.d.ts +49 -0
- package/dist/components/UploadBar/UploadBar.stories.d.ts +7 -0
- package/dist/dsrc.cjs.js +12 -9
- package/dist/dsrc.es.js +3968 -3544
- package/dist/foundations/radius-token.d.ts +6 -0
- package/dist/{src/foundations → foundations}/shadow-token.d.ts +1 -0
- package/dist/{src/foundations → foundations}/spacing-token.d.ts +1 -0
- package/dist/{src/index.d.ts → index.d.ts} +6 -1
- package/dist/preview-stats.json +2560 -0
- 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/{src/themes → themes}/design-token.d.ts +2 -0
- package/dist/utils/PdfIcon.d.ts +2 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/story-parameters.d.ts +2 -0
- package/package.json +25 -21
- package/dist/dsrc.umd.js +0 -15
- package/dist/shadow/shadow.css +0 -7
- package/dist/shadow/shadow.css.map +0 -1
- package/dist/shadow/spacing.css +0 -18
- package/dist/shadow/spacing.css.map +0 -1
- package/dist/spacing/shadow.css +0 -7
- package/dist/spacing/shadow.css.map +0 -1
- package/dist/spacing/spacing.css +0 -18
- package/dist/spacing/spacing.css.map +0 -1
- package/dist/src/components/Alert/Alert.d.ts +0 -9
- package/dist/src/components/Avatar/Avatar.d.ts +0 -19
- package/dist/src/components/Avatar/index.d.ts +0 -1
- package/dist/src/components/Button/Button.d.ts +0 -14
- package/dist/src/components/Card/Card.d.ts +0 -12
- package/dist/src/components/DatePicker/helpers.d.ts +0 -39
- package/dist/src/components/FileUploadProgress/FileUploadProgress.d.ts +0 -15
- package/dist/src/components/Form/Form.d.ts +0 -7
- package/dist/src/components/FormField/FormField.d.ts +0 -13
- package/dist/src/components/FormGroup/FormGroup.d.ts +0 -7
- package/dist/src/components/Icon/Icon.d.ts +0 -14
- package/dist/src/components/Icon/index.d.ts +0 -1
- package/dist/src/components/Modal/Modal.d.ts +0 -9
- package/dist/src/components/Modal/ModalBase.d.ts +0 -7
- package/dist/src/components/Modal/index.d.ts +0 -8
- package/dist/src/components/Picker/Picker.d.ts +0 -23
- package/dist/src/components/Picker/constants.d.ts +0 -21
- package/dist/src/components/Picker/index.d.ts +0 -2
- package/dist/src/components/Popover/Popover.d.ts +0 -12
- package/dist/src/components/Progress/constants.d.ts +0 -4
- package/dist/src/components/PromoBanner/PromoBanner.d.ts +0 -13
- package/dist/src/components/Search/Search.d.ts +0 -12
- package/dist/src/components/Switch/Switch.d.ts +0 -17
- package/dist/src/components/Tag/Tag.d.ts +0 -14
- package/dist/src/components/Tag/index.d.ts +0 -1
- package/dist/src/components/TagInput/TagInput.d.ts +0 -13
- package/dist/src/components/Tooltip/helpers.d.ts +0 -2
- package/dist/src/components/UploadBar/UploadBar.d.ts +0 -16
- package/dist/src/utils/constants.d.ts +0 -1
- package/dist/src/vite-env.d.ts +0 -1
- package/dist/themes/dark.css +0 -236
- package/dist/themes/dark.css.map +0 -1
- package/dist/themes/legacy.css +0 -237
- package/dist/themes/legacy.css.map +0 -1
- package/dist/themes/light.css +0 -236
- package/dist/themes/light.css.map +0 -1
- /package/dist/{src/components → components}/Alert/index.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/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/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/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormField/index.d.ts +0 -0
- /package/dist/{src/components → components}/FormGroup/index.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/Modal → components/Modal/components}/ModalPortal.d.ts +0 -0
- /package/dist/{src/components → components}/NumericInput/index.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/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/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}/TagInput/EditableTag.d.ts +0 -0
- /package/dist/{src/components → components}/TagInput/EditableTagContent.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/Tooltip → components/Tooltip/components}/Simple.d.ts +0 -0
- /package/dist/{src/components/Tooltip → components/Tooltip/components/UserGuide}/virtualElementReference.d.ts +0 -0
- /package/dist/{src/components → components}/UploadBar/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
|
@@ -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;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
key: string;
|
|
4
|
-
name: string;
|
|
5
|
-
customElement?: {
|
|
6
|
-
listItemBody: React.ReactElement;
|
|
7
|
-
selectedItemBody: React.ReactElement;
|
|
8
|
-
};
|
|
9
|
-
groupHeader?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
}
|
|
2
|
+
import { IPickerListItem } from './types';
|
|
12
3
|
export interface IPickerListProps {
|
|
13
4
|
isOpen: boolean;
|
|
14
5
|
items: IPickerListItem[];
|
|
@@ -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 {};
|
|
@@ -9,7 +9,9 @@ export interface ITriggerProps {
|
|
|
9
9
|
isRequired?: boolean;
|
|
10
10
|
isMultiSelect?: boolean;
|
|
11
11
|
size?: Size;
|
|
12
|
+
hideClearButton?: boolean;
|
|
12
13
|
onTrigger: (e: React.MouseEvent | KeyboardEvent) => void;
|
|
13
14
|
onClear: () => void;
|
|
15
|
+
testId?: string;
|
|
14
16
|
}
|
|
15
|
-
export declare const Trigger: React.FC<ITriggerProps
|
|
17
|
+
export declare const Trigger: React.FC<React.PropsWithChildren<ITriggerProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { PickerType } from './
|
|
4
|
-
import { IconSize } from 'index';
|
|
2
|
+
import { Size } from 'utils';
|
|
3
|
+
import { PickerType, IPickerListItem } from './types';
|
|
5
4
|
export interface ITriggerBodyProps {
|
|
6
5
|
isOpen: boolean;
|
|
7
6
|
isSearchDisabled?: boolean;
|
|
@@ -9,7 +8,8 @@ export interface ITriggerBodyProps {
|
|
|
9
8
|
placeholder: string;
|
|
10
9
|
items?: IPickerListItem[] | null;
|
|
11
10
|
type: PickerType;
|
|
12
|
-
|
|
11
|
+
clearSearchAfterSelection?: boolean;
|
|
12
|
+
size?: Size;
|
|
13
13
|
onItemRemove: (item: IPickerListItem) => void;
|
|
14
14
|
onFilter: (text: string) => void;
|
|
15
15
|
}
|
|
@@ -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,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Placement, flip } from '@floating-ui/react-dom';
|
|
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
|
+
* Set popover visibility
|
|
19
|
+
*/
|
|
20
|
+
isVisible?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Set the popover placement to keep it in view
|
|
23
|
+
*/
|
|
24
|
+
flipOptions?: Parameters<typeof flip>[0];
|
|
25
|
+
/**
|
|
26
|
+
* Set `false` if the menu is not to be closed with a esc press
|
|
27
|
+
*/
|
|
28
|
+
closeOnEsc?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Trigger element
|
|
31
|
+
*/
|
|
32
|
+
triggerRenderer: () => React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Optional callback called after popover close
|
|
35
|
+
*/
|
|
36
|
+
onClose?: () => void;
|
|
37
|
+
}
|
|
38
|
+
export declare const Popover: React.FC<IPopoverProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IPopoverProps } from './Popover';
|
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, IPopoverProps & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Default: {
|
|
8
|
+
(args: IPopoverProps): React.ReactElement;
|
|
9
|
+
args: {
|
|
10
|
+
placement: string;
|
|
11
|
+
isVisible: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -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>>;
|
|
@@ -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
|
+
};
|
|
@@ -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>>;
|
|
@@ -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 future versions. 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,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 @@
|
|
|
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,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
|
+
};
|
|
@@ -1,17 +1,38 @@
|
|
|
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'>;
|
|
8
8
|
export interface SegmentedControlProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional className to be applied to the container node
|
|
11
|
+
*/
|
|
9
12
|
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Array of buttons
|
|
15
|
+
*/
|
|
10
16
|
buttons: ButtonElement[];
|
|
17
|
+
/**
|
|
18
|
+
* Set to make buttons fill the container if there is free space
|
|
19
|
+
*/
|
|
11
20
|
fullWidth?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Specify the buttons size
|
|
23
|
+
*/
|
|
12
24
|
size?: ButtonSize;
|
|
25
|
+
/**
|
|
26
|
+
* Id of initially selected button
|
|
27
|
+
*/
|
|
13
28
|
initialId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Id of current selected button
|
|
31
|
+
*/
|
|
14
32
|
currentId?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Handler for onClick on specific button
|
|
35
|
+
*/
|
|
15
36
|
onButtonClick?: (id: string, event: React.MouseEvent<HTMLElement>) => void;
|
|
16
37
|
}
|
|
17
38
|
export declare const SegmentedControl: React.FC<SegmentedControlProps>;
|
|
@@ -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;
|
|
@@ -1,15 +1,15 @@
|
|
|
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;
|
|
12
12
|
size?: Size;
|
|
13
13
|
};
|
|
14
|
-
export declare const Tab: React.FC<TabProps
|
|
14
|
+
export declare const Tab: React.FC<React.PropsWithChildren<TabProps>>;
|
|
15
15
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|