@carbon/react 1.21.0 → 1.22.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/es/components/Accordion/AccordionItem.js +2 -2
- package/es/components/Breadcrumb/Breadcrumb.js +2 -1
- package/es/components/Breadcrumb/BreadcrumbItem.js +2 -1
- package/es/components/Button/Button.Skeleton.js +2 -1
- package/es/components/Button/Button.js +2 -1
- package/es/components/Button/index.js +0 -1
- package/es/components/ButtonSet/ButtonSet.js +2 -1
- package/es/{es/components → components}/Checkbox/Checkbox.Skeleton.d.ts +0 -0
- package/es/{es/components → components}/Checkbox/Checkbox.d.ts +0 -0
- package/es/{es/components → components}/Checkbox/index.d.ts +0 -0
- package/es/components/CodeSnippet/CodeSnippet.js +0 -1
- package/es/components/ComboBox/ComboBox.js +7 -7
- package/es/components/ComposedModal/ComposedModal.js +3 -2
- package/es/components/ComposedModal/ModalFooter.js +0 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +3 -3
- package/es/components/DangerButton/DangerButton.js +3 -2
- package/es/components/DataTable/Table.js +2 -1
- package/es/components/DataTable/TableActionList.js +2 -1
- package/es/components/DataTable/TableBatchAction.js +2 -2
- package/es/components/DataTable/TableBatchActions.js +2 -2
- package/es/components/DataTable/TableBody.js +2 -1
- package/es/components/DataTable/TableCell.js +2 -1
- package/es/components/DataTable/TableContainer.js +2 -1
- package/es/components/DataTable/TableExpandHeader.js +2 -1
- package/es/components/DataTable/TableExpandRow.js +2 -1
- package/es/components/DataTable/TableExpandedRow.js +2 -1
- package/es/components/DataTable/TableHead.js +2 -1
- package/es/components/DataTable/TableHeader.js +2 -1
- package/es/components/DataTable/TableRow.js +2 -1
- package/es/components/DataTable/TableSelectAll.d.ts +83 -0
- package/es/components/DataTable/TableSelectAll.js +2 -1
- package/es/components/DataTable/TableSelectRow.js +2 -1
- package/es/components/DataTable/TableToolbar.js +3 -2
- package/es/components/DataTable/TableToolbarAction.js +2 -1
- package/es/components/DataTable/TableToolbarContent.js +2 -1
- package/es/components/DataTable/TableToolbarMenu.js +2 -1
- package/es/components/DataTable/TableToolbarSearch.js +2 -2
- package/es/components/DataTable/state/getDerivedStateFromProps.js +3 -1
- package/es/components/DataTable/tools/denormalize.js +3 -1
- package/es/components/DataTable/tools/instanceId.js +3 -1
- package/es/components/DataTable/tools/normalize.js +3 -1
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +2 -1
- package/es/components/DatePicker/DatePicker.Skeleton.js +2 -1
- package/es/components/DatePicker/DatePicker.js +4 -3
- package/es/components/DatePicker/index.js +0 -1
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +32 -1
- package/es/components/DatePickerInput/DatePickerInput.js +2 -1
- package/es/components/Dropdown/Dropdown.Skeleton.js +2 -1
- package/es/components/Dropdown/Dropdown.d.ts +134 -0
- package/es/components/Dropdown/Dropdown.js +27 -14
- package/es/components/Dropdown/index.d.ts +11 -0
- package/es/components/Dropdown/index.js +0 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +0 -1
- package/es/components/FileUploader/FileUploader.js +2 -2
- package/es/components/FileUploader/FileUploaderButton.js +2 -2
- package/es/components/FileUploader/FileUploaderDropContainer.js +2 -2
- package/es/components/FileUploader/FileUploaderItem.js +2 -2
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +2 -1
- package/es/components/FluidComboBox/FluidComboBox.js +2 -1
- package/es/components/FluidDatePicker/FluidDatePicker.js +2 -2
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +2 -1
- package/es/components/FluidDropdown/FluidDropdown.js +2 -2
- package/es/components/FluidForm/FluidForm.d.ts +11 -0
- package/es/components/FluidForm/FluidForm.js +2 -2
- package/es/components/FluidForm/FormContext.d.ts +11 -0
- package/es/components/FluidForm/index.d.ts +10 -0
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +2 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +2 -1
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +2 -1
- package/es/components/FluidSelect/FluidSelect.js +2 -1
- package/es/components/FluidSelect/index.js +0 -1
- package/es/components/FluidTextArea/FluidTextArea.js +0 -1
- package/es/components/FluidTextInput/FluidTextInput.js +0 -1
- package/es/components/FluidTextInput/index.js +0 -1
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +2 -3
- package/es/components/FluidTimePicker/FluidTimePicker.js +2 -2
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -2
- package/es/components/Form/Form.js +2 -1
- package/es/components/FormGroup/FormGroup.js +2 -1
- package/es/components/IconButton/index.js +1 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +4 -1
- package/es/components/Link/Link.js +2 -1
- package/es/components/ListBox/ListBox.d.ts +60 -0
- package/es/components/ListBox/ListBox.js +4 -15
- package/es/components/ListBox/ListBoxField.d.ts +18 -0
- package/es/components/ListBox/ListBoxField.js +1 -1
- package/es/components/ListBox/ListBoxMenu.d.ts +22 -0
- package/es/components/ListBox/ListBoxMenu.js +2 -2
- package/es/components/ListBox/ListBoxMenuIcon.d.ts +31 -0
- package/es/components/ListBox/ListBoxMenuIcon.js +8 -5
- package/es/components/ListBox/ListBoxMenuItem.d.ts +24 -0
- package/es/components/ListBox/ListBoxMenuItem.js +2 -3
- package/es/components/ListBox/ListBoxPropTypes.d.ts +14 -0
- package/es/components/ListBox/ListBoxPropTypes.js +4 -2
- package/es/components/ListBox/ListBoxSelection.d.ts +51 -0
- package/es/components/ListBox/ListBoxSelection.js +7 -20
- package/es/components/ListBox/index.d.ts +23 -0
- package/es/components/ListBox/index.js +11 -8
- package/es/components/ListBox/next/ListBoxSelection.js +3 -3
- package/es/components/ListBox/next/ListBoxTrigger.js +2 -1
- package/es/components/ListItem/ListItem.js +2 -1
- package/es/components/Menu/Menu.js +4 -3
- package/es/components/Menu/MenuOption.js +2 -2
- package/es/components/Modal/Modal.js +3 -3
- package/es/components/ModalWrapper/ModalWrapper.js +0 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +8 -8
- package/es/components/MultiSelect/MultiSelect.js +6 -6
- package/es/components/Notification/Notification.js +4 -5
- package/es/components/NumberInput/NumberInput.Skeleton.d.ts +32 -0
- package/es/components/OrderedList/OrderedList.js +2 -1
- package/es/components/OverflowMenu/OverflowMenu.js +40 -35
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +4 -3
- package/es/components/OverflowMenuV2/index.js +2 -2
- package/es/components/Pagination/Pagination.js +2 -1
- package/es/components/Pagination/experimental/Pagination.js +0 -1
- package/es/components/PaginationNav/PaginationNav.js +2 -2
- package/es/components/PrimaryButton/PrimaryButton.js +3 -2
- package/es/components/ProgressIndicator/ProgressIndicator.js +2 -2
- package/es/components/RadioButton/RadioButton.js +2 -1
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +2 -1
- package/es/components/RadioTile/RadioTile.js +2 -2
- package/es/components/Search/Search.Skeleton.js +2 -1
- package/es/components/Search/Search.js +6 -5
- package/es/components/Search/index.js +0 -1
- package/es/components/SecondaryButton/SecondaryButton.js +3 -2
- package/es/components/Select/Select.Skeleton.d.ts +33 -0
- package/es/components/Select/Select.Skeleton.js +2 -1
- package/es/components/Select/Select.js +2 -1
- package/es/components/SelectItem/SelectItem.js +2 -1
- package/es/components/SelectItemGroup/SelectItemGroup.js +2 -1
- package/es/components/SkeletonIcon/SkeletonIcon.js +2 -1
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +2 -1
- package/es/components/SkeletonText/SkeletonText.js +2 -1
- package/es/components/Slider/Slider.Skeleton.d.ts +33 -0
- package/es/components/Slider/Slider.Skeleton.js +2 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/StructuredList/StructuredList.Skeleton.js +2 -1
- package/es/components/Switch/Switch.js +2 -1
- package/es/components/Tab/Tab.js +1 -1
- package/es/components/TabContent/TabContent.js +2 -1
- package/es/components/Tabs/Tabs.js +2 -3
- package/es/components/Tag/Tag.js +2 -1
- package/es/{es/components → components}/Text/Text.d.ts +0 -0
- package/es/{es/components → components}/Text/TextDirection.d.ts +0 -0
- package/es/{es/components → components}/Text/createTextComponent.d.ts +0 -0
- package/es/{es/components → components}/Text/index.d.ts +0 -0
- package/es/components/TextArea/TextArea.Skeleton.js +2 -1
- package/es/components/TextArea/TextArea.js +6 -3
- package/es/components/TextArea/index.js +0 -1
- package/es/components/TextInput/ControlledPasswordInput.js +2 -1
- package/es/components/TextInput/PasswordInput.js +2 -1
- package/es/components/TextInput/TextInput.Skeleton.js +2 -1
- package/es/components/TextInput/TextInput.js +2 -1
- package/es/components/TextInput/index.js +0 -1
- package/es/components/Tile/Tile.js +3 -7
- package/es/components/TileGroup/TileGroup.js +1 -1
- package/es/components/TimePicker/TimePicker.js +2 -1
- package/es/components/TimePickerSelect/TimePickerSelect.js +2 -1
- package/es/components/TimePickerSelect/index.js +2 -2
- package/es/components/Toggletip/index.js +2 -2
- package/es/components/Tooltip/DefinitionTooltip.js +2 -2
- package/es/components/Tooltip/Tooltip.js +34 -5
- package/es/components/TreeView/TreeNode.js +2 -2
- package/es/components/TreeView/TreeView.js +2 -2
- package/es/components/UIShell/Content.js +2 -1
- package/es/components/UIShell/Header.js +3 -2
- package/es/components/UIShell/HeaderContainer.js +2 -1
- package/es/components/UIShell/HeaderGlobalAction.js +3 -3
- package/es/components/UIShell/HeaderMenu.js +5 -4
- package/es/components/UIShell/HeaderMenuButton.js +1 -1
- package/es/components/UIShell/HeaderMenuItem.js +3 -2
- package/es/components/UIShell/HeaderName.js +1 -1
- package/es/components/UIShell/HeaderNavigation.js +1 -1
- package/es/components/UIShell/HeaderPanel.js +3 -2
- package/es/components/UIShell/HeaderSideNavItems.js +2 -1
- package/es/components/UIShell/Link.js +2 -1
- package/es/components/UIShell/SideNav.js +3 -2
- package/es/components/UIShell/SideNavDetails.js +2 -1
- package/es/components/UIShell/SideNavHeader.js +2 -1
- package/es/components/UIShell/SideNavItems.js +2 -1
- package/es/components/UIShell/SideNavLink.js +3 -2
- package/es/components/UIShell/SideNavMenu.js +5 -3
- package/es/components/UIShell/SideNavMenuItem.js +2 -1
- package/es/components/UIShell/SideNavSwitcher.js +2 -1
- package/es/components/UIShell/Switcher.js +3 -2
- package/es/components/UIShell/SwitcherDivider.js +2 -1
- package/es/components/UIShell/SwitcherItem.js +3 -2
- package/es/components/UnorderedList/UnorderedList.js +2 -1
- package/es/{es/index.d.ts → index.d.ts} +0 -0
- package/es/index.js +134 -140
- package/es/internal/ClickListener.js +1 -1
- package/es/internal/FloatingMenu.js +5 -6
- package/es/internal/OptimizedResize.js +3 -1
- package/es/internal/Selection.js +1 -1
- package/es/internal/useIsomorphicEffect.js +2 -1
- package/es/{es/internal → internal}/usePrefix.d.ts +0 -0
- package/es/node_modules/flatpickr/dist/plugins/rangePlugin.js +1 -1
- package/es/tools/mergeRefs.js +3 -1
- package/es/tools/wrapComponent.js +3 -1
- package/lib/components/Accordion/AccordionItem.js +2 -2
- package/lib/components/Breadcrumb/Breadcrumb.js +2 -1
- package/lib/components/Breadcrumb/BreadcrumbItem.js +2 -1
- package/lib/components/Button/Button.Skeleton.js +2 -1
- package/lib/components/Button/Button.js +2 -1
- package/lib/components/Button/index.js +0 -2
- package/lib/components/ButtonSet/ButtonSet.js +2 -1
- package/lib/{lib/components → components}/Checkbox/Checkbox.Skeleton.d.ts +0 -0
- package/lib/{lib/components → components}/Checkbox/Checkbox.d.ts +0 -0
- package/lib/{lib/components → components}/Checkbox/index.d.ts +0 -0
- package/lib/components/CodeSnippet/CodeSnippet.js +0 -1
- package/lib/components/ComboBox/ComboBox.js +10 -10
- package/lib/components/ComposedModal/ComposedModal.js +2 -1
- package/lib/components/ComposedModal/ModalFooter.js +0 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +2 -2
- package/lib/components/DangerButton/DangerButton.js +3 -2
- package/lib/components/DataTable/DataTable.js +5 -5
- package/lib/components/DataTable/Table.js +2 -1
- package/lib/components/DataTable/TableActionList.js +2 -1
- package/lib/components/DataTable/TableBatchAction.js +2 -2
- package/lib/components/DataTable/TableBatchActions.js +2 -2
- package/lib/components/DataTable/TableBody.js +2 -1
- package/lib/components/DataTable/TableCell.js +2 -1
- package/lib/components/DataTable/TableContainer.js +2 -1
- package/lib/components/DataTable/TableExpandHeader.js +2 -1
- package/lib/components/DataTable/TableExpandRow.js +2 -1
- package/lib/components/DataTable/TableExpandedRow.js +2 -1
- package/lib/components/DataTable/TableHead.js +2 -1
- package/lib/components/DataTable/TableHeader.js +2 -1
- package/lib/components/DataTable/TableRow.js +2 -1
- package/lib/components/DataTable/TableSelectAll.d.ts +83 -0
- package/lib/components/DataTable/TableSelectAll.js +2 -1
- package/lib/components/DataTable/TableSelectRow.js +2 -1
- package/lib/components/DataTable/TableToolbar.js +2 -1
- package/lib/components/DataTable/TableToolbarAction.js +2 -1
- package/lib/components/DataTable/TableToolbarContent.js +2 -1
- package/lib/components/DataTable/TableToolbarMenu.js +2 -1
- package/lib/components/DataTable/TableToolbarSearch.js +2 -2
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +3 -1
- package/lib/components/DataTable/tools/denormalize.js +3 -1
- package/lib/components/DataTable/tools/instanceId.js +3 -1
- package/lib/components/DataTable/tools/normalize.js +3 -1
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +2 -1
- package/lib/components/DatePicker/DatePicker.Skeleton.js +2 -1
- package/lib/components/DatePicker/DatePicker.js +4 -3
- package/lib/components/DatePicker/index.js +0 -2
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +32 -1
- package/lib/components/DatePickerInput/DatePickerInput.js +2 -1
- package/lib/components/Dropdown/Dropdown.Skeleton.js +2 -1
- package/lib/components/Dropdown/Dropdown.d.ts +134 -0
- package/lib/components/Dropdown/Dropdown.js +30 -17
- package/lib/components/Dropdown/index.d.ts +11 -0
- package/lib/components/Dropdown/index.js +0 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +0 -1
- package/lib/components/FileUploader/FileUploader.js +2 -2
- package/lib/components/FileUploader/FileUploaderButton.js +2 -2
- package/lib/components/FileUploader/FileUploaderDropContainer.js +2 -2
- package/lib/components/FileUploader/FileUploaderItem.js +2 -2
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +2 -1
- package/lib/components/FluidComboBox/FluidComboBox.js +2 -1
- package/lib/components/FluidDatePicker/FluidDatePicker.js +2 -2
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +2 -1
- package/lib/components/FluidDropdown/FluidDropdown.js +2 -2
- package/lib/components/FluidForm/FluidForm.d.ts +11 -0
- package/lib/components/FluidForm/FluidForm.js +2 -2
- package/lib/components/FluidForm/FormContext.d.ts +11 -0
- package/lib/components/FluidForm/index.d.ts +10 -0
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +2 -1
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +2 -1
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +2 -1
- package/lib/components/FluidSelect/FluidSelect.js +2 -1
- package/lib/components/FluidSelect/index.js +0 -2
- package/lib/components/FluidTextArea/FluidTextArea.js +0 -1
- package/lib/components/FluidTextInput/FluidTextInput.js +0 -1
- package/lib/components/FluidTextInput/index.js +0 -2
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +2 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.js +2 -2
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -2
- package/lib/components/Form/Form.js +2 -1
- package/lib/components/FormGroup/FormGroup.js +2 -1
- package/lib/components/IconButton/index.js +1 -2
- package/lib/components/InlineCheckbox/InlineCheckbox.js +4 -1
- package/lib/components/Link/Link.js +2 -1
- package/lib/components/ListBox/ListBox.d.ts +60 -0
- package/lib/components/ListBox/ListBox.js +3 -14
- package/lib/components/ListBox/ListBoxField.d.ts +18 -0
- package/lib/components/ListBox/ListBoxField.js +1 -1
- package/lib/components/ListBox/ListBoxMenu.d.ts +22 -0
- package/lib/components/ListBox/ListBoxMenu.js +2 -2
- package/lib/components/ListBox/ListBoxMenuIcon.d.ts +31 -0
- package/lib/components/ListBox/ListBoxMenuIcon.js +8 -5
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +24 -0
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -3
- package/lib/components/ListBox/ListBoxPropTypes.d.ts +14 -0
- package/lib/components/ListBox/ListBoxPropTypes.js +4 -2
- package/lib/components/ListBox/ListBoxSelection.d.ts +51 -0
- package/lib/components/ListBox/ListBoxSelection.js +7 -20
- package/lib/components/ListBox/index.d.ts +23 -0
- package/lib/components/ListBox/index.js +12 -8
- package/lib/components/ListBox/next/ListBoxSelection.js +2 -2
- package/lib/components/ListBox/next/ListBoxTrigger.js +2 -1
- package/lib/components/ListItem/ListItem.js +2 -1
- package/lib/components/Menu/Menu.js +4 -3
- package/lib/components/Menu/MenuOption.js +2 -2
- package/lib/components/Modal/Modal.js +2 -2
- package/lib/components/ModalWrapper/ModalWrapper.js +0 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +10 -10
- package/lib/components/MultiSelect/MultiSelect.js +10 -10
- package/lib/components/Notification/Notification.js +2 -3
- package/lib/components/NumberInput/NumberInput.Skeleton.d.ts +32 -0
- package/lib/components/OrderedList/OrderedList.js +2 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +40 -54
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +4 -3
- package/lib/components/OverflowMenuV2/index.js +2 -2
- package/lib/components/Pagination/Pagination.js +2 -1
- package/lib/components/Pagination/experimental/Pagination.js +0 -1
- package/lib/components/PaginationNav/PaginationNav.js +2 -2
- package/lib/components/PrimaryButton/PrimaryButton.js +3 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -2
- package/lib/components/RadioButton/RadioButton.js +2 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +2 -1
- package/lib/components/RadioTile/RadioTile.js +2 -2
- package/lib/components/Search/Search.Skeleton.js +2 -1
- package/lib/components/Search/Search.js +4 -3
- package/lib/components/Search/index.js +0 -2
- package/lib/components/SecondaryButton/SecondaryButton.js +3 -2
- package/lib/components/Select/Select.Skeleton.d.ts +33 -0
- package/lib/components/Select/Select.Skeleton.js +2 -1
- package/lib/components/Select/Select.js +2 -1
- package/lib/components/SelectItem/SelectItem.js +2 -1
- package/lib/components/SelectItemGroup/SelectItemGroup.js +2 -1
- package/lib/components/SkeletonIcon/SkeletonIcon.js +2 -1
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +2 -1
- package/lib/components/SkeletonText/SkeletonText.js +2 -1
- package/lib/components/Slider/Slider.Skeleton.d.ts +33 -0
- package/lib/components/Slider/Slider.Skeleton.js +2 -1
- package/lib/components/StructuredList/StructuredList.Skeleton.js +2 -1
- package/lib/components/Switch/Switch.js +2 -1
- package/lib/components/TabContent/TabContent.js +2 -1
- package/lib/components/Tabs/Tabs.js +2 -3
- package/lib/components/Tag/Tag.js +2 -1
- package/lib/{lib/components → components}/Text/Text.d.ts +0 -0
- package/lib/{lib/components → components}/Text/TextDirection.d.ts +0 -0
- package/lib/{lib/components → components}/Text/createTextComponent.d.ts +0 -0
- package/lib/{lib/components → components}/Text/index.d.ts +0 -0
- package/lib/components/TextArea/TextArea.Skeleton.js +2 -1
- package/lib/components/TextArea/TextArea.js +6 -3
- package/lib/components/TextArea/index.js +0 -2
- package/lib/components/TextInput/ControlledPasswordInput.js +2 -1
- package/lib/components/TextInput/PasswordInput.js +2 -1
- package/lib/components/TextInput/TextInput.Skeleton.js +2 -1
- package/lib/components/TextInput/TextInput.js +2 -1
- package/lib/components/TextInput/index.js +0 -2
- package/lib/components/Tile/Tile.js +3 -7
- package/lib/components/TimePicker/TimePicker.js +2 -1
- package/lib/components/TimePickerSelect/TimePickerSelect.js +2 -1
- package/lib/components/Toggletip/index.js +2 -2
- package/lib/components/Tooltip/DefinitionTooltip.js +2 -2
- package/lib/components/Tooltip/Tooltip.js +33 -4
- package/lib/components/TreeView/TreeNode.js +2 -2
- package/lib/components/TreeView/TreeView.js +2 -2
- package/lib/components/UIShell/Content.js +2 -1
- package/lib/components/UIShell/Header.js +2 -1
- package/lib/components/UIShell/HeaderContainer.js +2 -1
- package/lib/components/UIShell/HeaderGlobalAction.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +4 -3
- package/lib/components/UIShell/HeaderMenuItem.js +2 -1
- package/lib/components/UIShell/HeaderPanel.js +2 -1
- package/lib/components/UIShell/HeaderSideNavItems.js +2 -1
- package/lib/components/UIShell/Link.js +2 -1
- package/lib/components/UIShell/SideNav.js +2 -1
- package/lib/components/UIShell/SideNavDetails.js +2 -1
- package/lib/components/UIShell/SideNavHeader.js +2 -1
- package/lib/components/UIShell/SideNavItems.js +2 -1
- package/lib/components/UIShell/SideNavLink.js +2 -1
- package/lib/components/UIShell/SideNavMenu.js +5 -3
- package/lib/components/UIShell/SideNavMenuItem.js +2 -1
- package/lib/components/UIShell/SideNavSwitcher.js +2 -1
- package/lib/components/UIShell/Switcher.js +2 -1
- package/lib/components/UIShell/SwitcherDivider.js +2 -1
- package/lib/components/UIShell/SwitcherItem.js +2 -1
- package/lib/components/UnorderedList/UnorderedList.js +2 -1
- package/lib/{lib/index.d.ts → index.d.ts} +0 -0
- package/lib/index.js +281 -287
- package/lib/internal/FloatingMenu.js +4 -5
- package/lib/internal/OptimizedResize.js +3 -1
- package/lib/internal/useIsomorphicEffect.js +2 -1
- package/lib/{lib/internal → internal}/usePrefix.d.ts +0 -0
- package/lib/tools/mergeRefs.js +3 -1
- package/lib/tools/wrapComponent.js +3 -1
- package/package.json +5 -5
- package/es/components/ContainedList/index.js +0 -13
- package/es/components/DataTable/index.js +0 -70
- package/es/components/TreeView/index.js +0 -13
- package/lib/components/ContainedList/index.js +0 -19
- package/lib/components/DataTable/index.js +0 -76
- package/lib/components/TreeView/index.js +0 -19
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2022
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React, { ReactNode } from 'react';
|
|
8
|
+
import { UseSelectProps } from 'downshift';
|
|
9
|
+
import { ListBoxSize, ListBoxType } from '../ListBox';
|
|
10
|
+
import { ReactAttr } from '../../types/common';
|
|
11
|
+
type ExcludedAttributes = 'id' | 'onChange';
|
|
12
|
+
export interface OnChangeData<ItemType> {
|
|
13
|
+
selectedItem: ItemType | null;
|
|
14
|
+
}
|
|
15
|
+
export interface DropdownProps<ItemType> extends Omit<ReactAttr<HTMLDivElement>, ExcludedAttributes> {
|
|
16
|
+
/**
|
|
17
|
+
* 'aria-label' of the ListBox component.
|
|
18
|
+
*/
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Specify the direction of the dropdown. Can be either top or bottom.
|
|
22
|
+
*/
|
|
23
|
+
direction?: 'top' | 'bottom';
|
|
24
|
+
/**
|
|
25
|
+
* Disable the control
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Additional props passed to Downshift
|
|
30
|
+
*/
|
|
31
|
+
downshiftProps?: Partial<UseSelectProps<ItemType>>;
|
|
32
|
+
/**
|
|
33
|
+
* Provide helper text that is used alongside the control label for
|
|
34
|
+
* additional help
|
|
35
|
+
*/
|
|
36
|
+
helperText?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Specify whether the title text should be hidden or not
|
|
39
|
+
*/
|
|
40
|
+
hideLabel?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Specify a custom `id`
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
45
|
+
/**
|
|
46
|
+
* Allow users to pass in an arbitrary item or a string (in case their items are an array of strings)
|
|
47
|
+
* from their collection that are pre-selected
|
|
48
|
+
*/
|
|
49
|
+
initialSelectedItem?: ItemType;
|
|
50
|
+
/**
|
|
51
|
+
* Specify if the currently selected value is invalid.
|
|
52
|
+
*/
|
|
53
|
+
invalid?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Message which is displayed if the value is invalid.
|
|
56
|
+
*/
|
|
57
|
+
invalidText?: React.ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* Function to render items as custom components instead of strings.
|
|
60
|
+
* Defaults to null and is overridden by a getter
|
|
61
|
+
*/
|
|
62
|
+
itemToElement?: React.JSXElementConstructor<ItemType> | null;
|
|
63
|
+
/**
|
|
64
|
+
* Helper function passed to downshift that allows the library to render a
|
|
65
|
+
* given item to a string label. By default, it extracts the `label` field
|
|
66
|
+
* from a given item to serve as the item label in the list.
|
|
67
|
+
*/
|
|
68
|
+
itemToString?(item: ItemType): string;
|
|
69
|
+
/**
|
|
70
|
+
* We try to stay as generic as possible here to allow individuals to pass
|
|
71
|
+
* in a collection of whatever kind of data structure they prefer
|
|
72
|
+
*/
|
|
73
|
+
items: ItemType[];
|
|
74
|
+
/**
|
|
75
|
+
* Generic `label` that will be used as the textual representation of what
|
|
76
|
+
* this field is for
|
|
77
|
+
*/
|
|
78
|
+
label: NonNullable<ReactNode>;
|
|
79
|
+
/**
|
|
80
|
+
* `true` to use the light version.
|
|
81
|
+
* @deprecated The `light` prop for `Dropdown` has been deprecated
|
|
82
|
+
* in favor of the new `Layer` component. It will be removed in the next major release.
|
|
83
|
+
*/
|
|
84
|
+
light?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* `onChange` is a utility for this controlled component to communicate to a
|
|
87
|
+
* consuming component what kind of internal state changes are occurring.
|
|
88
|
+
*/
|
|
89
|
+
onChange?(data: OnChangeData<ItemType>): void;
|
|
90
|
+
/**
|
|
91
|
+
* Whether or not the Dropdown is readonly
|
|
92
|
+
*/
|
|
93
|
+
readOnly?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* An optional callback to render the currently selected item as a react element instead of only
|
|
96
|
+
* as a string.
|
|
97
|
+
*/
|
|
98
|
+
renderSelectedItem?(item: ItemType): string;
|
|
99
|
+
/**
|
|
100
|
+
* In the case you want to control the dropdown selection entirely.
|
|
101
|
+
*/
|
|
102
|
+
selectedItem?: ItemType;
|
|
103
|
+
/**
|
|
104
|
+
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
105
|
+
*/
|
|
106
|
+
size?: ListBoxSize;
|
|
107
|
+
/**
|
|
108
|
+
* Provide the title text that will be read by a screen reader when
|
|
109
|
+
* visiting this control
|
|
110
|
+
*/
|
|
111
|
+
titleText?: React.ReactNode;
|
|
112
|
+
/**
|
|
113
|
+
* Callback function for translating ListBoxMenuIcon SVG title
|
|
114
|
+
*/
|
|
115
|
+
translateWithId?(messageId: string, args?: Record<string, unknown>): string;
|
|
116
|
+
/**
|
|
117
|
+
* The dropdown type, `default` or `inline`
|
|
118
|
+
*/
|
|
119
|
+
type?: ListBoxType;
|
|
120
|
+
/**
|
|
121
|
+
* Specify whether the control is currently in warning state
|
|
122
|
+
*/
|
|
123
|
+
warn?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Provide the text that is displayed when the control is in warning state
|
|
126
|
+
*/
|
|
127
|
+
warnText?: React.ReactNode;
|
|
128
|
+
}
|
|
129
|
+
type DropdownComponentProps<ItemType> = React.PropsWithoutRef<React.PropsWithChildren<DropdownProps<ItemType>> & React.RefAttributes<HTMLButtonElement>>;
|
|
130
|
+
interface DropdownComponent {
|
|
131
|
+
<ItemType>(props: DropdownComponentProps<ItemType>): React.ReactElement | null;
|
|
132
|
+
}
|
|
133
|
+
declare const _default: DropdownComponent;
|
|
134
|
+
export default _default;
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2, slicedToArray as _slicedToArray, defineProperty as _defineProperty, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
8
|
+
import { typeof as _typeof, objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2, slicedToArray as _slicedToArray, defineProperty as _defineProperty, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React__default, { useContext, useState, useRef } from 'react';
|
|
10
10
|
import { useSelect } from 'downshift';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
13
|
import { WarningFilled, WarningAltFilled, Checkmark } from '@carbon/icons-react';
|
|
14
|
-
import '../ListBox/index.js';
|
|
14
|
+
import ListBox from '../ListBox/index.js';
|
|
15
15
|
import mergeRefs from '../../tools/mergeRefs.js';
|
|
16
16
|
import deprecate from '../../prop-types/deprecate.js';
|
|
17
17
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
@@ -19,7 +19,6 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
19
19
|
import '../FluidForm/FluidForm.js';
|
|
20
20
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
21
21
|
import { ListBoxSize, ListBoxType } from '../ListBox/ListBoxPropTypes.js';
|
|
22
|
-
import ListBox from '../ListBox/ListBox.js';
|
|
23
22
|
|
|
24
23
|
var _excluded = ["className", "disabled", "direction", "items", "label", "ariaLabel", "itemToString", "itemToElement", "renderSelectedItem", "type", "size", "onChange", "id", "titleText", "hideLabel", "helperText", "translateWithId", "light", "invalid", "invalidText", "warn", "warnText", "initialSelectedItem", "selectedItem", "downshiftProps", "readOnly"];
|
|
25
24
|
|
|
@@ -28,10 +27,18 @@ var defaultItemToString = function defaultItemToString(item) {
|
|
|
28
27
|
return item;
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
if (typeof item === 'number') {
|
|
31
|
+
return "".concat(item);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (item !== null && _typeof(item) === 'object' && 'label' in item && typeof item['label'] === 'string') {
|
|
35
|
+
return item['label'];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return '';
|
|
32
39
|
};
|
|
33
40
|
|
|
34
|
-
var Dropdown = /*#__PURE__*/React__default.forwardRef(function
|
|
41
|
+
var Dropdown = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
35
42
|
var _cx, _cx2, _cx4;
|
|
36
43
|
|
|
37
44
|
var containerClassName = _ref.className,
|
|
@@ -40,7 +47,8 @@ var Dropdown = /*#__PURE__*/React__default.forwardRef(function Dropdown(_ref, re
|
|
|
40
47
|
items = _ref.items,
|
|
41
48
|
label = _ref.label,
|
|
42
49
|
ariaLabel = _ref.ariaLabel,
|
|
43
|
-
itemToString = _ref.itemToString,
|
|
50
|
+
_ref$itemToString = _ref.itemToString,
|
|
51
|
+
itemToString = _ref$itemToString === void 0 ? defaultItemToString : _ref$itemToString,
|
|
44
52
|
itemToElement = _ref.itemToElement,
|
|
45
53
|
renderSelectedItem = _ref.renderSelectedItem,
|
|
46
54
|
type = _ref.type,
|
|
@@ -115,7 +123,7 @@ var Dropdown = /*#__PURE__*/React__default.forwardRef(function Dropdown(_ref, re
|
|
|
115
123
|
|
|
116
124
|
if (onChange) {
|
|
117
125
|
onChange({
|
|
118
|
-
selectedItem: selectedItem
|
|
126
|
+
selectedItem: selectedItem !== null && selectedItem !== void 0 ? selectedItem : null
|
|
119
127
|
});
|
|
120
128
|
}
|
|
121
129
|
}
|
|
@@ -128,12 +136,15 @@ var Dropdown = /*#__PURE__*/React__default.forwardRef(function Dropdown(_ref, re
|
|
|
128
136
|
setIsFocused(evt.type === 'focus' ? true : false);
|
|
129
137
|
};
|
|
130
138
|
|
|
139
|
+
var mergedRef = mergeRefs(toggleButtonProps.ref, ref);
|
|
131
140
|
var readOnlyEventHandlers = readOnly ? {
|
|
132
141
|
onClick: function onClick(evt) {
|
|
133
142
|
// NOTE: does not prevent click
|
|
134
143
|
evt.preventDefault(); // focus on the element as per readonly input behavior
|
|
135
144
|
|
|
136
|
-
|
|
145
|
+
if (mergedRef.current !== undefined) {
|
|
146
|
+
mergedRef.current.focus();
|
|
147
|
+
}
|
|
137
148
|
},
|
|
138
149
|
onKeyDown: function onKeyDown(evt) {
|
|
139
150
|
var selectAccessKeys = ['ArrowDown', 'ArrowUp', ' ', 'Enter']; // This prevents the select from opening for the above keys
|
|
@@ -170,21 +181,23 @@ var Dropdown = /*#__PURE__*/React__default.forwardRef(function Dropdown(_ref, re
|
|
|
170
181
|
disabled: disabled,
|
|
171
182
|
"aria-disabled": readOnly ? true : undefined // aria-disabled to remain focusable
|
|
172
183
|
,
|
|
173
|
-
title: selectedItem ? itemToString(selectedItem) : label
|
|
184
|
+
title: selectedItem && itemToString !== undefined ? itemToString(selectedItem) : label
|
|
174
185
|
}, toggleButtonProps, readOnlyEventHandlers, {
|
|
175
|
-
ref:
|
|
186
|
+
ref: mergedRef
|
|
176
187
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
177
188
|
className: "".concat(prefix, "--list-box__label")
|
|
178
189
|
}, selectedItem ? renderSelectedItem ? renderSelectedItem(selectedItem) : itemToString(selectedItem) : label), /*#__PURE__*/React__default.createElement(ListBox.MenuIcon, {
|
|
179
190
|
isOpen: isOpen,
|
|
180
191
|
translateWithId: translateWithId
|
|
181
192
|
})), /*#__PURE__*/React__default.createElement(ListBox.Menu, getMenuProps(), isOpen && items.map(function (item, index) {
|
|
193
|
+
var isObject = item !== null && _typeof(item) === 'object';
|
|
194
|
+
var disabled = isObject && 'disabled' in item && item.disabled === true;
|
|
182
195
|
var itemProps = getItemProps({
|
|
183
196
|
item: item,
|
|
184
197
|
index: index,
|
|
185
|
-
disabled:
|
|
198
|
+
disabled: disabled
|
|
186
199
|
});
|
|
187
|
-
var title = itemToElement ? item.text : itemToString(item);
|
|
200
|
+
var title = isObject && 'text' in item && itemToElement ? item.text : itemToString(item);
|
|
188
201
|
return /*#__PURE__*/React__default.createElement(ListBox.MenuItem, _extends({
|
|
189
202
|
key: itemProps.id,
|
|
190
203
|
isActive: selectedItem === item,
|
|
@@ -193,7 +206,7 @@ var Dropdown = /*#__PURE__*/React__default.forwardRef(function Dropdown(_ref, re
|
|
|
193
206
|
ref: {
|
|
194
207
|
menuItemOptionRef: menuItemOptionRefs.current[index]
|
|
195
208
|
}
|
|
196
|
-
}, itemProps),
|
|
209
|
+
}, itemProps), _typeof(item) === 'object' && ItemToElement !== undefined && ItemToElement !== null ? /*#__PURE__*/React__default.createElement(ItemToElement, _extends({
|
|
197
210
|
key: itemProps.id
|
|
198
211
|
}, item)) : itemToString(item), selectedItem === item && /*#__PURE__*/React__default.createElement(Checkmark, {
|
|
199
212
|
className: "".concat(prefix, "--list-box__menu-item__selected-icon")
|
|
@@ -320,7 +333,7 @@ Dropdown.propTypes = {
|
|
|
320
333
|
* Provide the title text that will be read by a screen reader when
|
|
321
334
|
* visiting this control
|
|
322
335
|
*/
|
|
323
|
-
titleText: PropTypes.node,
|
|
336
|
+
titleText: PropTypes.node.isRequired,
|
|
324
337
|
|
|
325
338
|
/**
|
|
326
339
|
* Callback function for translating ListBoxMenuIcon SVG title
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2018
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import Dropdown, { OnChangeData } from './Dropdown';
|
|
8
|
+
export type { OnChangeData };
|
|
9
|
+
export { Dropdown };
|
|
10
|
+
export { default as DropdownSkeleton } from './Dropdown.Skeleton';
|
|
11
|
+
export default Dropdown;
|
|
@@ -9,7 +9,6 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
|
|
|
9
9
|
import React__default, { useState, useRef } from 'react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import Search from '../Search/Search.js';
|
|
12
|
-
import '../Search/Search.Skeleton.js';
|
|
13
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
13
|
import { composeEventHandlers } from '../../tools/events.js';
|
|
15
14
|
|
|
@@ -13,9 +13,9 @@ import React__default from 'react';
|
|
|
13
13
|
import Filename from './Filename.js';
|
|
14
14
|
import FileUploaderButton from './FileUploaderButton.js';
|
|
15
15
|
import { ButtonKinds } from '../../prop-types/types.js';
|
|
16
|
-
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
17
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
18
16
|
import { PrefixContext } from '../../internal/usePrefix.js';
|
|
17
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
18
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
19
19
|
|
|
20
20
|
var _excluded = ["iconDescription", "buttonLabel", "buttonKind", "disabled", "filenameStatus", "labelDescription", "labelTitle", "className", "multiple", "accept", "name", "size", "onDelete"];
|
|
21
21
|
|
|
@@ -9,12 +9,12 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
|
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useState, useRef } from 'react';
|
|
12
|
-
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
13
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
14
12
|
import { ButtonKinds } from '../../prop-types/types.js';
|
|
15
13
|
import uniqueId from '../../tools/uniqueId.js';
|
|
16
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
17
15
|
import * as FeatureFlags from '@carbon/feature-flags';
|
|
16
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
17
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
18
18
|
|
|
19
19
|
var _excluded = ["accept", "buttonKind", "className", "disabled", "disableLabelChanges", "id", "labelText", "multiple", "onChange", "role", "name", "size", "tabIndex", "innerRef"];
|
|
20
20
|
|
|
@@ -9,10 +9,10 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
|
|
|
9
9
|
import React__default, { useRef, useState } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
|
-
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
13
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
14
12
|
import uniqueId from '../../tools/uniqueId.js';
|
|
15
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
15
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
16
16
|
|
|
17
17
|
var _excluded = ["accept", "className", "id", "disabled", "labelText", "multiple", "name", "onAddFiles", "pattern", "role", "tabIndex", "innerRef"];
|
|
18
18
|
|
|
@@ -10,11 +10,11 @@ import cx from 'classnames';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useRef } from 'react';
|
|
12
12
|
import Filename from './Filename.js';
|
|
13
|
-
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
14
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
15
13
|
import uniqueId from '../../tools/uniqueId.js';
|
|
16
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
17
15
|
import * as FeatureFlags from '@carbon/feature-flags';
|
|
16
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
17
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
18
18
|
|
|
19
19
|
var _excluded = ["uuid", "name", "status", "iconDescription", "onDelete", "invalid", "errorSubject", "errorBody", "size"];
|
|
20
20
|
|
|
@@ -10,7 +10,6 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import DatePicker from '../DatePicker/DatePicker.js';
|
|
13
|
-
import '../DatePicker/DatePicker.Skeleton.js';
|
|
14
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
14
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
16
15
|
|
|
@@ -72,5 +71,6 @@ FluidDatePicker.propTypes = {
|
|
|
72
71
|
*/
|
|
73
72
|
warnText: PropTypes.node
|
|
74
73
|
};
|
|
74
|
+
var FluidDatePicker$1 = FluidDatePicker;
|
|
75
75
|
|
|
76
|
-
export { FluidDatePicker as default };
|
|
76
|
+
export { FluidDatePicker$1 as default };
|
|
@@ -21,5 +21,6 @@ var FluidDatePickerInput = /*#__PURE__*/React__default.forwardRef(function Fluid
|
|
|
21
21
|
ref: ref
|
|
22
22
|
}, other)));
|
|
23
23
|
});
|
|
24
|
+
var FluidDatePickerInput$1 = FluidDatePickerInput;
|
|
24
25
|
|
|
25
|
-
export { FluidDatePickerInput as default };
|
|
26
|
+
export { FluidDatePickerInput$1 as default };
|
|
@@ -10,7 +10,6 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import Dropdown from '../Dropdown/Dropdown.js';
|
|
13
|
-
import '../Dropdown/Dropdown.Skeleton.js';
|
|
14
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
14
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
16
15
|
|
|
@@ -136,5 +135,6 @@ FluidDropdown.propTypes = {
|
|
|
136
135
|
*/
|
|
137
136
|
warnText: PropTypes.node
|
|
138
137
|
};
|
|
138
|
+
var FluidDropdown$1 = FluidDropdown;
|
|
139
139
|
|
|
140
|
-
export { FluidDropdown as default };
|
|
140
|
+
export { FluidDropdown$1 as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ReactAttr } from '../../types/common';
|
|
9
|
+
export type FluidFormProps = ReactAttr<HTMLFormElement>;
|
|
10
|
+
declare const FluidForm: React.FC<FluidFormProps>;
|
|
11
|
+
export default FluidForm;
|
|
@@ -15,7 +15,7 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
15
15
|
|
|
16
16
|
var _excluded = ["className", "children"];
|
|
17
17
|
|
|
18
|
-
function FluidForm(_ref) {
|
|
18
|
+
var FluidForm = function FluidForm(_ref) {
|
|
19
19
|
var className = _ref.className,
|
|
20
20
|
children = _ref.children,
|
|
21
21
|
other = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -29,7 +29,7 @@ function FluidForm(_ref) {
|
|
|
29
29
|
}, /*#__PURE__*/React__default.createElement(Form, _extends({
|
|
30
30
|
className: classNames
|
|
31
31
|
}, other), children));
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
|
|
34
34
|
FluidForm.propTypes = {
|
|
35
35
|
/**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
export interface FormContextProps {
|
|
9
|
+
isFluid?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const FormContext: import("react").Context<FormContextProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import FluidForm from './FluidForm';
|
|
8
|
+
export default FluidForm;
|
|
9
|
+
export { FluidForm };
|
|
10
|
+
export { FormContext } from './FormContext';
|
|
@@ -10,7 +10,6 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import TextArea from '../TextArea/TextArea.js';
|
|
13
|
-
import '../TextArea/TextArea.Skeleton.js';
|
|
14
13
|
import deprecate from '../../prop-types/deprecate.js';
|
|
15
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
15
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
@@ -10,7 +10,6 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import '../TextInput/index.js';
|
|
13
|
-
import '../TextInput/ControlledPasswordInput.js';
|
|
14
13
|
import PasswordInput from '../TextInput/PasswordInput.js';
|
|
15
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
15
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
@@ -10,9 +10,7 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
|
-
import '../FluidTextInput/FluidTextInput.js';
|
|
14
13
|
import FluidTextInputSkeleton from '../FluidTextInput/FluidTextInput.Skeleton.js';
|
|
15
|
-
import '../FluidSelect/FluidSelect.js';
|
|
16
14
|
import FluidSelectSkeleton from '../FluidSelect/FluidSelect.Skeleton.js';
|
|
17
15
|
|
|
18
16
|
var _FluidTextInputSkelet, _FluidSelectSkeleton, _FluidSelectSkeleton2;
|
|
@@ -42,5 +40,6 @@ FluidTimePickerSkeleton.propTypes = {
|
|
|
42
40
|
*/
|
|
43
41
|
isOnlyTwo: PropTypes.bool
|
|
44
42
|
};
|
|
43
|
+
var FluidTimePickerSkeleton$1 = FluidTimePickerSkeleton;
|
|
45
44
|
|
|
46
|
-
export { FluidTimePickerSkeleton as default };
|
|
45
|
+
export { FluidTimePickerSkeleton$1 as default };
|
|
@@ -10,7 +10,6 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import FluidTextInput from '../FluidTextInput/FluidTextInput.js';
|
|
13
|
-
import '../FluidTextInput/FluidTextInput.Skeleton.js';
|
|
14
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
14
|
import { WarningFilled, WarningAltFilled } from '@carbon/icons-react';
|
|
16
15
|
|
|
@@ -106,5 +105,6 @@ FluidTimePicker.propTypes = {
|
|
|
106
105
|
*/
|
|
107
106
|
warnText: PropTypes.node
|
|
108
107
|
};
|
|
108
|
+
var FluidTimePicker$1 = FluidTimePicker;
|
|
109
109
|
|
|
110
|
-
export { FluidTimePicker as default };
|
|
110
|
+
export { FluidTimePicker$1 as default };
|
|
@@ -9,7 +9,6 @@ import { objectWithoutProperties as _objectWithoutProperties, extends as _extend
|
|
|
9
9
|
import React__default from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import FluidSelect from '../FluidSelect/FluidSelect.js';
|
|
12
|
-
import '../FluidSelect/FluidSelect.Skeleton.js';
|
|
13
12
|
|
|
14
13
|
var _excluded = ["children", "className"];
|
|
15
14
|
var FluidTimePickerSelect = /*#__PURE__*/React__default.forwardRef(function FluidTimePickerSelect(_ref, ref) {
|
|
@@ -60,5 +59,6 @@ FluidTimePickerSelect.propTypes = {
|
|
|
60
59
|
*/
|
|
61
60
|
onChange: PropTypes.func
|
|
62
61
|
};
|
|
62
|
+
var FluidTimePickerSelect$1 = FluidTimePickerSelect;
|
|
63
63
|
|
|
64
|
-
export { FluidTimePickerSelect as default };
|
|
64
|
+
export { FluidTimePickerSelect$1 as default };
|
|
@@ -9,8 +9,6 @@ import { objectWithoutProperties as _objectWithoutProperties, extends as _extend
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import Button from '../Button/Button.js';
|
|
12
|
-
import '../Button/Button.Skeleton.js';
|
|
13
|
-
import '../Tooltip/DefinitionTooltip.js';
|
|
14
12
|
import { Tooltip } from '../Tooltip/Tooltip.js';
|
|
15
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
14
|
import cx from 'classnames';
|
|
@@ -34,6 +32,7 @@ var IconButton = /*#__PURE__*/React__default.forwardRef(function IconButton(prop
|
|
|
34
32
|
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
35
33
|
align: align,
|
|
36
34
|
className: "".concat(prefix, "--icon-tooltip"),
|
|
35
|
+
closeOnActivation: true,
|
|
37
36
|
defaultOpen: defaultOpen,
|
|
38
37
|
enterDelayMs: enterDelayMs,
|
|
39
38
|
label: label,
|