@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
package/lib/internal/useId.js
CHANGED
|
@@ -13,6 +13,7 @@ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.j
|
|
|
13
13
|
var React = require('react');
|
|
14
14
|
var setupGetInstanceId = require('../tools/setupGetInstanceId.js');
|
|
15
15
|
var environment = require('./environment.js');
|
|
16
|
+
var useIdPrefix = require('./useIdPrefix.js');
|
|
16
17
|
|
|
17
18
|
var getId = setupGetInstanceId["default"]();
|
|
18
19
|
var useIsomorphicLayoutEffect = environment.canUseDOM ? React.useLayoutEffect : React.useEffect;
|
|
@@ -26,9 +27,11 @@ var serverHandoffCompleted = false;
|
|
|
26
27
|
function useId() {
|
|
27
28
|
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'id';
|
|
28
29
|
|
|
30
|
+
var _prefix = useIdPrefix.useIdPrefix();
|
|
31
|
+
|
|
29
32
|
var _useState = React.useState(function () {
|
|
30
33
|
if (serverHandoffCompleted) {
|
|
31
|
-
return "".concat(prefix, "-").concat(getId());
|
|
34
|
+
return "".concat(_prefix ? "".concat(_prefix, "-") : "").concat(prefix, "-").concat(getId());
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
return null;
|
|
@@ -39,7 +42,7 @@ function useId() {
|
|
|
39
42
|
|
|
40
43
|
useIsomorphicLayoutEffect(function () {
|
|
41
44
|
if (id === null) {
|
|
42
|
-
setId("".concat(prefix, "-").concat(getId()));
|
|
45
|
+
setId("".concat(_prefix ? "".concat(_prefix, "-") : "").concat(prefix, "-").concat(getId()));
|
|
43
46
|
}
|
|
44
47
|
}, [getId]);
|
|
45
48
|
React.useEffect(function () {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 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
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var React = require('react');
|
|
13
|
+
|
|
14
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
+
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
+
|
|
18
|
+
var IdPrefixContext = /*#__PURE__*/React__default["default"].createContext(null);
|
|
19
|
+
function useIdPrefix() {
|
|
20
|
+
return React__default["default"].useContext(IdPrefixContext);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.IdPrefixContext = IdPrefixContext;
|
|
24
|
+
exports.useIdPrefix = useIdPrefix;
|
|
@@ -12,6 +12,5 @@ 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;
|
|
16
15
|
|
|
17
|
-
exports["default"] = useIsomorphicEffect
|
|
16
|
+
exports["default"] = useIsomorphicEffect;
|
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.18.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@babel/runtime": "^7.18.3",
|
|
46
|
-
"@carbon/feature-flags": "^0.
|
|
47
|
-
"@carbon/icons-react": "^11.
|
|
48
|
-
"@carbon/layout": "^11.
|
|
49
|
-
"@carbon/styles": "^1.
|
|
46
|
+
"@carbon/feature-flags": "^0.10.0-rc.0",
|
|
47
|
+
"@carbon/icons-react": "^11.12.0-rc.0",
|
|
48
|
+
"@carbon/layout": "^11.8.0-rc.0",
|
|
49
|
+
"@carbon/styles": "^1.18.0-rc.0",
|
|
50
50
|
"@carbon/telemetry": "0.1.0",
|
|
51
51
|
"classnames": "2.3.2",
|
|
52
52
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
"@babel/preset-env": "^7.18.2",
|
|
74
74
|
"@babel/preset-react": "^7.17.12",
|
|
75
75
|
"@carbon/test-utils": "^10.26.0",
|
|
76
|
-
"@carbon/themes": "^11.
|
|
76
|
+
"@carbon/themes": "^11.13.0-rc.0",
|
|
77
77
|
"@rollup/plugin-babel": "^5.3.0",
|
|
78
78
|
"@rollup/plugin-commonjs": "^21.0.0",
|
|
79
|
-
"@rollup/plugin-node-resolve": "^
|
|
80
|
-
"@rollup/plugin-typescript": "^
|
|
79
|
+
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
80
|
+
"@rollup/plugin-typescript": "^9.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",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"react-dom": "^17.0.2",
|
|
113
113
|
"requestanimationframe": "^0.0.23",
|
|
114
114
|
"rimraf": "^3.0.2",
|
|
115
|
-
"rollup": "^2.
|
|
115
|
+
"rollup": "^2.79.1",
|
|
116
116
|
"rollup-plugin-strip-banner": "^2.0.0",
|
|
117
117
|
"rtlcss": "^4.0.0",
|
|
118
118
|
"sass": "^1.51.0",
|
|
@@ -135,5 +135,5 @@
|
|
|
135
135
|
"**/*.scss",
|
|
136
136
|
"**/*.css"
|
|
137
137
|
],
|
|
138
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "50cfaf729cfe80fecb6f7371ef13b53b25514145"
|
|
139
139
|
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 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
|
-
|
|
8
|
-
import { StructuredListWrapper as StructuredListWrapper$1, StructuredListHead as StructuredListHead$1, StructuredListInput as StructuredListInput$1, StructuredListBody as StructuredListBody$1, StructuredListRow as StructuredListRow$1, StructuredListCell as StructuredListCell$1 } from './next/StructuredList.js';
|
|
9
|
-
import { StructuredListWrapper as StructuredListWrapper$2, StructuredListHead as StructuredListHead$2, StructuredListInput as StructuredListInput$2, StructuredListBody as StructuredListBody$2, StructuredListRow as StructuredListRow$2, StructuredListCell as StructuredListCell$2 } from './StructuredList.js';
|
|
10
|
-
import { createComponentToggle } from '../../internal/ComponentToggle.js';
|
|
11
|
-
|
|
12
|
-
var StructuredListWrapper = createComponentToggle({
|
|
13
|
-
name: 'StructuredListWrapper',
|
|
14
|
-
next: StructuredListWrapper$1,
|
|
15
|
-
classic: StructuredListWrapper$2
|
|
16
|
-
});
|
|
17
|
-
var StructuredListHead = createComponentToggle({
|
|
18
|
-
name: 'StructuredListHead',
|
|
19
|
-
next: StructuredListHead$1,
|
|
20
|
-
classic: StructuredListHead$2
|
|
21
|
-
});
|
|
22
|
-
var StructuredListInput = createComponentToggle({
|
|
23
|
-
name: 'StructuredListInput',
|
|
24
|
-
next: StructuredListInput$1,
|
|
25
|
-
classic: StructuredListInput$2
|
|
26
|
-
});
|
|
27
|
-
var StructuredListBody = createComponentToggle({
|
|
28
|
-
name: 'StructuredListBody',
|
|
29
|
-
next: StructuredListBody$1,
|
|
30
|
-
classic: StructuredListBody$2
|
|
31
|
-
});
|
|
32
|
-
var StructuredListRow = createComponentToggle({
|
|
33
|
-
name: 'StructuredListRow',
|
|
34
|
-
next: StructuredListRow$1,
|
|
35
|
-
classic: StructuredListRow$2
|
|
36
|
-
});
|
|
37
|
-
var StructuredListCell = createComponentToggle({
|
|
38
|
-
name: 'StructuredListCell',
|
|
39
|
-
next: StructuredListCell$1,
|
|
40
|
-
classic: StructuredListCell$2
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export { StructuredListBody, StructuredListCell, StructuredListHead, StructuredListInput, StructuredListRow, StructuredListWrapper };
|
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 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
|
-
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty, slicedToArray as _slicedToArray, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import React__default, { useState } from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
import cx from 'classnames';
|
|
12
|
-
import { useId } from '../../../internal/useId.js';
|
|
13
|
-
import deprecate from '../../../prop-types/deprecate.js';
|
|
14
|
-
import { usePrefix } from '../../../internal/usePrefix.js';
|
|
15
|
-
|
|
16
|
-
var _excluded = ["children", "selection", "className", "ariaLabel", "isCondensed", "isFlush"],
|
|
17
|
-
_excluded2 = ["children", "className"],
|
|
18
|
-
_excluded3 = ["children", "className"],
|
|
19
|
-
_excluded4 = ["onKeyDown", "children", "className", "head"],
|
|
20
|
-
_excluded5 = ["className", "name", "title", "id"],
|
|
21
|
-
_excluded6 = ["children", "className", "head", "noWrap"];
|
|
22
|
-
var GridSelectedRowStateContext = /*#__PURE__*/React__default.createContext(null);
|
|
23
|
-
var GridSelectedRowDispatchContext = /*#__PURE__*/React__default.createContext(null);
|
|
24
|
-
function StructuredListWrapper(props) {
|
|
25
|
-
var _classNames;
|
|
26
|
-
|
|
27
|
-
var children = props.children,
|
|
28
|
-
selection = props.selection,
|
|
29
|
-
className = props.className,
|
|
30
|
-
ariaLabel = props.ariaLabel,
|
|
31
|
-
isCondensed = props.isCondensed,
|
|
32
|
-
isFlush = props.isFlush,
|
|
33
|
-
other = _objectWithoutProperties(props, _excluded);
|
|
34
|
-
|
|
35
|
-
var prefix = usePrefix();
|
|
36
|
-
var classes = cx("".concat(prefix, "--structured-list"), className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "--structured-list--selection"), selection), _defineProperty(_classNames, "".concat(prefix, "--structured-list--condensed"), isCondensed), _defineProperty(_classNames, "".concat(prefix, "--structured-list--flush"), isFlush), _classNames));
|
|
37
|
-
|
|
38
|
-
var _React$useState = React__default.useState(null),
|
|
39
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
40
|
-
selectedRow = _React$useState2[0],
|
|
41
|
-
setSelectedRow = _React$useState2[1];
|
|
42
|
-
|
|
43
|
-
return /*#__PURE__*/React__default.createElement(GridSelectedRowStateContext.Provider, {
|
|
44
|
-
value: selectedRow
|
|
45
|
-
}, /*#__PURE__*/React__default.createElement(GridSelectedRowDispatchContext.Provider, {
|
|
46
|
-
value: setSelectedRow
|
|
47
|
-
}, /*#__PURE__*/React__default.createElement("div", _extends({
|
|
48
|
-
role: "table",
|
|
49
|
-
className: classes
|
|
50
|
-
}, other, {
|
|
51
|
-
"aria-label": ariaLabel
|
|
52
|
-
}), children)));
|
|
53
|
-
}
|
|
54
|
-
StructuredListWrapper.propTypes = {
|
|
55
|
-
/**
|
|
56
|
-
* Specify a label to be read by screen readers on the container node
|
|
57
|
-
*/
|
|
58
|
-
ariaLabel: PropTypes.string,
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Provide the contents of your StructuredListWrapper
|
|
62
|
-
*/
|
|
63
|
-
children: PropTypes.node,
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Specify an optional className to be applied to the container node
|
|
67
|
-
*/
|
|
68
|
-
className: PropTypes.string,
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Specify if structured list is condensed, default is false
|
|
72
|
-
*/
|
|
73
|
-
isCondensed: PropTypes.bool,
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Specify if structured list is flush, default is false
|
|
77
|
-
*/
|
|
78
|
-
isFlush: PropTypes.bool,
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Specify whether your StructuredListWrapper should have selections
|
|
82
|
-
*/
|
|
83
|
-
selection: PropTypes.bool
|
|
84
|
-
};
|
|
85
|
-
StructuredListWrapper.defaultProps = {
|
|
86
|
-
selection: false,
|
|
87
|
-
isCondensed: false,
|
|
88
|
-
isFlush: false,
|
|
89
|
-
ariaLabel: 'Structured list section'
|
|
90
|
-
};
|
|
91
|
-
function StructuredListHead(props) {
|
|
92
|
-
var children = props.children,
|
|
93
|
-
className = props.className,
|
|
94
|
-
other = _objectWithoutProperties(props, _excluded2);
|
|
95
|
-
|
|
96
|
-
var prefix = usePrefix();
|
|
97
|
-
var classes = cx("".concat(prefix, "--structured-list-thead"), className);
|
|
98
|
-
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
99
|
-
role: "rowgroup",
|
|
100
|
-
className: classes
|
|
101
|
-
}, other), children);
|
|
102
|
-
}
|
|
103
|
-
StructuredListHead.propTypes = {
|
|
104
|
-
/**
|
|
105
|
-
* Provide the contents of your StructuredListHead
|
|
106
|
-
*/
|
|
107
|
-
children: PropTypes.node,
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Specify an optional className to be applied to the node
|
|
111
|
-
*/
|
|
112
|
-
className: PropTypes.string
|
|
113
|
-
};
|
|
114
|
-
function StructuredListBody(props) {
|
|
115
|
-
var children = props.children,
|
|
116
|
-
className = props.className,
|
|
117
|
-
other = _objectWithoutProperties(props, _excluded3);
|
|
118
|
-
|
|
119
|
-
var prefix = usePrefix();
|
|
120
|
-
var classes = cx("".concat(prefix, "--structured-list-tbody"), className);
|
|
121
|
-
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
122
|
-
className: classes,
|
|
123
|
-
role: "rowgroup"
|
|
124
|
-
}, other), children);
|
|
125
|
-
}
|
|
126
|
-
StructuredListBody.propTypes = {
|
|
127
|
-
/**
|
|
128
|
-
* Provide the contents of your StructuredListBody
|
|
129
|
-
*/
|
|
130
|
-
children: PropTypes.node,
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Specify an optional className to be applied to the container node
|
|
134
|
-
*/
|
|
135
|
-
className: PropTypes.string,
|
|
136
|
-
head: PropTypes.bool,
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Provide a handler that is invoked on the key down event for the control
|
|
140
|
-
*/
|
|
141
|
-
onKeyDown: PropTypes.func
|
|
142
|
-
};
|
|
143
|
-
StructuredListBody.defaultProps = {
|
|
144
|
-
onKeyDown: function onKeyDown() {}
|
|
145
|
-
};
|
|
146
|
-
var GridRowContext = /*#__PURE__*/React__default.createContext(null);
|
|
147
|
-
function StructuredListRow(props) {
|
|
148
|
-
var _classNames2;
|
|
149
|
-
|
|
150
|
-
var onKeyDown = props.onKeyDown,
|
|
151
|
-
children = props.children,
|
|
152
|
-
className = props.className,
|
|
153
|
-
head = props.head,
|
|
154
|
-
other = _objectWithoutProperties(props, _excluded4);
|
|
155
|
-
|
|
156
|
-
var _useState = useState(false),
|
|
157
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
158
|
-
hasFocusWithin = _useState2[0],
|
|
159
|
-
setHasFocusWithin = _useState2[1];
|
|
160
|
-
|
|
161
|
-
var id = useId('grid-input');
|
|
162
|
-
var setSelectedRow = React__default.useContext(GridSelectedRowDispatchContext);
|
|
163
|
-
var prefix = usePrefix();
|
|
164
|
-
var value = {
|
|
165
|
-
id: id
|
|
166
|
-
};
|
|
167
|
-
var classes = cx("".concat(prefix, "--structured-list-row"), className, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefix, "--structured-list-row--header-row"), head), _defineProperty(_classNames2, "".concat(prefix, "--structured-list-row--focused-within"), hasFocusWithin), _classNames2));
|
|
168
|
-
return head ? /*#__PURE__*/React__default.createElement("div", _extends({
|
|
169
|
-
role: "row"
|
|
170
|
-
}, other, {
|
|
171
|
-
className: classes
|
|
172
|
-
}), children) :
|
|
173
|
-
/*#__PURE__*/
|
|
174
|
-
// eslint-disable-next-line jsx-a11y/interactive-supports-focus
|
|
175
|
-
React__default.createElement("div", _extends({}, other, {
|
|
176
|
-
role: "row",
|
|
177
|
-
className: classes,
|
|
178
|
-
onClick: function onClick() {
|
|
179
|
-
return setSelectedRow(id);
|
|
180
|
-
},
|
|
181
|
-
onFocus: function onFocus() {
|
|
182
|
-
setHasFocusWithin(true);
|
|
183
|
-
},
|
|
184
|
-
onBlur: function onBlur() {
|
|
185
|
-
setHasFocusWithin(false);
|
|
186
|
-
},
|
|
187
|
-
onKeyDown: onKeyDown
|
|
188
|
-
}), /*#__PURE__*/React__default.createElement(GridRowContext.Provider, {
|
|
189
|
-
value: value
|
|
190
|
-
}, children));
|
|
191
|
-
}
|
|
192
|
-
StructuredListRow.propTypes = {
|
|
193
|
-
/**
|
|
194
|
-
* Provide the contents of your StructuredListRow
|
|
195
|
-
*/
|
|
196
|
-
children: PropTypes.node,
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Specify an optional className to be applied to the container node
|
|
200
|
-
*/
|
|
201
|
-
className: PropTypes.string,
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Specify whether your StructuredListRow should be used as a header row
|
|
205
|
-
*/
|
|
206
|
-
head: PropTypes.bool,
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Specify whether a `<label>` should be used
|
|
210
|
-
*/
|
|
211
|
-
label: deprecate(PropTypes.bool, "\nThe `label` prop is no longer needed and will be removed in the next major version of Carbon."),
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Provide a handler that is invoked on the key down event for the control,
|
|
215
|
-
*/
|
|
216
|
-
onKeyDown: PropTypes.func
|
|
217
|
-
};
|
|
218
|
-
StructuredListRow.defaultProps = {
|
|
219
|
-
head: false,
|
|
220
|
-
onKeyDown: function onKeyDown() {}
|
|
221
|
-
};
|
|
222
|
-
function StructuredListInput(props) {
|
|
223
|
-
var _row$id;
|
|
224
|
-
|
|
225
|
-
var defaultId = useId('structureListInput');
|
|
226
|
-
|
|
227
|
-
var className = props.className,
|
|
228
|
-
_props$name = props.name,
|
|
229
|
-
name = _props$name === void 0 ? "structured-list-input-".concat(defaultId) : _props$name,
|
|
230
|
-
title = props.title,
|
|
231
|
-
id = props.id,
|
|
232
|
-
other = _objectWithoutProperties(props, _excluded5);
|
|
233
|
-
|
|
234
|
-
var prefix = usePrefix();
|
|
235
|
-
var classes = cx("".concat(prefix, "--structured-list-input"), "".concat(prefix, "--visually-hidden"), className);
|
|
236
|
-
var row = React__default.useContext(GridRowContext);
|
|
237
|
-
var selectedRow = React__default.useContext(GridSelectedRowStateContext);
|
|
238
|
-
var setSelectedRow = React__default.useContext(GridSelectedRowDispatchContext);
|
|
239
|
-
return /*#__PURE__*/React__default.createElement("input", _extends({}, other, {
|
|
240
|
-
type: "radio",
|
|
241
|
-
tabIndex: 0,
|
|
242
|
-
checked: row && row.id === selectedRow,
|
|
243
|
-
value: (_row$id = row === null || row === void 0 ? void 0 : row.id) !== null && _row$id !== void 0 ? _row$id : '',
|
|
244
|
-
onChange: function onChange(event) {
|
|
245
|
-
setSelectedRow(event.target.value);
|
|
246
|
-
},
|
|
247
|
-
id: id !== null && id !== void 0 ? id : defaultId,
|
|
248
|
-
className: classes,
|
|
249
|
-
name: name,
|
|
250
|
-
title: title
|
|
251
|
-
}));
|
|
252
|
-
}
|
|
253
|
-
StructuredListInput.propTypes = {
|
|
254
|
-
/**
|
|
255
|
-
* Specify an optional className to be applied to the input
|
|
256
|
-
*/
|
|
257
|
-
className: PropTypes.string,
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Specify whether the underlying input should be checked by default
|
|
261
|
-
*/
|
|
262
|
-
defaultChecked: deprecate(PropTypes.bool, "\nThe prop `defaultChecked` is no longer needed and will be removed in the next major version of Carbon."),
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Specify a custom `id` for the input
|
|
266
|
-
*/
|
|
267
|
-
id: PropTypes.string,
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Provide a `name` for the input
|
|
271
|
-
*/
|
|
272
|
-
name: PropTypes.string,
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Provide an optional hook that is called each time the input is updated
|
|
276
|
-
*/
|
|
277
|
-
onChange: deprecate(PropTypes.func, "\nThe prop `onChange` will be removed in the next major version of Carbon."),
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Provide a `title` for the input
|
|
281
|
-
*/
|
|
282
|
-
title: PropTypes.string,
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Specify the value of the input
|
|
286
|
-
*/
|
|
287
|
-
value: deprecate(PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, "\nThe prop `value` will be removed in the next major version of Carbon.")
|
|
288
|
-
};
|
|
289
|
-
StructuredListInput.defaultProps = {
|
|
290
|
-
title: 'title'
|
|
291
|
-
};
|
|
292
|
-
function StructuredListCell(props) {
|
|
293
|
-
var _classNames3;
|
|
294
|
-
|
|
295
|
-
var children = props.children,
|
|
296
|
-
className = props.className,
|
|
297
|
-
head = props.head,
|
|
298
|
-
noWrap = props.noWrap,
|
|
299
|
-
other = _objectWithoutProperties(props, _excluded6);
|
|
300
|
-
|
|
301
|
-
var prefix = usePrefix();
|
|
302
|
-
var classes = cx(className, (_classNames3 = {}, _defineProperty(_classNames3, "".concat(prefix, "--structured-list-th"), head), _defineProperty(_classNames3, "".concat(prefix, "--structured-list-td"), !head), _defineProperty(_classNames3, "".concat(prefix, "--structured-list-content--nowrap"), noWrap), _classNames3));
|
|
303
|
-
|
|
304
|
-
if (head) {
|
|
305
|
-
return /*#__PURE__*/React__default.createElement("span", _extends({
|
|
306
|
-
className: classes,
|
|
307
|
-
role: "columnheader"
|
|
308
|
-
}, other), children);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
312
|
-
className: classes,
|
|
313
|
-
role: "cell"
|
|
314
|
-
}, other), children);
|
|
315
|
-
}
|
|
316
|
-
StructuredListCell.propTypes = {
|
|
317
|
-
/**
|
|
318
|
-
* Provide the contents of your StructuredListCell
|
|
319
|
-
*/
|
|
320
|
-
children: PropTypes.node,
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Specify an optional className to be applied to the container node
|
|
324
|
-
*/
|
|
325
|
-
className: PropTypes.string,
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Specify whether your StructuredListCell should be used as a header cell
|
|
329
|
-
*/
|
|
330
|
-
head: PropTypes.bool,
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Specify whether your StructuredListCell should have text wrapping
|
|
334
|
-
*/
|
|
335
|
-
noWrap: PropTypes.bool
|
|
336
|
-
};
|
|
337
|
-
StructuredListCell.defaultProps = {
|
|
338
|
-
head: false,
|
|
339
|
-
noWrap: false
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
export { StructuredListBody, StructuredListCell, StructuredListHead, StructuredListInput, StructuredListRow, StructuredListWrapper };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 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
|
-
|
|
8
|
-
import * as FeatureFlags from '@carbon/feature-flags';
|
|
9
|
-
import TimePickerNext from './next/TimePicker.js';
|
|
10
|
-
import TimePicker$2 from './TimePicker.js';
|
|
11
|
-
|
|
12
|
-
var TimePicker = FeatureFlags.enabled('enable-v11-release') ? TimePickerNext : TimePicker$2;
|
|
13
|
-
var TimePicker$1 = TimePicker;
|
|
14
|
-
|
|
15
|
-
export { TimePicker$1 as default };
|