@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
|
@@ -16,14 +16,15 @@ import carbonFlatpickrAppendToPlugin from './plugins/appendToPlugin.js';
|
|
|
16
16
|
import carbonFlatpickrFixEventsPlugin from './plugins/fixEventsPlugin.js';
|
|
17
17
|
import carbonFlatpickrRangePlugin from './plugins/rangePlugin.js';
|
|
18
18
|
import deprecate from '../../prop-types/deprecate.js';
|
|
19
|
+
import { Escape, ArrowDown } from '../../internal/keyboard/keys.js';
|
|
20
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
19
21
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
20
22
|
import { useSavedCallback } from '../../internal/useSavedCallback.js';
|
|
21
|
-
import
|
|
23
|
+
import '../FluidForm/FluidForm.js';
|
|
22
24
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
23
|
-
import {
|
|
24
|
-
import { ArrowDown } from '../../internal/keyboard/keys.js';
|
|
25
|
+
import { WarningFilled, WarningAltFilled } from '@carbon/icons-react';
|
|
25
26
|
|
|
26
|
-
var _excluded = ["allowInput", "appendTo", "children", "className", "closeOnSelect", "dateFormat", "datePickerType", "disable", "enable", "inline", "invalid", "invalidText", "warn", "warnText", "light", "locale", "maxDate", "minDate", "onChange", "onClose", "onOpen", "short", "value"];
|
|
27
|
+
var _excluded = ["allowInput", "appendTo", "children", "className", "closeOnSelect", "dateFormat", "datePickerType", "disable", "enable", "inline", "invalid", "invalidText", "warn", "warnText", "light", "locale", "maxDate", "minDate", "onChange", "onClose", "onOpen", "readOnly", "short", "value"];
|
|
27
28
|
|
|
28
29
|
l10n.en.weekdays.shorthand.forEach(function (_day, index) {
|
|
29
30
|
var currentDay = l10n.en.weekdays.shorthand;
|
|
@@ -84,13 +85,15 @@ var carbonFlatpickrMonthSelectPlugin = function carbonFlatpickrMonthSelectPlugin
|
|
|
84
85
|
};
|
|
85
86
|
|
|
86
87
|
var updateCurrentMonth = function updateCurrentMonth() {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
if (fp.monthElements) {
|
|
89
|
+
var monthStr = monthToStr(fp.currentMonth, config.shorthand === true, fp.l10n);
|
|
90
|
+
fp.yearElements.forEach(function (elem) {
|
|
91
|
+
var currentMonthContainer = elem.closest(config.selectorFlatpickrMonthYearContainer);
|
|
92
|
+
Array.prototype.forEach.call(currentMonthContainer.querySelectorAll('.cur-month'), function (monthElement) {
|
|
93
|
+
monthElement.textContent = monthStr;
|
|
94
|
+
});
|
|
92
95
|
});
|
|
93
|
-
}
|
|
96
|
+
}
|
|
94
97
|
};
|
|
95
98
|
|
|
96
99
|
var register = function register() {
|
|
@@ -176,6 +179,8 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_ref
|
|
|
176
179
|
onChange = _ref.onChange,
|
|
177
180
|
onClose = _ref.onClose,
|
|
178
181
|
onOpen = _ref.onOpen,
|
|
182
|
+
_ref$readOnly = _ref.readOnly,
|
|
183
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
179
184
|
_ref$short = _ref.short,
|
|
180
185
|
short = _ref$short === void 0 ? false : _ref$short,
|
|
181
186
|
value = _ref.value,
|
|
@@ -198,26 +203,30 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_ref
|
|
|
198
203
|
if (index === 0 && child.type === React__default.createElement(DatePickerInput, child.props).type) {
|
|
199
204
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
200
205
|
datePickerType: datePickerType,
|
|
201
|
-
ref: startInputField
|
|
206
|
+
ref: startInputField,
|
|
207
|
+
readOnly: readOnly
|
|
202
208
|
});
|
|
203
209
|
}
|
|
204
210
|
|
|
205
211
|
if (index === 1 && child.type === React__default.createElement(DatePickerInput, child.props).type) {
|
|
206
212
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
207
213
|
datePickerType: datePickerType,
|
|
208
|
-
ref: endInputField
|
|
214
|
+
ref: endInputField,
|
|
215
|
+
readOnly: readOnly
|
|
209
216
|
});
|
|
210
217
|
}
|
|
211
218
|
|
|
212
219
|
if (index === 0) {
|
|
213
220
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
214
|
-
ref: startInputField
|
|
221
|
+
ref: startInputField,
|
|
222
|
+
readOnly: readOnly
|
|
215
223
|
});
|
|
216
224
|
}
|
|
217
225
|
|
|
218
226
|
if (index === 1) {
|
|
219
227
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
220
|
-
ref: endInputField
|
|
228
|
+
ref: endInputField,
|
|
229
|
+
readOnly: readOnly
|
|
221
230
|
});
|
|
222
231
|
}
|
|
223
232
|
});
|
|
@@ -234,6 +243,14 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_ref
|
|
|
234
243
|
|
|
235
244
|
var onHook = function onHook(_electedDates, _dateStr, instance, prefix) {
|
|
236
245
|
updateClassNames(instance, prefix);
|
|
246
|
+
|
|
247
|
+
if (startInputField !== null && startInputField !== void 0 && startInputField.current) {
|
|
248
|
+
startInputField.current.readOnly = readOnly;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (endInputField !== null && endInputField !== void 0 && endInputField.current) {
|
|
252
|
+
endInputField.current.readOnly = readOnly;
|
|
253
|
+
}
|
|
237
254
|
}; // Logic to determine if `enable` or `disable` will be passed down. If neither
|
|
238
255
|
// is provided, we return the default empty disabled array, allowing all dates.
|
|
239
256
|
|
|
@@ -281,8 +298,8 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_ref
|
|
|
281
298
|
}), carbonFlatpickrFixEventsPlugin({
|
|
282
299
|
inputFrom: startInputField.current,
|
|
283
300
|
inputTo: endInputField.current
|
|
284
|
-
})]), _defineProperty(_flatpickr, "clickOpens",
|
|
285
|
-
if (savedOnChange) {
|
|
301
|
+
})]), _defineProperty(_flatpickr, "clickOpens", !readOnly), _defineProperty(_flatpickr, "noCalendar", readOnly), _defineProperty(_flatpickr, "nextArrow", rightArrowHTML), _defineProperty(_flatpickr, "prevArrow", leftArrowHTML), _defineProperty(_flatpickr, "onChange", function onChange() {
|
|
302
|
+
if (savedOnChange && !readOnly) {
|
|
286
303
|
savedOnChange.apply(void 0, arguments);
|
|
287
304
|
}
|
|
288
305
|
}), _defineProperty(_flatpickr, "onClose", savedOnClose), _defineProperty(_flatpickr, "onReady", onHook), _defineProperty(_flatpickr, "onMonthChange", onHook), _defineProperty(_flatpickr, "onYearChange", onHook), _defineProperty(_flatpickr, "onOpen", function onOpen() {
|
|
@@ -292,6 +309,10 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_ref
|
|
|
292
309
|
calendarRef.current = calendar;
|
|
293
310
|
|
|
294
311
|
function handleArrowDown(event) {
|
|
312
|
+
if (match(event, Escape)) {
|
|
313
|
+
calendar.calendarContainer.classList.remove('open');
|
|
314
|
+
}
|
|
315
|
+
|
|
295
316
|
if (match(event, ArrowDown)) {
|
|
296
317
|
var calendarContainer = calendar.calendarContainer,
|
|
297
318
|
fpSelectedDateElem = calendar.selectedDateElem,
|
|
@@ -303,6 +324,10 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_ref
|
|
|
303
324
|
}
|
|
304
325
|
|
|
305
326
|
function handleOnChange() {
|
|
327
|
+
if (datePickerType == 'single') {
|
|
328
|
+
calendar.calendarContainer.classList.remove('open');
|
|
329
|
+
}
|
|
330
|
+
|
|
306
331
|
if (start.value !== '') {
|
|
307
332
|
return;
|
|
308
333
|
}
|
|
@@ -321,13 +346,16 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_ref
|
|
|
321
346
|
|
|
322
347
|
if (start) {
|
|
323
348
|
start.addEventListener('keydown', handleArrowDown);
|
|
324
|
-
start.addEventListener('change', handleOnChange);
|
|
325
|
-
// error with IBM Equal Access Accessibility Checker so we add an aria
|
|
326
|
-
// role to the container div.
|
|
349
|
+
start.addEventListener('change', handleOnChange);
|
|
327
350
|
|
|
328
|
-
calendar.calendarContainer
|
|
351
|
+
if (calendar && calendar.calendarContainer) {
|
|
352
|
+
// Flatpickr's calendar dialog is not rendered in a landmark causing an
|
|
353
|
+
// error with IBM Equal Access Accessibility Checker so we add an aria
|
|
354
|
+
// role to the container div.
|
|
355
|
+
calendar.calendarContainer.setAttribute('role', 'application'); // IBM EAAC requires an aria-label on a role='region'
|
|
329
356
|
|
|
330
|
-
|
|
357
|
+
calendar.calendarContainer.setAttribute('aria-label', 'calendar-container');
|
|
358
|
+
}
|
|
331
359
|
}
|
|
332
360
|
|
|
333
361
|
if (end) {
|
|
@@ -353,42 +381,56 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_ref
|
|
|
353
381
|
end.removeEventListener('change', handleOnChange);
|
|
354
382
|
}
|
|
355
383
|
};
|
|
356
|
-
}, [savedOnChange, savedOnClose, savedOnOpen]); //eslint-disable-line react-hooks/exhaustive-deps
|
|
384
|
+
}, [savedOnChange, savedOnClose, savedOnOpen, readOnly]); //eslint-disable-line react-hooks/exhaustive-deps
|
|
357
385
|
|
|
358
386
|
useEffect(function () {
|
|
359
|
-
|
|
387
|
+
var _calendarRef$current;
|
|
388
|
+
|
|
389
|
+
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current = calendarRef.current) !== null && _calendarRef$current !== void 0 && _calendarRef$current.set) {
|
|
360
390
|
calendarRef.current.set({
|
|
361
391
|
dateFormat: dateFormat
|
|
362
392
|
});
|
|
363
393
|
}
|
|
364
394
|
}, [dateFormat]);
|
|
365
395
|
useEffect(function () {
|
|
366
|
-
|
|
396
|
+
var _calendarRef$current2;
|
|
397
|
+
|
|
398
|
+
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current2 = calendarRef.current) !== null && _calendarRef$current2 !== void 0 && _calendarRef$current2.set) {
|
|
367
399
|
calendarRef.current.set('minDate', minDate);
|
|
368
400
|
}
|
|
369
401
|
}, [minDate]);
|
|
370
402
|
useEffect(function () {
|
|
371
|
-
|
|
403
|
+
var _calendarRef$current3;
|
|
404
|
+
|
|
405
|
+
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current3 = calendarRef.current) !== null && _calendarRef$current3 !== void 0 && _calendarRef$current3.set) {
|
|
372
406
|
calendarRef.current.set('maxDate', maxDate);
|
|
373
407
|
}
|
|
374
408
|
}, [maxDate]);
|
|
375
409
|
useEffect(function () {
|
|
376
|
-
|
|
377
|
-
|
|
410
|
+
var _calendarRef$current4;
|
|
411
|
+
|
|
412
|
+
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current4 = calendarRef.current) !== null && _calendarRef$current4 !== void 0 && _calendarRef$current4.set && disable) {
|
|
413
|
+
calendarRef.current.set('disable', disable);
|
|
378
414
|
}
|
|
379
415
|
}, [disable]);
|
|
380
416
|
useEffect(function () {
|
|
381
|
-
|
|
417
|
+
var _calendarRef$current5;
|
|
418
|
+
|
|
419
|
+
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current5 = calendarRef.current) !== null && _calendarRef$current5 !== void 0 && _calendarRef$current5.set && enable) {
|
|
382
420
|
calendarRef.current.set('enable', enable);
|
|
383
421
|
}
|
|
384
422
|
}, [enable]);
|
|
385
423
|
useEffect(function () {
|
|
386
|
-
|
|
424
|
+
var _calendarRef$current6;
|
|
425
|
+
|
|
426
|
+
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current6 = calendarRef.current) !== null && _calendarRef$current6 !== void 0 && _calendarRef$current6.set && inline) {
|
|
387
427
|
calendarRef.current.set('inline', inline);
|
|
388
428
|
}
|
|
389
429
|
}, [inline]);
|
|
390
430
|
useEffect(function () {
|
|
391
|
-
|
|
431
|
+
var _calendarRef$current7;
|
|
432
|
+
|
|
433
|
+
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current7 = calendarRef.current) !== null && _calendarRef$current7 !== void 0 && _calendarRef$current7.set) {
|
|
392
434
|
if (value !== undefined) {
|
|
393
435
|
calendarRef.current.setDate(value);
|
|
394
436
|
}
|
|
@@ -591,6 +633,13 @@ DatePicker.propTypes = {
|
|
|
591
633
|
*/
|
|
592
634
|
onOpen: PropTypes.func,
|
|
593
635
|
|
|
636
|
+
/**
|
|
637
|
+
* whether the DatePicker is to be readOnly
|
|
638
|
+
* if boolean applies to all inputs
|
|
639
|
+
* if array applies to each input in order
|
|
640
|
+
*/
|
|
641
|
+
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),
|
|
642
|
+
|
|
594
643
|
/**
|
|
595
644
|
* `true` to use the short version.
|
|
596
645
|
*/
|
|
@@ -612,6 +661,5 @@ DatePicker.propTypes = {
|
|
|
612
661
|
*/
|
|
613
662
|
warnText: PropTypes.node
|
|
614
663
|
};
|
|
615
|
-
var DatePicker$1 = DatePicker;
|
|
616
664
|
|
|
617
|
-
export { DatePicker
|
|
665
|
+
export { DatePicker as default };
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { match } from '../../../internal/keyboard/match.js';
|
|
9
8
|
import { Enter, ArrowLeft, ArrowRight, ArrowDown } from '../../../internal/keyboard/keys.js';
|
|
9
|
+
import { match } from '../../../internal/keyboard/match.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @param {object} config Plugin configuration.
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty,
|
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import { WarningFilled, WarningAltFilled, Calendar } from '@carbon/icons-react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import React__default, { useContext } from 'react';
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
|
+
import '../FluidForm/FluidForm.js';
|
|
14
15
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
15
16
|
|
|
16
17
|
var _excluded = ["datePickerType", "disabled", "helperText", "hideLabel", "id", "invalid", "invalidText", "labelText", "onClick", "onChange", "pattern", "placeholder", "size", "type", "warn", "warnText"];
|
|
@@ -64,20 +65,22 @@ var DatePickerInput = /*#__PURE__*/React__default.forwardRef(function DatePicker
|
|
|
64
65
|
type: type
|
|
65
66
|
};
|
|
66
67
|
var wrapperClasses = cx("".concat(prefix, "--date-picker-input__wrapper"), (_cx = {}, _defineProperty(_cx, "".concat(prefix, "--date-picker-input__wrapper--invalid"), invalid), _defineProperty(_cx, "".concat(prefix, "--date-picker-input__wrapper--warn"), warn), _cx));
|
|
67
|
-
var labelClasses = cx("".concat(prefix, "--label"), (_cx2 = {}, _defineProperty(_cx2, "".concat(prefix, "--visually-hidden"), hideLabel), _defineProperty(_cx2, "".concat(prefix, "--label--disabled"), disabled), _cx2));
|
|
68
|
+
var labelClasses = cx("".concat(prefix, "--label"), (_cx2 = {}, _defineProperty(_cx2, "".concat(prefix, "--visually-hidden"), hideLabel), _defineProperty(_cx2, "".concat(prefix, "--label--disabled"), disabled), _defineProperty(_cx2, "".concat(prefix, "--label--readonly"), rest.readOnly), _cx2));
|
|
68
69
|
var helperTextClasses = cx("".concat(prefix, "--form__helper-text"), _defineProperty({}, "".concat(prefix, "--form__helper-text--disabled"), disabled));
|
|
69
70
|
var inputClasses = cx("".concat(prefix, "--date-picker__input"), (_cx4 = {}, _defineProperty(_cx4, "".concat(prefix, "--date-picker__input--").concat(size), size), _defineProperty(_cx4, "".concat(prefix, "--date-picker__input--invalid"), invalid), _defineProperty(_cx4, "".concat(prefix, "--date-picker__input--warn"), warn), _cx4));
|
|
70
71
|
var containerClasses = cx("".concat(prefix, "--date-picker-container"), (_cx5 = {}, _defineProperty(_cx5, "".concat(prefix, "--date-picker--nolabel"), !labelText), _defineProperty(_cx5, "".concat(prefix, "--date-picker--fluid--invalid"), isFluid && invalid), _defineProperty(_cx5, "".concat(prefix, "--date-picker--fluid--warn"), isFluid && warn), _cx5));
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
ref: ref,
|
|
74
|
-
"data-invalid": true,
|
|
75
|
-
className: inputClasses
|
|
76
|
-
})) : /*#__PURE__*/React__default.createElement("input", _extends({}, rest, datePickerInputProps, {
|
|
77
|
-
disabled: disabled,
|
|
72
|
+
|
|
73
|
+
var inputProps = _objectSpread2(_objectSpread2(_objectSpread2({}, rest), datePickerInputProps), {}, {
|
|
78
74
|
className: inputClasses,
|
|
75
|
+
disabled: disabled,
|
|
79
76
|
ref: ref
|
|
80
|
-
})
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
if (invalid) {
|
|
80
|
+
inputProps['data-invalid'] = true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
var input = /*#__PURE__*/React__default.createElement("input", inputProps);
|
|
81
84
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
82
85
|
className: containerClasses
|
|
83
86
|
}, labelText && /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -180,6 +183,11 @@ DatePickerInput.propTypes = {
|
|
|
180
183
|
*/
|
|
181
184
|
placeholder: PropTypes.string,
|
|
182
185
|
|
|
186
|
+
/**
|
|
187
|
+
* whether the DatePicker is to be readOnly
|
|
188
|
+
*/
|
|
189
|
+
readOnly: PropTypes.bool,
|
|
190
|
+
|
|
183
191
|
/**
|
|
184
192
|
* Specify the size of the Date Picker Input. Currently supports either `sm`, `md`, or `lg` as an option.
|
|
185
193
|
*/
|
|
@@ -255,6 +263,5 @@ DatePickerIcon.propTypes = {
|
|
|
255
263
|
*/
|
|
256
264
|
warn: PropTypes.bool
|
|
257
265
|
};
|
|
258
|
-
var DatePickerInput$1 = DatePickerInput;
|
|
259
266
|
|
|
260
|
-
export { DatePickerInput
|
|
267
|
+
export { DatePickerInput as default };
|
|
@@ -9,6 +9,7 @@ import { objectWithoutProperties as _objectWithoutProperties, defineProperty as
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
|
+
import '../ListBox/index.js';
|
|
12
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
14
|
import { ListBoxSize } from '../ListBox/ListBoxPropTypes.js';
|
|
14
15
|
|
|
@@ -41,6 +42,5 @@ DropdownSkeleton.propTypes = {
|
|
|
41
42
|
*/
|
|
42
43
|
size: ListBoxSize
|
|
43
44
|
};
|
|
44
|
-
var DropdownSkeleton$1 = DropdownSkeleton;
|
|
45
45
|
|
|
46
|
-
export { DropdownSkeleton
|
|
46
|
+
export { DropdownSkeleton as default };
|
|
@@ -16,9 +16,10 @@ import mergeRefs from '../../tools/mergeRefs.js';
|
|
|
16
16
|
import deprecate from '../../prop-types/deprecate.js';
|
|
17
17
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
18
18
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
19
|
+
import '../FluidForm/FluidForm.js';
|
|
19
20
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
20
|
-
import ListBox from '../ListBox/ListBox.js';
|
|
21
21
|
import { ListBoxSize, ListBoxType } from '../ListBox/ListBoxPropTypes.js';
|
|
22
|
+
import ListBox from '../ListBox/ListBox.js';
|
|
22
23
|
|
|
23
24
|
var _excluded = ["className", "disabled", "direction", "items", "label", "ariaLabel", "itemToString", "itemToElement", "renderSelectedItem", "type", "size", "onChange", "id", "titleText", "hideLabel", "helperText", "translateWithId", "light", "invalid", "invalidText", "warn", "warnText", "initialSelectedItem", "selectedItem", "downshiftProps"];
|
|
24
25
|
|
|
@@ -328,6 +329,5 @@ Dropdown.defaultProps = {
|
|
|
328
329
|
helperText: '',
|
|
329
330
|
direction: 'bottom'
|
|
330
331
|
};
|
|
331
|
-
var Dropdown$1 = Dropdown;
|
|
332
332
|
|
|
333
|
-
export { Dropdown
|
|
333
|
+
export { Dropdown as default };
|
|
@@ -5,7 +5,7 @@
|
|
|
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 } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React__default from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import { ErrorBoundaryContext } from './ErrorBoundaryContext.js';
|
|
@@ -9,6 +9,7 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
|
|
|
9
9
|
import React__default, { useState, useRef } from 'react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import Search from '../Search/Search.js';
|
|
12
|
+
import '../Search/Search.Skeleton.js';
|
|
12
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
14
|
import { composeEventHandlers } from '../../tools/events.js';
|
|
14
15
|
|
|
@@ -5,7 +5,7 @@
|
|
|
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 * as FeatureFlags from '@carbon/feature-flags';
|
|
@@ -13,9 +13,9 @@ import React__default from 'react';
|
|
|
13
13
|
import Filename from './Filename.js';
|
|
14
14
|
import FileUploaderButton from './FileUploaderButton.js';
|
|
15
15
|
import { ButtonKinds } from '../../prop-types/types.js';
|
|
16
|
-
import { PrefixContext } from '../../internal/usePrefix.js';
|
|
17
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
18
16
|
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
17
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
18
|
+
import { PrefixContext } from '../../internal/usePrefix.js';
|
|
19
19
|
|
|
20
20
|
var _excluded = ["iconDescription", "buttonLabel", "buttonKind", "disabled", "filenameStatus", "labelDescription", "labelTitle", "className", "multiple", "accept", "name", "size", "onDelete"];
|
|
21
21
|
|
|
@@ -9,12 +9,12 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
|
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useState, useRef } from 'react';
|
|
12
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
13
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
12
14
|
import { ButtonKinds } from '../../prop-types/types.js';
|
|
13
15
|
import uniqueId from '../../tools/uniqueId.js';
|
|
14
16
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
17
|
import * as FeatureFlags from '@carbon/feature-flags';
|
|
16
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
17
|
-
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
18
18
|
|
|
19
19
|
var _excluded = ["accept", "buttonKind", "className", "disabled", "disableLabelChanges", "id", "labelText", "multiple", "onChange", "role", "name", "size", "tabIndex", "innerRef"];
|
|
20
20
|
|
|
@@ -9,10 +9,10 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
|
|
|
9
9
|
import React__default, { useRef, useState } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
13
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
12
14
|
import uniqueId from '../../tools/uniqueId.js';
|
|
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 = ["accept", "className", "id", "disabled", "labelText", "multiple", "name", "onAddFiles", "pattern", "role", "tabIndex", "innerRef"];
|
|
18
18
|
|
|
@@ -10,11 +10,11 @@ import cx from 'classnames';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useRef } from 'react';
|
|
12
12
|
import Filename from './Filename.js';
|
|
13
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
14
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
13
15
|
import uniqueId from '../../tools/uniqueId.js';
|
|
14
16
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
17
|
import * as FeatureFlags from '@carbon/feature-flags';
|
|
16
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
17
|
-
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
18
18
|
|
|
19
19
|
var _excluded = ["uuid", "name", "status", "iconDescription", "onDelete", "invalid", "errorSubject", "errorBody", "size"];
|
|
20
20
|
|
|
@@ -0,0 +1,67 @@
|
|
|
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, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import React__default from 'react';
|
|
11
|
+
import cx from 'classnames';
|
|
12
|
+
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
|
+
import { FormContext } from '../FluidForm/FormContext.js';
|
|
14
|
+
import { Calendar } from '@carbon/icons-react';
|
|
15
|
+
|
|
16
|
+
var _excluded = ["className", "datePickerType"];
|
|
17
|
+
|
|
18
|
+
function FluidDatePickerSkeleton(_ref) {
|
|
19
|
+
var className = _ref.className,
|
|
20
|
+
_ref$datePickerType = _ref.datePickerType,
|
|
21
|
+
datePickerType = _ref$datePickerType === void 0 ? 'single' : _ref$datePickerType,
|
|
22
|
+
other = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
|
|
24
|
+
var prefix = usePrefix();
|
|
25
|
+
var classNames = cx(className, "".concat(prefix, "--form-item ").concat(prefix, "--date-picker--fluid__skeleton"), _defineProperty({}, "".concat(prefix, "--date-picker--fluid__skeleton--range"), datePickerType === 'range'));
|
|
26
|
+
return /*#__PURE__*/React__default.createElement(FormContext.Provider, {
|
|
27
|
+
value: {
|
|
28
|
+
isFluid: true
|
|
29
|
+
}
|
|
30
|
+
}, /*#__PURE__*/React__default.createElement("div", _extends({
|
|
31
|
+
className: classNames
|
|
32
|
+
}, other), /*#__PURE__*/React__default.createElement("div", {
|
|
33
|
+
className: "".concat(prefix, "--date-picker--fluid__skeleton--container")
|
|
34
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
35
|
+
className: "".concat(prefix, "--label ").concat(prefix, "--skeleton")
|
|
36
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
37
|
+
className: "".concat(prefix, "--skeleton ").concat(prefix, "--text-input")
|
|
38
|
+
}), datePickerType !== 'simple' && /*#__PURE__*/React__default.createElement(Calendar, {
|
|
39
|
+
className: "".concat(prefix, "--date-picker__icon"),
|
|
40
|
+
role: "img",
|
|
41
|
+
"aria-hidden": "true"
|
|
42
|
+
})), datePickerType === 'range' && /*#__PURE__*/React__default.createElement("div", {
|
|
43
|
+
className: "".concat(prefix, "--date-picker--fluid__skeleton--container")
|
|
44
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
45
|
+
className: "".concat(prefix, "--label ").concat(prefix, "--skeleton")
|
|
46
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
47
|
+
className: "".concat(prefix, "--skeleton ").concat(prefix, "--text-input")
|
|
48
|
+
}), /*#__PURE__*/React__default.createElement(Calendar, {
|
|
49
|
+
className: "".concat(prefix, "--date-picker__icon"),
|
|
50
|
+
role: "img",
|
|
51
|
+
"aria-hidden": "true"
|
|
52
|
+
}))));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
FluidDatePickerSkeleton.propTypes = {
|
|
56
|
+
/**
|
|
57
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
58
|
+
*/
|
|
59
|
+
className: PropTypes.string,
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Specify which variant of the DatePicker the skeleton should mimic
|
|
63
|
+
*/
|
|
64
|
+
datePickerType: PropTypes.oneOf(['simple', 'single', 'range'])
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { FluidDatePickerSkeleton as default };
|
|
@@ -9,6 +9,7 @@ import { objectWithoutProperties as _objectWithoutProperties, defineProperty as
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
|
+
import '../DatePicker/DatePicker.Skeleton.js';
|
|
12
13
|
import DatePicker from '../DatePicker/DatePicker.js';
|
|
13
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
15
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
@@ -71,6 +72,5 @@ FluidDatePicker.propTypes = {
|
|
|
71
72
|
*/
|
|
72
73
|
warnText: PropTypes.node
|
|
73
74
|
};
|
|
74
|
-
var FluidDatePicker$1 = FluidDatePicker;
|
|
75
75
|
|
|
76
|
-
export { FluidDatePicker
|
|
76
|
+
export { FluidDatePicker as default };
|
|
@@ -21,6 +21,5 @@ var FluidDatePickerInput = /*#__PURE__*/React__default.forwardRef(function Fluid
|
|
|
21
21
|
ref: ref
|
|
22
22
|
}, other)));
|
|
23
23
|
});
|
|
24
|
-
var FluidDatePickerInput$1 = FluidDatePickerInput;
|
|
25
24
|
|
|
26
|
-
export { FluidDatePickerInput
|
|
25
|
+
export { FluidDatePickerInput as default };
|
|
@@ -9,6 +9,7 @@ import { objectWithoutProperties as _objectWithoutProperties, defineProperty as
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
|
+
import '../Dropdown/Dropdown.Skeleton.js';
|
|
12
13
|
import Dropdown from '../Dropdown/Dropdown.js';
|
|
13
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
15
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
@@ -135,6 +136,5 @@ FluidDropdown.propTypes = {
|
|
|
135
136
|
*/
|
|
136
137
|
warnText: PropTypes.node
|
|
137
138
|
};
|
|
138
|
-
var FluidDropdown$1 = FluidDropdown;
|
|
139
139
|
|
|
140
|
-
export { FluidDropdown
|
|
140
|
+
export { FluidDropdown as default };
|