@patternfly/react-core 4.243.1 → 4.244.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/CHANGELOG.md +16 -0
- package/dist/esm/components/Alert/Alert.d.ts +41 -34
- package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
- package/dist/esm/components/Alert/Alert.js.map +1 -1
- package/dist/esm/components/Alert/AlertActionCloseButton.d.ts +8 -5
- package/dist/esm/components/Alert/AlertActionCloseButton.d.ts.map +1 -1
- package/dist/esm/components/Alert/AlertActionCloseButton.js.map +1 -1
- package/dist/esm/components/Alert/AlertActionLink.d.ts +5 -2
- package/dist/esm/components/Alert/AlertActionLink.d.ts.map +1 -1
- package/dist/esm/components/Alert/AlertActionLink.js.map +1 -1
- package/dist/esm/components/Alert/AlertIcon.d.ts +4 -4
- package/dist/esm/components/Alert/AlertIcon.d.ts.map +1 -1
- package/dist/esm/components/Alert/AlertToggleExpandButton.d.ts +5 -5
- package/dist/esm/components/Alert/AlertToggleExpandButton.d.ts.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts +34 -28
- package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.js +1 -0
- package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/esm/components/DatePicker/DatePicker.d.ts +43 -36
- package/dist/esm/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts +34 -24
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts +10 -5
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.js.map +1 -1
- package/dist/esm/components/FileUpload/FileUpload.d.ts +53 -47
- package/dist/esm/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/esm/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/esm/components/FileUpload/FileUploadField.d.ts +51 -46
- package/dist/esm/components/FileUpload/FileUploadField.d.ts.map +1 -1
- package/dist/esm/components/FileUpload/FileUploadField.js.map +1 -1
- package/dist/esm/components/Modal/Modal.d.ts +57 -48
- package/dist/esm/components/Modal/Modal.d.ts.map +1 -1
- package/dist/esm/components/Modal/Modal.js.map +1 -1
- package/dist/esm/components/Modal/ModalBox.d.ts +12 -12
- package/dist/esm/components/Modal/ModalBox.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalBoxBody.d.ts +2 -2
- package/dist/esm/components/Modal/ModalBoxBody.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalBoxCloseButton.d.ts +2 -2
- package/dist/esm/components/Modal/ModalBoxCloseButton.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalBoxDescription.d.ts +3 -3
- package/dist/esm/components/Modal/ModalBoxDescription.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalBoxFooter.d.ts +2 -2
- package/dist/esm/components/Modal/ModalBoxFooter.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalBoxHeader.d.ts +3 -3
- package/dist/esm/components/Modal/ModalBoxHeader.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalBoxTitle.d.ts +8 -9
- package/dist/esm/components/Modal/ModalBoxTitle.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalBoxTitle.js.map +1 -1
- package/dist/esm/components/Modal/ModalContent.d.ts +56 -48
- package/dist/esm/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalContent.js.map +1 -1
- package/dist/esm/components/NotificationBadge/NotificationBadge.d.ts +17 -13
- package/dist/esm/components/NotificationBadge/NotificationBadge.d.ts.map +1 -1
- package/dist/esm/components/NotificationBadge/NotificationBadge.js +3 -3
- package/dist/esm/components/NotificationBadge/NotificationBadge.js.map +1 -1
- package/dist/esm/components/Pagination/Navigation.d.ts +33 -33
- package/dist/esm/components/Pagination/Navigation.d.ts.map +1 -1
- package/dist/esm/components/Pagination/OptionsToggle.d.ts +27 -26
- package/dist/esm/components/Pagination/OptionsToggle.d.ts.map +1 -1
- package/dist/esm/components/Pagination/OptionsToggle.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.d.ts +76 -65
- package/dist/esm/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js +1 -1
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/Pagination/PaginationOptionsMenu.d.ts +22 -18
- package/dist/esm/components/Pagination/PaginationOptionsMenu.d.ts.map +1 -1
- package/dist/esm/components/Pagination/PaginationOptionsMenu.js.map +1 -1
- package/dist/esm/components/Pagination/ToggleTemplate.d.ts +3 -0
- package/dist/esm/components/Pagination/ToggleTemplate.d.ts.map +1 -1
- package/dist/esm/components/Pagination/ToggleTemplate.js.map +1 -1
- package/dist/esm/components/Popover/Popover.d.ts +88 -73
- package/dist/esm/components/Popover/Popover.d.ts.map +1 -1
- package/dist/esm/components/Popover/Popover.js.map +1 -1
- package/dist/esm/components/SearchInput/AdvancedSearchMenu.d.ts +27 -26
- package/dist/esm/components/SearchInput/AdvancedSearchMenu.d.ts.map +1 -1
- package/dist/esm/components/SearchInput/AdvancedSearchMenu.js.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.d.ts +71 -60
- package/dist/esm/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/components/Slider/Slider.d.ts +45 -39
- package/dist/esm/components/Slider/Slider.d.ts.map +1 -1
- package/dist/esm/components/Slider/Slider.js.map +1 -1
- package/dist/esm/components/Slider/SliderStep.d.ts +10 -10
- package/dist/esm/components/Slider/SliderStep.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeView.d.ts +65 -53
- package/dist/esm/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeView.js.map +1 -1
- package/dist/esm/components/TreeView/TreeViewList.d.ts +4 -4
- package/dist/esm/components/TreeView/TreeViewList.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeViewListItem.d.ts +46 -39
- package/dist/esm/components/TreeView/TreeViewListItem.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeViewListItem.js.map +1 -1
- package/dist/esm/components/TreeView/TreeViewRoot.d.ts +4 -4
- package/dist/esm/components/TreeView/TreeViewRoot.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeViewSearch.d.ts +11 -8
- package/dist/esm/components/TreeView/TreeViewSearch.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeViewSearch.js.map +1 -1
- package/dist/esm/helpers/Popper/Popper.js +8 -8
- package/dist/esm/helpers/Popper/Popper.js.map +1 -1
- package/dist/js/components/Alert/Alert.d.ts +41 -34
- package/dist/js/components/Alert/Alert.d.ts.map +1 -1
- package/dist/js/components/Alert/Alert.js.map +1 -1
- package/dist/js/components/Alert/AlertActionCloseButton.d.ts +8 -5
- package/dist/js/components/Alert/AlertActionCloseButton.d.ts.map +1 -1
- package/dist/js/components/Alert/AlertActionCloseButton.js.map +1 -1
- package/dist/js/components/Alert/AlertActionLink.d.ts +5 -2
- package/dist/js/components/Alert/AlertActionLink.d.ts.map +1 -1
- package/dist/js/components/Alert/AlertActionLink.js.map +1 -1
- package/dist/js/components/Alert/AlertIcon.d.ts +4 -4
- package/dist/js/components/Alert/AlertIcon.d.ts.map +1 -1
- package/dist/js/components/Alert/AlertToggleExpandButton.d.ts +5 -5
- package/dist/js/components/Alert/AlertToggleExpandButton.d.ts.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.d.ts +34 -28
- package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.js +1 -0
- package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/js/components/DatePicker/DatePicker.d.ts +43 -36
- package/dist/js/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/js/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts +34 -24
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts +10 -5
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.js.map +1 -1
- package/dist/js/components/FileUpload/FileUpload.d.ts +53 -47
- package/dist/js/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/js/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/js/components/FileUpload/FileUploadField.d.ts +51 -46
- package/dist/js/components/FileUpload/FileUploadField.d.ts.map +1 -1
- package/dist/js/components/FileUpload/FileUploadField.js.map +1 -1
- package/dist/js/components/Modal/Modal.d.ts +57 -48
- package/dist/js/components/Modal/Modal.d.ts.map +1 -1
- package/dist/js/components/Modal/Modal.js.map +1 -1
- package/dist/js/components/Modal/ModalBox.d.ts +12 -12
- package/dist/js/components/Modal/ModalBox.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalBoxBody.d.ts +2 -2
- package/dist/js/components/Modal/ModalBoxBody.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalBoxCloseButton.d.ts +2 -2
- package/dist/js/components/Modal/ModalBoxCloseButton.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalBoxDescription.d.ts +3 -3
- package/dist/js/components/Modal/ModalBoxDescription.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalBoxFooter.d.ts +2 -2
- package/dist/js/components/Modal/ModalBoxFooter.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalBoxHeader.d.ts +3 -3
- package/dist/js/components/Modal/ModalBoxHeader.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalBoxTitle.d.ts +8 -9
- package/dist/js/components/Modal/ModalBoxTitle.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalBoxTitle.js.map +1 -1
- package/dist/js/components/Modal/ModalContent.d.ts +56 -48
- package/dist/js/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalContent.js.map +1 -1
- package/dist/js/components/NotificationBadge/NotificationBadge.d.ts +17 -13
- package/dist/js/components/NotificationBadge/NotificationBadge.d.ts.map +1 -1
- package/dist/js/components/NotificationBadge/NotificationBadge.js +3 -3
- package/dist/js/components/NotificationBadge/NotificationBadge.js.map +1 -1
- package/dist/js/components/Pagination/Navigation.d.ts +33 -33
- package/dist/js/components/Pagination/Navigation.d.ts.map +1 -1
- package/dist/js/components/Pagination/OptionsToggle.d.ts +27 -26
- package/dist/js/components/Pagination/OptionsToggle.d.ts.map +1 -1
- package/dist/js/components/Pagination/OptionsToggle.js.map +1 -1
- package/dist/js/components/Pagination/Pagination.d.ts +76 -65
- package/dist/js/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/js/components/Pagination/Pagination.js +1 -1
- package/dist/js/components/Pagination/Pagination.js.map +1 -1
- package/dist/js/components/Pagination/PaginationOptionsMenu.d.ts +22 -18
- package/dist/js/components/Pagination/PaginationOptionsMenu.d.ts.map +1 -1
- package/dist/js/components/Pagination/PaginationOptionsMenu.js.map +1 -1
- package/dist/js/components/Pagination/ToggleTemplate.d.ts +3 -0
- package/dist/js/components/Pagination/ToggleTemplate.d.ts.map +1 -1
- package/dist/js/components/Pagination/ToggleTemplate.js.map +1 -1
- package/dist/js/components/Popover/Popover.d.ts +88 -73
- package/dist/js/components/Popover/Popover.d.ts.map +1 -1
- package/dist/js/components/Popover/Popover.js.map +1 -1
- package/dist/js/components/SearchInput/AdvancedSearchMenu.d.ts +27 -26
- package/dist/js/components/SearchInput/AdvancedSearchMenu.d.ts.map +1 -1
- package/dist/js/components/SearchInput/AdvancedSearchMenu.js.map +1 -1
- package/dist/js/components/SearchInput/SearchInput.d.ts +71 -60
- package/dist/js/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/js/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/js/components/Slider/Slider.d.ts +45 -39
- package/dist/js/components/Slider/Slider.d.ts.map +1 -1
- package/dist/js/components/Slider/Slider.js.map +1 -1
- package/dist/js/components/Slider/SliderStep.d.ts +10 -10
- package/dist/js/components/Slider/SliderStep.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeView.d.ts +65 -53
- package/dist/js/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeView.js.map +1 -1
- package/dist/js/components/TreeView/TreeViewList.d.ts +4 -4
- package/dist/js/components/TreeView/TreeViewList.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeViewListItem.d.ts +46 -39
- package/dist/js/components/TreeView/TreeViewListItem.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeViewListItem.js.map +1 -1
- package/dist/js/components/TreeView/TreeViewRoot.d.ts +4 -4
- package/dist/js/components/TreeView/TreeViewRoot.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeViewSearch.d.ts +11 -8
- package/dist/js/components/TreeView/TreeViewSearch.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeViewSearch.js.map +1 -1
- package/dist/js/helpers/Popper/Popper.js +8 -8
- package/dist/js/helpers/Popper/Popper.js.map +1 -1
- package/dist/umd/react-core.min.css +3634 -3634
- package/dist/umd/react-core.min.js +2 -2
- package/package.json +2 -2
- package/src/components/Alert/Alert.tsx +42 -34
- package/src/components/Alert/AlertActionCloseButton.tsx +9 -5
- package/src/components/Alert/AlertActionLink.tsx +6 -2
- package/src/components/Alert/AlertIcon.tsx +4 -4
- package/src/components/Alert/AlertToggleExpandButton.tsx +5 -5
- package/src/components/Badge/__tests__/Badge.test.tsx +45 -8
- package/src/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap +2 -12
- package/src/components/CalendarMonth/CalendarMonth.tsx +36 -28
- package/src/components/DatePicker/DatePicker.tsx +45 -36
- package/src/components/ExpandableSection/ExpandableSection.tsx +35 -24
- package/src/components/ExpandableSection/ExpandableSectionToggle.tsx +11 -5
- package/src/components/FileUpload/FileUpload.tsx +56 -49
- package/src/components/FileUpload/FileUploadField.tsx +56 -50
- package/src/components/Modal/Modal.tsx +57 -48
- package/src/components/Modal/ModalBox.tsx +12 -12
- package/src/components/Modal/ModalBoxBody.tsx +2 -2
- package/src/components/Modal/ModalBoxCloseButton.tsx +2 -2
- package/src/components/Modal/ModalBoxDescription.tsx +3 -3
- package/src/components/Modal/ModalBoxFooter.tsx +2 -2
- package/src/components/Modal/ModalBoxHeader.tsx +3 -3
- package/src/components/Modal/ModalBoxTitle.tsx +8 -9
- package/src/components/Modal/ModalContent.tsx +56 -48
- package/src/components/Modal/examples/Modal.md +1 -3
- package/src/components/NotificationBadge/NotificationBadge.tsx +22 -15
- package/src/components/NotificationBadge/__tests__/NotificationBadge.test.tsx +25 -1
- package/src/components/NotificationBadge/__tests__/__snapshots__/NotificationBadge.test.tsx.snap +5 -0
- package/src/components/NotificationBadge/examples/NotificationBadge.md +16 -3
- package/src/components/NotificationBadge/examples/NotificationBadgeBasic.tsx +26 -13
- package/src/components/NotificationBadge/examples/NotificationBadgeWithCount.tsx +28 -18
- package/src/components/Pagination/Navigation.tsx +33 -33
- package/src/components/Pagination/OptionsToggle.tsx +27 -26
- package/src/components/Pagination/Pagination.tsx +79 -65
- package/src/components/Pagination/PaginationOptionsMenu.tsx +22 -18
- package/src/components/Pagination/ToggleTemplate.tsx +4 -0
- package/src/components/Popover/Popover.tsx +89 -73
- package/src/components/SearchInput/AdvancedSearchMenu.tsx +29 -28
- package/src/components/SearchInput/SearchInput.tsx +76 -62
- package/src/components/Slider/Slider.tsx +47 -41
- package/src/components/Slider/SliderStep.tsx +10 -10
- package/src/components/TreeView/TreeView.tsx +67 -53
- package/src/components/TreeView/TreeViewList.tsx +4 -4
- package/src/components/TreeView/TreeViewListItem.tsx +46 -39
- package/src/components/TreeView/TreeViewRoot.tsx +4 -4
- package/src/components/TreeView/TreeViewSearch.tsx +12 -8
- package/src/demos/Masthead.md +9 -193
- package/src/demos/NotificationDrawer/NotificationDrawer.md +2 -0
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +305 -0
- package/src/helpers/Popper/Popper.tsx +8 -8
|
@@ -2,55 +2,62 @@ import * as React from 'react';
|
|
|
2
2
|
import { TextInputProps } from '../TextInput/TextInput';
|
|
3
3
|
import { PopoverProps } from '../Popover/Popover';
|
|
4
4
|
import { CalendarFormat } from '../CalendarMonth';
|
|
5
|
+
/** The main date picker component. */
|
|
5
6
|
export interface DatePickerProps extends CalendarFormat, Omit<React.HTMLProps<HTMLInputElement>, 'onChange' | 'onFocus' | 'onBlur' | 'disabled' | 'ref'> {
|
|
6
|
-
/** Additional classes added to the date time picker. */
|
|
7
|
-
className?: string;
|
|
8
|
-
/** Accessible label for the date picker */
|
|
9
|
-
'aria-label'?: string;
|
|
10
|
-
/** How to format the date in the TextInput */
|
|
11
|
-
dateFormat?: (date: Date) => string;
|
|
12
|
-
/** How to format the date in the TextInput */
|
|
13
|
-
dateParse?: (value: string) => Date;
|
|
14
|
-
/** Flag indicating the date picker is disabled*/
|
|
15
|
-
isDisabled?: boolean;
|
|
16
|
-
/** String to display in the empty date picker field as a hint for the expected date format */
|
|
17
|
-
placeholder?: string;
|
|
18
|
-
/** Value of TextInput */
|
|
19
|
-
value?: string;
|
|
20
|
-
/** Error message to display when the TextInput cannot be parsed. */
|
|
21
|
-
invalidFormatText?: string;
|
|
22
|
-
/** Callback called every time the input value changes */
|
|
23
|
-
onChange?: (value: string, date?: Date) => void;
|
|
24
|
-
/** Callback called every time the input loses focus */
|
|
25
|
-
onBlur?: (value: string, date?: Date) => void;
|
|
26
|
-
/** Text for label */
|
|
27
|
-
helperText?: React.ReactNode;
|
|
28
|
-
/** Aria label for the button to open the date picker */
|
|
29
|
-
buttonAriaLabel?: string;
|
|
30
7
|
/** The container to append the menu to. Defaults to 'parent'.
|
|
31
8
|
* If your menu is being cut off you can append it to an element higher up the DOM tree.
|
|
32
9
|
* Some examples:
|
|
33
|
-
* menuAppendTo={() => document.body}
|
|
10
|
+
* menuAppendTo={() => document.body};
|
|
34
11
|
* menuAppendTo={document.getElementById('target')}
|
|
35
12
|
*/
|
|
36
13
|
appendTo?: HTMLElement | ((ref?: HTMLElement) => HTMLElement) | 'parent';
|
|
37
|
-
/**
|
|
14
|
+
/** Accessible label for the date picker. */
|
|
15
|
+
'aria-label'?: string;
|
|
16
|
+
/** Accessible label for the button to open the date picker. */
|
|
17
|
+
buttonAriaLabel?: string;
|
|
18
|
+
/** Additional classes added to the date picker. */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** How to format the date in the text input. */
|
|
21
|
+
dateFormat?: (date: Date) => string;
|
|
22
|
+
/** How to format the date in the text input. */
|
|
23
|
+
dateParse?: (value: string) => Date;
|
|
24
|
+
/** Helper text to display alongside the date picker. */
|
|
25
|
+
helperText?: React.ReactNode;
|
|
26
|
+
/** Additional props for the text input. */
|
|
27
|
+
inputProps?: TextInputProps;
|
|
28
|
+
/** Flag indicating the date picker is disabled. */
|
|
29
|
+
isDisabled?: boolean;
|
|
30
|
+
/** Error message to display when the text input cannot be parsed. */
|
|
31
|
+
invalidFormatText?: string;
|
|
32
|
+
/** Callback called every time the text input loses focus. */
|
|
33
|
+
onBlur?: (value: string, date?: Date) => void;
|
|
34
|
+
/** Callback called every time the text input value changes. */
|
|
35
|
+
onChange?: (value: string, date?: Date) => void;
|
|
36
|
+
/** String to display in the empty text input as a hint for the expected date format. */
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
/** Props to pass to the popover that contains the calendar month component. */
|
|
38
39
|
popoverProps?: Partial<Omit<PopoverProps, 'appendTo'>>;
|
|
39
|
-
/** Functions that returns an error message if a date is invalid */
|
|
40
|
+
/** Functions that returns an error message if a date is invalid. */
|
|
40
41
|
validators?: ((date: Date) => string)[];
|
|
41
|
-
/**
|
|
42
|
-
|
|
42
|
+
/** Value of the text input. */
|
|
43
|
+
value?: string;
|
|
43
44
|
}
|
|
45
|
+
/** Allows finer control over the calendar's open state when a React ref is passed into the
|
|
46
|
+
* date picker component. Accessed via ref.current[property], e.g. ref.current.toggleCalendar().
|
|
47
|
+
*/
|
|
44
48
|
export interface DatePickerRef {
|
|
45
|
-
/**
|
|
49
|
+
/** Current calendar open status. */
|
|
50
|
+
isCalendarOpen: boolean;
|
|
51
|
+
/** Sets the calendar open status. */
|
|
46
52
|
setCalendarOpen: (isOpen: boolean) => void;
|
|
47
|
-
/** Toggles the calendar open status. If no parameters are passed, the calendar will simply
|
|
48
|
-
*
|
|
49
|
-
* If the
|
|
50
|
-
*
|
|
53
|
+
/** Toggles the calendar open status. If no parameters are passed, the calendar will simply
|
|
54
|
+
* toggle its open status.
|
|
55
|
+
* If the isOpen parameter is passed, that will set the calendar open status to the value
|
|
56
|
+
* of the isOpen parameter.
|
|
57
|
+
* If the eventKey parameter is set to 'Escape', that will invoke the date pickers
|
|
58
|
+
* onEscapePress event to toggle the correct control appropriately.
|
|
59
|
+
*/
|
|
51
60
|
toggleCalendar: (isOpen?: boolean, eventKey?: string) => void;
|
|
52
|
-
/** Current calendar open status */
|
|
53
|
-
isCalendarOpen: boolean;
|
|
54
61
|
}
|
|
55
62
|
export declare const yyyyMMddFormat: (date: Date) => string;
|
|
56
63
|
export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<DatePickerRef>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAa,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE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,CAAC,qBAAM,CAAC,oBAAoB,EAAE,qBAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAG,SAAS,CAAO,CAC5G,CACP,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,UAAU,GAAG,KAAK,CAAC,UAAU,CAAiC,cAAc,CAAC,CAAC;AAC3F,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
|
|
@@ -4,42 +4,52 @@ export declare enum ExpandableSectionVariant {
|
|
|
4
4
|
default = "default",
|
|
5
5
|
truncate = "truncate"
|
|
6
6
|
}
|
|
7
|
+
/** The main expandable section component. */
|
|
7
8
|
export interface ExpandableSectionProps extends React.HTMLProps<HTMLDivElement> {
|
|
8
9
|
/** Content rendered inside the expandable section. */
|
|
9
10
|
children?: React.ReactNode;
|
|
10
11
|
/** Additional classes added to the expandable section. */
|
|
11
12
|
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
toggleText?: string;
|
|
16
|
-
/** Text that appears in the attached toggle when expanded (will override toggleText if both are specified; used for uncontrolled expandable with dynamic toggle text) */
|
|
17
|
-
toggleTextExpanded?: string;
|
|
18
|
-
/** Text that appears in the attached toggle when collapsed (will override toggleText if both are specified; used for uncontrolled expandable with dynamic toggle text) */
|
|
19
|
-
toggleTextCollapsed?: string;
|
|
20
|
-
/** React node that appears in the attached toggle in place of toggle text */
|
|
21
|
-
toggleContent?: React.ReactNode;
|
|
22
|
-
/** Callback function to toggle the expandable section. Detached expandable sections should use the onToggle property of the expandable section toggle sub-component. */
|
|
23
|
-
onToggle?: (isExpanded: boolean) => void;
|
|
24
|
-
/** Forces active state */
|
|
25
|
-
isActive?: boolean;
|
|
26
|
-
/** Indicates the expandable section has a detached toggle */
|
|
27
|
-
isDetached?: boolean;
|
|
28
|
-
/** ID of the content of the expandable section */
|
|
13
|
+
/** Id of the content of the expandable section. When passing in the isDetached property, this
|
|
14
|
+
* property's value should match the contenId property of the expandable section toggle sub-component.
|
|
15
|
+
*/
|
|
29
16
|
contentId?: string;
|
|
30
|
-
/** Display size variant. Set to large for disclosure styling. */
|
|
17
|
+
/** Display size variant. Set to "large" for disclosure styling. */
|
|
31
18
|
displaySize?: 'default' | 'large';
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/**
|
|
19
|
+
/** Forces active state. */
|
|
20
|
+
isActive?: boolean;
|
|
21
|
+
/** Indicates the expandable section has a detached toggle. */
|
|
22
|
+
isDetached?: boolean;
|
|
23
|
+
/** Flag to indicate if the content is expanded. */
|
|
24
|
+
isExpanded?: boolean;
|
|
25
|
+
/** Flag to indicate if the content is indented. */
|
|
35
26
|
isIndented?: boolean;
|
|
27
|
+
/** Flag to indicate the width of the component is limited. Set to "true" for disclosure styling. */
|
|
28
|
+
isWidthLimited?: boolean;
|
|
29
|
+
/** Callback function to toggle the expandable section. Detached expandable sections should
|
|
30
|
+
* use the onToggle property of the expandable section toggle sub-component.
|
|
31
|
+
*/
|
|
32
|
+
onToggle?: (isExpanded: boolean) => void;
|
|
33
|
+
/** React node that appears in the attached toggle in place of the toggleText property. */
|
|
34
|
+
toggleContent?: React.ReactNode;
|
|
35
|
+
/** Text that appears in the attached toggle. */
|
|
36
|
+
toggleText?: string;
|
|
37
|
+
/** Text that appears in the attached toggle when collapsed (will override toggleText if
|
|
38
|
+
* both are specified; used for uncontrolled expandable with dynamic toggle text).
|
|
39
|
+
*/
|
|
40
|
+
toggleTextCollapsed?: string;
|
|
41
|
+
/** Text that appears in the attached toggle when expanded (will override toggleText if
|
|
42
|
+
* both are specified; used for uncontrolled expandable with dynamic toggle text).
|
|
43
|
+
*/
|
|
44
|
+
toggleTextExpanded?: string;
|
|
45
|
+
/** @beta Truncates the expandable content to the specified number of lines when using the
|
|
46
|
+
* "truncate" variant.
|
|
47
|
+
*/
|
|
48
|
+
truncateMaxLines?: number;
|
|
36
49
|
/** @beta Determines the variant of the expandable section. When passing in "truncate" as the
|
|
37
50
|
* variant, the expandable content will be truncated after 3 lines by default.
|
|
38
51
|
*/
|
|
39
52
|
variant?: 'default' | 'truncate';
|
|
40
|
-
/** @beta Truncates the expandable content to the specified number of lines when using the
|
|
41
|
-
* "truncate" variant. */
|
|
42
|
-
truncateMaxLines?: number;
|
|
43
53
|
}
|
|
44
54
|
interface ExpandableSectionState {
|
|
45
55
|
isExpanded: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableSection.d.ts","sourceRoot":"","sources":["../../../../src/components/ExpandableSection/ExpandableSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IAC7E,sDAAsD;IACtD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"ExpandableSection.d.ts","sourceRoot":"","sources":["../../../../src/components/ExpandableSection/ExpandableSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,6CAA6C;AAE7C,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IAC7E,sDAAsD;IACtD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,WAAW,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAClC,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oGAAoG;IACpG,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,0FAA0F;IAC1F,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;CAClC;AAED,UAAU,sBAAsB;IAC9B,UAAU,EAAE,OAAO,CAAC;CACrB;AAUD,qBAAa,iBAAkB,SAAQ,KAAK,CAAC,SAAS,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;IACpG,MAAM,CAAC,WAAW,SAAuB;gBAC7B,KAAK,EAAE,sBAAsB;IAQzC,oBAAoB,kCAAqC;IACzD,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,sBAAsB,CAAC,CAcvD;IAEF,OAAO,CAAC,mBAAmB;IAe3B,iBAAiB;IAOjB,kBAAkB,CAAC,SAAS,EAAE,sBAAsB;IAUpD,MAAM;CAoFP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableSection.js","sourceRoot":"","sources":["../../../../src/components/ExpandableSection/ExpandableSection.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,8IAAkG;AAClG,2DAA+C;AAC/C,qLAA6G;AAC7G,sHAAqF;AAGrF,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,iDAAqB,CAAA;AACvB,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC;
|
|
1
|
+
{"version":3,"file":"ExpandableSection.js","sourceRoot":"","sources":["../../../../src/components/ExpandableSection/ExpandableSection.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,8IAAkG;AAClG,2DAA+C;AAC/C,qLAA6G;AAC7G,sHAAqF;AAGrF,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,iDAAqB,CAAA;AACvB,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC;AAuDD,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,OAAuB,EAAE,EAAE;IAC9D,IAAI,CAAC,OAAO,IAAI,KAAK,GAAG,CAAC,EAAE;QACzB,OAAO;KACR;IAED,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,4DAAS,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC9D,CAAC,CAAC;AAEF,MAAa,iBAAkB,SAAQ,KAAK,CAAC,SAAyD;IAEpG,YAAY,KAA6B;QACvC,KAAK,CAAC,KAAK,CAAC,CAAC;QAOf,yBAAoB,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;QALvD,IAAI,CAAC,KAAK,GAAG;YACX,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAC;IACJ,CAAC;IAmBO,mBAAmB,CACzB,UAAkB,EAClB,kBAA0B,EAC1B,mBAA2B,EAC3B,qBAA8B;QAE9B,IAAI,qBAAqB,IAAI,kBAAkB,KAAK,EAAE,EAAE;YACtD,OAAO,kBAAkB,CAAC;SAC3B;QACD,IAAI,CAAC,qBAAqB,IAA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,IAAI,4BAAM,CAAC,SAAS,CAAC,QAAQ,EAC1E,SAAS,CACV,IACG,KAAK;YAER,OAAO,KAAK,wBAAwB,CAAC,OAAO,IAAI,gBAAgB;YACjE,6BACE,GAAG,EAAE,IAAI,CAAC,oBAAoB,EAC9B,SAAS,EAAE,kBAAG,CAAC,4BAAM,CAAC,wBAAwB,CAAC,EAC/C,MAAM,EAAE,OAAO,KAAK,wBAAwB,CAAC,QAAQ,IAAI,CAAC,qBAAqB,EAC/E,EAAE,EAAE,SAAS,IAEZ,QAAQ,CACL;YACL,OAAO,KAAK,wBAAwB,CAAC,QAAQ,IAAI,gBAAgB,CAC9D,CACP,CAAC;IACJ,CAAC;;AA9IH,8CA+IC;AA9IQ,6BAAW,GAAG,mBAAmB,CAAC;AAUlC,8BAAY,GAAyC;IAC1D,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,EAAE;IACd,kBAAkB,EAAE,EAAE;IACtB,mBAAmB,EAAE,EAAE;IACvB,6DAA6D;IAC7D,QAAQ,EAAE,CAAC,UAAU,EAAQ,EAAE,CAAC,SAAS;IACzC,QAAQ,EAAE,KAAK;IACf,UAAU,EAAE,KAAK;IACjB,WAAW,EAAE,SAAS;IACtB,cAAc,EAAE,KAAK;IACrB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,SAAS;CACnB,CAAC"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
/** Acts as the toggle sub-component when the main expandable section component has the isDetached
|
|
3
|
+
* property passed in. Allows for more custom control over the expandable section's toggle.
|
|
4
|
+
*/
|
|
2
5
|
export interface ExpandableSectionToggleProps extends React.HTMLProps<HTMLDivElement> {
|
|
3
6
|
/** Content rendered inside the expandable toggle. */
|
|
4
7
|
children?: React.ReactNode;
|
|
5
8
|
/** Additional classes added to the expandable toggle. */
|
|
6
9
|
className?: string;
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
onToggle?: (isExpanded: boolean) => void;
|
|
11
|
-
/** ID of the toggle's respective expandable section content. */
|
|
10
|
+
/** Id of the toggle's respective expandable section content. The value passed into this
|
|
11
|
+
* property should match the contentId property of the main expandable section component.
|
|
12
|
+
*/
|
|
12
13
|
contentId?: string;
|
|
13
14
|
/** Direction the toggle arrow should point when the expandable section is expanded. */
|
|
14
15
|
direction?: 'up' | 'down';
|
|
15
16
|
/** @beta Flag to determine toggle styling when the expandable content is truncated. */
|
|
16
17
|
hasTruncatedContent?: boolean;
|
|
18
|
+
/** Flag indicating if the expandable section is expanded. */
|
|
19
|
+
isExpanded?: boolean;
|
|
20
|
+
/** Callback function to toggle the expandable content. */
|
|
21
|
+
onToggle?: (isExpanded: boolean) => void;
|
|
17
22
|
}
|
|
18
23
|
export declare const ExpandableSectionToggle: React.FunctionComponent<ExpandableSectionToggleProps>;
|
|
19
24
|
//# sourceMappingURL=ExpandableSectionToggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableSectionToggle.d.ts","sourceRoot":"","sources":["../../../../src/components/ExpandableSection/ExpandableSectionToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,4BAA6B,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IACnF,qDAAqD;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB
|
|
1
|
+
{"version":3,"file":"ExpandableSectionToggle.d.ts","sourceRoot":"","sources":["../../../../src/components/ExpandableSection/ExpandableSectionToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AAEH,MAAM,WAAW,4BAA6B,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IACnF,qDAAqD;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,6DAA6D;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,iBAAiB,CAAC,4BAA4B,CAwCzF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableSectionToggle.js","sourceRoot":"","sources":["../../../../src/components/ExpandableSection/ExpandableSectionToggle.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,8IAAkG;AAClG,2DAA+C;AAC/C,sHAAqF;
|
|
1
|
+
{"version":3,"file":"ExpandableSectionToggle.js","sourceRoot":"","sources":["../../../../src/components/ExpandableSection/ExpandableSectionToggle.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,8IAAkG;AAClG,2DAA+C;AAC/C,sHAAqF;AAyB9E,MAAM,uBAAuB,GAA0D,CAAC,EAShE,EAAE,EAAE;QAT4D,EAC7F,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,UAAU,GAAG,KAAK,EAClB,QAAQ,EACR,SAAS,EACT,SAAS,GAAG,MAAM,EAClB,mBAAmB,GAAG,KAAK,OAEE,EAD1B,KAAK,sBARqF,oGAS9F,CADS;IAC0B,OAAA,CAClC,2CACE,SAAS,EAAE,kBAAG,CACZ,4BAAM,CAAC,iBAAiB,EACxB,UAAU,IAAI,4BAAM,CAAC,SAAS,CAAC,QAAQ,EACvC,4BAAM,CAAC,SAAS,CAAC,QAAQ,EACzB,mBAAmB,IAAI,4BAAM,CAAC,SAAS,CAAC,QAAQ,EAChD,SAAS,CACV,IACG,KAAK;QAET,gCACE,SAAS,EAAE,kBAAG,CAAC,4BAAM,CAAC,uBAAuB,CAAC,EAC9C,IAAI,EAAC,QAAQ,mBACE,UAAU,mBACV,SAAS,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC;YAEnC,CAAC,mBAAmB,IAAI,CACvB,8BACE,SAAS,EAAE,kBAAG,CACZ,4BAAM,CAAC,2BAA2B,EAClC,UAAU,IAAI,SAAS,KAAK,IAAI,IAAI,4BAAM,CAAC,SAAS,CAAC,SAAS,CAC/D;gBAED,oBAAC,0BAAc,0BAAe,CACzB,CACR;YACD,8BAAM,SAAS,EAAE,kBAAG,CAAC,4BAAM,CAAC,2BAA2B,CAAC,IAAG,QAAQ,CAAQ,CACpE,CACL,CACP,CAAA;CAAA,CAAC;AAxCW,QAAA,uBAAuB,2BAwClC;AAEF,+BAAuB,CAAC,WAAW,GAAG,yBAAyB,CAAC"}
|
|
@@ -1,71 +1,77 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DropzoneProps } from 'react-dropzone';
|
|
3
3
|
import { FileUploadFieldProps } from './FileUploadField';
|
|
4
|
+
/** The main file upload component with drag and drop functionality built in by default. */
|
|
4
5
|
export interface FileUploadProps extends Omit<FileUploadFieldProps, 'children' | 'onBrowseButtonClick' | 'onClearButtonClick' | 'isDragActive' | 'containerRef'> {
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
/** Flag to allow editing of a text file's contents after it is selected from disk. */
|
|
7
|
+
allowEditingUploadedText?: boolean;
|
|
8
|
+
/** Aria-label for the text area. */
|
|
9
|
+
'aria-label'?: string;
|
|
10
|
+
/** Text for the browse button. */
|
|
11
|
+
browseButtonText?: string;
|
|
12
|
+
/** Additional children to render after (or instead of) the file preview. */
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
/** Additional classes added to the file upload container element. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Text for the clear button. */
|
|
17
|
+
clearButtonText?: string;
|
|
13
18
|
/** Value to be shown in the read-only filename field. */
|
|
14
19
|
filename?: string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
/** Aria-label for the read-only filename field. */
|
|
21
|
+
filenameAriaLabel?: string;
|
|
22
|
+
/** Placeholder string to display in the empty filename field. */
|
|
23
|
+
filenamePlaceholder?: string;
|
|
24
|
+
/** Flag to hide the built-in preview of the file (where available). If true, you can use
|
|
25
|
+
* the children property to render an alternate preview.
|
|
26
|
+
*/
|
|
27
|
+
hideDefaultPreview?: boolean;
|
|
28
|
+
/** Unique id for the text area. Also used to generate ids for accessible labels. */
|
|
29
|
+
id: string;
|
|
23
30
|
/** Flag to show if the field is disabled. */
|
|
24
31
|
isDisabled?: boolean;
|
|
25
|
-
/** Flag to show if the field is read only. */
|
|
26
|
-
isReadOnly?: boolean;
|
|
27
32
|
/** Flag to show if a file is being loaded. */
|
|
28
33
|
isLoading?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
|
|
34
|
+
/** Flag to show if the field is read only. */
|
|
35
|
+
isReadOnly?: boolean;
|
|
31
36
|
/** Flag to show if the field is required. */
|
|
32
37
|
isRequired?: boolean;
|
|
38
|
+
/** @deprecated A callback for when the file contents changes. Please instead use
|
|
39
|
+
* onFileInputChange, onTextChange, onDataChange, and onClearClick individually.
|
|
40
|
+
*/
|
|
41
|
+
onChange?: (value: string | File, filename: string, event: React.MouseEvent<HTMLButtonElement, MouseEvent> | React.DragEvent<HTMLElement> | React.ChangeEvent<HTMLElement>) => void;
|
|
42
|
+
/** Callback for clicking on the file upload field text area. By default, prevents a click
|
|
43
|
+
* in the text area from opening file dialog.
|
|
44
|
+
*/
|
|
45
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
46
|
+
/** Change event emitted from the hidden \<input type="file" \> field associated with the component */
|
|
47
|
+
onFileInputChange?: (event: React.ChangeEvent<HTMLInputElement> | React.DragEvent<HTMLElement>, file: File) => void;
|
|
48
|
+
/** Aria-valuetext for the loading spinner. */
|
|
49
|
+
spinnerAriaValueText?: string;
|
|
50
|
+
/** What type of file. Determines what is passed to the onChange property and what is
|
|
51
|
+
* expected by the value property (a string for 'text' and 'dataURL', or a File object otherwise.
|
|
52
|
+
*/
|
|
53
|
+
type?: 'text' | 'dataURL';
|
|
33
54
|
/** Value to indicate if the field is modified to show that validation state.
|
|
34
55
|
* If set to success, field will be modified to indicate valid state.
|
|
35
|
-
* If set to error,
|
|
56
|
+
* If set to error, field will be modified to indicate error state.
|
|
36
57
|
*/
|
|
37
58
|
validated?: 'success' | 'error' | 'default';
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
/** Placeholder string to display in the empty filename field */
|
|
41
|
-
filenamePlaceholder?: string;
|
|
42
|
-
/** Aria-label for the read-only filename field */
|
|
43
|
-
filenameAriaLabel?: string;
|
|
44
|
-
/** Text for the Browse button */
|
|
45
|
-
browseButtonText?: string;
|
|
46
|
-
/** Text for the Clear button */
|
|
47
|
-
clearButtonText?: string;
|
|
48
|
-
/** Flag to hide the built-in preview of the file (where available).
|
|
49
|
-
* If true, you can use children to render an alternate preview. */
|
|
50
|
-
hideDefaultPreview?: boolean;
|
|
51
|
-
/** Flag to allow editing of a text file's contents after it is selected from disk */
|
|
52
|
-
allowEditingUploadedText?: boolean;
|
|
53
|
-
/** Additional children to render after (or instead of) the file preview. */
|
|
54
|
-
children?: React.ReactNode;
|
|
55
|
-
/** A callback for when a selected file starts loading */
|
|
56
|
-
onReadStarted?: (fileHandle: File) => void;
|
|
57
|
-
/** A callback for when a selected file finishes loading */
|
|
58
|
-
onReadFinished?: (fileHandle: File) => void;
|
|
59
|
-
/** A callback for when the FileReader API fails */
|
|
60
|
-
onReadFailed?: (error: DOMException, fileHandle: File) => void;
|
|
59
|
+
/** Value of the file's contents (string if text file, File object otherwise). */
|
|
60
|
+
value?: string | File;
|
|
61
61
|
/** Optional extra props to customize react-dropzone. */
|
|
62
62
|
dropzoneProps?: DropzoneProps;
|
|
63
|
-
/** Clear button was clicked */
|
|
63
|
+
/** Clear button was clicked. */
|
|
64
64
|
onClearClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
65
|
-
/** Text area text changed */
|
|
66
|
-
onTextChange?: (text: string) => void;
|
|
67
65
|
/** On data changed - if type='text' or type='dataURL' and file was loaded it will call this method */
|
|
68
66
|
onDataChange?: (data: string) => void;
|
|
67
|
+
/** A callback for when the FileReader API fails. */
|
|
68
|
+
onReadFailed?: (error: DOMException, fileHandle: File) => void;
|
|
69
|
+
/** A callback for when a selected file finishes loading. */
|
|
70
|
+
onReadFinished?: (fileHandle: File) => void;
|
|
71
|
+
/** A callback for when a selected file starts loading. */
|
|
72
|
+
onReadStarted?: (fileHandle: File) => void;
|
|
73
|
+
/** Text area text changed. */
|
|
74
|
+
onTextChange?: (text: string) => void;
|
|
69
75
|
}
|
|
70
76
|
export declare const FileUpload: React.FunctionComponent<FileUploadProps>;
|
|
71
77
|
//# sourceMappingURL=FileUpload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../../src/components/FileUpload/FileUpload.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAiB,EAAE,aAAa,EAA4C,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAmB,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAQ1E,MAAM,WAAW,eACf,SAAQ,IAAI,CACV,oBAAoB,EACpB,UAAU,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,cAAc,GAAG,cAAc,CAC5F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;IAC3C,8BAA8B;IAC9B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAgH/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.js","sourceRoot":"","sources":["../../../../src/components/FileUpload/FileUpload.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,4EAAmG;AACnG,uDAA0E;AAC1E,uDAAmE;AACnE,iDAA0C;
|
|
1
|
+
{"version":3,"file":"FileUpload.js","sourceRoot":"","sources":["../../../../src/components/FileUpload/FileUpload.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,4EAAmG;AACnG,uDAA0E;AAC1E,uDAAmE;AACnE,iDAA0C;AA8FnC,MAAM,UAAU,GAA6C,CAAC,EAiBnD,EAAE,EAAE;QAjB+C,EACnE,EAAE,EACF,IAAI,EACJ,KAAK,GAAG,IAAI,KAAK,0BAAc,CAAC,IAAI,IAAI,IAAI,KAAK,0BAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EACnF,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,IAAI,EACf,QAAQ,GAAG,GAAG,EAAE,GAAE,CAAC,EACnB,iBAAiB,GAAG,IAAI,EACxB,aAAa,GAAG,GAAG,EAAE,GAAE,CAAC,EACxB,cAAc,GAAG,GAAG,EAAE,GAAE,CAAC,EACzB,YAAY,GAAG,GAAG,EAAE,GAAE,CAAC,EACvB,YAAY,EACZ,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EACzC,YAAY,EACZ,YAAY,EACZ,aAAa,GAAG,EAAE,OAEF,EADb,KAAK,sBAhB2D,+MAiBpE,CADS;IAER,MAAM,cAAc,GAAyB,CAAC,aAAa,EAAE,KAAK,EAAE,EAAE;QACpE,I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,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAS,CAAC,CAAC;iBAC1C;YACH,CAAC,CAAA,GACF,CAAC;QAEF,OAAO,CACL,oBAAC,iCAAe,oBACV,YAAY,iCACX,KAAK,KACR,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,IACxC,IACF,QAAQ,EAAE,IAAI,EACd,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,IAAI,EACzB,kBAAkB,EAAE,kBAAkB,EACtC,eAAe,EAAE,OAAO,EACxB,YAAY,EAAE,YAAY;YAE1B,+CAEM,UAAU,IACd,GAAG,EAAE,KAAK,CAAC,EAAE;oBACX,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;oBAC5B,UAAwC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACvD,CAAC,IACD;YACD,QAAQ,CACO,CACnB,CAAC;IACJ,CAAC,CACQ,CACZ,CAAC;AACJ,CAAC,CAAC;AAhHW,QAAA,UAAU,cAgHrB;AACF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
|
|
@@ -1,68 +1,73 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
/** A more customizable file upload component for implementing custom logic. Drag and drop
|
|
3
|
+
* functionality is not built in by default.
|
|
4
|
+
*/
|
|
2
5
|
export interface FileUploadFieldProps extends Omit<React.HTMLProps<HTMLDivElement>, 'value' | 'onChange'> {
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
/** Flag to allow editing of a text file's contents after it is selected from disk. */
|
|
7
|
+
allowEditingUploadedText?: boolean;
|
|
8
|
+
/** Aria-label for the text area. */
|
|
9
|
+
'aria-label'?: string;
|
|
10
|
+
/** Text for the browse button. */
|
|
11
|
+
browseButtonText?: string;
|
|
12
|
+
/** Additional children to render after (or instead of) the file preview. */
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
/** Additional classes added to the file upload field container element. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Text for the clear button. */
|
|
17
|
+
clearButtonText?: string;
|
|
11
18
|
/** Value to be shown in the read-only filename field. */
|
|
12
19
|
filename?: string;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
|
|
20
|
+
/** Aria-label for the read-only filename field. */
|
|
21
|
+
filenameAriaLabel?: string;
|
|
22
|
+
/** Placeholder string to display in the empty filename field. */
|
|
23
|
+
filenamePlaceholder?: string;
|
|
24
|
+
/** Flag to hide the built-in preview of the file (where available). If true, you can use
|
|
25
|
+
* the children property to render an alternate preview.
|
|
26
|
+
*/
|
|
27
|
+
hideDefaultPreview?: boolean;
|
|
28
|
+
/** Unique id for the text area. Also used to generate ids for accessible labels. */
|
|
29
|
+
id: string;
|
|
30
|
+
/** Flag to disable the clear button. */
|
|
31
|
+
isClearButtonDisabled?: boolean;
|
|
17
32
|
/** Flag to show if the field is disabled. */
|
|
18
33
|
isDisabled?: boolean;
|
|
19
|
-
/** Flag to show if the field is read only. */
|
|
20
|
-
isReadOnly?: boolean;
|
|
21
34
|
/** Flag to show if a file is being loaded. */
|
|
22
35
|
isLoading?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
|
|
36
|
+
/** Flag to show if the field is read only. */
|
|
37
|
+
isReadOnly?: boolean;
|
|
25
38
|
/** Flag to show if the field is required. */
|
|
26
39
|
isRequired?: boolean;
|
|
40
|
+
/** A callback for when the text area value changes. */
|
|
41
|
+
onChange?: (value: string, filename: string, event: React.ChangeEvent<HTMLTextAreaElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
42
|
+
/** Aria-valuetext for the loading spinner. */
|
|
43
|
+
spinnerAriaValueText?: string;
|
|
44
|
+
/** What type of file. Determines what is is expected by the value property (a string for
|
|
45
|
+
* 'text' and 'dataURL', or a File object otherwise).
|
|
46
|
+
*/
|
|
47
|
+
type?: 'text' | 'dataURL';
|
|
27
48
|
/** Value to indicate if the field is modified to show that validation state.
|
|
28
49
|
* If set to success, field will be modified to indicate valid state.
|
|
29
50
|
* If set to error, field will be modified to indicate error state.
|
|
30
51
|
*/
|
|
31
52
|
validated?: 'success' | 'error' | 'default';
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
browseButtonText?: string;
|
|
40
|
-
/** Text for the Clear button */
|
|
41
|
-
clearButtonText?: string;
|
|
42
|
-
/** Flag to disable the Clear button */
|
|
43
|
-
isClearButtonDisabled?: boolean;
|
|
44
|
-
/** Flag to hide the built-in preview of the file (where available).
|
|
45
|
-
* If true, you can use children to render an alternate preview. */
|
|
46
|
-
hideDefaultPreview?: boolean;
|
|
47
|
-
/** Flag to allow editing of a text file's contents after it is selected from disk */
|
|
48
|
-
allowEditingUploadedText?: boolean;
|
|
49
|
-
/** Additional children to render after (or instead of) the file preview. */
|
|
50
|
-
children?: React.ReactNode;
|
|
51
|
-
/** A callback for when the Browse button is clicked. */
|
|
53
|
+
/** Value of the file's contents (string if text file, File object otherwise). */
|
|
54
|
+
value?: string | File;
|
|
55
|
+
/** A reference object to attach to the file upload field container element. */
|
|
56
|
+
containerRef?: React.Ref<HTMLDivElement>;
|
|
57
|
+
/** Flag to show if a file is being dragged over the file upload field. */
|
|
58
|
+
isDragActive?: boolean;
|
|
59
|
+
/** A callback for when the browse button is clicked. */
|
|
52
60
|
onBrowseButtonClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
53
|
-
/** A callback for when the
|
|
61
|
+
/** A callback for when the clear button is clicked. */
|
|
54
62
|
onClearButtonClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
55
|
-
/**
|
|
63
|
+
/** Callback for when focus is lost on the text area field. */
|
|
64
|
+
onTextAreaBlur?: (event?: any) => void;
|
|
65
|
+
/** A callback for when the text area is clicked. Can also be set via the onClick property
|
|
66
|
+
* of the file upload component. */
|
|
56
67
|
onTextAreaClick?: (event: React.MouseEvent<HTMLTextAreaElement, MouseEvent>) => void;
|
|
57
|
-
/**
|
|
58
|
-
isDragActive?: boolean;
|
|
59
|
-
/** A reference object to attach to the FileUploadField container element. */
|
|
60
|
-
containerRef?: React.Ref<HTMLDivElement>;
|
|
61
|
-
/** Text area text changed */
|
|
68
|
+
/** Text area text changed. */
|
|
62
69
|
onTextChange?: (text: string) => void;
|
|
63
|
-
/**
|
|
64
|
-
onTextAreaBlur?: (event?: any) => void;
|
|
65
|
-
/** Placeholder string to display in the empty text area field */
|
|
70
|
+
/** Placeholder string to display in the empty text area field. */
|
|
66
71
|
textAreaPlaceholder?: string;
|
|
67
72
|
}
|
|
68
73
|
export declare const FileUploadField: React.FunctionComponent<FileUploadFieldProps>;
|