@innovaccer/design-system 2.6.0 → 2.7.0-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/.eslintrc.json +10 -9
- package/.github/workflows/chromatic.yml +5 -0
- package/.github/workflows/pull_request.yml +1 -1
- package/.storybook/main.js +4 -0
- package/.vscode/settings.json +11 -0
- package/CHANGELOG.md +36 -0
- package/CONTRIBUTING.md +7 -1
- package/core/accessibility/utils/useAccessibilityProps.ts +4 -2
- package/core/common.type.tsx +22 -0
- package/core/components/atoms/_chip/__tests__/__snapshots__/_chip.test.tsx.snap +9 -9
- package/core/components/atoms/_chip/index.tsx +17 -3
- package/core/components/atoms/avatar/Avatar.tsx +4 -14
- package/core/components/atoms/avatar/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/avatar/__tests__/Avatar.test.tsx +14 -9
- package/core/components/atoms/avatarGroup/AvatarGroup.tsx +3 -5
- package/core/components/atoms/badge/Badge.tsx +2 -12
- package/core/components/atoms/badge/__tests__/Badge.test.tsx +22 -7
- package/core/components/atoms/badge/_stories_/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/badge/_stories_/variants/Subtle.story.tsx +3 -2
- package/core/components/atoms/button/Button.tsx +10 -7
- package/core/components/atoms/button/__stories__/index.story.tsx +1 -1
- package/core/components/atoms/button/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/button/__stories__/variants/Expanded.story.tsx +2 -2
- package/core/components/atoms/button/__stories__/variants/icon/IconLeft.story.tsx +2 -2
- package/core/components/atoms/button/__stories__/variants/icon/IconRight.story.tsx +2 -2
- package/core/components/atoms/button/__tests__/Button.test.tsx +1 -1
- package/core/components/atoms/button/__tests__/__snapshots__/Button.test.tsx.snap +0 -137
- package/core/components/atoms/card/__stories__/empty.story.tsx +1 -1
- package/core/components/atoms/card/__stories__/nested.story.tsx +1 -1
- package/core/components/atoms/card/__stories__/scroll.story.tsx +1 -1
- package/core/components/atoms/checkbox/Checkbox.tsx +8 -9
- package/core/components/atoms/checkbox/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/chip/Chip.tsx +3 -2
- package/core/components/atoms/chip/__stories__/variants/Selection.story.tsx +17 -0
- package/core/components/atoms/chip/__stories__/variants/Type.story.tsx +2 -2
- package/core/components/atoms/chip/__tests__/Chip.test.tsx +7 -0
- package/core/components/atoms/chipGroup/__tests__/__snapshots__/chipGroup.test.tsx.snap +5 -5
- package/core/components/atoms/chipGroup/__tests__/chipGroup.test.tsx +2 -2
- package/core/components/atoms/chipGroup/_stories_/index.story.tsx +2 -2
- package/core/components/atoms/dropdown/Dropdown.tsx +18 -17
- package/core/components/atoms/dropdown/DropdownButton.tsx +2 -2
- package/core/components/atoms/dropdown/DropdownList.tsx +10 -5
- package/core/components/atoms/dropdown/Loading.tsx +1 -1
- package/core/components/atoms/dropdown/__stories__/CustomSearchPlaceholder.story.tsx +45 -0
- package/core/components/atoms/dropdown/__stories__/_common_/types.tsx +3 -0
- package/core/components/atoms/dropdown/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/dropdown/__stories__/variants/controlledDropdown/MultiSelect.story.tsx +1 -1
- package/core/components/atoms/dropdown/__tests__/Dropdown.test.tsx +12 -1
- package/core/components/atoms/dropdown/__tests__/Loading.test.tsx +0 -1
- package/core/components/atoms/dropdown/option/index.tsx +1 -1
- package/core/components/atoms/heading/Heading.tsx +4 -4
- package/core/components/atoms/heading/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/heading/__tests__/Heading.test.tsx +4 -3
- package/core/components/atoms/icon/Icon.tsx +3 -3
- package/core/components/atoms/input/Input.tsx +3 -3
- package/core/components/atoms/input/__stories__/InputWithCaption.story.tsx +62 -0
- package/core/components/atoms/input/__stories__/LabelPosition.story.tsx +38 -0
- package/core/components/atoms/input/__stories__/variants/controlledInput.story.tsx +46 -0
- package/core/components/atoms/input/__stories__/variants/types/BasicInput.story.tsx +2 -2
- package/core/components/atoms/input/__stories__/variants/types/IconLeft.story.tsx +2 -10
- package/core/components/atoms/input/__stories__/variants/types/WithLabel.story.tsx +1 -9
- package/core/components/atoms/label/Label.tsx +1 -1
- package/core/components/atoms/legend/Legend.tsx +2 -2
- package/core/components/atoms/legend/__stories__/variants/labelAppearance.story.tsx +2 -2
- package/core/components/atoms/link/Link.tsx +4 -4
- package/core/components/atoms/message/Message.tsx +12 -12
- package/core/components/atoms/message/__stories__/index.story.tsx +1 -1
- package/core/components/atoms/message/__stories__/variants/Appearance.story.tsx +1 -1
- package/core/components/atoms/message/__stories__/variants/AppearanceTitle.story.tsx +1 -1
- package/core/components/atoms/message/__tests__/Message.test.tsx +1 -6
- package/core/components/atoms/message/__tests__/__snapshots__/Message.test.tsx.snap +0 -45
- package/core/components/atoms/metaList/__tests__/MetaList.test.tsx +2 -2
- package/core/components/atoms/metricInput/MetricInput.tsx +5 -5
- package/core/components/atoms/multiSlider/SliderUtils.tsx +1 -4
- package/core/components/atoms/multiSlider/index.tsx +3 -4
- package/core/components/atoms/outsideClick/OutsideClick.tsx +1 -2
- package/core/components/atoms/paragraph/Paragraph.tsx +2 -2
- package/core/components/atoms/paragraph/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/paragraph/__tests__/Paragraph.test.tsx +2 -2
- package/core/components/atoms/pills/Pills.tsx +2 -12
- package/core/components/atoms/pills/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/pills/__stories__/variants/Subtle.story.tsx +3 -2
- package/core/components/atoms/pills/__tests__/Pills.test.tsx +3 -2
- package/core/components/atoms/placeholderImage/PlaceholderImage.tsx +2 -2
- package/core/components/atoms/placeholderImage/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/placeholderParagraph/PlaceholderParagraph.tsx +2 -2
- package/core/components/atoms/placeholderParagraph/__stories__/variants/Size.story.tsx +2 -2
- package/core/components/atoms/popperWrapper/PopperWrapper.tsx +2 -6
- package/core/components/atoms/progressRing/ProgressRing.tsx +2 -2
- package/core/components/atoms/progressRing/__stories__/variants/Size.story.tsx +1 -1
- package/core/components/atoms/radio/Radio.tsx +4 -5
- package/core/components/atoms/rangeSlider/RangeSlider.tsx +1 -2
- package/core/components/atoms/rangeSlider/__stories__/index.story.tsx +1 -2
- package/core/components/atoms/rangeSlider/__stories__/variants/Controlled.story.tsx +1 -2
- package/core/components/atoms/rangeSlider/__stories__/variants/CustomLabels.story.tsx +1 -2
- package/core/components/atoms/spinner/Spinner.tsx +4 -4
- package/core/components/atoms/spinner/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/spinner/__stories__/variants/Size.story.tsx +1 -1
- package/core/components/atoms/statusHint/StatusHint.tsx +2 -3
- package/core/components/atoms/statusHint/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/statusHint/__tests__/StatusHint.test.tsx +3 -2
- package/core/components/atoms/subheading/Subheading.tsx +2 -2
- package/core/components/atoms/subheading/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/subheading/__tests__/Subheading.test.tsx +3 -2
- package/core/components/atoms/switchInput/Switch.tsx +7 -8
- package/core/components/atoms/text/Text.tsx +4 -4
- package/core/components/atoms/text/__stories__/variants/Appearance.story.tsx +2 -2
- package/core/components/atoms/text/__tests__/Text.test.tsx +2 -3
- package/core/components/atoms/toast/ActionButton.tsx +2 -2
- package/core/components/atoms/toast/Toast.tsx +11 -6
- package/core/components/atoms/toast/__stories__/index.story.tsx +2 -6
- package/core/components/atoms/toast/__stories__/variants/Appearance.story.tsx +3 -2
- package/core/components/atoms/toast/__stories__/variants/ToastMessage.story.tsx +3 -2
- package/core/components/atoms/toast/__stories__/variants/ToastWithAction.story.tsx +3 -2
- package/core/components/atoms/toast/__tests__/Toast.test.tsx +1 -1
- package/core/components/atoms/toast/__tests__/__snapshots__/Toast.test.tsx.snap +0 -131
- package/core/components/css-utilities/Schema.tsx +1 -1
- package/core/components/css-utilities/Spacing/Schema.tsx +1 -1
- package/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap +2 -2
- package/core/components/molecules/dropzone/Dropzone.tsx +3 -3
- package/core/components/molecules/dropzone/DropzoneBase.tsx +22 -38
- package/core/components/molecules/dropzone/__stories__/index.story.tsx +151 -41
- package/core/components/molecules/dropzone/__tests__/Dropzone.test.tsx +2 -2
- package/core/components/molecules/dropzone/utils.tsx +6 -4
- package/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap +4 -4
- package/core/components/molecules/emptyState/EmptyState.tsx +4 -4
- package/core/components/molecules/emptyState/__stories__/pageNotLoadedWithSVG.story.tsx +26 -26
- package/core/components/molecules/fileList/FileListItem.tsx +1 -2
- package/core/components/molecules/fileUploader/FileUploaderItem.tsx +1 -2
- package/core/components/molecules/fileUploader/FileUploaderStatus.tsx +1 -1
- package/core/components/molecules/fileUploader/__stories__/_common_/types.tsx +3 -0
- package/core/components/molecules/fileUploader/__stories__/index.story.tsx +3 -222
- package/core/components/molecules/fullscreenModal/FullscreenModal.tsx +5 -7
- package/core/components/molecules/inputMask/InputMask.tsx +212 -146
- package/core/components/molecules/inputMask/__stories__/index.story.tsx +24 -0
- package/core/components/molecules/modal/Modal.tsx +4 -6
- package/core/components/molecules/modal/__stories__/Confirmation.story.tsx +1 -1
- package/core/components/molecules/placeholder/Placeholder.tsx +2 -2
- package/core/components/molecules/popover/Popover.tsx +2 -9
- package/core/components/molecules/sidesheet/Sidesheet.tsx +5 -7
- package/core/components/molecules/sidesheet/__stories__/variants/CustomHeader.story.tsx +172 -0
- package/core/components/molecules/tooltip/Tooltip.tsx +4 -4
- package/core/components/organisms/calendar/__stories__/variants/firstDayOfWeek.story.tsx +2 -2
- package/core/components/organisms/calendar/utility.ts +3 -3
- package/core/components/organisms/choiceList/ChoiceList.tsx +11 -11
- package/core/components/organisms/datePicker/DatePicker.tsx +1 -1
- package/core/components/organisms/datePicker/Trigger.tsx +1 -5
- package/core/components/organisms/dateRangePicker/DateRangePicker.tsx +9 -10
- package/core/components/organisms/dateRangePicker/SingleInputTrigger.tsx +0 -1
- package/core/components/organisms/dateRangePicker/Trigger.tsx +2 -2
- package/core/components/organisms/dateRangePicker/__stories__/variants/monthsInView.story.tsx +2 -2
- package/core/components/organisms/dateRangePicker/__tests__/__snapshots__/DateRangePicker.test.tsx.snap +16 -16
- package/core/components/organisms/grid/Cell.tsx +19 -19
- package/core/components/organisms/grid/Grid.tsx +3 -4
- package/core/components/organisms/grid/GridBody.tsx +0 -1
- package/core/components/organisms/grid/GridContext.ts +1 -1
- package/core/components/organisms/grid/__stories__/_common_/editableSchema.tsx +1 -3
- package/core/components/organisms/grid/__stories__/_common_/fetchData.ts +1 -1
- package/core/components/organisms/grid/__stories__/_common_/loaderSchema.ts +0 -2
- package/core/components/organisms/grid/__stories__/_common_/schema.tsx +1 -3
- package/core/components/organisms/grid/__stories__/_common_/simpleLoaderSchema.ts +0 -2
- package/core/components/organisms/grid/__stories__/_common_/statusSchema.ts +0 -2
- package/core/components/organisms/inlineMessage/InlineMessage.tsx +2 -2
- package/core/components/organisms/inlineMessage/__tests__/InlineMessage.test.tsx +3 -2
- package/core/components/organisms/list/__stories__/_common_/types.tsx +3 -0
- package/core/components/organisms/list/__stories__/index.story.tsx +0 -16
- package/core/components/organisms/table/Table.tsx +2 -2
- package/core/components/organisms/table/__stories__/CompressedTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/DataTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/NestedTableWithNestedCard.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/PinnedColumn.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/ResourceTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/StandardTable.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/TableAsOptionList.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/TightStory.story.tsx +1 -1
- package/core/components/organisms/table/__stories__/_common_/types.tsx +3 -0
- package/core/components/organisms/table/__stories__/variants/showHead.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/showMenu.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/size.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/type.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/withCheckbox.story.tsx +2 -2
- package/core/components/organisms/table/__stories__/variants/withPagination.story.tsx +2 -2
- package/core/components/organisms/timePicker/TimePicker.tsx +3 -7
- package/core/components/organisms/verticalNav/__stories__/schema.tsx +0 -2
- package/core/components/organisms/verticalNav/__tests__/VerticalNav.test.tsx +1 -2
- package/core/global.d.ts +9 -0
- package/core/index.tsx +1 -1
- package/core/utils/__tests__/__snapshots__/TS.test.tsx.snap +18 -5
- package/core/utils/docPage/generateImports.tsx +2 -3
- package/core/utils/docPage/index.tsx +30 -20
- package/core/utils/docPage/sandbox.tsx +14 -7
- package/core/utils/overlayHelper.ts +7 -3
- package/core/utils/testHelper.ts +1 -1
- package/core/utils/types.tsx +1 -1
- package/css/dist/index.css +48 -30
- package/css/dist/index.css.map +1 -1
- package/css/src/components/button.css +5 -5
- package/css/src/components/calendar.css +1 -1
- package/css/src/components/chip.css +6 -4
- package/css/src/components/fullscreenModal.css +4 -3
- package/css/src/components/message.css +0 -5
- package/css/src/components/switch.css +23 -2
- package/css/src/components/toast.css +0 -5
- package/css/src/variables/index.css +5 -2
- package/dist/core/accessibility/utils/useAccessibilityProps.d.ts +4 -1
- package/dist/core/common.type.d.ts +12 -0
- package/dist/core/components/atoms/avatar/Avatar.d.ts +4 -4
- package/dist/core/components/atoms/avatarGroup/AvatarGroup.d.ts +2 -3
- package/dist/core/components/atoms/badge/Badge.d.ts +2 -2
- package/dist/core/components/atoms/button/Button.d.ts +6 -6
- package/dist/core/components/atoms/checkbox/Checkbox.d.ts +3 -3
- package/dist/core/components/atoms/chip/Chip.d.ts +2 -2
- package/dist/core/components/atoms/dropdown/Dropdown.d.ts +18 -17
- package/dist/core/components/atoms/dropdown/DropdownButton.d.ts +2 -2
- package/dist/core/components/atoms/dropdown/DropdownList.d.ts +4 -3
- package/dist/core/components/atoms/dropdown/option/index.d.ts +1 -1
- package/dist/core/components/atoms/heading/Heading.d.ts +4 -4
- package/dist/core/components/atoms/icon/Icon.d.ts +2 -2
- package/dist/core/components/atoms/input/Input.d.ts +3 -3
- package/dist/core/components/atoms/legend/Legend.d.ts +2 -2
- package/dist/core/components/atoms/link/Link.d.ts +4 -4
- package/dist/core/components/atoms/message/Message.d.ts +2 -2
- package/dist/core/components/atoms/metricInput/MetricInput.d.ts +3 -3
- package/dist/core/components/atoms/multiSlider/SliderUtils.d.ts +1 -1
- package/dist/core/components/atoms/multiSlider/index.d.ts +3 -3
- package/dist/core/components/atoms/paragraph/Paragraph.d.ts +2 -2
- package/dist/core/components/atoms/pills/Pills.d.ts +2 -2
- package/dist/core/components/atoms/placeholderImage/PlaceholderImage.d.ts +2 -2
- package/dist/core/components/atoms/placeholderParagraph/PlaceholderParagraph.d.ts +2 -2
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +1 -2
- package/dist/core/components/atoms/progressRing/ProgressRing.d.ts +2 -2
- package/dist/core/components/atoms/radio/Radio.d.ts +4 -4
- package/dist/core/components/atoms/rangeSlider/RangeSlider.d.ts +1 -1
- package/dist/core/components/atoms/spinner/Spinner.d.ts +4 -4
- package/dist/core/components/atoms/statusHint/StatusHint.d.ts +2 -2
- package/dist/core/components/atoms/subheading/Subheading.d.ts +2 -2
- package/dist/core/components/atoms/switchInput/Switch.d.ts +6 -6
- package/dist/core/components/atoms/text/Text.d.ts +4 -4
- package/dist/core/components/atoms/toast/ActionButton.d.ts +2 -2
- package/dist/core/components/atoms/toast/Toast.d.ts +2 -2
- package/dist/core/components/molecules/dropzone/Dropzone.d.ts +3 -3
- package/dist/core/components/molecules/dropzone/DropzoneBase.d.ts +1 -1
- package/dist/core/components/molecules/dropzone/utils.d.ts +5 -3
- package/dist/core/components/molecules/emptyState/EmptyState.d.ts +4 -4
- package/dist/core/components/molecules/fileList/FileListItem.d.ts +1 -1
- package/dist/core/components/molecules/fileUploader/FileUploaderItem.d.ts +1 -1
- package/dist/core/components/molecules/fileUploader/FileUploaderStatus.d.ts +1 -1
- package/dist/core/components/molecules/fullscreenModal/FullscreenModal.d.ts +4 -7
- package/dist/core/components/molecules/inputMask/InputMask.d.ts +10 -2
- package/dist/core/components/molecules/modal/Modal.d.ts +3 -6
- package/dist/core/components/molecules/placeholder/Placeholder.d.ts +2 -2
- package/dist/core/components/molecules/popover/Popover.d.ts +0 -1
- package/dist/core/components/molecules/sidesheet/Sidesheet.d.ts +3 -6
- package/dist/core/components/molecules/tooltip/Tooltip.d.ts +3 -3
- package/dist/core/components/organisms/choiceList/ChoiceList.d.ts +5 -6
- package/dist/core/components/organisms/dateRangePicker/DateRangePicker.d.ts +24 -0
- package/dist/core/components/organisms/grid/Cell.d.ts +1 -1
- package/dist/core/components/organisms/grid/Grid.d.ts +3 -3
- package/dist/core/components/organisms/grid/GridContext.d.ts +1 -1
- package/dist/core/components/organisms/inlineMessage/InlineMessage.d.ts +2 -2
- package/dist/core/components/organisms/table/Table.d.ts +2 -2
- package/dist/core/components/patterns/dateRangePicker/withCustomPopover.story.d.ts +5 -1
- package/dist/core/utils/docPage/generateImports.d.ts +1 -1
- package/dist/core/utils/overlayHelper.d.ts +1 -1
- package/dist/core/utils/types.d.ts +1 -1
- package/dist/index.esm.js +221 -245
- package/dist/index.js +225 -233
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/dts.config.js +11 -2
- package/package.json +20 -18
- package/tsconfig.json +3 -16
- package/tsconfig.type.json +2 -1
- package/types/index.d.ts +2217 -0
- package/types/{innovaccer-design-system/tsconfig.json → tsconfig.json} +1 -1
- package/types/{innovaccer-design-system/tslint.json → tslint.json} +0 -0
- package/types/types-tests.tsx +936 -0
- package/core/components/atoms/button/__stories__/variants/state/Success.story.tsx +0 -89
- package/core/components/atoms/message/__stories__/default.story.tsx +0 -16
- package/core/components/atoms/toast/__stories__/DefaultToast.story.tsx +0 -16
- package/core/components/molecules/dropzone/__stories__/variants/DropzoneWithFileList.story.tsx +0 -176
- package/core/components/molecules/fileUploader/__stories__/variants/FileUploaderList.story.tsx +0 -80
- package/types/innovaccer-design-system/index.d.ts +0 -39
- package/types/innovaccer-design-system/innovaccer-design-system-tests.ts +0 -0
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,2217 @@
|
|
|
1
|
+
// Type definitions for types x.x
|
|
2
|
+
// Project: https://github.com/baz/foo (Does not have to be to GitHub, but prefer linking to a source code repository rather than to a project website.)
|
|
3
|
+
// Definitions by: SaniyaGupta <https://github.com/me>
|
|
4
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
|
|
6
|
+
/// <reference types="jest" />
|
|
7
|
+
/// <reference types="node" />
|
|
8
|
+
/// <reference types="prop-types" />
|
|
9
|
+
/// <reference types="scheduler" />
|
|
10
|
+
/// <reference types="throttle-debounce" />
|
|
11
|
+
/// <reference types="webpack-env" />
|
|
12
|
+
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
|
|
15
|
+
export declare type SingleOrArray<T> = T | T[];
|
|
16
|
+
export declare type MakeOptional<T extends {}, K extends keyof any> = Omit<T, K> & {
|
|
17
|
+
[OK in keyof T & K]?: T[OK];
|
|
18
|
+
};
|
|
19
|
+
export declare type ValidatorFn<K extends any[] = any[]> = (...values: K) => boolean;
|
|
20
|
+
export declare type Validators = SingleOrArray<ValidatorFn>;
|
|
21
|
+
export declare type Mask = (string | RegExp)[];
|
|
22
|
+
export declare type BaseProps = {
|
|
23
|
+
className?: string;
|
|
24
|
+
"data-test"?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare type BaseHtmlProps<T> = Omit<React.HTMLProps<T>, "ref" | "size" | "className">;
|
|
27
|
+
export declare type OmitNativeProps<T, K extends keyof any> = Omit<BaseHtmlProps<T>, K>;
|
|
28
|
+
export interface OverlayFooterProps extends BaseProps {
|
|
29
|
+
open?: boolean;
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
actions?: ButtonProps[];
|
|
32
|
+
}
|
|
33
|
+
export declare type AccentAppearance = "primary" | "secondary" | "alert" | "warning" | "success" | "accent1" | "accent2" | "accent3" | "accent4";
|
|
34
|
+
export declare type HeadingAppearance = "default" | "subtle" | "disabled" | "white";
|
|
35
|
+
export declare type MessageAppearance = "default" | "alert" | "info" | "success" | "warning";
|
|
36
|
+
export declare type FileStatus = "uploading" | "completed" | "error";
|
|
37
|
+
export declare type FooterOptions = {
|
|
38
|
+
actions: OverlayFooterProps["actions"];
|
|
39
|
+
};
|
|
40
|
+
export declare type AutoComplete = "on" | "off";
|
|
41
|
+
export declare type NumberRange = [number, number];
|
|
42
|
+
export declare type ChangeEvent = React.ChangeEvent<HTMLInputElement>;
|
|
43
|
+
export declare type AvatarSize = "regular" | "tiny";
|
|
44
|
+
export interface AvatarProps extends BaseProps {
|
|
45
|
+
appearance?: AccentAppearance;
|
|
46
|
+
children?: string;
|
|
47
|
+
firstName?: string;
|
|
48
|
+
lastName?: string;
|
|
49
|
+
withTooltip: boolean;
|
|
50
|
+
tooltipPosition: TooltipProps["position"];
|
|
51
|
+
size: AvatarSize;
|
|
52
|
+
}
|
|
53
|
+
export declare const Avatar: {
|
|
54
|
+
(props: AvatarProps): JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
defaultProps: {
|
|
57
|
+
tooltipPosition: string;
|
|
58
|
+
withTooltip: boolean;
|
|
59
|
+
size: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export interface AvatarData extends Record<string, any> {
|
|
63
|
+
firstName?: string;
|
|
64
|
+
lastName?: string;
|
|
65
|
+
appearance?: AvatarProps["appearance"];
|
|
66
|
+
}
|
|
67
|
+
export interface AvatarPopperProps {
|
|
68
|
+
popperRenderer?: (names: AvatarData[]) => JSX.Element;
|
|
69
|
+
appendToBody?: PopoverProps["appendToBody"];
|
|
70
|
+
dark?: PopoverProps["dark"];
|
|
71
|
+
position?: PopoverProps["position"];
|
|
72
|
+
on?: PopoverProps["on"];
|
|
73
|
+
maxHeight?: number;
|
|
74
|
+
popperClassName?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface AvatarGroupProps extends BaseProps {
|
|
77
|
+
list: AvatarData[];
|
|
78
|
+
max: number;
|
|
79
|
+
borderColor: string;
|
|
80
|
+
popoverOptions: AvatarPopperProps;
|
|
81
|
+
tooltipPosition: PopoverProps["position"];
|
|
82
|
+
}
|
|
83
|
+
export declare const AvatarGroup: {
|
|
84
|
+
(props: AvatarGroupProps): JSX.Element;
|
|
85
|
+
displayName: string;
|
|
86
|
+
defaultProps: {
|
|
87
|
+
max: number;
|
|
88
|
+
borderColor: string;
|
|
89
|
+
tooltipPosition: string;
|
|
90
|
+
popoverOptions: {};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export interface BackdropProps extends BaseProps {
|
|
94
|
+
open: boolean;
|
|
95
|
+
zIndex?: number;
|
|
96
|
+
}
|
|
97
|
+
export declare const Backdrop: React.FC<BackdropProps>;
|
|
98
|
+
export interface BadgeProps extends BaseProps {
|
|
99
|
+
appearance: AccentAppearance;
|
|
100
|
+
subtle?: boolean;
|
|
101
|
+
children: React.ReactText;
|
|
102
|
+
}
|
|
103
|
+
export declare const Badge: {
|
|
104
|
+
(props: BadgeProps): JSX.Element;
|
|
105
|
+
displayName: string;
|
|
106
|
+
defaultProps: {
|
|
107
|
+
appearance: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
export interface Breadcrumb {
|
|
111
|
+
label: string;
|
|
112
|
+
link: string;
|
|
113
|
+
}
|
|
114
|
+
export interface BreadcrumbsProps extends BaseProps {
|
|
115
|
+
list: Breadcrumb[];
|
|
116
|
+
onClick?: (link: string) => void;
|
|
117
|
+
}
|
|
118
|
+
export declare const Breadcrumbs: (props: BreadcrumbsProps) => JSX.Element;
|
|
119
|
+
export declare type ButtonType = "button" | "submit" | "reset";
|
|
120
|
+
export declare type ButtonAppearance = "basic" | "primary" | "success" | "alert" | "transparent";
|
|
121
|
+
export declare type ButtonSize = "tiny" | "regular" | "large";
|
|
122
|
+
export declare type ButtonAlignment = "left" | "right";
|
|
123
|
+
export interface ButtonProps extends BaseProps, BaseHtmlProps<HTMLButtonElement> {
|
|
124
|
+
type?: ButtonType;
|
|
125
|
+
size?: ButtonSize;
|
|
126
|
+
appearance?: ButtonAppearance;
|
|
127
|
+
disabled?: boolean;
|
|
128
|
+
expanded?: boolean;
|
|
129
|
+
selected?: boolean;
|
|
130
|
+
loading?: boolean;
|
|
131
|
+
icon?: string;
|
|
132
|
+
tooltip?: string;
|
|
133
|
+
iconAlign?: ButtonAlignment;
|
|
134
|
+
largeIcon?: boolean;
|
|
135
|
+
children?: React.ReactText;
|
|
136
|
+
tabIndex?: number;
|
|
137
|
+
autoFocus?: boolean;
|
|
138
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
139
|
+
onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
140
|
+
onMouseLeave?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
141
|
+
}
|
|
142
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
143
|
+
export declare type Size = "small" | "large";
|
|
144
|
+
export declare type View = "date" | "month" | "year";
|
|
145
|
+
export declare type Day = "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
|
|
146
|
+
export declare type DateFormat = "mm/dd/yyyy" | "dd/mm/yyyy" | "yyyy/mm/dd" | "mm-dd-yyyy" | "dd-mm-yyyy" | "yyyy-mm-dd";
|
|
147
|
+
export declare type DateType = number | Date | string;
|
|
148
|
+
export declare type Events = {
|
|
149
|
+
[key: string]: boolean;
|
|
150
|
+
};
|
|
151
|
+
export declare type OnHover = React.MouseEvent<HTMLSpanElement> | React.MouseEvent<HTMLDivElement>;
|
|
152
|
+
export interface hoveredDateProps {
|
|
153
|
+
value: number;
|
|
154
|
+
isToday: boolean;
|
|
155
|
+
isDisabled: boolean;
|
|
156
|
+
todayDate?: Date;
|
|
157
|
+
fullDate: Date;
|
|
158
|
+
date: number;
|
|
159
|
+
month: string;
|
|
160
|
+
year: number;
|
|
161
|
+
dayName: string;
|
|
162
|
+
}
|
|
163
|
+
export interface hoveredMonthProps {
|
|
164
|
+
value: string;
|
|
165
|
+
month: string;
|
|
166
|
+
year?: number;
|
|
167
|
+
isCurrentMonth: boolean;
|
|
168
|
+
isDisabled: boolean;
|
|
169
|
+
}
|
|
170
|
+
export interface hoveredYearProps {
|
|
171
|
+
value: number;
|
|
172
|
+
year: number;
|
|
173
|
+
isCurrentYear: boolean;
|
|
174
|
+
isDisabled: boolean;
|
|
175
|
+
}
|
|
176
|
+
export interface SharedProps extends BaseProps {
|
|
177
|
+
size: Size;
|
|
178
|
+
monthsInView: number;
|
|
179
|
+
jumpView?: boolean;
|
|
180
|
+
firstDayOfWeek: Day;
|
|
181
|
+
view: View;
|
|
182
|
+
disabledBefore?: Date;
|
|
183
|
+
disabledAfter?: Date;
|
|
184
|
+
yearNav?: number;
|
|
185
|
+
monthNav?: number;
|
|
186
|
+
}
|
|
187
|
+
export declare type CalendarProps = {
|
|
188
|
+
onDateChange?: (date: Date) => void;
|
|
189
|
+
onRangeChange?: (startDate: Date | undefined, endDate: Date | undefined) => void;
|
|
190
|
+
onDateHover?: (dateData: hoveredDateProps, evnt: OnHover) => void;
|
|
191
|
+
onMonthHover?: (monthData: hoveredMonthProps, evnt: OnHover) => void;
|
|
192
|
+
onYearHover?: (yearData: hoveredYearProps, evnt: OnHover) => void;
|
|
193
|
+
date?: Date;
|
|
194
|
+
rangePicker?: boolean;
|
|
195
|
+
startDate?: Date;
|
|
196
|
+
endDate?: Date;
|
|
197
|
+
rangeLimit?: number;
|
|
198
|
+
events?: Events;
|
|
199
|
+
} & SharedProps;
|
|
200
|
+
export interface CalendarState {
|
|
201
|
+
view: View;
|
|
202
|
+
year?: number;
|
|
203
|
+
month?: number;
|
|
204
|
+
date?: number;
|
|
205
|
+
currDate?: Date;
|
|
206
|
+
hoverDate?: Date;
|
|
207
|
+
startDate?: Date;
|
|
208
|
+
endDate?: Date;
|
|
209
|
+
yearBlockNav: number;
|
|
210
|
+
yearNav: number;
|
|
211
|
+
monthNav: number;
|
|
212
|
+
todayDate: number;
|
|
213
|
+
currMonth: number;
|
|
214
|
+
currYear: number;
|
|
215
|
+
}
|
|
216
|
+
export declare class Calendar extends React.Component<CalendarProps, CalendarState> {
|
|
217
|
+
static defaultProps: {
|
|
218
|
+
size: string;
|
|
219
|
+
monthsInView: number;
|
|
220
|
+
view: string;
|
|
221
|
+
firstDayOfWeek: string;
|
|
222
|
+
jumpView: boolean;
|
|
223
|
+
};
|
|
224
|
+
constructor(props: CalendarProps);
|
|
225
|
+
componentDidUpdate(prevProps: CalendarProps, prevState: CalendarState): void;
|
|
226
|
+
updateState: (year: number, month?: number | undefined, date?: number | undefined) => void;
|
|
227
|
+
getDateValue: (year: number, month: number, date: number) => Date | undefined;
|
|
228
|
+
getNavDateInfo: (index: number) => Record<string, any>;
|
|
229
|
+
getInRangeError: () => boolean;
|
|
230
|
+
selectYear: (year: number) => () => void;
|
|
231
|
+
yearMouseOverHandler: (year: number, isCurrentYear: boolean, isDisabled: boolean, ev: React.MouseEvent<HTMLDivElement>) => void;
|
|
232
|
+
selectMonth: (month: number) => () => void;
|
|
233
|
+
monthMouseOverHandler: (month: number, isCurrentMonth: boolean, isDisabled: boolean, ev: React.MouseEvent<HTMLDivElement>) => void;
|
|
234
|
+
selectDate: (index: number, date: number, prevMonthDayRange: number, dayRange: number) => void;
|
|
235
|
+
calculateDate: (index: number, date: number, prevMonthDayRange: number, dayRange: number, isDateHovered: boolean) => Date | undefined;
|
|
236
|
+
onNavIconClickHandler: (type: string) => () => void;
|
|
237
|
+
renderJumpButton: (type: string) => JSX.Element;
|
|
238
|
+
onNavHeadingClickHandler: (currView: View) => () => void;
|
|
239
|
+
renderHeaderContent: (index: number) => JSX.Element;
|
|
240
|
+
renderBodyYear: () => JSX.Element[];
|
|
241
|
+
renderBodyMonth: () => JSX.Element[];
|
|
242
|
+
onDateRowMouseLeaveHandler: () => void;
|
|
243
|
+
renderBodyDate: (index: number) => JSX.Element;
|
|
244
|
+
renderEventsIndicator(size: string, active: boolean): JSX.Element;
|
|
245
|
+
renderDateValues: (index: number) => JSX.Element[];
|
|
246
|
+
renderCalendar: (index: number) => JSX.Element;
|
|
247
|
+
render(): JSX.Element;
|
|
248
|
+
}
|
|
249
|
+
export declare type Shadow = "none" | "default" | "light" | "medium" | "dark";
|
|
250
|
+
export interface CardProps extends BaseProps, BaseHtmlProps<HTMLDivElement> {
|
|
251
|
+
shadow?: Shadow;
|
|
252
|
+
}
|
|
253
|
+
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
254
|
+
export declare type Border = "top" | "left" | "right" | "bottom";
|
|
255
|
+
export interface CardSubduedProps extends BaseProps, BaseHtmlProps<HTMLDivElement> {
|
|
256
|
+
border?: Border;
|
|
257
|
+
}
|
|
258
|
+
export declare const CardSubdued: React.ForwardRefExoticComponent<CardSubduedProps & React.RefAttributes<HTMLDivElement>>;
|
|
259
|
+
export interface CardHeaderProps extends BaseProps {
|
|
260
|
+
children: React.ReactNode;
|
|
261
|
+
}
|
|
262
|
+
export declare const CardHeader: {
|
|
263
|
+
(props: CardHeaderProps): JSX.Element;
|
|
264
|
+
displayName: string;
|
|
265
|
+
};
|
|
266
|
+
export interface CardBodyProps extends BaseProps {
|
|
267
|
+
children: React.ReactNode;
|
|
268
|
+
}
|
|
269
|
+
export declare const CardBody: {
|
|
270
|
+
(props: CardBodyProps): JSX.Element;
|
|
271
|
+
displayName: string;
|
|
272
|
+
};
|
|
273
|
+
export interface CardFooterProps extends BaseProps {
|
|
274
|
+
children: React.ReactNode;
|
|
275
|
+
withSeperator: boolean;
|
|
276
|
+
}
|
|
277
|
+
export declare const CardFooter: {
|
|
278
|
+
(props: CardFooterProps): JSX.Element;
|
|
279
|
+
displayName: string;
|
|
280
|
+
defaultProps: {
|
|
281
|
+
withSeperator: boolean;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
export declare type ChipType = "action" | "selection" | "input";
|
|
285
|
+
export declare type Name = number | string;
|
|
286
|
+
export interface ChipProps extends BaseProps {
|
|
287
|
+
label: string;
|
|
288
|
+
icon?: string;
|
|
289
|
+
clearButton?: boolean;
|
|
290
|
+
disabled?: boolean;
|
|
291
|
+
selected?: boolean;
|
|
292
|
+
type: ChipType;
|
|
293
|
+
onClose?: (name: Name) => void;
|
|
294
|
+
onClick?: (name: Name) => void;
|
|
295
|
+
name: Name;
|
|
296
|
+
}
|
|
297
|
+
export declare const Chip: {
|
|
298
|
+
(props: ChipProps): JSX.Element;
|
|
299
|
+
displayName: string;
|
|
300
|
+
defaultProps: {
|
|
301
|
+
type: string;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
export interface ChipGroupProps extends BaseProps {
|
|
305
|
+
onClose?: (item: ChipProps) => void;
|
|
306
|
+
onClick?: (item: ChipProps) => void;
|
|
307
|
+
list: ChipProps[];
|
|
308
|
+
}
|
|
309
|
+
export declare const ChipGroup: {
|
|
310
|
+
(props: ChipGroupProps): JSX.Element;
|
|
311
|
+
displayName: string;
|
|
312
|
+
};
|
|
313
|
+
export declare type CheckBoxSize = "regular" | "tiny";
|
|
314
|
+
export interface CheckboxProps extends BaseProps, OmitNativeProps<HTMLInputElement, "onChange"> {
|
|
315
|
+
size?: CheckBoxSize;
|
|
316
|
+
defaultChecked?: boolean;
|
|
317
|
+
checked?: boolean;
|
|
318
|
+
indeterminate?: boolean;
|
|
319
|
+
disabled?: boolean;
|
|
320
|
+
label?: string;
|
|
321
|
+
helpText?: string;
|
|
322
|
+
name?: string;
|
|
323
|
+
value?: string | number;
|
|
324
|
+
tabIndex?: number;
|
|
325
|
+
onChange?: (event: ChangeEvent) => void;
|
|
326
|
+
}
|
|
327
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
328
|
+
export declare type Columns = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "auto" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
329
|
+
export interface ColumnProps extends BaseProps, BaseHtmlProps<HTMLDivElement> {
|
|
330
|
+
size?: Columns;
|
|
331
|
+
sizeXS?: Columns;
|
|
332
|
+
sizeS?: Columns;
|
|
333
|
+
sizeM?: Columns;
|
|
334
|
+
sizeL?: Columns;
|
|
335
|
+
sizeXL?: Columns;
|
|
336
|
+
}
|
|
337
|
+
export declare const Column: React.ForwardRefExoticComponent<ColumnProps & React.RefAttributes<HTMLDivElement>>;
|
|
338
|
+
export declare type DatePickerProps = SharedProps & {
|
|
339
|
+
onDateChange?: (date: Date | undefined, dateVal?: string) => void;
|
|
340
|
+
date?: DateType;
|
|
341
|
+
withInput?: boolean;
|
|
342
|
+
open?: boolean;
|
|
343
|
+
position: PopoverProps["position"];
|
|
344
|
+
inputFormat: DateFormat;
|
|
345
|
+
outputFormat: DateFormat;
|
|
346
|
+
inputOptions: Omit<InputMaskProps, "mask" | "value" | "onChange" | "onBlur" | "onClear">;
|
|
347
|
+
validators: Validators;
|
|
348
|
+
closeOnSelect: boolean;
|
|
349
|
+
};
|
|
350
|
+
export interface DatePickerState {
|
|
351
|
+
init: boolean;
|
|
352
|
+
date?: Date;
|
|
353
|
+
error: boolean;
|
|
354
|
+
open: boolean;
|
|
355
|
+
}
|
|
356
|
+
export declare class DatePicker extends React.Component<DatePickerProps, DatePickerState> {
|
|
357
|
+
static defaultProps: {
|
|
358
|
+
position: string;
|
|
359
|
+
inputFormat: string;
|
|
360
|
+
outputFormat: string;
|
|
361
|
+
validators: ((val: string, format: string) => boolean)[];
|
|
362
|
+
inputOptions: {};
|
|
363
|
+
closeOnSelect: boolean;
|
|
364
|
+
size: string;
|
|
365
|
+
monthsInView: number;
|
|
366
|
+
view: string;
|
|
367
|
+
firstDayOfWeek: string;
|
|
368
|
+
jumpView: boolean;
|
|
369
|
+
};
|
|
370
|
+
constructor(props: DatePickerProps);
|
|
371
|
+
componentDidUpdate(prevProps: DatePickerProps, prevState: DatePickerState): void;
|
|
372
|
+
getError: (date?: Date | undefined) => boolean;
|
|
373
|
+
onDateChangeHandler: (d?: Date | undefined) => void;
|
|
374
|
+
onToggleHandler: (o: boolean, type?: string | undefined) => void;
|
|
375
|
+
renderCalendar(): JSX.Element;
|
|
376
|
+
render(): JSX.Element;
|
|
377
|
+
}
|
|
378
|
+
export declare type TimeFormat = "hh:mm AM" | "hh:mm";
|
|
379
|
+
export declare type TimeType = number | string;
|
|
380
|
+
export interface TimePickerProps {
|
|
381
|
+
time?: TimeType;
|
|
382
|
+
inputOptions: Omit<InputMaskProps, "mask" | "value" | "validators">;
|
|
383
|
+
inputFormat: TimeFormat;
|
|
384
|
+
outputFormat: TimeFormat;
|
|
385
|
+
validators: Validators;
|
|
386
|
+
onTimeChange?: (timeVal?: string) => void;
|
|
387
|
+
}
|
|
388
|
+
export declare const TimePicker: {
|
|
389
|
+
(props: TimePickerProps): JSX.Element;
|
|
390
|
+
defaultProps: {
|
|
391
|
+
inputFormat: string;
|
|
392
|
+
outputFormat: string;
|
|
393
|
+
inputOptions: {};
|
|
394
|
+
validators: ((val: string, format: string) => boolean)[];
|
|
395
|
+
};
|
|
396
|
+
displayName: string;
|
|
397
|
+
};
|
|
398
|
+
export declare type DropDownButtonSize = "tiny" | "regular";
|
|
399
|
+
export interface TriggerProps {
|
|
400
|
+
triggerSize?: DropDownButtonSize;
|
|
401
|
+
icon?: string;
|
|
402
|
+
placeholder?: string;
|
|
403
|
+
inlineLabel?: string;
|
|
404
|
+
disabled?: boolean;
|
|
405
|
+
menu?: boolean;
|
|
406
|
+
error?: boolean;
|
|
407
|
+
}
|
|
408
|
+
export interface OptionRendererProps {
|
|
409
|
+
optionRenderer?: (props: OptionProps) => React.ReactElement;
|
|
410
|
+
optionType?: OptionType;
|
|
411
|
+
}
|
|
412
|
+
export interface OptionSchema extends Record<string, any> {
|
|
413
|
+
label: string;
|
|
414
|
+
value: React.ReactText;
|
|
415
|
+
icon?: string;
|
|
416
|
+
subInfo?: string | MetaListProps;
|
|
417
|
+
optionType?: OptionType;
|
|
418
|
+
selected?: boolean;
|
|
419
|
+
disabled?: boolean;
|
|
420
|
+
group?: string;
|
|
421
|
+
}
|
|
422
|
+
export interface OptionProps extends OptionRendererProps {
|
|
423
|
+
optionData: OptionSchema;
|
|
424
|
+
selected: boolean;
|
|
425
|
+
truncateOption?: boolean;
|
|
426
|
+
checkboxes?: boolean;
|
|
427
|
+
index: number;
|
|
428
|
+
active?: boolean;
|
|
429
|
+
menu?: boolean;
|
|
430
|
+
onClick?: () => void;
|
|
431
|
+
onChange?: (event: ChangeEvent) => void;
|
|
432
|
+
updateActiveOption?: (index: number) => void;
|
|
433
|
+
}
|
|
434
|
+
export declare type DropdownAlign = "left" | "right";
|
|
435
|
+
export declare type OptionType = "DEFAULT" | "WITH_ICON" | "WITH_META" | "ICON_WITH_META";
|
|
436
|
+
export interface Selected {
|
|
437
|
+
label: OptionSchema["label"];
|
|
438
|
+
value: OptionSchema["value"];
|
|
439
|
+
}
|
|
440
|
+
export interface SelectAll {
|
|
441
|
+
indeterminate: boolean;
|
|
442
|
+
checked: boolean;
|
|
443
|
+
}
|
|
444
|
+
export interface PopoverOptions {
|
|
445
|
+
appendToBody?: PopoverProps["appendToBody"];
|
|
446
|
+
hideOnReferenceEscape?: PopoverProps["hideOnReferenceEscape"];
|
|
447
|
+
boundaryElement?: PopoverProps["boundaryElement"];
|
|
448
|
+
}
|
|
449
|
+
export declare type TriggerAndOptionProps = TriggerProps & OptionRendererProps;
|
|
450
|
+
export interface DropdownListProps extends TriggerAndOptionProps {
|
|
451
|
+
align?: DropdownAlign;
|
|
452
|
+
noResultMessage?: string;
|
|
453
|
+
selectAllLabel?: string;
|
|
454
|
+
footerLabel?: string;
|
|
455
|
+
selectedSectionLabel?: string;
|
|
456
|
+
applyButtonLabel?: string;
|
|
457
|
+
cancelButtonLabel?: string;
|
|
458
|
+
withSearch?: boolean;
|
|
459
|
+
withCheckbox?: boolean;
|
|
460
|
+
withSelectAll?: boolean;
|
|
461
|
+
showApplyButton?: boolean;
|
|
462
|
+
truncateOption?: boolean;
|
|
463
|
+
totalOptions?: number;
|
|
464
|
+
maxHeight?: number;
|
|
465
|
+
width?: number;
|
|
466
|
+
maxWidth?: number;
|
|
467
|
+
minWidth?: number;
|
|
468
|
+
loadersCount?: number;
|
|
469
|
+
popoverOptions?: PopoverOptions;
|
|
470
|
+
}
|
|
471
|
+
export declare type fetchOptionsFunction = (searchTerm: string) => Promise<{
|
|
472
|
+
searchTerm?: string;
|
|
473
|
+
count: number;
|
|
474
|
+
options: OptionSchema[];
|
|
475
|
+
}>;
|
|
476
|
+
export declare type EventType = "select-option" | "deselect-option" | "select-all" | "deselect-all" | "clear-all" | "apply-selected" | "cancel-selected";
|
|
477
|
+
export interface ControlledProps {
|
|
478
|
+
selected?: OptionSchema[];
|
|
479
|
+
onUpdate?: (type: EventType, options?: OptionSchema | OptionSchema[], recentSelected?: OptionSchema[]) => void;
|
|
480
|
+
}
|
|
481
|
+
export interface SyncProps {
|
|
482
|
+
options: OptionSchema[];
|
|
483
|
+
loading?: boolean;
|
|
484
|
+
}
|
|
485
|
+
export interface AsyncProps {
|
|
486
|
+
fetchOptions?: fetchOptionsFunction;
|
|
487
|
+
}
|
|
488
|
+
export interface TriggerProps {
|
|
489
|
+
labelLimit?: number;
|
|
490
|
+
customLabel?: (selected: number, totalOptions?: number, selectedOptions?: OptionSchema[]) => string;
|
|
491
|
+
customTrigger?: (label: string) => React.ReactElement;
|
|
492
|
+
}
|
|
493
|
+
export interface SharedDropdownProps extends DropdownListProps, BaseProps {
|
|
494
|
+
name?: string | number;
|
|
495
|
+
totalOptions?: number;
|
|
496
|
+
closeOnSelect: boolean;
|
|
497
|
+
triggerOptions: TriggerProps;
|
|
498
|
+
open?: boolean;
|
|
499
|
+
staticLimit: number;
|
|
500
|
+
searchDebounceDuration: number;
|
|
501
|
+
onPopperToggle?: (open: boolean, type?: string) => void;
|
|
502
|
+
getLabel?: (label: string) => void;
|
|
503
|
+
onChange?: (selected: any[] | any, name?: string | number) => void;
|
|
504
|
+
onClose?: (selected: any[], name?: string | number) => void;
|
|
505
|
+
}
|
|
506
|
+
export declare type SyncDropdownProps = SyncProps & SharedDropdownProps;
|
|
507
|
+
export declare type AsyncDropdownProps = AsyncProps & SharedDropdownProps;
|
|
508
|
+
export declare type UncontrolledDropdownProps = SyncDropdownProps & AsyncDropdownProps;
|
|
509
|
+
export declare type ControlledDropdownProps = ControlledProps & SyncDropdownProps & AsyncDropdownProps;
|
|
510
|
+
export declare type DropdownProps = ControlledDropdownProps & UncontrolledDropdownProps;
|
|
511
|
+
export interface DropdownState {
|
|
512
|
+
async: boolean;
|
|
513
|
+
searchInit: boolean;
|
|
514
|
+
options: OptionSchema[];
|
|
515
|
+
loading?: boolean;
|
|
516
|
+
optionsApplied: boolean;
|
|
517
|
+
open?: boolean;
|
|
518
|
+
searchTerm: string;
|
|
519
|
+
optionsLength: number;
|
|
520
|
+
searchedOptionsLength: number;
|
|
521
|
+
triggerLabel: string;
|
|
522
|
+
selectAll: SelectAll;
|
|
523
|
+
selected: OptionSchema[];
|
|
524
|
+
tempSelected: OptionSchema[];
|
|
525
|
+
previousSelected: OptionSchema[];
|
|
526
|
+
}
|
|
527
|
+
export declare class Dropdown extends React.Component<DropdownProps, DropdownState> {
|
|
528
|
+
staticLimit: number;
|
|
529
|
+
static defaultProps: {
|
|
530
|
+
triggerOptions: {};
|
|
531
|
+
options: never[];
|
|
532
|
+
closeOnSelect: boolean;
|
|
533
|
+
staticLimit: number;
|
|
534
|
+
searchDebounceDuration: number;
|
|
535
|
+
};
|
|
536
|
+
constructor(props: DropdownProps);
|
|
537
|
+
componentDidMount(): void;
|
|
538
|
+
componentDidUpdate(prevProps: DropdownProps, prevState: DropdownState): void;
|
|
539
|
+
getDisabledOptions: (options?: OptionSchema[]) => OptionSchema[];
|
|
540
|
+
fetchOptionsFunction: (searchTerm: string) => Promise<any>;
|
|
541
|
+
getUnSelectedOptions: (options: OptionSchema[], init: boolean) => OptionSchema[];
|
|
542
|
+
getSelectedOptions: (options: OptionSchema[], init: boolean) => OptionSchema[];
|
|
543
|
+
updateOptions: (init: boolean, async?: boolean | undefined) => void;
|
|
544
|
+
updateSearchTerm: (search: string) => void;
|
|
545
|
+
updateOnPopperToggle: () => void;
|
|
546
|
+
updateTriggerLabel: (selectedArray?: Selected[], totalOptions?: number | undefined) => string;
|
|
547
|
+
updateSelectedOptions: (selectedArray: OptionSchema[], isSingleSelect: boolean, isControlled?: boolean | undefined) => void;
|
|
548
|
+
onOptionSelect: (option: OptionSchema) => void;
|
|
549
|
+
onSelect: (option: OptionSchema, checked: boolean) => void;
|
|
550
|
+
onSelectAll: (event: ChangeEvent) => void;
|
|
551
|
+
debounceSearch: import("throttle-debounce").throttle<() => void>;
|
|
552
|
+
debounceClear: import("throttle-debounce").throttle<() => void>;
|
|
553
|
+
onClearOptions: () => void;
|
|
554
|
+
onTogglePopper: (type: string) => void;
|
|
555
|
+
onCancelOptions: () => void;
|
|
556
|
+
onApplyOptions: () => void;
|
|
557
|
+
onToggleDropdown: (updatedOpen: boolean, type?: string | undefined) => void;
|
|
558
|
+
render(): JSX.Element;
|
|
559
|
+
}
|
|
560
|
+
export declare type HeadingSize = "s" | "m" | "l" | "xl" | "xxl";
|
|
561
|
+
export interface HeadingProps extends BaseProps, BaseHtmlProps<HTMLHeadingElement> {
|
|
562
|
+
children: React.ReactText;
|
|
563
|
+
appearance: HeadingAppearance;
|
|
564
|
+
size: HeadingSize;
|
|
565
|
+
}
|
|
566
|
+
export declare const Heading: {
|
|
567
|
+
(props: HeadingProps): JSX.Element;
|
|
568
|
+
displayName: string;
|
|
569
|
+
defaultProps: {
|
|
570
|
+
appearance: string;
|
|
571
|
+
size: string;
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
export declare type IconAppearance = "default" | "destructive" | "white" | "subtle" | "disabled" | "info" | "alert" | "warning" | "success" | "primary_lighter" | "primary" | "primary_dark" | "alert_lighter" | "alert_dark" | "warning_lighter" | "warning_dark" | "success_lighter" | "success_dark" | "accent1" | "accent1_lighter" | "accent1_dark" | "accent2" | "accent2_lighter" | "accent2_dark" | "accent3" | "accent3_lighter" | "accent3_dark" | "accent4" | "accent4_lighter" | "accent4_dark" | "inverse";
|
|
575
|
+
export declare type IconType = "filled" | "outlined" | "outline" | "rounded" | "round" | "two-tone" | "sharp";
|
|
576
|
+
export interface IconProps extends BaseProps {
|
|
577
|
+
name?: string;
|
|
578
|
+
size: number;
|
|
579
|
+
type?: IconType;
|
|
580
|
+
appearance?: IconAppearance;
|
|
581
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
582
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLElement>) => void;
|
|
583
|
+
children?: React.ReactNode;
|
|
584
|
+
tabIndex?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>["tabIndex"];
|
|
585
|
+
}
|
|
586
|
+
export declare const Icon: {
|
|
587
|
+
(props: IconProps): JSX.Element;
|
|
588
|
+
displayName: string;
|
|
589
|
+
defaultProps: {
|
|
590
|
+
size: number;
|
|
591
|
+
type: string;
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
export declare type InputType = "text" | "password" | "number" | "email" | "tel" | "url";
|
|
595
|
+
export declare type InputSize = "tiny" | "regular" | "large";
|
|
596
|
+
export interface InputProps extends BaseProps, BaseHtmlProps<HTMLInputElement> {
|
|
597
|
+
name?: string;
|
|
598
|
+
type?: InputType;
|
|
599
|
+
value?: string;
|
|
600
|
+
defaultValue?: string;
|
|
601
|
+
placeholder?: string;
|
|
602
|
+
size?: InputSize;
|
|
603
|
+
icon?: string;
|
|
604
|
+
inlineLabel?: string;
|
|
605
|
+
disabled?: boolean;
|
|
606
|
+
required?: boolean;
|
|
607
|
+
autoFocus?: boolean;
|
|
608
|
+
autoComplete?: AutoComplete;
|
|
609
|
+
readOnly?: boolean;
|
|
610
|
+
min?: number;
|
|
611
|
+
max?: number;
|
|
612
|
+
minLength?: number;
|
|
613
|
+
maxLength?: number;
|
|
614
|
+
pattern?: string;
|
|
615
|
+
error?: boolean;
|
|
616
|
+
info?: string;
|
|
617
|
+
minWidth?: string;
|
|
618
|
+
onClear?: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
|
|
619
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
620
|
+
onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
621
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
622
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
623
|
+
actionIcon?: React.ReactElement<IconProps>;
|
|
624
|
+
}
|
|
625
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
626
|
+
export declare type MetricInputSize = "regular" | "large";
|
|
627
|
+
export interface MetricInputProps extends BaseProps, BaseHtmlProps<HTMLInputElement> {
|
|
628
|
+
name?: string;
|
|
629
|
+
value?: React.ReactText;
|
|
630
|
+
defaultValue?: React.ReactText;
|
|
631
|
+
placeholder?: string;
|
|
632
|
+
size?: MetricInputSize;
|
|
633
|
+
icon?: string;
|
|
634
|
+
prefix?: string;
|
|
635
|
+
suffix?: string;
|
|
636
|
+
disabled?: boolean;
|
|
637
|
+
autoFocus?: boolean;
|
|
638
|
+
autoComplete?: AutoComplete;
|
|
639
|
+
readOnly?: boolean;
|
|
640
|
+
min?: number;
|
|
641
|
+
max?: number;
|
|
642
|
+
error?: boolean;
|
|
643
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
644
|
+
onClick?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
645
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
646
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
647
|
+
}
|
|
648
|
+
export declare const MetricInput: React.ForwardRefExoticComponent<MetricInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
649
|
+
export interface MaskProps extends BaseProps {
|
|
650
|
+
mask: Mask;
|
|
651
|
+
placeholderChar?: string;
|
|
652
|
+
caption?: string;
|
|
653
|
+
validators?: Validators;
|
|
654
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>, maskedVal: string) => void;
|
|
655
|
+
onBlur?: (e: React.ChangeEvent<HTMLInputElement>, maskedVal: string) => void;
|
|
656
|
+
onClear?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
657
|
+
clearOnEmptyBlur?: boolean;
|
|
658
|
+
}
|
|
659
|
+
export declare type InputMaskProps = InputProps & MaskProps;
|
|
660
|
+
export declare const InputMask: React.ForwardRefExoticComponent<InputProps & MaskProps & React.RefAttributes<HTMLInputElement>>;
|
|
661
|
+
export interface LabelProps extends BaseProps, BaseHtmlProps<HTMLLabelElement> {
|
|
662
|
+
children: React.ReactNode;
|
|
663
|
+
disabled?: boolean;
|
|
664
|
+
required?: boolean;
|
|
665
|
+
optional?: boolean;
|
|
666
|
+
withInput?: boolean;
|
|
667
|
+
}
|
|
668
|
+
export declare const Label: {
|
|
669
|
+
(props: LabelProps): JSX.Element;
|
|
670
|
+
displayName: string;
|
|
671
|
+
};
|
|
672
|
+
export interface CaptionProps extends BaseProps {
|
|
673
|
+
children: React.ReactNode;
|
|
674
|
+
error?: boolean;
|
|
675
|
+
hide?: boolean;
|
|
676
|
+
withInput?: boolean;
|
|
677
|
+
}
|
|
678
|
+
export declare const Caption: {
|
|
679
|
+
(props: CaptionProps): JSX.Element;
|
|
680
|
+
displayName: string;
|
|
681
|
+
};
|
|
682
|
+
export declare type TextSize = "small" | "regular" | "large";
|
|
683
|
+
export declare type TextAppearance = "default" | "white" | "destructive" | "subtle" | "disabled" | "success" | "link";
|
|
684
|
+
export interface TextProps extends BaseProps, BaseHtmlProps<HTMLSpanElement> {
|
|
685
|
+
children: React.ReactText;
|
|
686
|
+
weight?: "strong" | "medium";
|
|
687
|
+
small?: boolean;
|
|
688
|
+
appearance: TextAppearance;
|
|
689
|
+
size: TextSize;
|
|
690
|
+
}
|
|
691
|
+
export declare const Text: {
|
|
692
|
+
(props: TextProps): JSX.Element;
|
|
693
|
+
displayName: string;
|
|
694
|
+
defaultProps: {
|
|
695
|
+
appearance: string;
|
|
696
|
+
size: string;
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
export interface LegendProps extends BaseProps {
|
|
700
|
+
children: React.ReactText;
|
|
701
|
+
iconAppearance: string;
|
|
702
|
+
labelAppearance?: TextAppearance;
|
|
703
|
+
iconSize: number;
|
|
704
|
+
labelWeight?: "strong" | "medium";
|
|
705
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
706
|
+
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
707
|
+
onMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
708
|
+
}
|
|
709
|
+
export declare const Legend: {
|
|
710
|
+
(props: LegendProps): JSX.Element;
|
|
711
|
+
displayName: string;
|
|
712
|
+
defaultProps: {
|
|
713
|
+
iconAppearance: string;
|
|
714
|
+
iconSize: number;
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
export declare type DropdownOptions = MakeOptional<DropdownProps, keyof typeof Dropdown["defaultProps"]>;
|
|
718
|
+
export interface EditableDropdownProps extends BaseProps {
|
|
719
|
+
placeholder: string;
|
|
720
|
+
dropdownOptions: Omit<DropdownOptions, "getLabel" | "placeholder">;
|
|
721
|
+
customTriggerRenderer?: (label: string) => React.ReactNode;
|
|
722
|
+
}
|
|
723
|
+
export declare const EditableDropdown: {
|
|
724
|
+
(props: EditableDropdownProps): JSX.Element;
|
|
725
|
+
defaultProps: {
|
|
726
|
+
placeholder: string;
|
|
727
|
+
dropdownOptions: {};
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
export declare type LinkTarget = "_blank" | "_self" | "_parent" | "_top";
|
|
731
|
+
export declare type LinkAppearance = "default" | "subtle";
|
|
732
|
+
export declare type LinkSize = "regular" | "tiny";
|
|
733
|
+
export interface LinkProps extends BaseProps, OmitNativeProps<HTMLLinkElement, "onClick"> {
|
|
734
|
+
id?: string;
|
|
735
|
+
appearance: LinkAppearance;
|
|
736
|
+
size: LinkSize;
|
|
737
|
+
disabled: boolean;
|
|
738
|
+
href?: string;
|
|
739
|
+
target?: LinkTarget;
|
|
740
|
+
rel?: string;
|
|
741
|
+
download?: string;
|
|
742
|
+
hreflang?: string;
|
|
743
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
744
|
+
children: React.ReactNode;
|
|
745
|
+
}
|
|
746
|
+
export declare const Link: {
|
|
747
|
+
(props: LinkProps): JSX.Element;
|
|
748
|
+
displayName: string;
|
|
749
|
+
defaultProps: {
|
|
750
|
+
appearance: string;
|
|
751
|
+
size: string;
|
|
752
|
+
disabled: boolean;
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
export interface MessageProps extends BaseProps {
|
|
756
|
+
appearance: MessageAppearance;
|
|
757
|
+
title?: string;
|
|
758
|
+
children?: React.ReactNode;
|
|
759
|
+
description: string;
|
|
760
|
+
actions?: React.ReactNode;
|
|
761
|
+
}
|
|
762
|
+
export declare const Message: {
|
|
763
|
+
(props: MessageProps): JSX.Element;
|
|
764
|
+
displayName: string;
|
|
765
|
+
defaultProps: {
|
|
766
|
+
appearance: string;
|
|
767
|
+
description: string;
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
export interface MetaProps {
|
|
771
|
+
label: string;
|
|
772
|
+
icon?: string;
|
|
773
|
+
iconAppearance?: IconProps["appearance"];
|
|
774
|
+
labelAppearance?: TextProps["appearance"];
|
|
775
|
+
}
|
|
776
|
+
export interface MetaListProps extends BaseProps {
|
|
777
|
+
list: MetaProps[];
|
|
778
|
+
seperator?: boolean;
|
|
779
|
+
seperatorAppearance: IconProps["appearance"];
|
|
780
|
+
iconAppearance: IconProps["appearance"];
|
|
781
|
+
labelAppearance: TextProps["appearance"];
|
|
782
|
+
}
|
|
783
|
+
export declare const MetaList: {
|
|
784
|
+
(props: MetaListProps): JSX.Element;
|
|
785
|
+
displayName: string;
|
|
786
|
+
defaultProps: {
|
|
787
|
+
seperatorAppearance: string;
|
|
788
|
+
iconAppearance: string;
|
|
789
|
+
labelAppearance: string;
|
|
790
|
+
};
|
|
791
|
+
};
|
|
792
|
+
export interface HandleProps {
|
|
793
|
+
value: number;
|
|
794
|
+
fillAfter?: boolean;
|
|
795
|
+
fillBefore?: boolean;
|
|
796
|
+
onChange?: (newValue: number) => void;
|
|
797
|
+
onRelease?: (newValue: number) => void;
|
|
798
|
+
}
|
|
799
|
+
export interface InternalHandleProps extends HandleProps {
|
|
800
|
+
disabled?: boolean;
|
|
801
|
+
isCurrentLabelHovered?: boolean;
|
|
802
|
+
label: string;
|
|
803
|
+
max: number;
|
|
804
|
+
min: number;
|
|
805
|
+
stepSize: number;
|
|
806
|
+
tickSize: number;
|
|
807
|
+
tickSizeRatio: number;
|
|
808
|
+
zIndex?: number;
|
|
809
|
+
}
|
|
810
|
+
export interface HandleState {
|
|
811
|
+
isHandleMoving?: boolean;
|
|
812
|
+
isHandleHovered?: boolean;
|
|
813
|
+
}
|
|
814
|
+
declare class Handle extends React.Component<InternalHandleProps, HandleState> {
|
|
815
|
+
state: {
|
|
816
|
+
isHandleMoving: boolean;
|
|
817
|
+
isHandleHovered: boolean;
|
|
818
|
+
};
|
|
819
|
+
handleElement: HTMLElement | null;
|
|
820
|
+
refHandlers: {
|
|
821
|
+
handle: (el: HTMLDivElement) => HTMLDivElement;
|
|
822
|
+
};
|
|
823
|
+
componentWillUnmount(): void;
|
|
824
|
+
componentDidUpdate(_prevProps: InternalHandleProps, prevState: HandleState): void;
|
|
825
|
+
mouseEventClientOffset: (event: MouseEvent | React.MouseEvent<HTMLElement>) => number;
|
|
826
|
+
clientToValue: (clientPixel: number) => number;
|
|
827
|
+
changeValue: (newValue: number, callback?: ((newValue: number) => void) | undefined) => number;
|
|
828
|
+
endHandleMovement: (event: MouseEvent) => void;
|
|
829
|
+
continueHandleMovement: (event: MouseEvent) => void;
|
|
830
|
+
beginHandleMovement: (event: MouseEvent | React.MouseEvent<HTMLElement>) => void;
|
|
831
|
+
handleKeyDown: (event: React.KeyboardEvent<HTMLSpanElement>) => void;
|
|
832
|
+
handleKeyUp: (event: React.KeyboardEvent<HTMLSpanElement>) => void;
|
|
833
|
+
getHandleMidpointAndOffset: (handleElement: HTMLElement | null, useOppositeDimension?: boolean) => {
|
|
834
|
+
handleMidpoint: number;
|
|
835
|
+
handleOffset: number;
|
|
836
|
+
};
|
|
837
|
+
handleMouseOver: () => void;
|
|
838
|
+
handleMouseLeave: () => void;
|
|
839
|
+
render(): JSX.Element;
|
|
840
|
+
removeDocumentEventListeners: () => void;
|
|
841
|
+
}
|
|
842
|
+
export interface MultiSliderProps extends BaseProps {
|
|
843
|
+
disabled?: boolean;
|
|
844
|
+
labelStepSize: number;
|
|
845
|
+
labelPrecision?: number;
|
|
846
|
+
max: number;
|
|
847
|
+
min: number;
|
|
848
|
+
stepSize: number;
|
|
849
|
+
label?: string;
|
|
850
|
+
labelRenderer: boolean | ((value: number) => string);
|
|
851
|
+
}
|
|
852
|
+
export interface SliderBaserProps extends MultiSliderProps {
|
|
853
|
+
onChange?: (values: number) => void;
|
|
854
|
+
onRelease?: (values: number) => void;
|
|
855
|
+
}
|
|
856
|
+
export interface RangeSliderBaseProps extends MultiSliderProps {
|
|
857
|
+
onRangeChange?: (values: NumberRange) => void;
|
|
858
|
+
onRangeRelease?: (values: NumberRange) => void;
|
|
859
|
+
}
|
|
860
|
+
export interface MultiSliderState {
|
|
861
|
+
labelPrecision: number;
|
|
862
|
+
tickSize: number;
|
|
863
|
+
tickSizeRatio: number;
|
|
864
|
+
hoveredLabelValue?: number;
|
|
865
|
+
}
|
|
866
|
+
export declare type InternalMultiSliderProps = SliderBaserProps & RangeSliderBaseProps;
|
|
867
|
+
export declare class MultiSlider extends React.Component<InternalMultiSliderProps, MultiSliderState> {
|
|
868
|
+
static defaultProps: {
|
|
869
|
+
labelStepSize: number;
|
|
870
|
+
max: number;
|
|
871
|
+
min: number;
|
|
872
|
+
stepSize: number;
|
|
873
|
+
labelRenderer: boolean;
|
|
874
|
+
};
|
|
875
|
+
static Handle: React.FunctionComponent<HandleProps>;
|
|
876
|
+
handleElements: Handle[];
|
|
877
|
+
trackElement: HTMLElement | null;
|
|
878
|
+
constructor(props: InternalMultiSliderProps);
|
|
879
|
+
getDerivedStateFromProps(props: InternalMultiSliderProps): {
|
|
880
|
+
labelPrecision: number;
|
|
881
|
+
};
|
|
882
|
+
getSnapshotBeforeUpdate(prevProps: InternalMultiSliderProps): null;
|
|
883
|
+
componentDidMount(): void;
|
|
884
|
+
getLabelPrecision: ({ labelPrecision, stepSize }: InternalMultiSliderProps) => number;
|
|
885
|
+
getOffsetRatio: (value: number) => number;
|
|
886
|
+
addHandleRef: (ref: Handle) => void;
|
|
887
|
+
getHandleValues: (props: React.PropsWithChildren<InternalMultiSliderProps>) => HandleProps[];
|
|
888
|
+
updateTickSize: () => void;
|
|
889
|
+
getTrackFill: (start: HandleProps, end?: HandleProps | undefined) => boolean;
|
|
890
|
+
nearestHandleForValue(handles: Handle[], getOffset: (handle: Handle) => number): Handle | undefined;
|
|
891
|
+
maybeHandleTrackClick: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
892
|
+
getLockedHandleIndex: (startIndex: number, endIndex: number) => number;
|
|
893
|
+
getNewHandleValues: (newValue: number, oldIndex: number) => number[];
|
|
894
|
+
onReleaseHandler: (newValue: number, index: number) => void;
|
|
895
|
+
onChangeHandler: (newValue: number, index: number) => void;
|
|
896
|
+
formatLabel: (value: number) => string;
|
|
897
|
+
renderHandles: () => JSX.Element[] | null;
|
|
898
|
+
renderLabels: () => JSX.Element[];
|
|
899
|
+
renderTrackFill: (index: number, start: HandleProps, end: HandleProps) => JSX.Element;
|
|
900
|
+
renderTracks: () => JSX.Element[];
|
|
901
|
+
handleLabelMouseOver: (value: number) => void;
|
|
902
|
+
handleLabelMouseLeave: () => void;
|
|
903
|
+
render(): JSX.Element;
|
|
904
|
+
}
|
|
905
|
+
export interface OutsideClickProps extends BaseHtmlProps<HTMLDivElement>, BaseProps {
|
|
906
|
+
onOutsideClick: (event: Event) => void;
|
|
907
|
+
children: React.ReactElement<any>;
|
|
908
|
+
}
|
|
909
|
+
export declare const OutsideClick: React.ForwardRefExoticComponent<OutsideClickProps & React.RefAttributes<HTMLDivElement>>;
|
|
910
|
+
export declare type ParagraphAppearance = "default" | "white" | "destructive" | "subtle" | "disabled";
|
|
911
|
+
export interface ParagraphProps extends BaseProps, BaseHtmlProps<HTMLParagraphElement> {
|
|
912
|
+
children: React.ReactNode;
|
|
913
|
+
appearance: ParagraphAppearance;
|
|
914
|
+
}
|
|
915
|
+
export declare const Paragraph: {
|
|
916
|
+
(props: ParagraphProps): JSX.Element;
|
|
917
|
+
displayName: string;
|
|
918
|
+
defaultProps: {
|
|
919
|
+
appearance: string;
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
export interface ProgressBarProps extends BaseProps {
|
|
923
|
+
value: number;
|
|
924
|
+
max: number;
|
|
925
|
+
}
|
|
926
|
+
export declare const ProgressBar: {
|
|
927
|
+
(props: ProgressBarProps): JSX.Element;
|
|
928
|
+
displayName: string;
|
|
929
|
+
defaultProps: {
|
|
930
|
+
max: number;
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
export declare type RadioSize = "regular" | "tiny";
|
|
934
|
+
export interface RadioProps extends BaseProps, OmitNativeProps<HTMLInputElement, "onChange"> {
|
|
935
|
+
size?: RadioSize;
|
|
936
|
+
disabled?: boolean;
|
|
937
|
+
label?: string;
|
|
938
|
+
helpText?: string;
|
|
939
|
+
name: string;
|
|
940
|
+
value: string;
|
|
941
|
+
defaultChecked?: boolean;
|
|
942
|
+
checked?: boolean;
|
|
943
|
+
onChange?: (event: ChangeEvent) => void;
|
|
944
|
+
}
|
|
945
|
+
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
946
|
+
export declare type RowProps = BaseProps & BaseHtmlProps<HTMLDivElement>;
|
|
947
|
+
export declare const Row: React.ForwardRefExoticComponent<BaseProps & Pick<React.HTMLProps<HTMLDivElement>, "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLDivElement>>;
|
|
948
|
+
export interface StatusHintProps extends BaseProps {
|
|
949
|
+
children: React.ReactText;
|
|
950
|
+
appearance: MessageAppearance;
|
|
951
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
952
|
+
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
953
|
+
onMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
954
|
+
}
|
|
955
|
+
export declare const StatusHint: {
|
|
956
|
+
(props: StatusHintProps): JSX.Element;
|
|
957
|
+
displayName: string;
|
|
958
|
+
defaultProps: {
|
|
959
|
+
appearance: string;
|
|
960
|
+
};
|
|
961
|
+
};
|
|
962
|
+
export interface PillsProps extends BaseProps {
|
|
963
|
+
appearance: AccentAppearance;
|
|
964
|
+
subtle?: boolean;
|
|
965
|
+
children: React.ReactText;
|
|
966
|
+
}
|
|
967
|
+
export declare const Pills: {
|
|
968
|
+
(props: PillsProps): JSX.Element;
|
|
969
|
+
displayName: string;
|
|
970
|
+
defaultProps: {
|
|
971
|
+
appearance: string;
|
|
972
|
+
};
|
|
973
|
+
};
|
|
974
|
+
export declare type SpinnerAppearance = "primary" | "secondary" | "white";
|
|
975
|
+
export declare type SpinnerSize = "small" | "medium" | "large";
|
|
976
|
+
export interface SpinnerProps extends BaseProps {
|
|
977
|
+
appearance: SpinnerAppearance;
|
|
978
|
+
size: SpinnerSize;
|
|
979
|
+
}
|
|
980
|
+
export declare const Spinner: {
|
|
981
|
+
(props: SpinnerProps): JSX.Element;
|
|
982
|
+
displayName: string;
|
|
983
|
+
defaultProps: {
|
|
984
|
+
appearance: string;
|
|
985
|
+
size: string;
|
|
986
|
+
};
|
|
987
|
+
};
|
|
988
|
+
export interface SliderProps extends MultiSliderProps {
|
|
989
|
+
defaultValue: number;
|
|
990
|
+
value?: number;
|
|
991
|
+
onChange?: (value: number) => void;
|
|
992
|
+
onRelease?: (value: number) => void;
|
|
993
|
+
}
|
|
994
|
+
export declare const Slider: {
|
|
995
|
+
(props: SliderProps): JSX.Element;
|
|
996
|
+
displayName: string;
|
|
997
|
+
defaultProps: {
|
|
998
|
+
defaultValue: number;
|
|
999
|
+
labelStepSize: number;
|
|
1000
|
+
max: number;
|
|
1001
|
+
min: number;
|
|
1002
|
+
stepSize: number;
|
|
1003
|
+
labelRenderer: boolean;
|
|
1004
|
+
};
|
|
1005
|
+
};
|
|
1006
|
+
export interface RangeSliderProps extends MultiSliderProps {
|
|
1007
|
+
defaultValue: NumberRange;
|
|
1008
|
+
value?: NumberRange;
|
|
1009
|
+
onChange?: (value: NumberRange) => void;
|
|
1010
|
+
onRelease?: (value: NumberRange) => void;
|
|
1011
|
+
}
|
|
1012
|
+
export declare const RangeSlider: {
|
|
1013
|
+
(props: RangeSliderProps): JSX.Element;
|
|
1014
|
+
displayName: string;
|
|
1015
|
+
defaultProps: {
|
|
1016
|
+
defaultValue: number[];
|
|
1017
|
+
labelStepSize: number;
|
|
1018
|
+
max: number;
|
|
1019
|
+
min: number;
|
|
1020
|
+
stepSize: number;
|
|
1021
|
+
labelRenderer: boolean;
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
export interface SubheadingProps extends BaseProps, BaseHtmlProps<HTMLHeadingElement> {
|
|
1025
|
+
children: React.ReactText;
|
|
1026
|
+
appearance: HeadingAppearance;
|
|
1027
|
+
}
|
|
1028
|
+
export declare const Subheading: {
|
|
1029
|
+
(props: SubheadingProps): JSX.Element;
|
|
1030
|
+
displayName: string;
|
|
1031
|
+
defaultProps: {
|
|
1032
|
+
appearance: string;
|
|
1033
|
+
};
|
|
1034
|
+
};
|
|
1035
|
+
export declare type SwitchSize = "regular" | "tiny" | "large";
|
|
1036
|
+
export declare type SwitchAppearance = "primary" | "alert" | "success" | "warning";
|
|
1037
|
+
export declare type KeyboardEvent = React.KeyboardEvent<HTMLInputElement>;
|
|
1038
|
+
export interface SwitchProps extends BaseProps, OmitNativeProps<HTMLInputElement, "onChange"> {
|
|
1039
|
+
size?: SwitchSize;
|
|
1040
|
+
appearance?: SwitchAppearance;
|
|
1041
|
+
defaultChecked?: boolean;
|
|
1042
|
+
checked?: boolean;
|
|
1043
|
+
disabled?: boolean;
|
|
1044
|
+
name?: string;
|
|
1045
|
+
value?: string;
|
|
1046
|
+
onChange?: (event: ChangeEvent | KeyboardEvent, selected: boolean) => void;
|
|
1047
|
+
}
|
|
1048
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
1049
|
+
export interface TextareaProps extends BaseProps, BaseHtmlProps<HTMLTextAreaElement> {
|
|
1050
|
+
name?: string;
|
|
1051
|
+
value?: string;
|
|
1052
|
+
defaultValue?: string;
|
|
1053
|
+
placeholder?: string;
|
|
1054
|
+
rows?: number;
|
|
1055
|
+
disabled?: boolean;
|
|
1056
|
+
required?: boolean;
|
|
1057
|
+
error?: boolean;
|
|
1058
|
+
resize?: boolean;
|
|
1059
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
1060
|
+
onClick?: (e: React.MouseEvent<HTMLTextAreaElement>) => void;
|
|
1061
|
+
onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
1062
|
+
onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
1063
|
+
}
|
|
1064
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
1065
|
+
export declare type Action = {
|
|
1066
|
+
label: string;
|
|
1067
|
+
onClick: (e: React.MouseEvent) => void;
|
|
1068
|
+
};
|
|
1069
|
+
export interface ToastProps extends BaseProps {
|
|
1070
|
+
title: string;
|
|
1071
|
+
appearance: MessageAppearance;
|
|
1072
|
+
message?: string;
|
|
1073
|
+
actions?: Action[];
|
|
1074
|
+
onClose?: () => void;
|
|
1075
|
+
}
|
|
1076
|
+
export declare const Toast: {
|
|
1077
|
+
(props: ToastProps): JSX.Element;
|
|
1078
|
+
displayName: string;
|
|
1079
|
+
defaultProps: {
|
|
1080
|
+
appearance: string;
|
|
1081
|
+
};
|
|
1082
|
+
};
|
|
1083
|
+
export declare type PositionType = "auto-start" | "auto" | "auto-end" | "top-start" | "top" | "top-end" | "right-start" | "right" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left" | "left-start";
|
|
1084
|
+
export declare type ActionType = "click" | "hover";
|
|
1085
|
+
export declare type Offset = "small" | "medium" | "large";
|
|
1086
|
+
export interface PopperWrapperProps {
|
|
1087
|
+
init?: boolean;
|
|
1088
|
+
trigger: React.ReactElement<any>;
|
|
1089
|
+
boundaryElement?: Element | null;
|
|
1090
|
+
triggerClass?: string;
|
|
1091
|
+
placement: PositionType;
|
|
1092
|
+
children: React.ReactElement<any>;
|
|
1093
|
+
style: React.CSSProperties;
|
|
1094
|
+
appendToBody: boolean;
|
|
1095
|
+
on: ActionType;
|
|
1096
|
+
hoverable: boolean;
|
|
1097
|
+
offset: Offset;
|
|
1098
|
+
closeOnBackdropClick: boolean;
|
|
1099
|
+
closeOnScroll?: boolean;
|
|
1100
|
+
open?: boolean;
|
|
1101
|
+
hide?: boolean;
|
|
1102
|
+
onToggle: (open: boolean, type?: string) => void;
|
|
1103
|
+
}
|
|
1104
|
+
export declare type Position = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "right";
|
|
1105
|
+
export interface CustomStyle {
|
|
1106
|
+
height?: number | string;
|
|
1107
|
+
minHeight?: number | string;
|
|
1108
|
+
maxHeight?: number | string;
|
|
1109
|
+
width?: number | string;
|
|
1110
|
+
minWidth?: number | string;
|
|
1111
|
+
maxWidth?: number | string;
|
|
1112
|
+
}
|
|
1113
|
+
declare const propsList: readonly ["appendToBody", "trigger", "hoverable", "on", "open", "closeOnBackdropClick", "offset", "closeOnScroll"];
|
|
1114
|
+
export declare type PopperProps = typeof propsList[number];
|
|
1115
|
+
export interface PopoverProps extends Pick<PopperWrapperProps, PopperProps>, BaseProps {
|
|
1116
|
+
children: React.ReactNode;
|
|
1117
|
+
position: Position;
|
|
1118
|
+
onToggle?: (open: boolean, type?: string) => void;
|
|
1119
|
+
dark?: boolean;
|
|
1120
|
+
customStyle: CustomStyle;
|
|
1121
|
+
triggerClass?: string;
|
|
1122
|
+
hideOnReferenceEscape?: boolean;
|
|
1123
|
+
boundaryElement: React.RefObject<HTMLElement> | Element;
|
|
1124
|
+
}
|
|
1125
|
+
export declare const Popover: {
|
|
1126
|
+
(props: PopoverProps): JSX.Element;
|
|
1127
|
+
displayName: string;
|
|
1128
|
+
defaultProps: Record<string, any> & {
|
|
1129
|
+
offset: string;
|
|
1130
|
+
position: string;
|
|
1131
|
+
hideOnReferenceEscape: boolean;
|
|
1132
|
+
customStyle: {};
|
|
1133
|
+
boundaryElement: HTMLElement;
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
export declare type ChipOptions = {
|
|
1137
|
+
icon?: ChipProps["icon"];
|
|
1138
|
+
type?: ChipProps["type"];
|
|
1139
|
+
clearButton?: ChipProps["clearButton"];
|
|
1140
|
+
onClick?: (value: string, index: number) => void;
|
|
1141
|
+
};
|
|
1142
|
+
export interface ChipInputProps extends BaseProps {
|
|
1143
|
+
allowDuplicates: boolean;
|
|
1144
|
+
chipOptions: ChipOptions;
|
|
1145
|
+
disabled?: boolean;
|
|
1146
|
+
placeholder?: string;
|
|
1147
|
+
value?: string[];
|
|
1148
|
+
defaultValue: string[];
|
|
1149
|
+
autoFocus: boolean;
|
|
1150
|
+
onChange?: (chips: string[]) => void;
|
|
1151
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
1152
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
1153
|
+
}
|
|
1154
|
+
export declare const ChipInput: {
|
|
1155
|
+
(props: ChipInputProps): JSX.Element;
|
|
1156
|
+
displayName: string;
|
|
1157
|
+
defaultProps: {
|
|
1158
|
+
chipOptions: {};
|
|
1159
|
+
defaultValue: never[];
|
|
1160
|
+
allowDuplicates: boolean;
|
|
1161
|
+
autoFocus: boolean;
|
|
1162
|
+
};
|
|
1163
|
+
};
|
|
1164
|
+
export declare type Menu = {
|
|
1165
|
+
name: string;
|
|
1166
|
+
label: string;
|
|
1167
|
+
link?: string;
|
|
1168
|
+
icon?: string;
|
|
1169
|
+
group?: string;
|
|
1170
|
+
count?: number;
|
|
1171
|
+
disabled?: boolean;
|
|
1172
|
+
subMenu?: Menu[];
|
|
1173
|
+
};
|
|
1174
|
+
export declare type ActiveMenu = ({
|
|
1175
|
+
name: string;
|
|
1176
|
+
} | {
|
|
1177
|
+
link: string;
|
|
1178
|
+
}) & Partial<Menu>;
|
|
1179
|
+
export interface VerticalNavProps extends BaseProps {
|
|
1180
|
+
menus: Menu[];
|
|
1181
|
+
active?: ActiveMenu;
|
|
1182
|
+
onClick?: (menu: Menu) => void;
|
|
1183
|
+
rounded: boolean;
|
|
1184
|
+
expanded: boolean;
|
|
1185
|
+
autoCollapse: boolean;
|
|
1186
|
+
}
|
|
1187
|
+
export declare const VerticalNav: {
|
|
1188
|
+
(props: VerticalNavProps): JSX.Element;
|
|
1189
|
+
defaultProps: {
|
|
1190
|
+
expanded: boolean;
|
|
1191
|
+
autoCollapse: boolean;
|
|
1192
|
+
rounded: boolean;
|
|
1193
|
+
};
|
|
1194
|
+
};
|
|
1195
|
+
export declare type HorizontalNavProps = BaseProps & Pick<VerticalNavProps, "menus" | "active" | "onClick">;
|
|
1196
|
+
export declare const HorizontalNav: (props: HorizontalNavProps) => JSX.Element;
|
|
1197
|
+
declare const tooltipPropsList: readonly ["trigger", "on", "open", "offset", "onToggle", "dark", "customStyle", "closeOnBackdropClick", "hideOnReferenceEscape", "closeOnScroll"];
|
|
1198
|
+
export declare type TooltipPopperProps = typeof tooltipPropsList[number];
|
|
1199
|
+
export interface TooltipProps extends Omit<PopoverProps, TooltipPopperProps>, BaseProps {
|
|
1200
|
+
tooltip: string;
|
|
1201
|
+
children: PopoverProps["trigger"];
|
|
1202
|
+
}
|
|
1203
|
+
export declare const Tooltip: {
|
|
1204
|
+
(props: TooltipProps): JSX.Element;
|
|
1205
|
+
defaultProps: Record<string, any> & {
|
|
1206
|
+
hoverable: boolean;
|
|
1207
|
+
};
|
|
1208
|
+
};
|
|
1209
|
+
export interface DialogProps extends BaseProps {
|
|
1210
|
+
onClose: (event?: Event | React.MouseEvent<HTMLElement, MouseEvent>, reason?: string) => void;
|
|
1211
|
+
dimension: ModalProps["dimension"];
|
|
1212
|
+
open: boolean;
|
|
1213
|
+
heading: ModalHeaderProps["heading"];
|
|
1214
|
+
title?: string;
|
|
1215
|
+
description?: string;
|
|
1216
|
+
primaryButtonLabel: string;
|
|
1217
|
+
primaryButtonAppearance: ButtonProps["appearance"];
|
|
1218
|
+
primaryButtonCallback: () => void;
|
|
1219
|
+
secondaryButtonLabel: string;
|
|
1220
|
+
secondaryButtonAppearance: ButtonProps["appearance"];
|
|
1221
|
+
secondaryButtonCallback: () => void;
|
|
1222
|
+
}
|
|
1223
|
+
export declare const Dialog: {
|
|
1224
|
+
(props: DialogProps): JSX.Element;
|
|
1225
|
+
displayName: string;
|
|
1226
|
+
defaultProps: {
|
|
1227
|
+
dimension: string;
|
|
1228
|
+
primaryButtonAppearance: string;
|
|
1229
|
+
secondaryButtonAppearance: string;
|
|
1230
|
+
};
|
|
1231
|
+
};
|
|
1232
|
+
export interface OverlayHeaderProps extends BaseProps {
|
|
1233
|
+
heading?: string;
|
|
1234
|
+
onClose?: (event: React.MouseEvent<HTMLElement, MouseEvent>, reason?: string) => void;
|
|
1235
|
+
subHeading?: string;
|
|
1236
|
+
backButton?: boolean;
|
|
1237
|
+
backButtonCallback?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
1238
|
+
backIcon?: boolean;
|
|
1239
|
+
backIconCallback?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
1240
|
+
}
|
|
1241
|
+
export declare type ModalDimension = "small" | "medium" | "large";
|
|
1242
|
+
export interface ModalProps extends BaseProps {
|
|
1243
|
+
backdropClose?: boolean | ((event?: Event, reason?: string) => void);
|
|
1244
|
+
dimension: ModalDimension;
|
|
1245
|
+
open: boolean;
|
|
1246
|
+
onClose?: (event?: Event | React.MouseEvent<HTMLElement, MouseEvent>, reason?: string) => void;
|
|
1247
|
+
headerOptions?: OverlayHeaderProps;
|
|
1248
|
+
header?: React.ReactNode;
|
|
1249
|
+
footer?: React.ReactNode;
|
|
1250
|
+
footerOptions?: FooterOptions;
|
|
1251
|
+
children?: React.ReactNode;
|
|
1252
|
+
seperator?: boolean;
|
|
1253
|
+
closeOnEscape?: boolean;
|
|
1254
|
+
}
|
|
1255
|
+
export interface ModalState {
|
|
1256
|
+
open: boolean;
|
|
1257
|
+
animate: boolean;
|
|
1258
|
+
zIndex?: number;
|
|
1259
|
+
}
|
|
1260
|
+
export declare class Modal extends React.Component<ModalProps, ModalState> {
|
|
1261
|
+
modalRef: React.RefObject<HTMLDivElement>;
|
|
1262
|
+
element: Element;
|
|
1263
|
+
static defaultProps: {
|
|
1264
|
+
dimension: string;
|
|
1265
|
+
};
|
|
1266
|
+
constructor(props: ModalProps);
|
|
1267
|
+
onCloseHandler: (event: KeyboardEvent) => void;
|
|
1268
|
+
componentDidMount(): void;
|
|
1269
|
+
componentWillUnmount(): void;
|
|
1270
|
+
componentDidUpdate(prevProps: ModalProps): void;
|
|
1271
|
+
onOutsideClickHandler(event: Event): void;
|
|
1272
|
+
render(): JSX.Element;
|
|
1273
|
+
}
|
|
1274
|
+
export interface ModalHeaderProps extends BaseProps {
|
|
1275
|
+
heading?: string;
|
|
1276
|
+
onClose?: (event: React.MouseEvent<HTMLElement, MouseEvent>, reason?: string) => void;
|
|
1277
|
+
subHeading?: string;
|
|
1278
|
+
seperator?: boolean;
|
|
1279
|
+
backIcon?: boolean;
|
|
1280
|
+
backIconCallback?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
1281
|
+
}
|
|
1282
|
+
export declare const ModalHeader: {
|
|
1283
|
+
(props: ModalHeaderProps): JSX.Element;
|
|
1284
|
+
displayName: string;
|
|
1285
|
+
};
|
|
1286
|
+
export interface ModalBodyProps extends BaseProps {
|
|
1287
|
+
children: React.ReactNode;
|
|
1288
|
+
stickFooter: boolean;
|
|
1289
|
+
withFooter: boolean;
|
|
1290
|
+
}
|
|
1291
|
+
export declare const ModalBody: {
|
|
1292
|
+
(props: ModalBodyProps): JSX.Element;
|
|
1293
|
+
defaultProps: {
|
|
1294
|
+
stickFooter: boolean;
|
|
1295
|
+
withFooter: boolean;
|
|
1296
|
+
};
|
|
1297
|
+
displayName: string;
|
|
1298
|
+
};
|
|
1299
|
+
export interface ModalFooterProps extends BaseProps {
|
|
1300
|
+
open?: boolean;
|
|
1301
|
+
children: React.ReactNode;
|
|
1302
|
+
stickToBottom?: boolean;
|
|
1303
|
+
seperator?: boolean;
|
|
1304
|
+
inSidesheet?: boolean;
|
|
1305
|
+
}
|
|
1306
|
+
export declare const ModalFooter: {
|
|
1307
|
+
(props: ModalFooterProps): JSX.Element;
|
|
1308
|
+
displayName: string;
|
|
1309
|
+
};
|
|
1310
|
+
export declare type FullScreenDimension = "medium" | "large";
|
|
1311
|
+
export interface FullscreenModalProps extends BaseProps {
|
|
1312
|
+
dimension: FullScreenDimension;
|
|
1313
|
+
open: boolean;
|
|
1314
|
+
onClose?: (event?: Event | React.MouseEvent<HTMLElement, MouseEvent>, reason?: string) => void;
|
|
1315
|
+
headerOptions?: OverlayHeaderProps;
|
|
1316
|
+
header?: React.ReactNode;
|
|
1317
|
+
footerOptions?: FooterOptions;
|
|
1318
|
+
footer?: React.ReactNode;
|
|
1319
|
+
children?: React.ReactNode;
|
|
1320
|
+
closeOnEscape?: boolean;
|
|
1321
|
+
}
|
|
1322
|
+
export interface ModalState {
|
|
1323
|
+
open: boolean;
|
|
1324
|
+
animate: boolean;
|
|
1325
|
+
zIndex?: number;
|
|
1326
|
+
}
|
|
1327
|
+
export declare class FullscreenModal extends React.Component<FullscreenModalProps, ModalState> {
|
|
1328
|
+
modalRef: React.RefObject<HTMLDivElement>;
|
|
1329
|
+
element: Element;
|
|
1330
|
+
static defaultProps: {
|
|
1331
|
+
dimension: string;
|
|
1332
|
+
};
|
|
1333
|
+
constructor(props: FullscreenModalProps);
|
|
1334
|
+
onOutsideClickHandler: (event: KeyboardEvent) => void;
|
|
1335
|
+
onCloseHandler: (event: KeyboardEvent) => void;
|
|
1336
|
+
componentDidMount(): void;
|
|
1337
|
+
componentWillUnmount(): void;
|
|
1338
|
+
componentDidUpdate(prevProps: FullscreenModalProps): void;
|
|
1339
|
+
render(): JSX.Element;
|
|
1340
|
+
}
|
|
1341
|
+
export declare type SidesheetDimension = "regular" | "large";
|
|
1342
|
+
export interface SidesheetProps extends BaseProps {
|
|
1343
|
+
headerOptions: Omit<OverlayHeaderProps, "onClose">;
|
|
1344
|
+
header?: React.ReactNode;
|
|
1345
|
+
dimension: SidesheetDimension;
|
|
1346
|
+
open: boolean;
|
|
1347
|
+
stickFooter?: boolean;
|
|
1348
|
+
seperator?: boolean;
|
|
1349
|
+
children?: React.ReactNode;
|
|
1350
|
+
footer?: React.ReactNode;
|
|
1351
|
+
footerOptions?: FooterOptions;
|
|
1352
|
+
backdropClose?: boolean;
|
|
1353
|
+
closeOnEscape?: boolean;
|
|
1354
|
+
onClose?: (event?: Event | React.MouseEvent<HTMLElement, MouseEvent>, reason?: string) => void;
|
|
1355
|
+
}
|
|
1356
|
+
export interface SidesheetState {
|
|
1357
|
+
open: boolean;
|
|
1358
|
+
animate: boolean;
|
|
1359
|
+
zIndex?: number;
|
|
1360
|
+
}
|
|
1361
|
+
export declare class Sidesheet extends React.Component<SidesheetProps, SidesheetState> {
|
|
1362
|
+
sidesheetRef: React.RefObject<HTMLDivElement>;
|
|
1363
|
+
element: Element;
|
|
1364
|
+
static defaultProps: {
|
|
1365
|
+
dimension: string;
|
|
1366
|
+
stickFooter: boolean;
|
|
1367
|
+
headerOptions: {};
|
|
1368
|
+
};
|
|
1369
|
+
constructor(props: SidesheetProps);
|
|
1370
|
+
onCloseHandler: (event: KeyboardEvent) => void;
|
|
1371
|
+
componentDidMount(): void;
|
|
1372
|
+
componentWillUnmount(): void;
|
|
1373
|
+
componentDidUpdate(prevProps: SidesheetProps): void;
|
|
1374
|
+
onOutsideClickHandler(event: Event): void;
|
|
1375
|
+
render(): JSX.Element;
|
|
1376
|
+
}
|
|
1377
|
+
export interface CollapsibleProps extends BaseProps {
|
|
1378
|
+
expanded: boolean;
|
|
1379
|
+
hoverable: boolean;
|
|
1380
|
+
height: React.ReactText;
|
|
1381
|
+
expandedWidth: number;
|
|
1382
|
+
onToggle?: (expanded: boolean) => void;
|
|
1383
|
+
children: React.ReactChild;
|
|
1384
|
+
}
|
|
1385
|
+
export declare const Collapsible: {
|
|
1386
|
+
(props: CollapsibleProps): JSX.Element;
|
|
1387
|
+
displayName: string;
|
|
1388
|
+
defaultProps: {
|
|
1389
|
+
expanded: boolean;
|
|
1390
|
+
hoverable: boolean;
|
|
1391
|
+
height: string;
|
|
1392
|
+
expandedWidth: string;
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
export declare type StatusType = "failed" | "sending" | "sent" | "read" | "urgent";
|
|
1396
|
+
export interface StatusProps extends BaseProps {
|
|
1397
|
+
type: StatusType;
|
|
1398
|
+
time?: string | number;
|
|
1399
|
+
readText?: string;
|
|
1400
|
+
failedText?: string;
|
|
1401
|
+
sendingText?: string;
|
|
1402
|
+
}
|
|
1403
|
+
export interface BoxProps extends BaseProps {
|
|
1404
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
1405
|
+
}
|
|
1406
|
+
export interface MessageTextProps extends BaseProps {
|
|
1407
|
+
text: string;
|
|
1408
|
+
typingText: string;
|
|
1409
|
+
}
|
|
1410
|
+
export declare type MessageType = "incoming" | "outgoing";
|
|
1411
|
+
export interface ChatMessageBaseProps extends BaseProps {
|
|
1412
|
+
type: MessageType;
|
|
1413
|
+
isTyping?: boolean;
|
|
1414
|
+
statusOptions?: StatusProps;
|
|
1415
|
+
}
|
|
1416
|
+
export declare type ChatMessageProps = ChatMessageBaseProps & BoxProps & MessageTextProps;
|
|
1417
|
+
export declare const ChatMessage: {
|
|
1418
|
+
(props: ChatMessageProps): JSX.Element;
|
|
1419
|
+
displayName: string;
|
|
1420
|
+
};
|
|
1421
|
+
export declare type EmptyStateSize = "large" | "small";
|
|
1422
|
+
export interface EmptyStateProps extends BaseProps {
|
|
1423
|
+
imageSrc?: string;
|
|
1424
|
+
title: string;
|
|
1425
|
+
description: string;
|
|
1426
|
+
size: EmptyStateSize;
|
|
1427
|
+
children?: React.ReactNode;
|
|
1428
|
+
image?: React.ReactNode;
|
|
1429
|
+
}
|
|
1430
|
+
export declare const EmptyState: {
|
|
1431
|
+
(props: EmptyStateProps): JSX.Element;
|
|
1432
|
+
displayName: string;
|
|
1433
|
+
};
|
|
1434
|
+
export interface ModalDescriptionProps extends BaseProps {
|
|
1435
|
+
title?: string;
|
|
1436
|
+
description?: string;
|
|
1437
|
+
}
|
|
1438
|
+
export declare const ModalDescription: {
|
|
1439
|
+
(props: ModalDescriptionProps): JSX.Element;
|
|
1440
|
+
displayName: string;
|
|
1441
|
+
};
|
|
1442
|
+
export declare type PaginationType = "basic" | "jump";
|
|
1443
|
+
export interface PaginationProps extends BaseProps {
|
|
1444
|
+
type: PaginationType;
|
|
1445
|
+
totalPages: number;
|
|
1446
|
+
page: number;
|
|
1447
|
+
onPageChange: (page: number) => void;
|
|
1448
|
+
}
|
|
1449
|
+
export declare const Pagination: {
|
|
1450
|
+
(props: PaginationProps): JSX.Element;
|
|
1451
|
+
displayName: string;
|
|
1452
|
+
defaultProps: {
|
|
1453
|
+
type: string;
|
|
1454
|
+
page: number;
|
|
1455
|
+
totalPages: number;
|
|
1456
|
+
};
|
|
1457
|
+
};
|
|
1458
|
+
export declare type PlaceholderImageSize = "small" | "medium" | "large";
|
|
1459
|
+
export declare type Length = "small" | "medium" | "large";
|
|
1460
|
+
export declare type PlaceholderParagraphSize = "xxs" | "xs" | "s" | "m" | "l" | "xl" | "xxl" | "xxxl";
|
|
1461
|
+
export interface PlaceholderParagraphProps extends BaseProps {
|
|
1462
|
+
length: Length;
|
|
1463
|
+
size?: PlaceholderParagraphSize;
|
|
1464
|
+
}
|
|
1465
|
+
export declare const PlaceholderParagraph: {
|
|
1466
|
+
(props: PlaceholderParagraphProps): JSX.Element;
|
|
1467
|
+
displayName: string;
|
|
1468
|
+
defaultProps: {
|
|
1469
|
+
length: string;
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
export interface PlaceholderProps extends BaseProps {
|
|
1473
|
+
withImage: boolean;
|
|
1474
|
+
round?: boolean;
|
|
1475
|
+
imageSize: PlaceholderImageSize;
|
|
1476
|
+
children?: React.ReactElement<PlaceholderParagraphProps> | React.ReactElement<PlaceholderParagraphProps>[];
|
|
1477
|
+
}
|
|
1478
|
+
export declare const Placeholder: {
|
|
1479
|
+
(props: PlaceholderProps): JSX.Element;
|
|
1480
|
+
displayName: string;
|
|
1481
|
+
defaultProps: {
|
|
1482
|
+
withImage: boolean;
|
|
1483
|
+
imageSize: string;
|
|
1484
|
+
};
|
|
1485
|
+
};
|
|
1486
|
+
export interface EditableInputProps extends BaseProps {
|
|
1487
|
+
value?: string;
|
|
1488
|
+
placeholder?: string;
|
|
1489
|
+
size: "tiny" | "regular";
|
|
1490
|
+
disableSaveAction?: boolean;
|
|
1491
|
+
error?: boolean;
|
|
1492
|
+
errorMessage?: string;
|
|
1493
|
+
inputOptions: Omit<InputProps, "error" | "value" | "defaultValue" | "size" | "placeholder">;
|
|
1494
|
+
onChange?: (value: string) => void;
|
|
1495
|
+
}
|
|
1496
|
+
export declare const EditableInput: {
|
|
1497
|
+
(props: EditableInputProps): JSX.Element;
|
|
1498
|
+
defaultProps: {
|
|
1499
|
+
size: string;
|
|
1500
|
+
placeholder: string;
|
|
1501
|
+
inputOptions: {};
|
|
1502
|
+
};
|
|
1503
|
+
};
|
|
1504
|
+
export interface EditableChipInputProps extends BaseProps {
|
|
1505
|
+
placeholder: string;
|
|
1506
|
+
value?: string[];
|
|
1507
|
+
onChange?: (chips: string[]) => void;
|
|
1508
|
+
disableSaveAction?: boolean;
|
|
1509
|
+
chipInputOptions: Omit<ChipInputProps, "placeholder" | "value" | "defaultValue">;
|
|
1510
|
+
}
|
|
1511
|
+
export declare const EditableChipInput: {
|
|
1512
|
+
(props: EditableChipInputProps): JSX.Element;
|
|
1513
|
+
defaultProps: {
|
|
1514
|
+
placeholder: string;
|
|
1515
|
+
chipInputOptions: {};
|
|
1516
|
+
};
|
|
1517
|
+
};
|
|
1518
|
+
export declare type ProgressRingSize = "small" | "regular";
|
|
1519
|
+
export interface ProgressRingProps extends BaseProps {
|
|
1520
|
+
size: ProgressRingSize;
|
|
1521
|
+
value: number;
|
|
1522
|
+
max: number;
|
|
1523
|
+
}
|
|
1524
|
+
export declare const ProgressRing: {
|
|
1525
|
+
(props: ProgressRingProps): JSX.Element;
|
|
1526
|
+
displayName: string;
|
|
1527
|
+
defaultProps: {
|
|
1528
|
+
size: string;
|
|
1529
|
+
max: number;
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
export interface StepProp {
|
|
1533
|
+
label: string;
|
|
1534
|
+
value?: React.ReactText;
|
|
1535
|
+
}
|
|
1536
|
+
export interface StepperProps extends BaseProps {
|
|
1537
|
+
active: number;
|
|
1538
|
+
completed: number;
|
|
1539
|
+
steps: StepProp[];
|
|
1540
|
+
onChange?: (active: number, completed: number, label?: string, value?: React.ReactText) => void;
|
|
1541
|
+
skipIndexes: number[];
|
|
1542
|
+
}
|
|
1543
|
+
export declare const Stepper: {
|
|
1544
|
+
(props: StepperProps): JSX.Element;
|
|
1545
|
+
displayName: string;
|
|
1546
|
+
defaultProps: {
|
|
1547
|
+
completed: number;
|
|
1548
|
+
active: number;
|
|
1549
|
+
skipIndexes: never[];
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
export declare type InputOptions = Omit<InputMaskProps, "mask" | "value" | "onChange" | "onBlur" | "onClick" | "onClear"> & {
|
|
1553
|
+
label?: string;
|
|
1554
|
+
};
|
|
1555
|
+
export declare type DateRangePickerProps = SharedProps & {
|
|
1556
|
+
onRangeChange?: (startDate?: Date, endDate?: Date, startValue?: string, endValue?: string) => void;
|
|
1557
|
+
children: React.ReactNode;
|
|
1558
|
+
contentAlign?: "left" | "right";
|
|
1559
|
+
startDate?: DateType;
|
|
1560
|
+
endDate?: DateType;
|
|
1561
|
+
rangeLimit?: number;
|
|
1562
|
+
withInput?: boolean;
|
|
1563
|
+
singleInput?: boolean;
|
|
1564
|
+
open?: boolean;
|
|
1565
|
+
position: PopoverProps["position"];
|
|
1566
|
+
inputFormat: DateFormat;
|
|
1567
|
+
outputFormat: DateFormat;
|
|
1568
|
+
inputOptions: InputOptions;
|
|
1569
|
+
startInputOptions: InputOptions;
|
|
1570
|
+
endInputOptions: InputOptions;
|
|
1571
|
+
validators: Validators;
|
|
1572
|
+
monthsInView?: CalendarProps["monthsInView"];
|
|
1573
|
+
};
|
|
1574
|
+
export interface DateRangePickerState {
|
|
1575
|
+
init: boolean;
|
|
1576
|
+
startDate?: Date;
|
|
1577
|
+
endDate?: Date;
|
|
1578
|
+
startValue: string;
|
|
1579
|
+
endValue: string;
|
|
1580
|
+
startError: boolean;
|
|
1581
|
+
endError: boolean;
|
|
1582
|
+
yearNav?: number;
|
|
1583
|
+
monthNav?: number;
|
|
1584
|
+
open: boolean;
|
|
1585
|
+
}
|
|
1586
|
+
export declare class DateRangePicker extends React.Component<DateRangePickerProps, DateRangePickerState> {
|
|
1587
|
+
static defaultProps: {
|
|
1588
|
+
children: JSX.Element;
|
|
1589
|
+
contentAlign: string;
|
|
1590
|
+
monthsInView: undefined;
|
|
1591
|
+
position: string;
|
|
1592
|
+
inputFormat: string;
|
|
1593
|
+
outputFormat: string;
|
|
1594
|
+
validators: ((val: string, format: string) => boolean)[];
|
|
1595
|
+
inputOptions: {
|
|
1596
|
+
label: string;
|
|
1597
|
+
};
|
|
1598
|
+
startInputOptions: {
|
|
1599
|
+
label: string;
|
|
1600
|
+
};
|
|
1601
|
+
endInputOptions: {
|
|
1602
|
+
label: string;
|
|
1603
|
+
};
|
|
1604
|
+
size: string;
|
|
1605
|
+
view: string;
|
|
1606
|
+
firstDayOfWeek: string;
|
|
1607
|
+
jumpView: boolean;
|
|
1608
|
+
};
|
|
1609
|
+
monthsInView: number;
|
|
1610
|
+
constructor(props: DateRangePickerProps);
|
|
1611
|
+
componentDidUpdate(prevProps: DateRangePickerProps, prevState: DateRangePickerState): void;
|
|
1612
|
+
getDate: (startDate?: Date | undefined, endDate?: Date | undefined) => {
|
|
1613
|
+
startValue: string;
|
|
1614
|
+
endValue: string;
|
|
1615
|
+
};
|
|
1616
|
+
getErrors: (startDate?: Date | undefined, endDate?: Date | undefined) => {
|
|
1617
|
+
startError: boolean;
|
|
1618
|
+
endError: boolean;
|
|
1619
|
+
};
|
|
1620
|
+
getInRangeError: () => boolean;
|
|
1621
|
+
onRangeChangeHandler: (sDate?: Date | undefined, eDate?: Date | undefined) => void;
|
|
1622
|
+
onToggleHandler: (o: boolean, type?: string | undefined) => void;
|
|
1623
|
+
renderCalendar(): JSX.Element;
|
|
1624
|
+
render(): JSX.Element;
|
|
1625
|
+
}
|
|
1626
|
+
export interface TabsWrapperProps extends BaseProps {
|
|
1627
|
+
active?: number;
|
|
1628
|
+
children: SingleOrArray<React.ReactElement>;
|
|
1629
|
+
onTabChange?: (tabIndex: number) => void;
|
|
1630
|
+
}
|
|
1631
|
+
export declare const TabsWrapper: {
|
|
1632
|
+
(props: TabsWrapperProps): JSX.Element;
|
|
1633
|
+
displayName: string;
|
|
1634
|
+
};
|
|
1635
|
+
export interface TabProps {
|
|
1636
|
+
label: React.ReactNode | string;
|
|
1637
|
+
disabled?: boolean;
|
|
1638
|
+
icon?: string;
|
|
1639
|
+
count?: number;
|
|
1640
|
+
children?: React.ReactNode;
|
|
1641
|
+
}
|
|
1642
|
+
export declare const Tab: {
|
|
1643
|
+
(props: TabProps): JSX.Element;
|
|
1644
|
+
displayName: string;
|
|
1645
|
+
};
|
|
1646
|
+
export interface TabConfig {
|
|
1647
|
+
label: string;
|
|
1648
|
+
count?: number;
|
|
1649
|
+
icon?: string;
|
|
1650
|
+
disabled?: boolean;
|
|
1651
|
+
}
|
|
1652
|
+
export interface TabsProps extends BaseProps {
|
|
1653
|
+
activeIndex?: number;
|
|
1654
|
+
withSeparator?: boolean;
|
|
1655
|
+
tabs: TabConfig[];
|
|
1656
|
+
children?: SingleOrArray<React.ReactElement>;
|
|
1657
|
+
onTabChange?: (tabIndex: number) => void;
|
|
1658
|
+
}
|
|
1659
|
+
export declare const Tabs: {
|
|
1660
|
+
(props: TabsProps): JSX.Element;
|
|
1661
|
+
displayName: string;
|
|
1662
|
+
defaultProps: {
|
|
1663
|
+
withSeparator: boolean;
|
|
1664
|
+
tabs: never[];
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1667
|
+
export declare type FileErrorTypes = "FILE_INVALID_TYPE" | "FILE_TOO_LARGE" | "FILE_TOO_SMALL" | "TOO_MANY_FILES";
|
|
1668
|
+
export interface DOMFile extends Blob {
|
|
1669
|
+
readonly lastModified: number;
|
|
1670
|
+
readonly name: string;
|
|
1671
|
+
}
|
|
1672
|
+
export interface FileWithPath extends DOMFile {
|
|
1673
|
+
readonly path?: string;
|
|
1674
|
+
}
|
|
1675
|
+
declare function fromEvent(evt: Event): Promise<(FileWithPath | DataTransferItem)[]>;
|
|
1676
|
+
export interface FileError {
|
|
1677
|
+
type: FileErrorTypes;
|
|
1678
|
+
message: string;
|
|
1679
|
+
}
|
|
1680
|
+
export interface FileRejection {
|
|
1681
|
+
file: File;
|
|
1682
|
+
errors: FileError[];
|
|
1683
|
+
}
|
|
1684
|
+
export interface DropzoneBaseProps extends BaseProps {
|
|
1685
|
+
accept?: string | string[];
|
|
1686
|
+
multiple?: boolean;
|
|
1687
|
+
preventDropOnDocument?: boolean;
|
|
1688
|
+
minSize: number;
|
|
1689
|
+
maxSize: number;
|
|
1690
|
+
disabled: boolean;
|
|
1691
|
+
getFilesFromEvent: (event: DragEvent | Event) => any;
|
|
1692
|
+
onFileDialogCancel?: () => void;
|
|
1693
|
+
onDragEnter?: (event: DragEvent) => void;
|
|
1694
|
+
onDragLeave?: (event: DragEvent) => void;
|
|
1695
|
+
onDragOver?: (event: DragEvent) => void;
|
|
1696
|
+
onDrop?: (event: DragEvent | Event, acceptedFiles: File[], rejectedFiles: FileRejection[]) => void;
|
|
1697
|
+
onDropAccepted?: (event: DragEvent | Event, files: File[]) => void;
|
|
1698
|
+
onDropRejected?: (event: DragEvent | Event, rejectedFiles: FileRejection[]) => any;
|
|
1699
|
+
validator?: (file: File) => FileError | FileError[];
|
|
1700
|
+
}
|
|
1701
|
+
export declare type DropZoneType = "standard" | "compressed" | "tight";
|
|
1702
|
+
export interface DropzoneProps extends BaseProps, DropzoneBaseProps {
|
|
1703
|
+
formatLabel?: string;
|
|
1704
|
+
type: DropZoneType;
|
|
1705
|
+
sizeLabel?: string;
|
|
1706
|
+
sampleFileLink?: React.ReactNode;
|
|
1707
|
+
}
|
|
1708
|
+
export declare const Dropzone: {
|
|
1709
|
+
(props: DropzoneProps): JSX.Element;
|
|
1710
|
+
displayName: string;
|
|
1711
|
+
defaultProps: {
|
|
1712
|
+
type: string;
|
|
1713
|
+
disabled: boolean;
|
|
1714
|
+
getFilesFromEvent: typeof fromEvent;
|
|
1715
|
+
maxSize: number;
|
|
1716
|
+
minSize: number;
|
|
1717
|
+
multiple: boolean;
|
|
1718
|
+
preventDropOnDocument: boolean;
|
|
1719
|
+
validator: () => null;
|
|
1720
|
+
};
|
|
1721
|
+
};
|
|
1722
|
+
export interface FileUploaderFormatProps {
|
|
1723
|
+
formatLabel?: string;
|
|
1724
|
+
}
|
|
1725
|
+
export interface FileUploaderButtonProps extends BaseProps {
|
|
1726
|
+
name?: string;
|
|
1727
|
+
id?: string;
|
|
1728
|
+
accept?: string[];
|
|
1729
|
+
multiple: boolean;
|
|
1730
|
+
uploadButtonLabel: string;
|
|
1731
|
+
disabled: boolean;
|
|
1732
|
+
onChange?: (fileList: File[], event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
1733
|
+
}
|
|
1734
|
+
export interface FileUploaderProps extends FileUploaderButtonProps, FileUploaderFormatProps, BaseProps {
|
|
1735
|
+
title: string;
|
|
1736
|
+
sizeLabel: string;
|
|
1737
|
+
sampleFileLink?: JSX.Element;
|
|
1738
|
+
}
|
|
1739
|
+
export declare const FileUploader: {
|
|
1740
|
+
(props: FileUploaderProps): JSX.Element;
|
|
1741
|
+
defaultProps: {
|
|
1742
|
+
uploadButtonLabel: string;
|
|
1743
|
+
disabled: boolean;
|
|
1744
|
+
multiple: boolean;
|
|
1745
|
+
} & {
|
|
1746
|
+
title: string;
|
|
1747
|
+
sizeLabel: string;
|
|
1748
|
+
};
|
|
1749
|
+
displayName: string;
|
|
1750
|
+
};
|
|
1751
|
+
export interface FileItem {
|
|
1752
|
+
file: File;
|
|
1753
|
+
id?: any;
|
|
1754
|
+
status?: FileStatus;
|
|
1755
|
+
progress?: number;
|
|
1756
|
+
errorMessage?: string;
|
|
1757
|
+
}
|
|
1758
|
+
export interface FileUploaderListProps extends BaseProps {
|
|
1759
|
+
fileList: FileItem[];
|
|
1760
|
+
onClick?: (file: File, id?: any) => void;
|
|
1761
|
+
onDelete?: (file: File, id?: any) => void;
|
|
1762
|
+
onRetry?: (file: File, id?: any) => void;
|
|
1763
|
+
}
|
|
1764
|
+
export declare const FileUploaderList: {
|
|
1765
|
+
(props: FileUploaderListProps): JSX.Element | null;
|
|
1766
|
+
defaultProps: {
|
|
1767
|
+
fileList: never[];
|
|
1768
|
+
};
|
|
1769
|
+
displayName: string;
|
|
1770
|
+
};
|
|
1771
|
+
export interface NestedRowProps {
|
|
1772
|
+
rowIndex: number;
|
|
1773
|
+
data: RowData;
|
|
1774
|
+
schema: GridProps["schema"];
|
|
1775
|
+
loading: GridProps["loading"];
|
|
1776
|
+
}
|
|
1777
|
+
export declare type SortType = "asc" | "desc" | "unsort";
|
|
1778
|
+
export declare type Pinned = "left" | "right" | "unpin";
|
|
1779
|
+
export declare type Alignment = "left" | "right" | "center";
|
|
1780
|
+
export declare type Comparator = (a: RowData, b: RowData) => -1 | 0 | 1;
|
|
1781
|
+
export declare type Filter = any[];
|
|
1782
|
+
export declare type GridRef = HTMLDivElement | null;
|
|
1783
|
+
export declare type PageInfo = {
|
|
1784
|
+
page: number;
|
|
1785
|
+
scrollTop: number;
|
|
1786
|
+
};
|
|
1787
|
+
export interface FetchDataOptions {
|
|
1788
|
+
page?: number;
|
|
1789
|
+
pageSize?: number;
|
|
1790
|
+
filterList?: GridProps["filterList"];
|
|
1791
|
+
sortingList?: GridProps["sortingList"];
|
|
1792
|
+
searchTerm?: string;
|
|
1793
|
+
}
|
|
1794
|
+
export declare type fetchDataFunction = (options: FetchDataOptions) => Promise<{
|
|
1795
|
+
searchTerm?: string;
|
|
1796
|
+
count: number;
|
|
1797
|
+
data: Data;
|
|
1798
|
+
schema: Schema;
|
|
1799
|
+
}>;
|
|
1800
|
+
export declare type updateSortingListFunction = (newSortingList: GridProps["sortingList"]) => void;
|
|
1801
|
+
export declare type updateFilterListFunction = (newFilterList: GridProps["filterList"]) => void;
|
|
1802
|
+
export declare type updateSchemaFunction = (newSchema: Schema) => void;
|
|
1803
|
+
export declare type updateColumnSchemaFunction = (name: ColumnSchema["name"], schemaUpdate: Partial<ColumnSchema>) => void;
|
|
1804
|
+
export declare type reorderColumnFunction = (from: string, to: string) => void;
|
|
1805
|
+
export declare type onSelectFn = (rowIndex: number, selected: boolean) => void;
|
|
1806
|
+
export declare type onFilterChangeFn = (name: ColumnSchema["name"], selected: any) => void;
|
|
1807
|
+
export declare type onSelectAllFunction = (selected: boolean, selectAll?: boolean) => void;
|
|
1808
|
+
export declare type onFilterChangeFunction = (data: RowData, filters: Filter) => boolean;
|
|
1809
|
+
export declare type onRowClickFunction = (data: RowData, rowIndex?: number) => void;
|
|
1810
|
+
export declare type onMenuChangeFn = (name: ColumnSchema["name"], selected: any) => void;
|
|
1811
|
+
export declare type updatePrevPageInfoFunction = (value: PageInfo) => void;
|
|
1812
|
+
export declare type CellType = "DEFAULT" | "WITH_META_LIST" | "AVATAR" | "AVATAR_WITH_TEXT" | "AVATAR_WITH_META_LIST" | "STATUS_HINT" | "ICON";
|
|
1813
|
+
export declare type ColumnSchema = {
|
|
1814
|
+
name: string;
|
|
1815
|
+
displayName: string;
|
|
1816
|
+
width?: React.ReactText;
|
|
1817
|
+
minWidth?: React.ReactText;
|
|
1818
|
+
maxWidth?: React.ReactText;
|
|
1819
|
+
resizable?: boolean;
|
|
1820
|
+
sorting?: boolean;
|
|
1821
|
+
comparator?: Comparator;
|
|
1822
|
+
separator?: boolean;
|
|
1823
|
+
pinned?: Pinned;
|
|
1824
|
+
hidden?: boolean;
|
|
1825
|
+
filters?: DropdownProps["options"];
|
|
1826
|
+
onFilterChange?: onFilterChangeFunction;
|
|
1827
|
+
translate?: (data: RowData) => RowData;
|
|
1828
|
+
cellType?: CellType;
|
|
1829
|
+
cellRenderer?: React.FC<GridCellProps>;
|
|
1830
|
+
align?: Alignment;
|
|
1831
|
+
tooltip?: boolean;
|
|
1832
|
+
};
|
|
1833
|
+
export declare type RowData = Record<string, any> & {
|
|
1834
|
+
_selected?: boolean;
|
|
1835
|
+
};
|
|
1836
|
+
export declare type GridSize = "comfortable" | "standard" | "compressed" | "tight";
|
|
1837
|
+
export declare type GridType = "resource" | "data";
|
|
1838
|
+
export declare type Data = RowData[];
|
|
1839
|
+
export declare type Schema = ColumnSchema[];
|
|
1840
|
+
export interface GridProps extends BaseProps {
|
|
1841
|
+
size: GridSize;
|
|
1842
|
+
type: GridType;
|
|
1843
|
+
onRowClick?: onRowClickFunction;
|
|
1844
|
+
loaderSchema: Schema;
|
|
1845
|
+
schema: Schema;
|
|
1846
|
+
data: Data;
|
|
1847
|
+
totalRecords: number;
|
|
1848
|
+
loading: boolean;
|
|
1849
|
+
error: boolean;
|
|
1850
|
+
updateData?: () => void;
|
|
1851
|
+
updateSchema?: updateSchemaFunction;
|
|
1852
|
+
showHead?: boolean;
|
|
1853
|
+
showMenu?: boolean;
|
|
1854
|
+
draggable?: boolean;
|
|
1855
|
+
nestedRows?: boolean;
|
|
1856
|
+
nestedRowRenderer?: React.FC<NestedRowProps>;
|
|
1857
|
+
withPagination?: boolean;
|
|
1858
|
+
page: number;
|
|
1859
|
+
pageSize: number;
|
|
1860
|
+
withCheckbox?: boolean;
|
|
1861
|
+
onSelect?: onSelectFn;
|
|
1862
|
+
onSelectAll?: onSelectAllFunction;
|
|
1863
|
+
errorTemplate?: React.FunctionComponent | React.ReactNode;
|
|
1864
|
+
sortingList: {
|
|
1865
|
+
name: ColumnSchema["name"];
|
|
1866
|
+
type: SortType;
|
|
1867
|
+
}[];
|
|
1868
|
+
updateSortingList?: updateSortingListFunction;
|
|
1869
|
+
filterList: Record<ColumnSchema["name"], Filter>;
|
|
1870
|
+
updateFilterList?: updateFilterListFunction;
|
|
1871
|
+
selectAll?: {
|
|
1872
|
+
checked: boolean;
|
|
1873
|
+
indeterminate: boolean;
|
|
1874
|
+
};
|
|
1875
|
+
headCellTooltip?: boolean;
|
|
1876
|
+
separator?: boolean;
|
|
1877
|
+
showFilters: boolean;
|
|
1878
|
+
}
|
|
1879
|
+
export interface GridState {
|
|
1880
|
+
init: boolean;
|
|
1881
|
+
prevPageInfo: PageInfo;
|
|
1882
|
+
}
|
|
1883
|
+
export declare class Grid extends React.Component<GridProps, GridState> {
|
|
1884
|
+
static defaultProps: GridProps;
|
|
1885
|
+
constructor(props: GridProps);
|
|
1886
|
+
componentDidMount(): void;
|
|
1887
|
+
forceRerender(): void;
|
|
1888
|
+
componentWillUnmount(): void;
|
|
1889
|
+
componentDidUpdate(prevProps: GridProps, prevState: GridState): void;
|
|
1890
|
+
gridRef: GridRef;
|
|
1891
|
+
isHeadSyncing: boolean;
|
|
1892
|
+
isBodySyncing: boolean;
|
|
1893
|
+
addScrollListeners(): void;
|
|
1894
|
+
removeScrollListeners(): void;
|
|
1895
|
+
syncScroll: (type: string) => () => void;
|
|
1896
|
+
updateRenderedSchema: (newSchema: Schema) => void;
|
|
1897
|
+
updateColumnSchema: updateColumnSchemaFunction;
|
|
1898
|
+
reorderColumn: reorderColumnFunction;
|
|
1899
|
+
updateSortingList: (sortingList: GridProps["sortingList"]) => void;
|
|
1900
|
+
updateFilterList: (filterList: GridProps["filterList"]) => void;
|
|
1901
|
+
onMenuChange: onMenuChangeFn;
|
|
1902
|
+
onFilterChange: onFilterChangeFn;
|
|
1903
|
+
onSelect: onSelectFn;
|
|
1904
|
+
onSelectAll: CheckboxProps["onChange"];
|
|
1905
|
+
updatePrevPageInfo: updatePrevPageInfoFunction;
|
|
1906
|
+
render(): JSX.Element;
|
|
1907
|
+
}
|
|
1908
|
+
export interface PartialCellProps {
|
|
1909
|
+
data: RowData;
|
|
1910
|
+
schema: ColumnSchema;
|
|
1911
|
+
loading?: boolean;
|
|
1912
|
+
expanded?: boolean;
|
|
1913
|
+
}
|
|
1914
|
+
export interface GridCellProps extends PartialCellProps {
|
|
1915
|
+
size?: GridSize;
|
|
1916
|
+
rowIndex?: number;
|
|
1917
|
+
colIndex?: number;
|
|
1918
|
+
}
|
|
1919
|
+
export declare const GridCell: {
|
|
1920
|
+
(props: GridCellProps): JSX.Element | null;
|
|
1921
|
+
displayName: string;
|
|
1922
|
+
};
|
|
1923
|
+
export interface ExternalHeaderProps {
|
|
1924
|
+
children?: React.ReactNode;
|
|
1925
|
+
withSearch?: boolean;
|
|
1926
|
+
searchPlaceholder?: string;
|
|
1927
|
+
dynamicColumn?: boolean;
|
|
1928
|
+
allowSelectAll?: boolean;
|
|
1929
|
+
}
|
|
1930
|
+
export declare type updateSearchTermFunction = (newSearchTerm: string) => void;
|
|
1931
|
+
export interface HeaderProps extends ExternalHeaderProps {
|
|
1932
|
+
loading?: boolean;
|
|
1933
|
+
error?: boolean;
|
|
1934
|
+
data: Data;
|
|
1935
|
+
schema: Schema;
|
|
1936
|
+
selectAll?: GridProps["selectAll"];
|
|
1937
|
+
totalRecords: number;
|
|
1938
|
+
withPagination?: boolean;
|
|
1939
|
+
page: number;
|
|
1940
|
+
pageSize: number;
|
|
1941
|
+
withCheckbox?: boolean;
|
|
1942
|
+
showHead?: boolean;
|
|
1943
|
+
updateSchema?: updateSchemaFunction;
|
|
1944
|
+
filterList?: GridProps["filterList"];
|
|
1945
|
+
showFilters: boolean;
|
|
1946
|
+
updateFilterList?: updateFilterListFunction;
|
|
1947
|
+
onSelectAll?: onSelectAllFunction;
|
|
1948
|
+
searchTerm?: string;
|
|
1949
|
+
updateSearchTerm?: updateSearchTermFunction;
|
|
1950
|
+
}
|
|
1951
|
+
export interface ErrorTemplateProps {
|
|
1952
|
+
errorType?: TableProps["errorType"];
|
|
1953
|
+
}
|
|
1954
|
+
export declare type FilterPosition = "GRID" | "HEADER";
|
|
1955
|
+
export interface TableSyncProps {
|
|
1956
|
+
data: GridProps["data"];
|
|
1957
|
+
schema: GridProps["schema"];
|
|
1958
|
+
loading: GridProps["loading"];
|
|
1959
|
+
error: GridProps["error"];
|
|
1960
|
+
errorType?: string;
|
|
1961
|
+
onSearch?: (data: Data, searchTerm: string) => Data;
|
|
1962
|
+
}
|
|
1963
|
+
export interface AsyncProps {
|
|
1964
|
+
fetchData?: fetchDataFunction;
|
|
1965
|
+
}
|
|
1966
|
+
export interface SharedTableProps extends BaseProps {
|
|
1967
|
+
showHead: GridProps["showHead"];
|
|
1968
|
+
type: GridProps["type"];
|
|
1969
|
+
size: GridProps["size"];
|
|
1970
|
+
draggable: GridProps["draggable"];
|
|
1971
|
+
nestedRows?: GridProps["nestedRows"];
|
|
1972
|
+
nestedRowRenderer?: GridProps["nestedRowRenderer"];
|
|
1973
|
+
withHeader?: boolean;
|
|
1974
|
+
headerOptions?: ExternalHeaderProps;
|
|
1975
|
+
withCheckbox?: GridProps["withCheckbox"];
|
|
1976
|
+
showMenu?: GridProps["showMenu"];
|
|
1977
|
+
withPagination: GridProps["withPagination"];
|
|
1978
|
+
page: GridProps["page"];
|
|
1979
|
+
paginationType: PaginationProps["type"];
|
|
1980
|
+
pageSize: GridProps["pageSize"];
|
|
1981
|
+
loaderSchema: GridProps["loaderSchema"];
|
|
1982
|
+
multipleSorting: boolean;
|
|
1983
|
+
sortingList: GridProps["sortingList"];
|
|
1984
|
+
filterList: GridProps["filterList"];
|
|
1985
|
+
errorTemplate?: React.FunctionComponent<ErrorTemplateProps>;
|
|
1986
|
+
searchDebounceDuration: number;
|
|
1987
|
+
onRowClick?: GridProps["onRowClick"];
|
|
1988
|
+
onSelect?: (rowIndexes: number[], selected: boolean, allSelected: RowData[], selectAll?: boolean) => void;
|
|
1989
|
+
onPageChange?: PaginationProps["onPageChange"];
|
|
1990
|
+
headCellTooltip?: GridProps["headCellTooltip"];
|
|
1991
|
+
separator?: GridProps["headCellTooltip"];
|
|
1992
|
+
filterPosition: FilterPosition;
|
|
1993
|
+
}
|
|
1994
|
+
export declare type SyncTableProps = SharedTableProps & TableSyncProps;
|
|
1995
|
+
export declare type AsyncTableProps = SharedTableProps & AsyncProps;
|
|
1996
|
+
export declare type TableProps = AsyncTableProps & SyncTableProps;
|
|
1997
|
+
export interface TableState {
|
|
1998
|
+
async: boolean;
|
|
1999
|
+
data: TableProps["data"];
|
|
2000
|
+
schema: TableProps["schema"];
|
|
2001
|
+
sortingList: TableProps["sortingList"];
|
|
2002
|
+
filterList: TableProps["filterList"];
|
|
2003
|
+
page: TableProps["page"];
|
|
2004
|
+
totalRecords: GridProps["totalRecords"];
|
|
2005
|
+
selectAll: GridProps["selectAll"];
|
|
2006
|
+
searchTerm: HeaderProps["searchTerm"];
|
|
2007
|
+
loading: TableProps["loading"];
|
|
2008
|
+
error: TableProps["error"];
|
|
2009
|
+
errorType?: TableProps["errorType"];
|
|
2010
|
+
}
|
|
2011
|
+
export declare class Table extends React.Component<TableProps, TableState> {
|
|
2012
|
+
static defaultProps: {
|
|
2013
|
+
type: string;
|
|
2014
|
+
size: string;
|
|
2015
|
+
showHead: boolean;
|
|
2016
|
+
showMenu: boolean;
|
|
2017
|
+
multipleSorting: boolean;
|
|
2018
|
+
headerOptions: {};
|
|
2019
|
+
withPagination: boolean;
|
|
2020
|
+
paginationType: string;
|
|
2021
|
+
page: number;
|
|
2022
|
+
pageSize: number;
|
|
2023
|
+
draggable: boolean;
|
|
2024
|
+
data: never[];
|
|
2025
|
+
schema: never[];
|
|
2026
|
+
loading: boolean;
|
|
2027
|
+
error: boolean;
|
|
2028
|
+
loaderSchema: never[];
|
|
2029
|
+
sortingList: never[];
|
|
2030
|
+
filterList: {};
|
|
2031
|
+
filterPosition: string;
|
|
2032
|
+
searchDebounceDuration: number;
|
|
2033
|
+
errorTemplate: (props: ErrorTemplateProps) => JSX.Element;
|
|
2034
|
+
};
|
|
2035
|
+
debounceUpdate: () => void;
|
|
2036
|
+
constructor(props: TableProps);
|
|
2037
|
+
componentDidMount(): void;
|
|
2038
|
+
componentDidUpdate(prevProps: TableProps, prevState: TableState): void;
|
|
2039
|
+
updateData: (searchUpdate?: boolean | undefined) => void;
|
|
2040
|
+
updateDataFn: () => void;
|
|
2041
|
+
onSelect: onSelectFn;
|
|
2042
|
+
onSelectAll: onSelectAllFunction;
|
|
2043
|
+
onPageChange: PaginationProps["onPageChange"];
|
|
2044
|
+
updateSchema: updateSchemaFunction;
|
|
2045
|
+
updateSortingList: updateSortingListFunction;
|
|
2046
|
+
updateFilterList: updateFilterListFunction;
|
|
2047
|
+
updateSearchTerm: updateSearchTermFunction;
|
|
2048
|
+
render(): JSX.Element;
|
|
2049
|
+
}
|
|
2050
|
+
export declare type ExcludeTypes = "showHead" | "draggable" | "showMenu" | "headCellTooltip" | "filterPosition";
|
|
2051
|
+
export declare type ListProps = Omit<TableProps, ExcludeTypes>;
|
|
2052
|
+
export declare const List: {
|
|
2053
|
+
(props: ListProps): JSX.Element;
|
|
2054
|
+
defaultProps: {
|
|
2055
|
+
type: string;
|
|
2056
|
+
size: string;
|
|
2057
|
+
showHead: boolean;
|
|
2058
|
+
showMenu: boolean;
|
|
2059
|
+
multipleSorting: boolean;
|
|
2060
|
+
headerOptions: {};
|
|
2061
|
+
withPagination: boolean;
|
|
2062
|
+
paginationType: string;
|
|
2063
|
+
page: number;
|
|
2064
|
+
pageSize: number;
|
|
2065
|
+
draggable: boolean;
|
|
2066
|
+
data: never[];
|
|
2067
|
+
schema: never[];
|
|
2068
|
+
loading: boolean;
|
|
2069
|
+
error: boolean;
|
|
2070
|
+
loaderSchema: never[];
|
|
2071
|
+
sortingList: never[];
|
|
2072
|
+
filterList: {};
|
|
2073
|
+
filterPosition: string;
|
|
2074
|
+
searchDebounceDuration: number;
|
|
2075
|
+
errorTemplate: (props: ErrorTemplateProps) => JSX.Element;
|
|
2076
|
+
};
|
|
2077
|
+
};
|
|
2078
|
+
export interface VerticalNavigationProps {
|
|
2079
|
+
menus: Menu[];
|
|
2080
|
+
active?: ActiveMenu;
|
|
2081
|
+
onClick?: (menu: Menu) => void;
|
|
2082
|
+
rounded: boolean;
|
|
2083
|
+
expanded: boolean;
|
|
2084
|
+
footer?: boolean;
|
|
2085
|
+
onToggle?: (expanded: boolean) => void;
|
|
2086
|
+
autoCollapse: boolean;
|
|
2087
|
+
}
|
|
2088
|
+
export declare type LayoutType = "vertical" | "horizontal";
|
|
2089
|
+
export declare type Align = "left" | "center";
|
|
2090
|
+
export interface NavigationProps extends BaseProps, VerticalNavigationProps {
|
|
2091
|
+
type: LayoutType;
|
|
2092
|
+
align: Align;
|
|
2093
|
+
}
|
|
2094
|
+
export declare const Navigation: {
|
|
2095
|
+
(props: NavigationProps): JSX.Element;
|
|
2096
|
+
defaultProps: {
|
|
2097
|
+
type: string;
|
|
2098
|
+
align: string;
|
|
2099
|
+
expanded: boolean;
|
|
2100
|
+
autoCollapse: boolean;
|
|
2101
|
+
rounded: boolean;
|
|
2102
|
+
};
|
|
2103
|
+
};
|
|
2104
|
+
export declare type navigationPositionType = "center" | "bottom";
|
|
2105
|
+
export interface PageHeaderProps extends BaseProps {
|
|
2106
|
+
title: string;
|
|
2107
|
+
navigation?: React.ReactNode;
|
|
2108
|
+
stepper?: React.ReactNode;
|
|
2109
|
+
actions?: React.ReactNode;
|
|
2110
|
+
tabs?: React.ReactNode;
|
|
2111
|
+
breadcrumbs?: React.ReactNode;
|
|
2112
|
+
badge?: React.ReactNode;
|
|
2113
|
+
status?: React.ReactNode;
|
|
2114
|
+
meta?: React.ReactNode;
|
|
2115
|
+
navigationPosition: navigationPositionType;
|
|
2116
|
+
separator: boolean;
|
|
2117
|
+
}
|
|
2118
|
+
export declare const PageHeader: {
|
|
2119
|
+
(props: PageHeaderProps): JSX.Element;
|
|
2120
|
+
defaultProps: {
|
|
2121
|
+
navigationPosition: string;
|
|
2122
|
+
separator: boolean;
|
|
2123
|
+
};
|
|
2124
|
+
};
|
|
2125
|
+
export interface FileObject extends BaseProps, Record<string, any> {
|
|
2126
|
+
name: string;
|
|
2127
|
+
size: string;
|
|
2128
|
+
type: string;
|
|
2129
|
+
}
|
|
2130
|
+
export interface FileListItemProps extends BaseProps, Record<string, any> {
|
|
2131
|
+
file: File | FileObject;
|
|
2132
|
+
status: FileStatus;
|
|
2133
|
+
progress?: number;
|
|
2134
|
+
errorMessage?: string;
|
|
2135
|
+
actions?: React.ReactNode;
|
|
2136
|
+
fileItem?: any;
|
|
2137
|
+
fileSize?: string;
|
|
2138
|
+
onClick?: (file: FileListItemProps) => void;
|
|
2139
|
+
}
|
|
2140
|
+
export interface FileListProps extends BaseProps {
|
|
2141
|
+
fileList: Omit<FileListItemProps[], "onClick">;
|
|
2142
|
+
onClick?: FileListItemProps["onClick"];
|
|
2143
|
+
actionRenderer?: React.FC<FileListItemProps>;
|
|
2144
|
+
}
|
|
2145
|
+
export declare const FileList: {
|
|
2146
|
+
(props: FileListProps): JSX.Element | null;
|
|
2147
|
+
defaultProps: {
|
|
2148
|
+
fileList: never[];
|
|
2149
|
+
};
|
|
2150
|
+
displayName: string;
|
|
2151
|
+
};
|
|
2152
|
+
export interface VerificationProps extends BaseProps {
|
|
2153
|
+
fields?: number;
|
|
2154
|
+
type?: "text" | "number" | "password";
|
|
2155
|
+
onComplete?: (value: string) => void;
|
|
2156
|
+
}
|
|
2157
|
+
export declare type VerificationCodeInputProps = VerificationProps & Omit<InputProps, "name" | "type" | "defaultValue" | "size" | "icon" | "inlineLabel" | "autoComplete" | "onChange" | "onClear" | "info" | "min" | "max" | "minLength" | "maxLength" | "actionIcon">;
|
|
2158
|
+
export declare const VerificationCodeInput: {
|
|
2159
|
+
(props: VerificationCodeInputProps): JSX.Element;
|
|
2160
|
+
displayName: string;
|
|
2161
|
+
};
|
|
2162
|
+
export interface InlineMessageProps extends BaseProps {
|
|
2163
|
+
appearance: MessageAppearance;
|
|
2164
|
+
description: string;
|
|
2165
|
+
}
|
|
2166
|
+
export declare const InlineMessage: {
|
|
2167
|
+
(props: InlineMessageProps): JSX.Element;
|
|
2168
|
+
displayName: string;
|
|
2169
|
+
defaultProps: {
|
|
2170
|
+
appearance: string;
|
|
2171
|
+
description: string;
|
|
2172
|
+
};
|
|
2173
|
+
};
|
|
2174
|
+
export declare type ChoiceListAlignment = "horizontal" | "vertical";
|
|
2175
|
+
export declare type ChoiceListSize = "regular" | "tiny";
|
|
2176
|
+
export interface Choice {
|
|
2177
|
+
value: string;
|
|
2178
|
+
label?: string;
|
|
2179
|
+
disabled?: boolean;
|
|
2180
|
+
helpText?: string;
|
|
2181
|
+
name: string;
|
|
2182
|
+
}
|
|
2183
|
+
export interface ChoiceListProps extends BaseProps {
|
|
2184
|
+
title?: string;
|
|
2185
|
+
choices: Choice[];
|
|
2186
|
+
alignment?: ChoiceListAlignment;
|
|
2187
|
+
size?: ChoiceListSize;
|
|
2188
|
+
allowMultiple?: boolean;
|
|
2189
|
+
disabled?: boolean;
|
|
2190
|
+
selected?: string[];
|
|
2191
|
+
onChange?(event: ChangeEvent, selected: string[]): void;
|
|
2192
|
+
}
|
|
2193
|
+
export declare const ChoiceList: {
|
|
2194
|
+
(props: ChoiceListProps): JSX.Element;
|
|
2195
|
+
displayName: string;
|
|
2196
|
+
defaultProps: {
|
|
2197
|
+
alignment: string;
|
|
2198
|
+
size: string;
|
|
2199
|
+
allowMultiple: boolean;
|
|
2200
|
+
disabled: boolean;
|
|
2201
|
+
};
|
|
2202
|
+
};
|
|
2203
|
+
export declare type DividerType = "basic" | "header";
|
|
2204
|
+
export interface DividerProps extends BaseProps {
|
|
2205
|
+
vertical: boolean;
|
|
2206
|
+
appearance: DividerType;
|
|
2207
|
+
}
|
|
2208
|
+
export declare const Divider: {
|
|
2209
|
+
(props: DividerProps): JSX.Element;
|
|
2210
|
+
displayName: string;
|
|
2211
|
+
defaultProps: {
|
|
2212
|
+
appearance: string;
|
|
2213
|
+
vertical: boolean;
|
|
2214
|
+
};
|
|
2215
|
+
};
|
|
2216
|
+
|
|
2217
|
+
export {};
|