From c1ca3958d2f0a2f8b0df66c8428a861a6162f84d Mon Sep 17 00:00:00 2001 From: Kyle Albert <5498623+kalbert312@users.noreply.github.com> Date: Thu, 16 Apr 2020 21:38:20 -0400 Subject: [PATCH] [carbon-components-react] Update types to 7.10.3 (partial) (#43925) * Update Accordion. * Update Breadcrumb. * Accordion: inherit html ul attrs. * CheckBox Skeleton. * Update Copy. * Update CodeSnippet. * Update ComposedModal. * Update ContentSwitcher. * Update CopyButton. * Update DataTableSkeleton. * Update DatePicker. * Update DatePickerInput. * Update ListBox. * Update Dropdown. * Add ErrorBoundary. * Update FileUploader. * Update FormLabel. * Update Icon. * Update InlineCheckbox. * Update InlineLoading. * Update Link. * Update Loading. * Update Modal. * Update ModalWrapper. * Update MultiSelect. * Update Notification. * Update NumberInput. * Update OverflowMenu. * Update Pagination. * Update ProgressIndicator. * Update RadioButton. * Update RadioButtoGroup. * Update RadioTile. * Update Search. * Update SearchLayoutButton. * Update Select. * Update SelectItem. * Update Slider. * Update Switch. * Update Tab. * Update Tabs. * Update Tab. Update Tests. * Update TextArea. * Update TextInput. * Update Tile. * Update ToggleSkeleton. * Update ToggleSmall. * Update Toolbar. * Update Tooltip. * Update Toolbar and ToolbarSearch deprecation. * Update TooltipDefinition. * Update TooltipIcon. * Update ComboBox. * Update StructuredList. * Fix error. * Fix dtslint errors. * Fix dtslint errors. * ComboBox seems to have problems with undefined and controlled state so adding null here because it seems to fix my issue. Co-authored-by: Kyle Albert --- .../carbon-components-react-tests.tsx | 17 +++- types/carbon-components-react/index.d.ts | 13 +-- .../Accordion/Accordion.Skeleton.d.ts | 9 +- .../lib/components/Accordion/Accordion.d.ts | 9 +- .../Breadcrumb/Breadcrumb.Skeleton.d.ts | 7 +- .../components/Breadcrumb/BreadcrumbItem.d.ts | 4 +- .../Checkbox/Checkbox.Skeleton.d.ts | 10 +-- .../CodeSnippet/CodeSnippet.Skeleton.d.ts | 2 +- .../components/CodeSnippet/CodeSnippet.d.ts | 3 +- .../lib/components/CodeSnippet/index.d.ts | 1 + .../lib/components/ComboBox/ComboBox.d.ts | 18 +++- .../ComposedModal/ComposedModal.d.ts | 14 +-- .../ContentSwitcher/ContentSwitcher.d.ts | 8 +- .../components/ContentSwitcher/Switch.d.ts | 15 ---- .../lib/components/ContentSwitcher/index.d.ts | 2 - .../lib/components/Copy/Copy.d.ts | 4 +- .../lib/components/CopyButton/CopyButton.d.ts | 11 ++- .../DataTableSkeleton/DataTableSkeleton.d.ts | 11 ++- .../DatePicker/DatePicker.Skeleton.d.ts | 6 +- .../lib/components/DatePicker/DatePicker.d.ts | 9 +- .../DatePickerInput/DatePickerInput.d.ts | 11 ++- .../Dropdown/Dropdown.Skeleton.d.ts | 5 +- .../lib/components/Dropdown/Dropdown.d.ts | 3 + .../ErrorBoundary/ErrorBoundary.d.ts | 10 +++ .../ErrorBoundary/ErrorBoundaryContext.d.ts | 7 ++ .../lib/components/ErrorBoundary/index.d.ts | 4 + .../FileUploader/FileUploader.Skeleton.d.ts | 7 +- .../components/FileUploader/FileUploader.d.ts | 35 +++----- .../FileUploaderDropContainer.d.ts | 90 ++++++++++--------- .../FileUploader/FileUploaderItem.d.ts | 6 +- .../lib/components/FileUploader/index.d.ts | 4 + .../lib/components/FormLabel/FormLabel.d.ts | 2 +- .../lib/components/Icon/Icon.Skeleton.d.ts | 6 +- .../lib/components/Icon/Icon.d.ts | 21 ++--- .../InlineCheckbox/InlineCheckbox.d.ts | 4 +- .../InlineLoading/InlineLoading.d.ts | 2 +- .../lib/components/Link/Link.d.ts | 2 + .../lib/components/ListBox/ListBox.d.ts | 5 +- .../lib/components/ListBox/ListBoxField.d.ts | 4 +- .../components/ListBox/ListBoxPropTypes.d.ts | 1 + .../lib/components/Loading/Loading.d.ts | 2 +- .../lib/components/Modal/Modal.d.ts | 12 ++- .../components/ModalWrapper/ModalWrapper.d.ts | 2 +- .../MultiSelect/FilterableMultiSelect.d.ts | 3 +- .../components/MultiSelect/MultiSelect.d.ts | 15 ++-- .../components/Notification/Notification.d.ts | 14 +-- .../Notification/a11yIconWarningSolid.d.ts | 7 +- .../NumberInput/NumberInput.Skeleton.d.ts | 6 +- .../components/NumberInput/NumberInput.d.ts | 16 +++- .../components/OverflowMenu/OverflowMenu.d.ts | 23 +++-- .../lib/components/OverflowMenu/index.d.ts | 2 +- .../Pagination/Pagination.Skeleton.d.ts | 7 +- .../lib/components/Pagination/Pagination.d.ts | 3 +- .../ProgressIndicator.Skeleton.d.ts | 4 +- .../ProgressIndicator/ProgressIndicator.d.ts | 13 ++- .../RadioButton/RadioButton.Skeleton.d.ts | 8 +- .../components/RadioButton/RadioButton.d.ts | 9 +- .../RadioButtonGroup/RadioButtonGroup.d.ts | 2 + .../lib/components/RadioTile/RadioTile.d.ts | 14 +-- .../components/Search/Search.Skeleton.d.ts | 8 +- .../lib/components/Search/Search.d.ts | 15 ++-- .../SearchLayoutButton.d.ts | 4 +- .../components/Select/Select.Skeleton.d.ts | 6 +- .../lib/components/Select/Select.d.ts | 26 ++++-- .../lib/components/SelectItem/SelectItem.d.ts | 2 +- .../components/Slider/Slider.Skeleton.d.ts | 6 +- .../lib/components/Slider/Slider.d.ts | 2 +- .../StructuredList.Skeleton.d.ts | 3 +- .../StructuredList/StructuredList.d.ts | 3 + .../lib/components/Switch/Switch.d.ts | 21 ++++- .../lib/components/Tab/Tab.d.ts | 11 ++- .../lib/components/Tabs/Tabs.Skeleton.d.ts | 7 +- .../lib/components/Tabs/Tabs.d.ts | 2 + .../lib/components/Tag/Tag.Skeleton.d.ts | 7 +- .../lib/components/Tag/Tag.d.ts | 17 +++- .../TextArea/TextArea.Skeleton.d.ts | 6 +- .../lib/components/TextArea/TextArea.d.ts | 4 +- .../TextInput/ControlledPasswordInput.d.ts | 13 +-- .../components/TextInput/PasswordInput.d.ts | 12 ++- .../TextInput/TextInput.Skeleton.d.ts | 6 +- .../lib/components/TextInput/TextInput.d.ts | 10 ++- .../lib/components/TextInput/index.d.ts | 10 +-- .../lib/components/TextInput/props.d.ts | 19 ++-- .../lib/components/Tile/Tile.d.ts | 26 ++++-- .../components/Toggle/Toggle.Skeleton.d.ts | 10 +-- .../ToggleSmall/ToggleSmall.Skeleton.d.ts | 10 +-- .../components/ToggleSmall/ToggleSmall.d.ts | 3 +- .../lib/components/Toolbar/Toolbar.d.ts | 35 +++++++- .../ToolbarSearch/ToolbarSearch.d.ts | 6 ++ .../lib/components/Tooltip/Tooltip.d.ts | 14 ++- .../TooltipDefinition/TooltipDefinition.d.ts | 6 +- .../components/TooltipIcon/TooltipIcon.d.ts | 6 +- .../typings/shared.d.ts | 4 + .../typings/translation.d.ts | 4 +- 94 files changed, 558 insertions(+), 350 deletions(-) delete mode 100644 types/carbon-components-react/lib/components/ContentSwitcher/Switch.d.ts create mode 100644 types/carbon-components-react/lib/components/ErrorBoundary/ErrorBoundary.d.ts create mode 100644 types/carbon-components-react/lib/components/ErrorBoundary/ErrorBoundaryContext.d.ts create mode 100644 types/carbon-components-react/lib/components/ErrorBoundary/index.d.ts diff --git a/types/carbon-components-react/carbon-components-react-tests.tsx b/types/carbon-components-react/carbon-components-react-tests.tsx index 5902cf8eea..29e011f47d 100644 --- a/types/carbon-components-react/carbon-components-react-tests.tsx +++ b/types/carbon-components-react/carbon-components-react-tests.tsx @@ -15,6 +15,7 @@ import { TableBatchActions, TableHeader, TableRow, + Tag, TileGroup, TooltipDefinition, TextArea, @@ -325,12 +326,12 @@ const tooltipDefHasTriggerClassName = ( // Tabs const tabCanBeDisabled = ( { }} handleTabClick={() => { }} handleTabKeyDown={() => { }} href="#" tabIndex={0} disabled + selected={false} /> ); @@ -344,6 +345,19 @@ const SliderHasOnChange = ( /> ); +// Tag +const ChipTagFilterUndef = ( + +); + +const ChipTagFalse = ( + +); + +const FilterTag = ( + {}}/> +); + // TextArea const textAreaWithDefaultRef = (