@carbon/react 1.21.0 → 1.22.0-rc.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/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.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.js +27 -14
- 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.js +2 -2
- 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 -2
- 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 +0 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +4 -1
- package/es/components/Link/Link.js +2 -1
- package/es/components/ListBox/ListBox.js +4 -15
- package/es/components/ListBox/ListBoxField.js +1 -1
- package/es/components/ListBox/ListBoxMenu.js +2 -2
- package/es/components/ListBox/ListBoxMenuIcon.js +8 -5
- package/es/components/ListBox/ListBoxMenuItem.js +2 -3
- package/es/components/ListBox/ListBoxPropTypes.js +4 -2
- package/es/components/ListBox/ListBoxSelection.js +7 -20
- 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/OrderedList/OrderedList.js +2 -1
- package/es/components/OverflowMenu/OverflowMenu.js +14 -3
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +4 -3
- package/es/components/OverflowMenuV2/index.js +2 -2
- package/es/components/Pagination/Pagination.js +2 -2
- package/es/components/Pagination/experimental/PageSelector.js +0 -1
- package/es/components/Pagination/experimental/Pagination.js +0 -2
- 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.js +2 -1
- package/es/components/Select/Select.js +2 -1
- package/es/components/Select/index.js +0 -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.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/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 +2 -2
- 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/components/DataTable/TableSelectAll.d.ts +83 -0
- package/es/es/components/Dropdown/Dropdown.d.ts +134 -0
- package/es/es/components/Dropdown/index.d.ts +11 -0
- package/es/es/components/FluidForm/FluidForm.d.ts +11 -0
- package/es/es/components/FluidForm/FormContext.d.ts +11 -0
- package/es/es/components/FluidForm/index.d.ts +10 -0
- package/es/es/components/ListBox/ListBox.d.ts +60 -0
- package/es/es/components/ListBox/ListBoxField.d.ts +18 -0
- package/es/es/components/ListBox/ListBoxMenu.d.ts +22 -0
- package/es/es/components/ListBox/ListBoxMenuIcon.d.ts +31 -0
- package/es/es/components/ListBox/ListBoxMenuItem.d.ts +24 -0
- package/es/es/components/ListBox/ListBoxPropTypes.d.ts +14 -0
- package/es/es/components/ListBox/ListBoxSelection.d.ts +51 -0
- package/es/es/components/ListBox/index.d.ts +23 -0
- package/es/es/components/NumberInput/NumberInput.Skeleton.d.ts +32 -0
- package/es/es/components/Slider/Slider.Skeleton.d.ts +33 -0
- package/es/index.js +134 -140
- package/es/internal/ClickListener.js +1 -1
- package/es/internal/FloatingMenu.js +4 -2
- package/es/internal/OptimizedResize.js +3 -1
- package/es/internal/Selection.js +1 -1
- package/es/internal/useIsomorphicEffect.js +2 -1
- 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/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.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.js +30 -17
- 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.js +2 -2
- 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 -2
- 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 +0 -2
- package/lib/components/InlineCheckbox/InlineCheckbox.js +4 -1
- package/lib/components/Link/Link.js +2 -1
- package/lib/components/ListBox/ListBox.js +3 -14
- package/lib/components/ListBox/ListBoxField.js +1 -1
- package/lib/components/ListBox/ListBoxMenu.js +2 -2
- package/lib/components/ListBox/ListBoxMenuIcon.js +8 -5
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -3
- package/lib/components/ListBox/ListBoxPropTypes.js +4 -2
- package/lib/components/ListBox/ListBoxSelection.js +7 -20
- 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/OrderedList/OrderedList.js +2 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +14 -3
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +4 -3
- package/lib/components/OverflowMenuV2/index.js +2 -2
- package/lib/components/Pagination/Pagination.js +2 -2
- package/lib/components/Pagination/experimental/PageSelector.js +0 -1
- package/lib/components/Pagination/experimental/Pagination.js +0 -2
- 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.js +2 -1
- package/lib/components/Select/Select.js +2 -1
- package/lib/components/Select/index.js +0 -2
- 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.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/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 +2 -2
- 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/index.js +281 -287
- package/lib/internal/FloatingMenu.js +3 -1
- package/lib/internal/OptimizedResize.js +3 -1
- package/lib/internal/useIsomorphicEffect.js +2 -1
- package/lib/lib/components/DataTable/TableSelectAll.d.ts +83 -0
- package/lib/lib/components/Dropdown/Dropdown.d.ts +134 -0
- package/lib/lib/components/Dropdown/index.d.ts +11 -0
- package/lib/lib/components/FluidForm/FluidForm.d.ts +11 -0
- package/lib/lib/components/FluidForm/FormContext.d.ts +11 -0
- package/lib/lib/components/FluidForm/index.d.ts +10 -0
- package/lib/lib/components/ListBox/ListBox.d.ts +60 -0
- package/lib/lib/components/ListBox/ListBoxField.d.ts +18 -0
- package/lib/lib/components/ListBox/ListBoxMenu.d.ts +22 -0
- package/lib/lib/components/ListBox/ListBoxMenuIcon.d.ts +31 -0
- package/lib/lib/components/ListBox/ListBoxMenuItem.d.ts +24 -0
- package/lib/lib/components/ListBox/ListBoxPropTypes.d.ts +14 -0
- package/lib/lib/components/ListBox/ListBoxSelection.d.ts +51 -0
- package/lib/lib/components/ListBox/index.d.ts +23 -0
- package/lib/lib/components/NumberInput/NumberInput.Skeleton.d.ts +32 -0
- package/lib/lib/components/Slider/Slider.Skeleton.d.ts +33 -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
|
@@ -491,8 +491,10 @@ _rollupPluginBabelHelpers.defineProperty(FloatingMenu, "defaultProps", {
|
|
|
491
491
|
updateOrientation: null
|
|
492
492
|
});
|
|
493
493
|
|
|
494
|
+
var FloatingMenu$1 = FloatingMenu;
|
|
495
|
+
|
|
494
496
|
exports.DIRECTION_BOTTOM = DIRECTION_BOTTOM;
|
|
495
497
|
exports.DIRECTION_LEFT = DIRECTION_LEFT;
|
|
496
498
|
exports.DIRECTION_RIGHT = DIRECTION_RIGHT;
|
|
497
499
|
exports.DIRECTION_TOP = DIRECTION_TOP;
|
|
498
|
-
exports["default"] = FloatingMenu;
|
|
500
|
+
exports["default"] = FloatingMenu$1;
|
|
@@ -12,5 +12,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
|
|
14
14
|
var useIsomorphicEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
15
|
+
var useIsomorphicEffect$1 = useIsomorphicEffect;
|
|
15
16
|
|
|
16
|
-
exports["default"] = useIsomorphicEffect;
|
|
17
|
+
exports["default"] = useIsomorphicEffect$1;
|
|
@@ -0,0 +1,83 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
interface TableSelectAllProps {
|
|
10
|
+
/**
|
|
11
|
+
* Specify the aria label for the underlying input control
|
|
12
|
+
*/
|
|
13
|
+
ariaLabel: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specify whether all items are selected, or not
|
|
16
|
+
*/
|
|
17
|
+
checked: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The CSS class names of the cell that wraps the underlying input control
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Specify whether the checkbox input should be disabled
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Provide an `id` for the underlying input control
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
/**
|
|
31
|
+
* Specify whether the selection only has a subset of all items
|
|
32
|
+
*/
|
|
33
|
+
indeterminate?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Provide a `name` for the underlying input control
|
|
36
|
+
*/
|
|
37
|
+
name: string;
|
|
38
|
+
/**
|
|
39
|
+
* Provide a handler to listen to when a user initiates a selection request
|
|
40
|
+
*/
|
|
41
|
+
onSelect: React.MouseEventHandler<HTMLInputElement>;
|
|
42
|
+
}
|
|
43
|
+
declare const TableSelectAll: {
|
|
44
|
+
({ ariaLabel, checked, id, indeterminate, name, onSelect, disabled, className, }: TableSelectAllProps): JSX.Element;
|
|
45
|
+
propTypes: {
|
|
46
|
+
/**
|
|
47
|
+
* Specify the aria label for the underlying input control
|
|
48
|
+
*/
|
|
49
|
+
ariaLabel: PropTypes.Validator<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Specify whether all items are selected, or not
|
|
52
|
+
*/
|
|
53
|
+
checked: PropTypes.Validator<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* The CSS class names of the cell that wraps the underlying input control
|
|
56
|
+
*/
|
|
57
|
+
className: PropTypes.Requireable<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Specify whether the checkbox input should be disabled
|
|
60
|
+
*/
|
|
61
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Provide an `id` for the underlying input control
|
|
64
|
+
*/
|
|
65
|
+
id: PropTypes.Validator<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Specify whether the selection only has a subset of all items
|
|
68
|
+
*/
|
|
69
|
+
indeterminate: PropTypes.Requireable<boolean>;
|
|
70
|
+
/**
|
|
71
|
+
* Provide a `name` for the underlying input control
|
|
72
|
+
*/
|
|
73
|
+
name: PropTypes.Validator<string>;
|
|
74
|
+
/**
|
|
75
|
+
* Provide a handler to listen to when a user initiates a selection request
|
|
76
|
+
*/
|
|
77
|
+
onSelect: PropTypes.Validator<(...args: any[]) => any>;
|
|
78
|
+
};
|
|
79
|
+
defaultProps: {
|
|
80
|
+
ariaLabel: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export default TableSelectAll;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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';
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { ListBoxType, ListBoxSize } from './ListBoxPropTypes';
|
|
9
|
+
import { ForwardRefReturn, ReactAttr } from '../../types/common';
|
|
10
|
+
type ExcludedAttributes = 'onKeyDown' | 'onKeyPress' | 'ref';
|
|
11
|
+
export interface ListBoxProps extends Omit<ReactAttr<HTMLDivElement>, ExcludedAttributes> {
|
|
12
|
+
/**
|
|
13
|
+
* Specify whether the ListBox is currently disabled
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Specify whether the control is currently invalid
|
|
18
|
+
*/
|
|
19
|
+
invalid?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Specify the text to be displayed when the control is invalid
|
|
22
|
+
*/
|
|
23
|
+
invalidText?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Specify if the control should render open
|
|
26
|
+
*/
|
|
27
|
+
isOpen?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
30
|
+
* Don't use this to make tile background color same as container background color.
|
|
31
|
+
*
|
|
32
|
+
* @deprecated The `light` prop for `ListBox` has been deprecated in favor of
|
|
33
|
+
* the new `Layer` component. It will be removed in the next major release.
|
|
34
|
+
*/
|
|
35
|
+
light?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
38
|
+
*/
|
|
39
|
+
size?: ListBoxSize;
|
|
40
|
+
/**
|
|
41
|
+
* Specify the "type" of the ListBox. Currently supports either `default` or
|
|
42
|
+
* `inline` as an option.
|
|
43
|
+
*/
|
|
44
|
+
type?: ListBoxType;
|
|
45
|
+
/**
|
|
46
|
+
* Specify whether the control is currently in warning state
|
|
47
|
+
*/
|
|
48
|
+
warn?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Provide the text that is displayed when the control is in warning state
|
|
51
|
+
*/
|
|
52
|
+
warnText?: React.ReactNode;
|
|
53
|
+
}
|
|
54
|
+
export type ListBoxComponent = ForwardRefReturn<HTMLDivElement, ListBoxProps>;
|
|
55
|
+
/**
|
|
56
|
+
* `ListBox` is a generic container component that handles creating the
|
|
57
|
+
* container class name in response to certain props.
|
|
58
|
+
*/
|
|
59
|
+
declare const ListBox: ListBoxComponent;
|
|
60
|
+
export default ListBox;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 declare const translationIds: {};
|
|
10
|
+
export interface ListBoxFieldProps extends ReactAttr<HTMLDivElement> {
|
|
11
|
+
/**
|
|
12
|
+
* Specify if the parent <ListBox> is disabled
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type ListBoxFieldComponent = React.FC<ListBoxFieldProps>;
|
|
17
|
+
declare const _default: ListBoxFieldComponent;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { ForwardRefReturn, ReactAttr } from '../../types/common';
|
|
8
|
+
type ExcludedAttributes = 'id';
|
|
9
|
+
export interface ListBoxMenuProps extends Omit<ReactAttr<HTMLDivElement>, ExcludedAttributes> {
|
|
10
|
+
/**
|
|
11
|
+
* Specify a custom `id`
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
}
|
|
15
|
+
export type ListBoxMenuComponent = ForwardRefReturn<HTMLDivElement, ListBoxMenuProps>;
|
|
16
|
+
/**
|
|
17
|
+
* `ListBoxMenu` is a simple container node that isolates the `list-box__menu`
|
|
18
|
+
* class into a single component. It is also being used to validate given
|
|
19
|
+
* `children` components.
|
|
20
|
+
*/
|
|
21
|
+
declare const ListBoxMenu: ListBoxMenuComponent;
|
|
22
|
+
export default ListBoxMenu;
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
export declare const translationIds: {
|
|
9
|
+
'close.menu': string;
|
|
10
|
+
'open.menu': string;
|
|
11
|
+
};
|
|
12
|
+
export interface ListBoxMenuIconProps {
|
|
13
|
+
/**
|
|
14
|
+
* Specify whether the menu is currently open, which will influence the
|
|
15
|
+
* direction of the menu icon
|
|
16
|
+
*/
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* i18n hook used to provide the appropriate description for the given menu
|
|
20
|
+
* icon. This function takes in an id defined in `translationIds` and should
|
|
21
|
+
* return a string message for that given message id.
|
|
22
|
+
*/
|
|
23
|
+
translateWithId?(messageId: string, args?: Record<string, unknown>): string;
|
|
24
|
+
}
|
|
25
|
+
export type ListBoxMenuIconComponent = React.FC<ListBoxMenuIconProps>;
|
|
26
|
+
/**
|
|
27
|
+
* `ListBoxMenuIcon` is used to orient the icon up or down depending on the
|
|
28
|
+
* state of the menu for a given `ListBox`
|
|
29
|
+
*/
|
|
30
|
+
declare const ListBoxMenuIcon: ListBoxMenuIconComponent;
|
|
31
|
+
export default ListBoxMenuIcon;
|
|
@@ -0,0 +1,24 @@
|
|
|
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, { ForwardedRef } from 'react';
|
|
8
|
+
import { ForwardRefReturn, ReactAttr } from '../../types/common';
|
|
9
|
+
export interface ListBoxMenuItemProps extends ReactAttr<HTMLDivElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Specify whether the current menu item is "active".
|
|
12
|
+
*/
|
|
13
|
+
isActive?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Specify whether the current menu item is "highlighted".
|
|
16
|
+
*/
|
|
17
|
+
isHighlighted?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type ListBoxMenuItemForwardedRef = ForwardedRef<HTMLDivElement> & {
|
|
20
|
+
menuItemOptionRef?: React.Ref<HTMLDivElement>;
|
|
21
|
+
} | null;
|
|
22
|
+
export type ListBoxMenuItemComponent = ForwardRefReturn<ListBoxMenuItemForwardedRef, ListBoxMenuItemProps>;
|
|
23
|
+
declare const _default: ListBoxMenuItemComponent;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
8
|
+
declare const listBoxTypes: readonly ["default", "inline"];
|
|
9
|
+
declare const listBoxSizes: readonly ["sm", "md", "lg"];
|
|
10
|
+
export type ListBoxType = typeof listBoxTypes[number];
|
|
11
|
+
export type ListBoxSize = typeof listBoxSizes[number];
|
|
12
|
+
export declare const ListBoxType: PropTypes.Requireable<"default" | "inline">;
|
|
13
|
+
export declare const ListBoxSize: PropTypes.Requireable<"md" | "sm" | "lg">;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
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 { KeyboardEvent, MouseEvent } from 'react';
|
|
9
|
+
export interface ListBoxSelectionProps {
|
|
10
|
+
/**
|
|
11
|
+
* Specify a function to be invoked when a user interacts with the clear
|
|
12
|
+
* selection element.
|
|
13
|
+
*/
|
|
14
|
+
clearSelection(event: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>): void;
|
|
15
|
+
/**
|
|
16
|
+
* Specify whether or not the clear selection element should be disabled
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Specify an optional `onClearSelection` handler that is called when the underlying
|
|
21
|
+
* element is cleared
|
|
22
|
+
*/
|
|
23
|
+
onClearSelection?(event: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>): void;
|
|
24
|
+
/**
|
|
25
|
+
* Whether or not the Dropdown is readonly
|
|
26
|
+
*/
|
|
27
|
+
readOnly?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Specify an optional `selectionCount` value that will be used to determine
|
|
30
|
+
* whether the selection should display a badge or a single clear icon.
|
|
31
|
+
*/
|
|
32
|
+
selectionCount?: number;
|
|
33
|
+
/**
|
|
34
|
+
* i18n hook used to provide the appropriate description for the given menu
|
|
35
|
+
* icon. This function takes in an id defined in `translationIds` and should
|
|
36
|
+
* return a string message for that given message id.
|
|
37
|
+
*/
|
|
38
|
+
translateWithId(messageId: string, args?: Record<string, unknown>): string;
|
|
39
|
+
}
|
|
40
|
+
export type ListBoxSelectionComponent = React.FC<ListBoxSelectionProps>;
|
|
41
|
+
/**
|
|
42
|
+
* `ListBoxSelection` is used to provide controls for clearing a selection, in
|
|
43
|
+
* addition to conditionally rendering a badge if the control has more than one
|
|
44
|
+
* selection.
|
|
45
|
+
*/
|
|
46
|
+
declare const ListBoxSelection: ListBoxSelectionComponent;
|
|
47
|
+
export declare const translationIds: {
|
|
48
|
+
'clear.all': string;
|
|
49
|
+
'clear.selection': string;
|
|
50
|
+
};
|
|
51
|
+
export default ListBoxSelection;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
export * as PropTypes from './ListBoxPropTypes';
|
|
8
|
+
export * from './ListBoxPropTypes';
|
|
9
|
+
import { ListBoxComponent as ListBoxPartialComponent } from './ListBox';
|
|
10
|
+
import { ListBoxFieldComponent } from './ListBoxField';
|
|
11
|
+
import { ListBoxMenuComponent } from './ListBoxMenu';
|
|
12
|
+
import { ListBoxMenuIconComponent } from './ListBoxMenuIcon';
|
|
13
|
+
import { ListBoxMenuItemComponent } from './ListBoxMenuItem';
|
|
14
|
+
import { ListBoxSelectionComponent } from './ListBoxSelection';
|
|
15
|
+
export interface ListBoxComponent extends ListBoxPartialComponent {
|
|
16
|
+
readonly Field: ListBoxFieldComponent;
|
|
17
|
+
readonly Menu: ListBoxMenuComponent;
|
|
18
|
+
readonly MenuIcon: ListBoxMenuIconComponent;
|
|
19
|
+
readonly MenuItem: ListBoxMenuItemComponent;
|
|
20
|
+
readonly Selection: ListBoxSelectionComponent;
|
|
21
|
+
}
|
|
22
|
+
declare const ListBox: ListBoxComponent;
|
|
23
|
+
export default ListBox;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
8
|
+
import { HTMLAttributes } from 'react';
|
|
9
|
+
export interface NumberInputSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Specify an optional className to add to the form item wrapper.
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specify whether the label should be hidden, or not
|
|
16
|
+
*/
|
|
17
|
+
hideLabel?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare function NumberInputSkeleton({ hideLabel, className, ...rest }: NumberInputSkeletonProps): JSX.Element;
|
|
20
|
+
declare namespace NumberInputSkeleton {
|
|
21
|
+
var propTypes: {
|
|
22
|
+
/**
|
|
23
|
+
* Specify an optional className to add to the form item wrapper.
|
|
24
|
+
*/
|
|
25
|
+
className: PropTypes.Requireable<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Specify whether the label should be hidden, or not
|
|
28
|
+
*/
|
|
29
|
+
hideLabel: PropTypes.Requireable<boolean>;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export default NumberInputSkeleton;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
8
|
+
import { HTMLAttributes } from 'react';
|
|
9
|
+
export interface SliderSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Specify an optional className to add to the form item wrapper.
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specify whether the label should be hidden, or not
|
|
16
|
+
*/
|
|
17
|
+
hideLabel?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const SliderSkeleton: {
|
|
20
|
+
({ hideLabel, className, ...rest }: SliderSkeletonProps): JSX.Element;
|
|
21
|
+
propTypes: {
|
|
22
|
+
/**
|
|
23
|
+
* Specify an optional className to add to the form item wrapper.
|
|
24
|
+
*/
|
|
25
|
+
className: PropTypes.Requireable<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Specify whether the label should be hidden, or not
|
|
28
|
+
*/
|
|
29
|
+
hideLabel: PropTypes.Requireable<boolean>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default SliderSkeleton;
|
|
33
|
+
export { SliderSkeleton };
|
package/lib/tools/mergeRefs.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.22.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@babel/runtime": "^7.18.3",
|
|
46
46
|
"@carbon/feature-flags": "^0.12.0",
|
|
47
|
-
"@carbon/icons-react": "^11.
|
|
47
|
+
"@carbon/icons-react": "^11.16.0-rc.0",
|
|
48
48
|
"@carbon/layout": "^11.11.0",
|
|
49
|
-
"@carbon/styles": "^1.
|
|
49
|
+
"@carbon/styles": "^1.22.0-rc.0",
|
|
50
50
|
"@carbon/telemetry": "0.1.0",
|
|
51
51
|
"classnames": "2.3.2",
|
|
52
52
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@rollup/plugin-babel": "^6.0.0",
|
|
78
78
|
"@rollup/plugin-commonjs": "^24.0.0",
|
|
79
79
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
80
|
-
"@rollup/plugin-typescript": "^
|
|
80
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
81
81
|
"@storybook/addon-a11y": "^6.5.6",
|
|
82
82
|
"@storybook/addon-actions": "^6.5.6",
|
|
83
83
|
"@storybook/addon-docs": "^6.5.6",
|
|
@@ -135,5 +135,5 @@
|
|
|
135
135
|
"**/*.scss",
|
|
136
136
|
"**/*.css"
|
|
137
137
|
],
|
|
138
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "3e7357ecc2ee754a8d5a2c23c1082d5cdd425faa"
|
|
139
139
|
}
|