@carbon/react 1.17.0-rc.2 → 1.18.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/Accordion/index.js +2 -0
- package/es/components/AccordionItem/index.js +2 -0
- package/es/components/Breadcrumb/Breadcrumb.js +1 -2
- package/es/components/Breadcrumb/BreadcrumbItem.js +1 -2
- package/es/components/Button/Button.Skeleton.js +1 -2
- package/es/components/Button/Button.js +1 -2
- package/es/components/ButtonSet/ButtonSet.js +1 -2
- package/es/components/Checkbox/Checkbox.d.ts +4 -0
- package/es/components/Checkbox/Checkbox.js +29 -6
- package/es/components/CodeSnippet/CodeSnippet.js +4 -3
- package/es/components/ComboBox/ComboBox.js +6 -6
- package/es/components/ComposedModal/ComposedModal.js +2 -3
- package/es/components/ComposedModal/ModalFooter.js +1 -0
- package/es/components/ContainedList/ContainedList.js +10 -3
- package/es/components/ContentSwitcher/ContentSwitcher.js +3 -3
- package/es/components/CopyButton/CopyButton.js +1 -2
- package/es/components/DangerButton/DangerButton.js +2 -3
- package/es/components/DataTable/Table.js +1 -2
- package/es/components/DataTable/TableActionList.js +1 -2
- package/es/components/DataTable/TableBatchAction.js +2 -2
- package/es/components/DataTable/TableBatchActions.js +2 -2
- package/es/components/DataTable/TableBody.js +1 -2
- package/es/components/DataTable/TableCell.js +1 -2
- package/es/components/DataTable/TableContainer.js +1 -2
- package/es/components/DataTable/TableExpandHeader.js +1 -2
- package/es/components/DataTable/TableExpandRow.js +1 -2
- package/es/components/DataTable/TableExpandedRow.js +1 -2
- package/es/components/DataTable/TableHead.js +1 -2
- package/es/components/DataTable/TableHeader.js +1 -2
- package/es/components/DataTable/TableRow.js +1 -2
- package/es/components/DataTable/TableSelectAll.js +1 -2
- package/es/components/DataTable/TableSelectRow.js +1 -2
- package/es/components/DataTable/TableToolbar.js +2 -3
- package/es/components/DataTable/TableToolbarAction.js +2 -3
- package/es/components/DataTable/TableToolbarContent.js +1 -2
- package/es/components/DataTable/TableToolbarMenu.js +1 -2
- package/es/components/DataTable/TableToolbarSearch.js +2 -2
- package/es/components/DataTable/index.js +24 -26
- package/es/components/DataTable/state/getDerivedStateFromProps.js +1 -3
- package/es/components/DataTable/tools/denormalize.js +1 -3
- package/es/components/DataTable/tools/instanceId.js +1 -3
- package/es/components/DataTable/tools/normalize.js +1 -3
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +1 -2
- package/es/components/DatePicker/DatePicker.Skeleton.js +1 -2
- package/es/components/DatePicker/DatePicker.js +80 -32
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/es/components/DatePickerInput/DatePickerInput.js +19 -12
- package/es/components/Dropdown/Dropdown.Skeleton.js +2 -2
- package/es/components/Dropdown/Dropdown.js +3 -3
- package/es/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +1 -0
- package/es/components/FileUploader/FileUploader.js +3 -3
- 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 +1 -2
- package/es/components/FluidComboBox/FluidComboBox.js +1 -2
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +67 -0
- package/es/components/FluidDatePicker/FluidDatePicker.js +2 -2
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +1 -2
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +1 -2
- package/es/components/FluidDropdown/FluidDropdown.js +2 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +1 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +1 -2
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +1 -2
- package/es/components/FluidSelect/FluidSelect.js +2 -2
- package/es/components/FluidTextArea/FluidTextArea.js +1 -0
- package/es/components/FluidTextInput/FluidTextInput.js +1 -0
- package/es/components/Form/Form.js +1 -2
- package/es/components/FormGroup/FormGroup.js +1 -2
- package/es/components/Icon/Icon.Skeleton.js +1 -2
- package/es/components/IconButton/index.js +3 -1
- package/es/components/IdPrefix/index.js +29 -0
- package/es/components/InlineCheckbox/InlineCheckbox.js +1 -2
- package/es/components/Link/Link.js +1 -2
- package/es/components/ListBox/ListBox.js +2 -2
- package/es/components/ListBox/ListBoxMenu.js +1 -2
- package/es/components/ListBox/ListBoxMenuIcon.js +1 -2
- package/es/components/ListBox/ListBoxMenuItem.js +1 -2
- package/es/components/ListBox/ListBoxSelection.js +13 -6
- package/es/components/ListBox/index.js +1 -0
- package/es/components/ListBox/next/ListBoxSelection.js +3 -3
- package/es/components/ListBox/next/ListBoxTrigger.js +1 -2
- package/es/components/ListItem/ListItem.js +1 -2
- package/es/components/Menu/Menu.js +4 -5
- package/es/components/Menu/MenuOption.js +2 -2
- package/es/components/Modal/Modal.js +3 -3
- package/es/components/ModalWrapper/ModalWrapper.js +2 -1
- package/es/components/ModalWrapper/index.js +2 -5
- package/es/components/MultiSelect/FilterableMultiSelect.js +8 -8
- package/es/components/MultiSelect/MultiSelect.js +34 -11
- package/es/components/Notification/Notification.js +5 -4
- package/es/components/NumberInput/NumberInput.js +3 -3
- package/es/components/OrderedList/OrderedList.js +1 -2
- package/es/components/OverflowMenu/OverflowMenu.js +12 -2
- package/es/components/OverflowMenu/index.js +1 -2
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +3 -3
- package/es/components/OverflowMenuItem/index.js +2 -5
- package/es/components/OverflowMenuV2/index.js +2 -2
- package/es/components/Pagination/Pagination.js +10 -8
- package/es/components/Pagination/experimental/PageSelector.js +1 -0
- package/es/components/Pagination/experimental/Pagination.js +2 -0
- package/es/components/Pagination/index.js +1 -0
- package/es/components/PaginationNav/PaginationNav.js +2 -2
- package/es/components/PrimaryButton/PrimaryButton.js +2 -3
- package/es/components/ProgressIndicator/ProgressIndicator.js +5 -5
- package/es/components/RadioButton/RadioButton.js +2 -3
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +15 -7
- package/es/components/RadioTile/RadioTile.js +2 -2
- package/es/components/Search/Search.Skeleton.js +1 -2
- package/es/components/Search/Search.js +5 -6
- package/es/components/Search/index.js +1 -0
- package/es/components/SecondaryButton/SecondaryButton.js +2 -3
- package/es/components/Select/Select.Skeleton.js +1 -2
- package/es/components/Select/Select.js +30 -4
- package/es/components/SelectItem/SelectItem.js +1 -2
- package/es/components/SelectItemGroup/SelectItemGroup.js +1 -2
- package/es/components/SkeletonIcon/SkeletonIcon.js +1 -2
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +3 -3
- package/es/components/SkeletonText/SkeletonText.js +2 -3
- package/es/components/Slider/Slider.Skeleton.js +1 -2
- package/es/components/Slider/Slider.js +21 -13
- package/es/components/Slider/index.js +2 -2
- package/es/components/StructuredList/StructuredList.Skeleton.js +1 -2
- package/es/components/StructuredList/StructuredList.js +89 -54
- package/es/components/Switch/Switch.js +1 -2
- package/es/components/Tab/Tab.js +1 -1
- package/es/components/Tab/index.js +4 -5
- package/es/components/TabContent/TabContent.js +1 -2
- package/es/components/Tabs/Tabs.js +4 -3
- package/es/components/Tabs/index.js +1 -0
- package/es/components/Tag/Tag.js +1 -2
- package/es/components/TextArea/TextArea.Skeleton.js +1 -2
- package/es/components/TextArea/TextArea.js +2 -2
- package/es/components/TextInput/ControlledPasswordInput.js +1 -2
- package/es/components/TextInput/PasswordInput.js +3 -3
- package/es/components/TextInput/TextInput.Skeleton.js +1 -2
- package/es/components/TextInput/TextInput.js +3 -3
- package/es/components/TextInput/index.js +1 -0
- package/es/components/Tile/Tile.js +2 -2
- package/es/components/TileGroup/TileGroup.js +1 -1
- package/es/components/TimePicker/TimePicker.js +148 -144
- package/es/components/TimePickerSelect/TimePickerSelect.js +1 -1
- package/es/components/TimePickerSelect/index.js +3 -4
- package/es/components/TimePickerSelect/next/TimePickerSelect.js +1 -2
- package/es/components/Toggle/Toggle.Skeleton.js +1 -1
- package/es/components/Toggle/Toggle.js +13 -3
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +1 -1
- package/es/components/Toggletip/index.js +2 -2
- package/es/components/Tooltip/{next/DefinitionTooltip.js → DefinitionTooltip.js} +7 -7
- package/es/components/Tooltip/{next/Tooltip.js → Tooltip.js} +8 -8
- package/es/components/TreeView/TreeNode.js +2 -2
- package/es/components/TreeView/TreeView.js +2 -2
- package/es/components/UIShell/Content.js +1 -2
- package/es/components/UIShell/Header.js +2 -3
- package/es/components/UIShell/HeaderContainer.js +1 -2
- package/es/components/UIShell/HeaderGlobalAction.js +3 -3
- package/es/components/UIShell/HeaderMenu.js +4 -5
- package/es/components/UIShell/HeaderMenuButton.js +1 -1
- package/es/components/UIShell/HeaderMenuItem.js +2 -3
- package/es/components/UIShell/HeaderName.js +1 -1
- package/es/components/UIShell/HeaderNavigation.js +1 -1
- package/es/components/UIShell/HeaderPanel.js +2 -3
- package/es/components/UIShell/HeaderSideNavItems.js +1 -2
- package/es/components/UIShell/Link.js +1 -2
- package/es/components/UIShell/SideNav.js +2 -3
- package/es/components/UIShell/SideNavDetails.js +1 -2
- package/es/components/UIShell/SideNavHeader.js +1 -2
- package/es/components/UIShell/SideNavItems.js +1 -2
- package/es/components/UIShell/SideNavLink.js +2 -3
- package/es/components/UIShell/SideNavMenu.js +2 -2
- package/es/components/UIShell/SideNavMenuItem.js +1 -2
- package/es/components/UIShell/SideNavSwitcher.js +1 -2
- package/es/components/UIShell/Switcher.js +2 -3
- package/es/components/UIShell/SwitcherDivider.js +1 -2
- package/es/components/UIShell/SwitcherItem.js +2 -3
- package/es/components/UnorderedList/UnorderedList.js +1 -2
- package/es/index.js +86 -81
- package/es/internal/ClickListener.js +1 -1
- package/es/internal/FloatingMenu.js +1 -1
- package/es/internal/OptimizedResize.js +1 -3
- package/es/internal/Selection.js +1 -1
- package/es/internal/useId.js +5 -2
- package/es/internal/useIdPrefix.js +15 -0
- package/es/internal/useIsomorphicEffect.js +1 -2
- package/es/internal/useSavedCallback.js +1 -1
- package/es/tools/mergeRefs.js +1 -3
- package/es/tools/wrapComponent.js +1 -3
- package/lib/components/Accordion/AccordionItem.js +2 -2
- package/lib/components/Accordion/index.js +4 -0
- package/lib/components/AccordionItem/index.js +2 -0
- package/lib/components/Breadcrumb/Breadcrumb.js +1 -2
- package/lib/components/Breadcrumb/BreadcrumbItem.js +1 -2
- package/lib/components/Button/Button.Skeleton.js +1 -2
- package/lib/components/Button/Button.js +1 -2
- package/lib/components/ButtonSet/ButtonSet.js +1 -2
- package/lib/components/Checkbox/Checkbox.d.ts +4 -0
- package/lib/components/Checkbox/Checkbox.js +29 -6
- package/lib/components/CodeSnippet/CodeSnippet.js +4 -3
- package/lib/components/ComboBox/ComboBox.js +6 -6
- package/lib/components/ComposedModal/ComposedModal.js +1 -2
- package/lib/components/ComposedModal/ModalFooter.js +1 -0
- package/lib/components/ContainedList/ContainedList.js +10 -3
- package/lib/components/ContentSwitcher/ContentSwitcher.js +2 -2
- package/lib/components/CopyButton/CopyButton.js +1 -2
- package/lib/components/DangerButton/DangerButton.js +2 -3
- package/lib/components/DataTable/DataTable.js +5 -5
- package/lib/components/DataTable/Table.js +1 -2
- package/lib/components/DataTable/TableActionList.js +1 -2
- package/lib/components/DataTable/TableBatchAction.js +2 -2
- package/lib/components/DataTable/TableBatchActions.js +2 -2
- package/lib/components/DataTable/TableBody.js +1 -2
- package/lib/components/DataTable/TableCell.js +1 -2
- package/lib/components/DataTable/TableContainer.js +1 -2
- package/lib/components/DataTable/TableExpandHeader.js +1 -2
- package/lib/components/DataTable/TableExpandRow.js +1 -2
- package/lib/components/DataTable/TableExpandedRow.js +1 -2
- package/lib/components/DataTable/TableHead.js +1 -2
- package/lib/components/DataTable/TableHeader.js +1 -2
- package/lib/components/DataTable/TableRow.js +1 -2
- package/lib/components/DataTable/TableSelectAll.js +1 -2
- package/lib/components/DataTable/TableSelectRow.js +1 -2
- package/lib/components/DataTable/TableToolbar.js +1 -2
- package/lib/components/DataTable/TableToolbarAction.js +3 -4
- package/lib/components/DataTable/TableToolbarContent.js +1 -2
- package/lib/components/DataTable/TableToolbarMenu.js +1 -2
- package/lib/components/DataTable/TableToolbarSearch.js +2 -2
- package/lib/components/DataTable/index.js +23 -24
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +1 -3
- package/lib/components/DataTable/tools/denormalize.js +1 -3
- package/lib/components/DataTable/tools/instanceId.js +1 -3
- package/lib/components/DataTable/tools/normalize.js +1 -3
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +1 -2
- package/lib/components/DatePicker/DatePicker.Skeleton.js +1 -2
- package/lib/components/DatePicker/DatePicker.js +80 -32
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/lib/components/DatePickerInput/DatePickerInput.js +18 -11
- package/lib/components/Dropdown/Dropdown.Skeleton.js +2 -2
- package/lib/components/Dropdown/Dropdown.js +3 -3
- package/lib/components/ExpandableSearch/ExpandableSearch.js +1 -0
- 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 +1 -2
- package/lib/components/FluidComboBox/FluidComboBox.js +1 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +77 -0
- package/lib/components/FluidDatePicker/FluidDatePicker.js +2 -2
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +1 -2
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +1 -2
- package/lib/components/FluidDropdown/FluidDropdown.js +2 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +1 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +1 -2
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +1 -2
- package/lib/components/FluidSelect/FluidSelect.js +2 -2
- package/lib/components/FluidTextArea/FluidTextArea.js +1 -0
- package/lib/components/FluidTextInput/FluidTextInput.js +1 -0
- package/lib/components/Form/Form.js +1 -2
- package/lib/components/FormGroup/FormGroup.js +1 -2
- package/lib/components/Icon/Icon.Skeleton.js +1 -2
- package/lib/components/IconButton/index.js +3 -1
- package/lib/components/IdPrefix/index.js +38 -0
- package/lib/components/InlineCheckbox/InlineCheckbox.js +1 -2
- package/lib/components/Link/Link.js +1 -2
- package/lib/components/ListBox/ListBox.js +2 -2
- package/lib/components/ListBox/ListBoxMenu.js +1 -2
- package/lib/components/ListBox/ListBoxMenuIcon.js +1 -2
- package/lib/components/ListBox/ListBoxMenuItem.js +1 -2
- package/lib/components/ListBox/ListBoxSelection.js +13 -6
- package/lib/components/ListBox/index.js +1 -0
- package/lib/components/ListBox/next/ListBoxSelection.js +2 -2
- package/lib/components/ListBox/next/ListBoxTrigger.js +1 -2
- package/lib/components/ListItem/ListItem.js +1 -2
- package/lib/components/Menu/Menu.js +3 -4
- package/lib/components/Menu/MenuOption.js +2 -2
- package/lib/components/Modal/Modal.js +2 -2
- package/lib/components/ModalWrapper/ModalWrapper.js +1 -0
- package/lib/components/ModalWrapper/index.js +3 -3
- package/lib/components/MultiSelect/FilterableMultiSelect.js +7 -7
- package/lib/components/MultiSelect/MultiSelect.js +33 -10
- package/lib/components/Notification/Notification.js +3 -2
- package/lib/components/NumberInput/NumberInput.js +3 -3
- package/lib/components/OrderedList/OrderedList.js +1 -2
- package/lib/components/OverflowMenu/OverflowMenu.js +12 -2
- package/lib/components/OverflowMenu/index.js +1 -22
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
- package/lib/components/OverflowMenuItem/index.js +3 -3
- package/lib/components/OverflowMenuV2/index.js +2 -2
- package/lib/components/Pagination/Pagination.js +9 -7
- package/lib/components/Pagination/experimental/PageSelector.js +1 -0
- package/lib/components/Pagination/experimental/Pagination.js +2 -0
- package/lib/components/Pagination/index.js +1 -0
- package/lib/components/PaginationNav/PaginationNav.js +2 -2
- package/lib/components/PrimaryButton/PrimaryButton.js +2 -3
- package/lib/components/ProgressIndicator/ProgressIndicator.js +5 -5
- package/lib/components/RadioButton/RadioButton.js +2 -3
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +15 -7
- package/lib/components/RadioTile/RadioTile.js +2 -2
- package/lib/components/Search/Search.Skeleton.js +1 -2
- package/lib/components/Search/Search.js +3 -4
- package/lib/components/Search/index.js +2 -0
- package/lib/components/SecondaryButton/SecondaryButton.js +2 -3
- package/lib/components/Select/Select.Skeleton.js +1 -2
- package/lib/components/Select/Select.js +30 -4
- package/lib/components/SelectItem/SelectItem.js +1 -2
- package/lib/components/SelectItemGroup/SelectItemGroup.js +1 -2
- package/lib/components/SkeletonIcon/SkeletonIcon.js +1 -2
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +3 -3
- package/lib/components/SkeletonText/SkeletonText.js +2 -3
- package/lib/components/Slider/Slider.Skeleton.js +1 -2
- package/lib/components/Slider/Slider.js +20 -12
- package/lib/components/Slider/index.js +3 -22
- package/lib/components/StructuredList/StructuredList.Skeleton.js +1 -2
- package/lib/components/StructuredList/StructuredList.js +87 -52
- package/lib/components/Switch/Switch.js +1 -2
- package/lib/components/Tab/index.js +3 -4
- package/lib/components/TabContent/TabContent.js +1 -2
- package/lib/components/Tabs/Tabs.js +4 -3
- package/lib/components/Tabs/index.js +2 -0
- package/lib/components/Tag/Tag.js +1 -2
- package/lib/components/TextArea/TextArea.Skeleton.js +1 -2
- package/lib/components/TextArea/TextArea.js +2 -2
- package/lib/components/TextInput/ControlledPasswordInput.js +1 -2
- package/lib/components/TextInput/PasswordInput.js +3 -3
- package/lib/components/TextInput/TextInput.Skeleton.js +1 -2
- package/lib/components/TextInput/TextInput.js +3 -3
- package/lib/components/TextInput/index.js +2 -0
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/TimePicker/TimePicker.js +144 -140
- package/lib/components/TimePickerSelect/index.js +4 -5
- package/lib/components/TimePickerSelect/next/TimePickerSelect.js +1 -2
- package/lib/components/Toggle/Toggle.js +13 -3
- package/lib/components/Toggletip/index.js +2 -2
- package/lib/components/Tooltip/{next/DefinitionTooltip.js → DefinitionTooltip.js} +7 -7
- package/lib/components/Tooltip/{next/Tooltip.js → Tooltip.js} +8 -8
- package/lib/components/TreeView/TreeNode.js +2 -2
- package/lib/components/TreeView/TreeView.js +2 -2
- package/lib/components/UIShell/Content.js +1 -2
- package/lib/components/UIShell/Header.js +1 -2
- package/lib/components/UIShell/HeaderContainer.js +1 -2
- package/lib/components/UIShell/HeaderGlobalAction.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +3 -4
- package/lib/components/UIShell/HeaderMenuItem.js +1 -2
- package/lib/components/UIShell/HeaderPanel.js +1 -2
- package/lib/components/UIShell/HeaderSideNavItems.js +1 -2
- package/lib/components/UIShell/Link.js +1 -2
- package/lib/components/UIShell/SideNav.js +1 -2
- package/lib/components/UIShell/SideNavDetails.js +1 -2
- package/lib/components/UIShell/SideNavHeader.js +1 -2
- package/lib/components/UIShell/SideNavItems.js +1 -2
- package/lib/components/UIShell/SideNavLink.js +1 -2
- package/lib/components/UIShell/SideNavMenu.js +2 -2
- package/lib/components/UIShell/SideNavMenuItem.js +1 -2
- package/lib/components/UIShell/SideNavSwitcher.js +1 -2
- package/lib/components/UIShell/Switcher.js +1 -2
- package/lib/components/UIShell/SwitcherDivider.js +1 -2
- package/lib/components/UIShell/SwitcherItem.js +1 -2
- package/lib/components/UnorderedList/UnorderedList.js +1 -2
- package/lib/index.js +208 -200
- package/lib/internal/OptimizedResize.js +1 -3
- package/lib/internal/useId.js +5 -2
- package/lib/internal/useIdPrefix.js +24 -0
- package/lib/internal/useIsomorphicEffect.js +1 -2
- package/lib/tools/mergeRefs.js +1 -3
- package/lib/tools/wrapComponent.js +1 -3
- package/package.json +10 -10
- package/es/components/StructuredList/index.js +0 -43
- package/es/components/StructuredList/next/StructuredList.js +0 -342
- package/es/components/TimePicker/index.js +0 -15
- package/es/components/TimePicker/next/TimePicker.js +0 -218
- package/es/internal/ComponentToggle.js +0 -42
- package/lib/components/StructuredList/index.js +0 -52
- package/lib/components/StructuredList/next/StructuredList.js +0 -357
- package/lib/components/TimePicker/index.js +0 -39
- package/lib/components/TimePicker/next/TimePicker.js +0 -228
- package/lib/internal/ComponentToggle.js +0 -50
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import * as FeatureFlags from '@carbon/feature-flags';
|
|
9
8
|
import { OverflowMenu as OverflowMenu$1 } from './OverflowMenu.js';
|
|
10
9
|
import { createClassWrapper } from '../../internal/createClassWrapper.js';
|
|
11
10
|
|
|
12
|
-
var OverflowMenu =
|
|
11
|
+
var OverflowMenu = createClassWrapper(OverflowMenu$1);
|
|
13
12
|
|
|
14
13
|
export { OverflowMenu as default };
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { inherits as _inherits, createSuper as _createSuper,
|
|
8
|
+
import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, defineProperty as _defineProperty, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default from 'react';
|
|
12
|
+
import { ArrowDown, ArrowUp } from '../../internal/keyboard/keys.js';
|
|
13
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
12
14
|
import { warning } from '../../internal/warning.js';
|
|
13
15
|
import * as FeatureFlags from '@carbon/feature-flags';
|
|
14
16
|
import { PrefixContext } from '../../internal/usePrefix.js';
|
|
15
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
16
|
-
import { ArrowDown, ArrowUp } from '../../internal/keyboard/keys.js';
|
|
17
17
|
|
|
18
18
|
var _excluded = ["href", "className", "itemText", "hasDivider", "isDelete", "disabled", "closeMenu", "onClick", "handleOverflowMenuItemFocus", "onKeyDown", "wrapperClassName", "requireTitle", "index", "title"];
|
|
19
19
|
|
|
@@ -5,8 +5,5 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import OverflowMenuItem
|
|
9
|
-
|
|
10
|
-
var OverflowMenuItem = OverflowMenuItem$1;
|
|
11
|
-
|
|
12
|
-
export { OverflowMenuItem as default };
|
|
8
|
+
import OverflowMenuItem from './OverflowMenuItem.js';
|
|
9
|
+
export { default } from './OverflowMenuItem.js';
|
|
@@ -12,10 +12,10 @@ import cx from 'classnames';
|
|
|
12
12
|
import { OverflowMenuVertical } from '@carbon/icons-react';
|
|
13
13
|
import { useId } from '../../internal/useId.js';
|
|
14
14
|
import '../Menu/index.js';
|
|
15
|
-
import {
|
|
15
|
+
import { ArrowUp, ArrowRight, ArrowDown, ArrowLeft } from '../../internal/keyboard/keys.js';
|
|
16
16
|
import { matches } from '../../internal/keyboard/match.js';
|
|
17
|
+
import { usePrefix } from '../../internal/usePrefix.js';
|
|
17
18
|
import Menu from '../Menu/Menu.js';
|
|
18
|
-
import { ArrowUp, ArrowRight, ArrowDown, ArrowLeft } from '../../internal/keyboard/keys.js';
|
|
19
19
|
|
|
20
20
|
var _excluded = ["children", "className", "renderIcon", "size"];
|
|
21
21
|
var defaultSize = 'md';
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties,
|
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, defineProperty as _defineProperty, extends as _extends, typeof as _typeof } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import { CaretLeft, CaretRight } from '@carbon/icons-react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import React__default, { useRef, useState } from 'react';
|
|
13
|
+
import '../Select/Select.Skeleton.js';
|
|
13
14
|
import Select from '../Select/Select.js';
|
|
14
15
|
import SelectItem from '../SelectItem/SelectItem.js';
|
|
15
16
|
import { equals } from '../../tools/array.js';
|
|
@@ -96,8 +97,8 @@ var Pagination = /*#__PURE__*/React__default.forwardRef(function Pagination(_ref
|
|
|
96
97
|
pageSizeInputDisabled = _ref.pageSizeInputDisabled,
|
|
97
98
|
controlledPageSizes = _ref.pageSizes,
|
|
98
99
|
_ref$pageText = _ref.pageText,
|
|
99
|
-
pageText = _ref$pageText === void 0 ? function (page) {
|
|
100
|
-
return "page ".concat(page);
|
|
100
|
+
pageText = _ref$pageText === void 0 ? function (page, pagesUnknown) {
|
|
101
|
+
return "page ".concat(pagesUnknown ? '' : page);
|
|
101
102
|
} : _ref$pageText,
|
|
102
103
|
_ref$pagesUnknown = _ref.pagesUnknown,
|
|
103
104
|
pagesUnknown = _ref$pagesUnknown === void 0 ? false : _ref$pagesUnknown,
|
|
@@ -278,7 +279,9 @@ var Pagination = /*#__PURE__*/React__default.forwardRef(function Pagination(_ref
|
|
|
278
279
|
className: "".concat(prefix, "--pagination__text ").concat(prefix, "--pagination__items-count")
|
|
279
280
|
}, pagesUnknown ? itemText(pageSize * (page - 1) + 1, page * pageSize) : itemRangeText(Math.min(pageSize * (page - 1) + 1, totalItems), Math.min(page * pageSize, totalItems), totalItems))), /*#__PURE__*/React__default.createElement("div", {
|
|
280
281
|
className: "".concat(prefix, "--pagination__right")
|
|
281
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
282
|
+
}, pagesUnknown ? /*#__PURE__*/React__default.createElement("span", {
|
|
283
|
+
className: "".concat(prefix, "--pagination__text ").concat(prefix, "--pagination__page-text")
|
|
284
|
+
}, pagesUnknown ? pageText(page, pagesUnknown) : pageRangeText(page, totalPages)) : null, /*#__PURE__*/React__default.createElement(Select, {
|
|
282
285
|
id: "".concat(prefix, "-pagination-select-").concat(inputId, "-right"),
|
|
283
286
|
className: "".concat(prefix, "--select__page-number"),
|
|
284
287
|
labelText: "Page number, of ".concat(totalPages, " pages"),
|
|
@@ -287,9 +290,9 @@ var Pagination = /*#__PURE__*/React__default.forwardRef(function Pagination(_ref
|
|
|
287
290
|
onChange: handlePageInputChange,
|
|
288
291
|
value: page,
|
|
289
292
|
disabled: pageInputDisabled || disabled
|
|
290
|
-
}, selectItems), /*#__PURE__*/React__default.createElement("span", {
|
|
293
|
+
}, selectItems), pagesUnknown ? null : /*#__PURE__*/React__default.createElement("span", {
|
|
291
294
|
className: "".concat(prefix, "--pagination__text")
|
|
292
|
-
}, pagesUnknown ? pageText(page) : pageRangeText(page, totalPages)), /*#__PURE__*/React__default.createElement("div", {
|
|
295
|
+
}, pagesUnknown ? pageText(page, pagesUnknown) : pageRangeText(page, totalPages)), /*#__PURE__*/React__default.createElement("div", {
|
|
293
296
|
className: "".concat(prefix, "--pagination__control-buttons")
|
|
294
297
|
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
295
298
|
align: "top",
|
|
@@ -416,6 +419,5 @@ Pagination.propTypes = {
|
|
|
416
419
|
*/
|
|
417
420
|
totalItems: PropTypes.number
|
|
418
421
|
};
|
|
419
|
-
var Pagination$1 = Pagination;
|
|
420
422
|
|
|
421
|
-
export { Pagination
|
|
423
|
+
export { Pagination as default };
|
|
@@ -10,6 +10,7 @@ import React__default from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import setupGetInstanceId from '../../../tools/setupGetInstanceId.js';
|
|
13
|
+
import '../../Select/Select.Skeleton.js';
|
|
13
14
|
import Select from '../../Select/Select.js';
|
|
14
15
|
import SelectItem from '../../SelectItem/SelectItem.js';
|
|
15
16
|
import { usePrefix } from '../../../internal/usePrefix.js';
|
|
@@ -10,7 +10,9 @@ import React__default, { useState } from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { CaretLeft, CaretRight } from '@carbon/icons-react';
|
|
13
|
+
import '../../Button/Button.Skeleton.js';
|
|
13
14
|
import Button from '../../Button/Button.js';
|
|
15
|
+
import '../../Select/Select.Skeleton.js';
|
|
14
16
|
import Select from '../../Select/Select.js';
|
|
15
17
|
import SelectItem from '../../SelectItem/SelectItem.js';
|
|
16
18
|
import { IconButton } from '../../IconButton/index.js';
|
|
@@ -10,6 +10,7 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React__default, { useState, useEffect, useRef } from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { CaretRight, CaretLeft, OverflowMenuHorizontal } from '@carbon/icons-react';
|
|
13
|
+
import '../Button/Button.Skeleton.js';
|
|
13
14
|
import Button from '../Button/Button.js';
|
|
14
15
|
import { IconButton } from '../IconButton/index.js';
|
|
15
16
|
import * as FeatureFlags from '@carbon/feature-flags';
|
|
@@ -431,6 +432,5 @@ PaginationNav.propTypes = {
|
|
|
431
432
|
*/
|
|
432
433
|
translateWithId: PropTypes.func
|
|
433
434
|
};
|
|
434
|
-
var PaginationNav$1 = PaginationNav;
|
|
435
435
|
|
|
436
|
-
export { PaginationNav
|
|
436
|
+
export { PaginationNav as default };
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React__default from 'react';
|
|
10
|
+
import '../Button/Button.Skeleton.js';
|
|
10
11
|
import Button from '../Button/Button.js';
|
|
11
12
|
|
|
12
13
|
var PrimaryButton = function PrimaryButton(props) {
|
|
@@ -15,6 +16,4 @@ var PrimaryButton = function PrimaryButton(props) {
|
|
|
15
16
|
}, props));
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export { PrimaryButton$1 as default };
|
|
19
|
+
export { PrimaryButton as default };
|
|
@@ -9,10 +9,10 @@ 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 } from 'react';
|
|
12
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
13
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
12
14
|
import { Warning, Incomplete, CheckmarkOutline, CircleDash } from '@carbon/icons-react';
|
|
13
15
|
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 = ["children", "className", "currentIndex", "onChange", "spaceEqually", "vertical"],
|
|
18
18
|
_excluded2 = ["label", "description", "className", "current", "complete", "invalid", "secondaryLabel", "disabled", "onClick", "translateWithId"];
|
|
@@ -202,9 +202,7 @@ function ProgressStep(_ref2) {
|
|
|
202
202
|
onClick: !current ? onClick : undefined,
|
|
203
203
|
onKeyDown: handleKeyDown,
|
|
204
204
|
title: label
|
|
205
|
-
}, rest), /*#__PURE__*/React__default.createElement(
|
|
206
|
-
className: "".concat(prefix, "--assistive-text")
|
|
207
|
-
}, message), /*#__PURE__*/React__default.createElement(SVGIcon, {
|
|
205
|
+
}, rest), /*#__PURE__*/React__default.createElement(SVGIcon, {
|
|
208
206
|
complete: complete,
|
|
209
207
|
current: current,
|
|
210
208
|
description: description,
|
|
@@ -217,6 +215,8 @@ function ProgressStep(_ref2) {
|
|
|
217
215
|
}, label), secondaryLabel !== null && secondaryLabel !== undefined ? /*#__PURE__*/React__default.createElement("p", {
|
|
218
216
|
className: "".concat(prefix, "--progress-optional")
|
|
219
217
|
}, secondaryLabel) : null), /*#__PURE__*/React__default.createElement("span", {
|
|
218
|
+
className: "".concat(prefix, "--assistive-text")
|
|
219
|
+
}, message), /*#__PURE__*/React__default.createElement("span", {
|
|
220
220
|
className: "".concat(prefix, "--progress-line")
|
|
221
221
|
})));
|
|
222
222
|
}
|
|
@@ -39,7 +39,7 @@ var RadioButton = /*#__PURE__*/React__default.forwardRef(function RadioButton(_r
|
|
|
39
39
|
onChange(value, name, event);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
var innerLabelClasses = cx(_defineProperty({}, "".concat(prefix, "--visually-hidden"), hideLabel));
|
|
42
|
+
var innerLabelClasses = cx("".concat(prefix, "--radio-button__label-text"), _defineProperty({}, "".concat(prefix, "--visually-hidden"), hideLabel));
|
|
43
43
|
var wrapperClasses = cx(className, "".concat(prefix, "--radio-button-wrapper"), _defineProperty({}, "".concat(prefix, "--radio-button-wrapper--label-").concat(labelPosition), labelPosition !== 'right'));
|
|
44
44
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
45
45
|
className: wrapperClasses
|
|
@@ -126,6 +126,5 @@ RadioButton.propTypes = {
|
|
|
126
126
|
*/
|
|
127
127
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
128
128
|
};
|
|
129
|
-
var RadioButton$1 = RadioButton;
|
|
130
129
|
|
|
131
|
-
export { RadioButton
|
|
130
|
+
export { RadioButton as default };
|
|
@@ -27,6 +27,7 @@ var RadioButtonGroup = /*#__PURE__*/React__default.forwardRef(function RadioButt
|
|
|
27
27
|
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
28
28
|
_ref$orientation = _ref.orientation,
|
|
29
29
|
orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation,
|
|
30
|
+
readOnly = _ref.readOnly,
|
|
30
31
|
valueSelected = _ref.valueSelected;
|
|
31
32
|
var prefix = usePrefix();
|
|
32
33
|
|
|
@@ -71,20 +72,23 @@ var RadioButtonGroup = /*#__PURE__*/React__default.forwardRef(function RadioButt
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
function handleOnChange(newSelection, value, evt) {
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
if (!readOnly) {
|
|
76
|
+
if (newSelection !== selected) {
|
|
77
|
+
setSelected(newSelection);
|
|
78
|
+
onChange(newSelection, name, evt);
|
|
79
|
+
}
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
|
|
80
|
-
var fieldsetClasses = cx("".concat(prefix, "--radio-button-group"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "--radio-button-group--").concat(orientation), orientation === 'vertical'), _defineProperty(_classNames, "".concat(prefix, "--radio-button-group--label-").concat(labelPosition), labelPosition), _classNames));
|
|
83
|
+
var fieldsetClasses = cx("".concat(prefix, "--radio-button-group"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "--radio-button-group--").concat(orientation), orientation === 'vertical'), _defineProperty(_classNames, "".concat(prefix, "--radio-button-group--label-").concat(labelPosition), labelPosition), _defineProperty(_classNames, "".concat(prefix, "--radio-button-group--readonly"), readOnly), _classNames));
|
|
81
84
|
var wrapperClasses = cx("".concat(prefix, "--form-item"), className);
|
|
82
85
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
83
86
|
className: wrapperClasses,
|
|
84
87
|
ref: ref
|
|
85
88
|
}, /*#__PURE__*/React__default.createElement("fieldset", {
|
|
86
89
|
className: fieldsetClasses,
|
|
87
|
-
disabled: disabled
|
|
90
|
+
disabled: disabled,
|
|
91
|
+
"aria-readonly": readOnly
|
|
88
92
|
}, legendText && /*#__PURE__*/React__default.createElement(Legend, {
|
|
89
93
|
className: "".concat(prefix, "--label")
|
|
90
94
|
}, legendText), getRadioButtons()));
|
|
@@ -137,11 +141,15 @@ RadioButtonGroup.propTypes = {
|
|
|
137
141
|
*/
|
|
138
142
|
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
139
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Whether the RadioButtonGroup should be read-only
|
|
146
|
+
*/
|
|
147
|
+
readOnly: PropTypes.bool,
|
|
148
|
+
|
|
140
149
|
/**
|
|
141
150
|
* Specify the value that is currently selected in the group
|
|
142
151
|
*/
|
|
143
152
|
valueSelected: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
144
153
|
};
|
|
145
|
-
var RadioButtonGroup$1 = RadioButtonGroup;
|
|
146
154
|
|
|
147
|
-
export { RadioButtonGroup
|
|
155
|
+
export { RadioButtonGroup as default };
|
|
@@ -10,11 +10,11 @@ import { CheckmarkFilled } from '@carbon/icons-react';
|
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import React__default from 'react';
|
|
13
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
14
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
13
15
|
import { useFallbackId } from '../../internal/useId.js';
|
|
14
16
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
17
|
import deprecate from '../../prop-types/deprecate.js';
|
|
16
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
17
|
-
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
18
18
|
|
|
19
19
|
var _CheckmarkFilled;
|
|
20
20
|
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, defineProperty as _defineProperty, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import { Close, Search as Search$
|
|
9
|
+
import { Close, Search as Search$1 } from '@carbon/icons-react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import React__default, { useRef, useState } from 'react';
|
|
13
13
|
import { focus } from '../../internal/focus/index.js';
|
|
14
|
+
import { Escape } from '../../internal/keyboard/keys.js';
|
|
15
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
14
16
|
import { useId } from '../../internal/useId.js';
|
|
15
17
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
18
|
import { composeEventHandlers } from '../../tools/events.js';
|
|
17
19
|
import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
18
20
|
import deprecate from '../../prop-types/deprecate.js';
|
|
19
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
20
|
-
import { Escape } from '../../internal/keyboard/keys.js';
|
|
21
21
|
|
|
22
22
|
var _Close;
|
|
23
23
|
|
|
@@ -250,7 +250,7 @@ function CustomSearchIcon(_ref2) {
|
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
return /*#__PURE__*/React__default.createElement(Search$
|
|
253
|
+
return /*#__PURE__*/React__default.createElement(Search$1, {
|
|
254
254
|
className: "".concat(prefix, "--search-magnifier-icon")
|
|
255
255
|
});
|
|
256
256
|
}
|
|
@@ -261,6 +261,5 @@ CustomSearchIcon.propTypes = {
|
|
|
261
261
|
*/
|
|
262
262
|
icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
263
263
|
};
|
|
264
|
-
var Search$1 = Search;
|
|
265
264
|
|
|
266
|
-
export { Search
|
|
265
|
+
export { Search as default };
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React__default from 'react';
|
|
10
|
+
import '../Button/Button.Skeleton.js';
|
|
10
11
|
import Button from '../Button/Button.js';
|
|
11
12
|
|
|
12
13
|
var SecondaryButton = function SecondaryButton(props) {
|
|
@@ -15,6 +16,4 @@ var SecondaryButton = function SecondaryButton(props) {
|
|
|
15
16
|
}, props));
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export { SecondaryButton$1 as default };
|
|
19
|
+
export { SecondaryButton as default };
|
|
@@ -13,9 +13,10 @@ import { ChevronDown, WarningFilled, WarningAltFilled } from '@carbon/icons-reac
|
|
|
13
13
|
import deprecate from '../../prop-types/deprecate.js';
|
|
14
14
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
15
15
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
|
+
import '../FluidForm/FluidForm.js';
|
|
16
17
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
17
18
|
|
|
18
|
-
var _excluded = ["className", "id", "inline", "labelText", "disabled", "children", "noLabel", "hideLabel", "invalid", "invalidText", "helperText", "light", "size", "warn", "warnText"];
|
|
19
|
+
var _excluded = ["className", "id", "inline", "labelText", "disabled", "children", "noLabel", "hideLabel", "invalid", "invalidText", "helperText", "light", "readOnly", "size", "warn", "warnText"];
|
|
19
20
|
var Select = /*#__PURE__*/React__default.forwardRef(function Select(_ref, ref) {
|
|
20
21
|
var _classNames, _classNames2, _classNames3;
|
|
21
22
|
|
|
@@ -37,6 +38,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function Select(_ref, ref) {
|
|
|
37
38
|
helperText = _ref.helperText,
|
|
38
39
|
_ref$light = _ref.light,
|
|
39
40
|
light = _ref$light === void 0 ? false : _ref$light,
|
|
41
|
+
readOnly = _ref.readOnly,
|
|
40
42
|
size = _ref.size,
|
|
41
43
|
_ref$warn = _ref.warn,
|
|
42
44
|
warn = _ref$warn === void 0 ? false : _ref$warn,
|
|
@@ -54,7 +56,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function Select(_ref, ref) {
|
|
|
54
56
|
isFocused = _useState2[0],
|
|
55
57
|
setIsFocused = _useState2[1];
|
|
56
58
|
|
|
57
|
-
var selectClasses = cx((_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "--select"), true), _defineProperty(_classNames, "".concat(prefix, "--select--inline"), inline), _defineProperty(_classNames, "".concat(prefix, "--select--light"), light), _defineProperty(_classNames, "".concat(prefix, "--select--invalid"), invalid), _defineProperty(_classNames, "".concat(prefix, "--select--disabled"), disabled), _defineProperty(_classNames, "".concat(prefix, "--select--warning"), warn), _defineProperty(_classNames, "".concat(prefix, "--select--fluid--invalid"), isFluid && invalid), _defineProperty(_classNames, "".concat(prefix, "--select--fluid--focus"), isFluid && isFocused), _classNames), [enabled ? null : className]);
|
|
59
|
+
var selectClasses = cx((_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "--select"), true), _defineProperty(_classNames, "".concat(prefix, "--select--inline"), inline), _defineProperty(_classNames, "".concat(prefix, "--select--light"), light), _defineProperty(_classNames, "".concat(prefix, "--select--invalid"), invalid), _defineProperty(_classNames, "".concat(prefix, "--select--disabled"), disabled), _defineProperty(_classNames, "".concat(prefix, "--select--readonly"), readOnly), _defineProperty(_classNames, "".concat(prefix, "--select--warning"), warn), _defineProperty(_classNames, "".concat(prefix, "--select--fluid--invalid"), isFluid && invalid), _defineProperty(_classNames, "".concat(prefix, "--select--fluid--focus"), isFluid && isFocused), _classNames), [enabled ? null : className]);
|
|
58
60
|
var labelClasses = cx("".concat(prefix, "--label"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefix, "--visually-hidden"), hideLabel), _defineProperty(_classNames2, "".concat(prefix, "--label--disabled"), disabled), _classNames2));
|
|
59
61
|
var inputClasses = cx((_classNames3 = {}, _defineProperty(_classNames3, "".concat(prefix, "--select-input"), true), _defineProperty(_classNames3, "".concat(prefix, "--select-input--").concat(size), size), _classNames3));
|
|
60
62
|
var errorId = "".concat(id, "-error-msg");
|
|
@@ -87,12 +89,32 @@ var Select = /*#__PURE__*/React__default.forwardRef(function Select(_ref, ref) {
|
|
|
87
89
|
setIsFocused(evt.type === 'focus' ? true : false);
|
|
88
90
|
};
|
|
89
91
|
|
|
92
|
+
var readOnlyEventHandlers = {
|
|
93
|
+
onMouseDown: function onMouseDown(evt) {
|
|
94
|
+
// NOTE: does not prevent click
|
|
95
|
+
if (readOnly) {
|
|
96
|
+
evt.preventDefault(); // focus on the element as per readonly input behavior
|
|
97
|
+
|
|
98
|
+
evt.target.focus();
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
onKeyDown: function onKeyDown(evt) {
|
|
102
|
+
var selectAccessKeys = ['ArrowDown', 'ArrowUp', ' ']; // This prevents the select from opening for the above keys
|
|
103
|
+
|
|
104
|
+
if (readOnly && selectAccessKeys.includes(evt.key)) {
|
|
105
|
+
evt.preventDefault();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
90
110
|
var input = function () {
|
|
91
111
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("select", _extends({}, other, ariaProps, {
|
|
92
112
|
id: id,
|
|
93
113
|
className: inputClasses,
|
|
94
114
|
disabled: disabled || undefined,
|
|
95
115
|
"aria-invalid": invalid || undefined,
|
|
116
|
+
"aria-readonly": readOnly || undefined
|
|
117
|
+
}, readOnlyEventHandlers, {
|
|
96
118
|
ref: ref
|
|
97
119
|
}), children), /*#__PURE__*/React__default.createElement(ChevronDown, {
|
|
98
120
|
className: "".concat(prefix, "--select__arrow")
|
|
@@ -200,6 +222,11 @@ Select.propTypes = {
|
|
|
200
222
|
*/
|
|
201
223
|
onChange: PropTypes.func,
|
|
202
224
|
|
|
225
|
+
/**
|
|
226
|
+
* Whether the select should be read-only
|
|
227
|
+
*/
|
|
228
|
+
readOnly: PropTypes.bool,
|
|
229
|
+
|
|
203
230
|
/**
|
|
204
231
|
* Specify the size of the Select Input.
|
|
205
232
|
*/
|
|
@@ -223,6 +250,5 @@ Select.defaultProps = {
|
|
|
223
250
|
invalidText: '',
|
|
224
251
|
helperText: ''
|
|
225
252
|
};
|
|
226
|
-
var Select$1 = Select;
|
|
227
253
|
|
|
228
|
-
export { Select
|
|
254
|
+
export { Select as default };
|
|
@@ -55,6 +55,5 @@ SelectItemGroup.defaultProps = {
|
|
|
55
55
|
disabled: false,
|
|
56
56
|
label: FeatureFlags.enabled('enable-v11-release') ? undefined : 'Provide label'
|
|
57
57
|
};
|
|
58
|
-
var SelectItemGroup$1 = SelectItemGroup;
|
|
59
58
|
|
|
60
|
-
export { SelectItemGroup
|
|
59
|
+
export { SelectItemGroup as default };
|
|
@@ -28,10 +28,10 @@ var SkeletonPlaceholder = function SkeletonPlaceholder(_ref) {
|
|
|
28
28
|
|
|
29
29
|
SkeletonPlaceholder.propTypes = {
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Add a custom class to the component
|
|
32
|
+
* to set the height and width
|
|
32
33
|
*/
|
|
33
34
|
className: PropTypes.string
|
|
34
35
|
};
|
|
35
|
-
var SkeletonPlaceholder$1 = SkeletonPlaceholder;
|
|
36
36
|
|
|
37
|
-
export { SkeletonPlaceholder
|
|
37
|
+
export { SkeletonPlaceholder as default };
|
|
@@ -89,7 +89,7 @@ SkeletonText.propTypes = {
|
|
|
89
89
|
heading: PropTypes.bool,
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* the number of lines
|
|
92
|
+
* the number of lines shown if paragraph is true
|
|
93
93
|
*/
|
|
94
94
|
lineCount: PropTypes.number,
|
|
95
95
|
|
|
@@ -109,6 +109,5 @@ SkeletonText.defaultProps = {
|
|
|
109
109
|
heading: false,
|
|
110
110
|
lineCount: 3
|
|
111
111
|
};
|
|
112
|
-
var SkeletonText$1 = SkeletonText;
|
|
113
112
|
|
|
114
|
-
export { SkeletonText
|
|
113
|
+
export { SkeletonText as default };
|