@carbon/react 1.29.1 → 1.30.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/_virtual/_rollupPluginBabelHelpers.js +16 -5
- package/es/components/Accordion/Accordion.Skeleton.js +0 -7
- package/es/components/Accordion/Accordion.js +1 -8
- package/es/components/Accordion/AccordionItem.js +5 -19
- package/es/components/AspectRatio/AspectRatio.js +0 -5
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
- package/es/components/Breadcrumb/Breadcrumb.js +0 -3
- package/es/components/Breadcrumb/BreadcrumbItem.js +0 -7
- package/es/components/Button/Button.Skeleton.js +2 -7
- package/es/components/Button/Button.js +2 -36
- package/es/components/ButtonSet/ButtonSet.js +0 -2
- package/es/components/Checkbox/Checkbox.Skeleton.js +0 -1
- package/es/components/Checkbox/Checkbox.js +4 -20
- package/es/components/CheckboxGroup/CheckboxGroup.js +0 -11
- package/es/components/ClassPrefix/index.d.ts +26 -0
- package/es/components/ClassPrefix/index.js +0 -2
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
- package/es/components/CodeSnippet/CodeSnippet.js +6 -45
- package/es/components/ComboBox/ComboBox.js +12 -79
- package/es/components/ComboBox/tools/filter.js +0 -1
- package/es/components/ComboButton/index.js +0 -14
- package/es/components/ComposedModal/ComposedModal.js +2 -32
- package/es/components/ComposedModal/ModalFooter.js +0 -21
- package/es/components/ComposedModal/ModalHeader.js +0 -12
- package/es/components/ContainedList/ContainedList.js +5 -32
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
- package/es/components/ContentSwitcher/ContentSwitcher.js +11 -23
- package/es/components/ContextMenu/useContextMenu.js +1 -6
- package/es/components/Copy/Copy.js +8 -31
- package/es/components/CopyButton/CopyButton.js +0 -4
- package/es/components/DangerButton/DangerButton.js +0 -1
- package/es/components/DataTable/DataTable.js +171 -91
- package/es/components/DataTable/Table.js +0 -6
- package/es/components/DataTable/TableBatchAction.js +0 -4
- package/es/components/DataTable/TableBatchActions.js +0 -8
- package/es/components/DataTable/TableBody.js +0 -1
- package/es/components/DataTable/TableContainer.js +0 -5
- package/es/components/DataTable/TableExpandHeader.js +0 -7
- package/es/components/DataTable/TableExpandRow.js +0 -6
- package/es/components/DataTable/TableExpandedRow.js +0 -6
- package/es/components/DataTable/TableHeader.d.ts +1 -1
- package/es/components/DataTable/TableHeader.js +3 -19
- package/es/components/DataTable/TableRow.js +4 -5
- package/es/components/DataTable/TableSelectAll.js +0 -8
- package/es/components/DataTable/TableSelectRow.js +2 -10
- package/es/components/DataTable/TableToolbar.js +0 -3
- package/es/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +3 -6
- package/es/components/DataTable/TableToolbarSearch.js +2 -30
- package/es/components/DataTable/state/getDerivedStateFromProps.js +0 -4
- package/es/components/DataTable/state/sorting.js +5 -8
- package/es/components/DataTable/tools/denormalize.js +2 -2
- package/es/components/DataTable/tools/filter.js +0 -2
- package/es/components/DataTable/tools/instanceId.js +0 -1
- package/es/components/DataTable/tools/normalize.js +10 -10
- package/es/components/DataTable/tools/sorting.js +5 -13
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
- package/es/components/DatePicker/DatePicker.Skeleton.js +0 -6
- package/es/components/DatePicker/DatePicker.js +152 -174
- package/es/components/DatePicker/plugins/appendToPlugin.js +3 -7
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
- package/es/components/DatePicker/plugins/rangePlugin.js +2 -7
- package/es/components/DatePickerInput/DatePickerInput.js +2 -28
- package/es/components/Dropdown/Dropdown.Skeleton.js +0 -2
- package/es/components/Dropdown/Dropdown.js +43 -52
- package/es/components/ErrorBoundary/ErrorBoundary.js +0 -10
- package/es/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +1 -10
- package/es/components/FeatureFlags/index.js +8 -20
- package/es/components/FileUploader/FileUploader.Skeleton.js +0 -2
- package/es/components/FileUploader/FileUploader.js +3 -38
- package/es/components/FileUploader/FileUploaderButton.js +3 -24
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -28
- package/es/components/FileUploader/FileUploaderItem.js +1 -11
- package/es/components/FileUploader/Filename.js +0 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
- package/es/components/FluidComboBox/FluidComboBox.js +0 -18
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
- package/es/components/FluidDatePicker/FluidDatePicker.js +0 -6
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
- package/es/components/FluidDropdown/FluidDropdown.js +0 -18
- package/es/components/FluidForm/FluidForm.js +0 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
- package/es/components/FluidSelect/FluidSelect.js +0 -10
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
- package/es/components/FluidTextArea/FluidTextArea.js +0 -20
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
- package/es/components/FluidTextInput/FluidTextInput.js +0 -14
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
- package/es/components/FluidTimePicker/FluidTimePicker.js +1 -11
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
- package/es/components/Form/Form.d.ts +23 -0
- package/es/components/Form/Form.js +3 -6
- package/es/components/Form/index.d.ts +7 -0
- package/es/components/FormGroup/FormGroup.js +0 -7
- package/es/components/FormItem/FormItem.js +0 -2
- package/es/components/FormLabel/FormLabel.js +1 -7
- package/es/components/Grid/CSSGrid.js +2 -15
- package/es/components/Grid/Column.js +18 -59
- package/es/components/Grid/ColumnHang.js +2 -5
- package/es/components/Grid/FlexGrid.js +2 -8
- package/es/components/Grid/Grid.js +0 -8
- package/es/components/Grid/GridContext.js +1 -3
- package/es/components/Grid/Row.js +2 -7
- package/es/components/Heading/index.js +0 -4
- package/es/components/Icon/Icon.Skeleton.js +2 -2
- package/es/components/IconButton/index.js +0 -10
- package/es/components/IdPrefix/index.js +0 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +0 -14
- package/es/components/InlineLoading/InlineLoading.js +0 -12
- package/es/components/Layer/index.js +3 -6
- package/es/components/Layout/LayoutDirection.js +0 -3
- package/es/components/Layout/useLayoutDirection.js +0 -1
- package/es/components/Link/Link.js +3 -10
- package/es/components/ListBox/ListBox.js +2 -13
- package/es/components/ListBox/ListBoxField.js +0 -5
- package/es/components/ListBox/ListBoxMenuIcon.js +0 -4
- package/es/components/ListBox/ListBoxMenuItem.js +2 -6
- package/es/components/ListBox/ListBoxPropTypes.d.ts +2 -2
- package/es/components/ListBox/ListBoxSelection.js +1 -13
- package/es/components/ListBox/next/ListBoxSelection.js +1 -14
- package/es/components/ListBox/next/ListBoxTrigger.js +1 -3
- package/es/components/ListItem/ListItem.d.ts +23 -0
- package/es/components/ListItem/ListItem.js +4 -8
- package/es/components/ListItem/index.d.ts +7 -0
- package/es/components/Loading/Loading.js +0 -6
- package/es/components/Menu/Menu.js +22 -40
- package/es/components/Menu/MenuContext.js +4 -5
- package/es/components/Menu/MenuItem.js +5 -39
- package/es/components/MenuButton/index.js +0 -9
- package/es/components/Modal/Modal.js +0 -43
- package/es/components/ModalWrapper/ModalWrapper.js +2 -15
- package/es/components/MultiSelect/FilterableMultiSelect.js +2 -60
- package/es/components/MultiSelect/MultiSelect.js +22 -70
- package/es/components/MultiSelect/MultiSelectPropTypes.js +0 -1
- package/es/components/MultiSelect/index.js +0 -1
- package/es/components/MultiSelect/tools/itemToString.js +0 -2
- package/es/components/MultiSelect/tools/sorting.js +3 -4
- package/es/components/Notification/Notification.js +0 -78
- package/es/components/NumberInput/NumberInput.Skeleton.js +0 -2
- package/es/components/NumberInput/NumberInput.js +3 -60
- package/es/components/OrderedList/OrderedList.d.ts +39 -0
- package/es/components/OrderedList/OrderedList.js +7 -19
- package/es/components/{Form/index.js → OrderedList/index.d.ts} +1 -3
- package/es/components/OverflowMenu/OverflowMenu.js +65 -86
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
- package/es/components/OverflowMenuV2/index.js +0 -5
- package/es/components/Pagination/Pagination.Skeleton.js +0 -2
- package/es/components/Pagination/Pagination.js +11 -47
- package/es/components/Pagination/experimental/PageSelector.js +0 -10
- package/es/components/Pagination/experimental/Pagination.js +2 -48
- package/es/components/PaginationNav/PaginationNav.js +15 -59
- package/es/components/Popover/index.d.ts +14 -8
- package/es/components/Popover/index.js +44 -48
- package/es/components/PrimaryButton/PrimaryButton.js +0 -1
- package/es/components/ProgressBar/ProgressBar.js +0 -15
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
- package/es/components/ProgressIndicator/ProgressIndicator.js +2 -40
- package/es/components/RadioButton/RadioButton.Skeleton.js +0 -1
- package/es/components/RadioButton/RadioButton.js +0 -13
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
- package/es/components/RadioTile/RadioTile.js +0 -12
- package/es/components/Search/Search.Skeleton.js +0 -2
- package/es/components/Search/Search.js +1 -28
- package/es/components/SecondaryButton/SecondaryButton.js +0 -1
- package/es/components/Select/Select.Skeleton.js +0 -2
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/Select/Select.js +6 -33
- package/es/components/SelectItem/SelectItem.js +0 -5
- package/es/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
- package/es/components/SelectItemGroup/SelectItemGroup.js +1 -7
- package/es/components/SkeletonIcon/SkeletonIcon.js +0 -2
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
- package/es/components/SkeletonText/SkeletonText.js +0 -12
- package/es/components/Slider/Slider.Skeleton.js +0 -2
- package/es/components/Slider/Slider.d.ts +0 -1
- package/es/components/Slider/Slider.js +112 -135
- package/es/components/Stack/Stack.js +1 -8
- package/es/components/StructuredList/StructuredList.Skeleton.js +0 -5
- package/es/components/StructuredList/StructuredList.js +1 -25
- package/es/components/Switch/IconSwitch.js +0 -18
- package/es/components/Switch/Switch.js +0 -11
- package/es/components/TabContent/TabContent.js +2 -6
- package/es/components/Tabs/Tabs.Skeleton.js +0 -4
- package/es/components/Tabs/Tabs.js +135 -104
- package/es/components/Tabs/usePressable.js +18 -31
- package/es/components/Tag/Tag.Skeleton.js +0 -2
- package/es/components/Tag/Tag.js +0 -15
- package/es/components/Text/Text.js +5 -18
- package/es/components/Text/TextDirection.js +0 -3
- package/es/components/Text/TextDirectionContext.js +0 -1
- package/es/components/Text/createTextComponent.js +0 -3
- package/es/components/TextArea/TextArea.Skeleton.js +0 -2
- package/es/components/TextArea/TextArea.js +11 -33
- package/es/components/TextInput/ControlledPasswordInput.js +0 -20
- package/es/components/TextInput/PasswordInput.js +0 -25
- package/es/components/TextInput/TextInput.Skeleton.js +0 -2
- package/es/components/TextInput/TextInput.d.ts +1 -1
- package/es/components/TextInput/TextInput.js +5 -33
- package/es/components/TextInput/util.js +3 -5
- package/es/components/Theme/index.js +1 -6
- package/es/components/Tile/Tile.js +32 -59
- package/es/components/TileGroup/TileGroup.js +1 -22
- package/es/components/TimePicker/TimePicker.js +6 -32
- package/es/components/TimePickerSelect/TimePickerSelect.js +2 -5
- package/es/components/Toggle/Toggle.Skeleton.js +0 -8
- package/es/components/Toggle/Toggle.js +0 -16
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
- package/es/components/Toggletip/index.d.ts +148 -0
- package/es/components/Toggletip/index.js +20 -44
- package/es/components/Tooltip/DefinitionTooltip.js +0 -11
- package/es/components/Tooltip/Tooltip.d.ts +1 -1
- package/es/components/Tooltip/Tooltip.js +4 -21
- package/es/components/TreeView/TreeNode.js +21 -66
- package/es/components/TreeView/TreeView.js +11 -67
- package/es/components/UIShell/Content.js +2 -4
- package/es/components/UIShell/Header.js +0 -2
- package/es/components/UIShell/HeaderContainer.d.ts +33 -0
- package/es/components/UIShell/HeaderContainer.js +13 -11
- package/es/components/UIShell/HeaderGlobalAction.js +0 -6
- package/es/components/UIShell/HeaderGlobalBar.js +0 -1
- package/es/components/UIShell/HeaderMenu.js +32 -31
- package/es/components/UIShell/HeaderMenuButton.js +2 -4
- package/es/components/UIShell/HeaderMenuItem.js +0 -8
- package/es/components/UIShell/HeaderName.js +0 -5
- package/es/components/UIShell/HeaderNavigation.js +0 -2
- package/es/components/UIShell/HeaderPanel.js +0 -2
- package/es/components/UIShell/HeaderSideNavItems.js +0 -2
- package/es/components/UIShell/Link.js +2 -3
- package/es/components/UIShell/SideNav.d.ts +3 -1
- package/es/components/UIShell/SideNav.js +44 -36
- package/es/components/UIShell/SideNavDetails.js +0 -3
- package/es/components/UIShell/SideNavDivider.js +0 -1
- package/es/components/UIShell/SideNavFooter.js +1 -4
- package/es/components/UIShell/SideNavHeader.js +0 -4
- package/es/components/UIShell/SideNavIcon.js +0 -3
- package/es/components/UIShell/SideNavItem.js +0 -3
- package/es/components/UIShell/SideNavItems.js +2 -6
- package/es/components/UIShell/SideNavLink.js +3 -7
- package/es/components/UIShell/SideNavLinkText.js +0 -2
- package/es/components/UIShell/SideNavMenu.js +0 -16
- package/es/components/UIShell/SideNavMenuItem.js +0 -2
- package/es/components/UIShell/SideNavSwitcher.js +2 -5
- package/es/components/UIShell/SkipToContent.d.ts +32 -0
- package/es/components/UIShell/SkipToContent.js +8 -15
- package/es/components/UIShell/Switcher.js +0 -2
- package/es/components/UIShell/SwitcherDivider.js +0 -1
- package/es/components/UIShell/SwitcherItem.js +0 -3
- package/es/components/UnorderedList/UnorderedList.d.ts +34 -0
- package/es/components/UnorderedList/UnorderedList.js +6 -16
- package/es/components/UnorderedList/index.d.ts +7 -0
- package/es/index.js +7 -8
- package/es/internal/ClickListener.js +3 -13
- package/es/internal/FloatingMenu.js +57 -63
- package/es/internal/OptimizedResize.js +6 -12
- package/es/internal/Selection.js +2 -25
- package/es/internal/createClassWrapper.js +0 -2
- package/es/internal/deprecateFieldOnObject.js +0 -4
- package/es/internal/focus/index.js +0 -1
- package/es/internal/keyboard/keys.js +2 -1
- package/es/internal/keyboard/match.js +1 -6
- package/es/internal/keyboard/navigation.js +8 -7
- package/es/internal/useAnnouncer.js +0 -1
- package/es/internal/useAttachedMenu.js +1 -9
- package/es/internal/useControllableState.js +6 -13
- package/es/internal/useDelayedState.js +2 -4
- package/es/internal/useEffectOnce.js +0 -1
- package/es/internal/useEvent.js +61 -3
- package/es/internal/useId.js +2 -5
- package/es/internal/useIsomorphicEffect.js +1 -0
- package/es/internal/useMergedRefs.js +2 -2
- package/es/internal/useNoInteractiveChildren.js +2 -13
- package/es/internal/useNormalizedInputProps.js +0 -3
- package/es/internal/useSavedCallback.js +0 -1
- package/es/internal/warning.js +0 -3
- package/es/internal/wrapFocus.js +1 -8
- package/es/prop-types/deprecate.js +2 -5
- package/es/prop-types/isRequiredOneOf.js +2 -5
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
- package/es/tools/array.js +0 -3
- package/es/tools/events.js +0 -3
- package/es/tools/mergeRefs.js +0 -2
- package/es/tools/wrapComponent.js +2 -5
- package/lib/_virtual/_rollupPluginBabelHelpers.js +17 -4
- package/lib/components/Accordion/Accordion.Skeleton.js +0 -7
- package/lib/components/Accordion/Accordion.js +1 -27
- package/lib/components/Accordion/AccordionItem.js +5 -19
- package/lib/components/AspectRatio/AspectRatio.js +0 -5
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
- package/lib/components/Breadcrumb/Breadcrumb.js +0 -3
- package/lib/components/Breadcrumb/BreadcrumbItem.js +0 -7
- package/lib/components/Button/Button.Skeleton.js +2 -26
- package/lib/components/Button/Button.js +2 -36
- package/lib/components/ButtonSet/ButtonSet.js +0 -2
- package/lib/components/Checkbox/Checkbox.Skeleton.js +0 -1
- package/lib/components/Checkbox/Checkbox.js +4 -20
- package/lib/components/CheckboxGroup/CheckboxGroup.js +0 -11
- package/lib/components/ClassPrefix/index.d.ts +26 -0
- package/lib/components/ClassPrefix/index.js +0 -2
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
- package/lib/components/CodeSnippet/CodeSnippet.js +6 -45
- package/lib/components/ComboBox/ComboBox.js +19 -86
- package/lib/components/ComboBox/tools/filter.js +0 -1
- package/lib/components/ComboButton/index.js +0 -14
- package/lib/components/ComposedModal/ComposedModal.js +2 -32
- package/lib/components/ComposedModal/ModalFooter.js +0 -21
- package/lib/components/ComposedModal/ModalHeader.js +0 -12
- package/lib/components/ContainedList/ContainedList.js +5 -32
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
- package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -23
- package/lib/components/ContextMenu/useContextMenu.js +1 -6
- package/lib/components/Copy/Copy.js +8 -50
- package/lib/components/CopyButton/CopyButton.js +0 -4
- package/lib/components/DangerButton/DangerButton.js +0 -1
- package/lib/components/DataTable/DataTable.js +171 -91
- package/lib/components/DataTable/Table.js +0 -6
- package/lib/components/DataTable/TableBatchAction.js +0 -4
- package/lib/components/DataTable/TableBatchActions.js +0 -8
- package/lib/components/DataTable/TableBody.js +0 -1
- package/lib/components/DataTable/TableContainer.js +0 -5
- package/lib/components/DataTable/TableExpandHeader.js +0 -7
- package/lib/components/DataTable/TableExpandRow.js +0 -6
- package/lib/components/DataTable/TableExpandedRow.js +0 -6
- package/lib/components/DataTable/TableHeader.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.js +3 -19
- package/lib/components/DataTable/TableRow.js +4 -5
- package/lib/components/DataTable/TableSelectAll.js +0 -8
- package/lib/components/DataTable/TableSelectRow.js +2 -10
- package/lib/components/DataTable/TableToolbar.js +0 -3
- package/lib/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarMenu.js +3 -6
- package/lib/components/DataTable/TableToolbarSearch.js +2 -30
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +0 -4
- package/lib/components/DataTable/state/sorting.js +5 -8
- package/lib/components/DataTable/tools/denormalize.js +2 -2
- package/lib/components/DataTable/tools/filter.js +0 -2
- package/lib/components/DataTable/tools/instanceId.js +0 -1
- package/lib/components/DataTable/tools/normalize.js +10 -10
- package/lib/components/DataTable/tools/sorting.js +5 -13
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
- package/lib/components/DatePicker/DatePicker.Skeleton.js +0 -6
- package/lib/components/DatePicker/DatePicker.js +152 -174
- package/lib/components/DatePicker/plugins/appendToPlugin.js +3 -7
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -7
- package/lib/components/DatePickerInput/DatePickerInput.js +2 -28
- package/lib/components/Dropdown/Dropdown.Skeleton.js +0 -2
- package/lib/components/Dropdown/Dropdown.js +50 -59
- package/lib/components/ErrorBoundary/ErrorBoundary.js +0 -10
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +1 -10
- package/lib/components/FeatureFlags/index.js +8 -20
- package/lib/components/FileUploader/FileUploader.Skeleton.js +0 -2
- package/lib/components/FileUploader/FileUploader.js +3 -57
- package/lib/components/FileUploader/FileUploaderButton.js +3 -43
- package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -28
- package/lib/components/FileUploader/FileUploaderItem.js +1 -30
- package/lib/components/FileUploader/Filename.js +0 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
- package/lib/components/FluidComboBox/FluidComboBox.js +0 -18
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.js +0 -6
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
- package/lib/components/FluidDropdown/FluidDropdown.js +0 -18
- package/lib/components/FluidForm/FluidForm.js +0 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
- package/lib/components/FluidSelect/FluidSelect.js +0 -10
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
- package/lib/components/FluidTextArea/FluidTextArea.js +0 -20
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
- package/lib/components/FluidTextInput/FluidTextInput.js +0 -14
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.js +1 -11
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
- package/lib/components/Form/Form.d.ts +23 -0
- package/lib/components/Form/Form.js +3 -6
- package/lib/components/Form/index.d.ts +7 -0
- package/lib/components/FormGroup/FormGroup.js +0 -7
- package/lib/components/FormItem/FormItem.js +0 -2
- package/lib/components/FormLabel/FormLabel.js +1 -26
- package/lib/components/Grid/CSSGrid.js +2 -15
- package/lib/components/Grid/Column.js +18 -59
- package/lib/components/Grid/ColumnHang.js +2 -5
- package/lib/components/Grid/FlexGrid.js +2 -8
- package/lib/components/Grid/Grid.js +0 -8
- package/lib/components/Grid/GridContext.js +1 -3
- package/lib/components/Grid/Row.js +2 -7
- package/lib/components/Heading/index.js +0 -4
- package/lib/components/Icon/Icon.Skeleton.js +2 -2
- package/lib/components/IconButton/index.js +0 -10
- package/lib/components/IdPrefix/index.js +0 -2
- package/lib/components/InlineCheckbox/InlineCheckbox.js +0 -14
- package/lib/components/InlineLoading/InlineLoading.js +0 -12
- package/lib/components/Layer/index.js +3 -6
- package/lib/components/Layout/LayoutDirection.js +0 -3
- package/lib/components/Layout/useLayoutDirection.js +0 -1
- package/lib/components/Link/Link.js +3 -10
- package/lib/components/ListBox/ListBox.js +2 -13
- package/lib/components/ListBox/ListBoxField.js +0 -5
- package/lib/components/ListBox/ListBoxMenuIcon.js +0 -4
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -6
- package/lib/components/ListBox/ListBoxPropTypes.d.ts +2 -2
- package/lib/components/ListBox/ListBoxSelection.js +1 -13
- package/lib/components/ListBox/next/ListBoxSelection.js +1 -14
- package/lib/components/ListBox/next/ListBoxTrigger.js +1 -3
- package/lib/components/ListItem/ListItem.d.ts +23 -0
- package/lib/components/ListItem/ListItem.js +4 -8
- package/lib/components/ListItem/index.d.ts +7 -0
- package/lib/components/Loading/Loading.js +0 -6
- package/lib/components/Menu/Menu.js +22 -40
- package/lib/components/Menu/MenuContext.js +4 -5
- package/lib/components/Menu/MenuItem.js +5 -39
- package/lib/components/MenuButton/index.js +0 -9
- package/lib/components/Modal/Modal.js +0 -43
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -15
- package/lib/components/MultiSelect/FilterableMultiSelect.js +8 -66
- package/lib/components/MultiSelect/MultiSelect.js +30 -78
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +0 -1
- package/lib/components/MultiSelect/index.js +0 -1
- package/lib/components/MultiSelect/tools/itemToString.js +0 -2
- package/lib/components/MultiSelect/tools/sorting.js +3 -4
- package/lib/components/Notification/Notification.js +0 -78
- package/lib/components/NumberInput/NumberInput.Skeleton.js +0 -2
- package/lib/components/NumberInput/NumberInput.js +3 -60
- package/lib/components/OrderedList/OrderedList.d.ts +39 -0
- package/lib/components/OrderedList/OrderedList.js +7 -19
- package/lib/components/OrderedList/index.d.ts +7 -0
- package/lib/components/OverflowMenu/OverflowMenu.js +65 -86
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
- package/lib/components/OverflowMenuV2/index.js +0 -5
- package/lib/components/Pagination/Pagination.Skeleton.js +0 -2
- package/lib/components/Pagination/Pagination.js +11 -47
- package/lib/components/Pagination/experimental/PageSelector.js +0 -10
- package/lib/components/Pagination/experimental/Pagination.js +2 -67
- package/lib/components/PaginationNav/PaginationNav.js +15 -78
- package/lib/components/Popover/index.d.ts +14 -8
- package/lib/components/Popover/index.js +44 -48
- package/lib/components/PrimaryButton/PrimaryButton.js +0 -1
- package/lib/components/ProgressBar/ProgressBar.js +0 -15
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
- package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -40
- package/lib/components/RadioButton/RadioButton.Skeleton.js +0 -1
- package/lib/components/RadioButton/RadioButton.js +0 -13
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
- package/lib/components/RadioTile/RadioTile.js +0 -12
- package/lib/components/Search/Search.Skeleton.js +0 -2
- package/lib/components/Search/Search.js +1 -28
- package/lib/components/SecondaryButton/SecondaryButton.js +0 -1
- package/lib/components/Select/Select.Skeleton.js +0 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Select/Select.js +6 -33
- package/lib/components/SelectItem/SelectItem.js +0 -5
- package/lib/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
- package/lib/components/SelectItemGroup/SelectItemGroup.js +1 -26
- package/lib/components/SkeletonIcon/SkeletonIcon.js +0 -2
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
- package/lib/components/SkeletonText/SkeletonText.js +0 -12
- package/lib/components/Slider/Slider.Skeleton.js +0 -2
- package/lib/components/Slider/Slider.d.ts +0 -1
- package/lib/components/Slider/Slider.js +112 -154
- package/lib/components/Stack/Stack.js +1 -8
- package/lib/components/StructuredList/StructuredList.Skeleton.js +0 -5
- package/lib/components/StructuredList/StructuredList.js +1 -25
- package/lib/components/Switch/IconSwitch.js +0 -18
- package/lib/components/Switch/Switch.js +0 -11
- package/lib/components/TabContent/TabContent.js +2 -6
- package/lib/components/Tabs/Tabs.Skeleton.js +0 -4
- package/lib/components/Tabs/Tabs.js +133 -102
- package/lib/components/Tabs/usePressable.js +18 -31
- package/lib/components/Tag/Tag.Skeleton.js +0 -2
- package/lib/components/Tag/Tag.js +0 -15
- package/lib/components/Text/Text.js +5 -18
- package/lib/components/Text/TextDirection.js +0 -3
- package/lib/components/Text/TextDirectionContext.js +0 -1
- package/lib/components/Text/createTextComponent.js +0 -3
- package/lib/components/TextArea/TextArea.Skeleton.js +0 -2
- package/lib/components/TextArea/TextArea.js +10 -32
- package/lib/components/TextInput/ControlledPasswordInput.js +0 -20
- package/lib/components/TextInput/PasswordInput.js +0 -25
- package/lib/components/TextInput/TextInput.Skeleton.js +0 -2
- package/lib/components/TextInput/TextInput.d.ts +1 -1
- package/lib/components/TextInput/TextInput.js +5 -52
- package/lib/components/TextInput/util.js +3 -5
- package/lib/components/Theme/index.js +1 -6
- package/lib/components/Tile/Tile.js +31 -58
- package/lib/components/TileGroup/TileGroup.js +1 -22
- package/lib/components/TimePicker/TimePicker.js +6 -32
- package/lib/components/TimePickerSelect/TimePickerSelect.js +2 -5
- package/lib/components/Toggle/Toggle.Skeleton.js +0 -8
- package/lib/components/Toggle/Toggle.js +0 -16
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
- package/lib/components/Toggletip/index.d.ts +148 -0
- package/lib/components/Toggletip/index.js +20 -44
- package/lib/components/Tooltip/DefinitionTooltip.js +0 -11
- package/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.js +4 -21
- package/lib/components/TreeView/TreeNode.js +21 -66
- package/lib/components/TreeView/TreeView.js +11 -67
- package/lib/components/UIShell/Content.js +2 -4
- package/lib/components/UIShell/Header.js +0 -2
- package/lib/components/UIShell/HeaderContainer.d.ts +33 -0
- package/lib/components/UIShell/HeaderContainer.js +13 -11
- package/lib/components/UIShell/HeaderGlobalAction.js +0 -6
- package/lib/components/UIShell/HeaderGlobalBar.js +0 -1
- package/lib/components/UIShell/HeaderMenu.js +32 -31
- package/lib/components/UIShell/HeaderMenuButton.js +2 -4
- package/lib/components/UIShell/HeaderMenuItem.js +0 -8
- package/lib/components/UIShell/HeaderName.js +0 -5
- package/lib/components/UIShell/HeaderNavigation.js +0 -2
- package/lib/components/UIShell/HeaderPanel.js +0 -2
- package/lib/components/UIShell/HeaderSideNavItems.js +0 -2
- package/lib/components/UIShell/Link.js +2 -3
- package/lib/components/UIShell/SideNav.d.ts +3 -1
- package/lib/components/UIShell/SideNav.js +43 -35
- package/lib/components/UIShell/SideNavDetails.js +0 -3
- package/lib/components/UIShell/SideNavDivider.js +0 -1
- package/lib/components/UIShell/SideNavFooter.js +1 -4
- package/lib/components/UIShell/SideNavHeader.js +0 -4
- package/lib/components/UIShell/SideNavIcon.js +0 -3
- package/lib/components/UIShell/SideNavItem.js +0 -3
- package/lib/components/UIShell/SideNavItems.js +2 -6
- package/lib/components/UIShell/SideNavLink.js +3 -7
- package/lib/components/UIShell/SideNavLinkText.js +0 -2
- package/lib/components/UIShell/SideNavMenu.js +0 -16
- package/lib/components/UIShell/SideNavMenuItem.js +0 -2
- package/lib/components/UIShell/SideNavSwitcher.js +2 -5
- package/lib/components/UIShell/SkipToContent.d.ts +32 -0
- package/lib/components/UIShell/SkipToContent.js +8 -15
- package/lib/components/UIShell/Switcher.js +0 -2
- package/lib/components/UIShell/SwitcherDivider.js +0 -1
- package/lib/components/UIShell/SwitcherItem.js +0 -3
- package/lib/components/UnorderedList/UnorderedList.d.ts +34 -0
- package/lib/components/UnorderedList/UnorderedList.js +6 -16
- package/lib/components/UnorderedList/index.d.ts +7 -0
- package/lib/index.js +42 -43
- package/lib/internal/ClickListener.js +3 -13
- package/lib/internal/FloatingMenu.js +57 -63
- package/lib/internal/OptimizedResize.js +6 -12
- package/lib/internal/Selection.js +2 -25
- package/lib/internal/createClassWrapper.js +0 -2
- package/lib/internal/deprecateFieldOnObject.js +0 -4
- package/lib/internal/focus/index.js +0 -1
- package/lib/internal/keyboard/keys.js +2 -1
- package/lib/internal/keyboard/match.js +1 -6
- package/lib/internal/keyboard/navigation.js +8 -7
- package/lib/internal/useAnnouncer.js +0 -1
- package/lib/internal/useAttachedMenu.js +1 -9
- package/lib/internal/useControllableState.js +6 -13
- package/lib/internal/useDelayedState.js +2 -4
- package/lib/internal/useEffectOnce.js +0 -1
- package/lib/internal/useEvent.js +61 -2
- package/lib/internal/useId.js +2 -5
- package/lib/internal/useIsomorphicEffect.js +1 -0
- package/lib/internal/useMergedRefs.js +2 -2
- package/lib/internal/useNoInteractiveChildren.js +2 -13
- package/lib/internal/useNormalizedInputProps.js +0 -3
- package/lib/internal/useSavedCallback.js +0 -1
- package/lib/internal/warning.js +0 -3
- package/lib/internal/wrapFocus.js +1 -8
- package/lib/prop-types/deprecate.js +2 -5
- package/lib/prop-types/isRequiredOneOf.js +2 -5
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
- package/lib/tools/array.js +0 -3
- package/lib/tools/events.js +0 -3
- package/lib/tools/mergeRefs.js +0 -2
- package/lib/tools/wrapComponent.js +2 -5
- package/package.json +9 -9
- package/es/components/Tab/Tab.js +0 -185
- package/es/components/Tab/index.js +0 -14
- package/es/components/TimePickerSelect/index.js +0 -13
- package/lib/components/Form/index.js +0 -17
- package/lib/components/Tab/Tab.js +0 -214
- package/lib/components/Tab/index.js +0 -39
- package/lib/components/TimePickerSelect/index.js +0 -38
|
@@ -27,7 +27,6 @@ import { Escape, ArrowDown } from '../../internal/keyboard/keys.js';
|
|
|
27
27
|
// Weekdays shorthand for english locale
|
|
28
28
|
l10n.en.weekdays.shorthand.forEach((_day, index) => {
|
|
29
29
|
const currentDay = l10n.en.weekdays.shorthand;
|
|
30
|
-
|
|
31
30
|
if (currentDay[index] === 'Thu' || currentDay[index] === 'Th') {
|
|
32
31
|
currentDay[index] = 'Th';
|
|
33
32
|
} else {
|
|
@@ -35,14 +34,15 @@ l10n.en.weekdays.shorthand.forEach((_day, index) => {
|
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
const forEach = Array.prototype.forEach;
|
|
37
|
+
|
|
38
38
|
/**
|
|
39
39
|
* @param {number} monthNumber The month number.
|
|
40
40
|
* @param {boolean} shorthand `true` to use shorthand month.
|
|
41
41
|
* @param {Locale} locale The Flatpickr locale data.
|
|
42
42
|
* @returns {string} The month string.
|
|
43
43
|
*/
|
|
44
|
-
|
|
45
44
|
const monthToStr = (monthNumber, shorthand, locale) => locale.months[shorthand ? 'shorthand' : 'longhand'][monthNumber];
|
|
45
|
+
|
|
46
46
|
/**
|
|
47
47
|
* @param {object} config Plugin configuration.
|
|
48
48
|
* @param {boolean} [config.shorthand] `true` to use shorthand month.
|
|
@@ -52,31 +52,25 @@ const monthToStr = (monthNumber, shorthand, locale) => locale.months[shorthand ?
|
|
|
52
52
|
* @param {string} config.classFlatpickrCurrentMonth The CSS class for the text-based month selection UI.
|
|
53
53
|
* @returns {Plugin} A Flatpickr plugin to use text instead of `<select>` for month picker.
|
|
54
54
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
55
|
const carbonFlatpickrMonthSelectPlugin = config => fp => {
|
|
58
56
|
const setupElements = () => {
|
|
59
57
|
if (!fp.monthElements) {
|
|
60
58
|
return;
|
|
61
59
|
}
|
|
62
|
-
|
|
63
60
|
fp.monthElements.forEach(elem => {
|
|
64
61
|
if (!elem.parentNode) {
|
|
65
62
|
return;
|
|
66
63
|
}
|
|
67
|
-
|
|
68
64
|
elem.parentNode.removeChild(elem);
|
|
69
65
|
});
|
|
70
66
|
fp.monthElements.splice(0, fp.monthElements.length, ...fp.monthElements.map(() => {
|
|
71
67
|
// eslint-disable-next-line no-underscore-dangle
|
|
72
68
|
const monthElement = fp._createElement('span', config.classFlatpickrCurrentMonth);
|
|
73
|
-
|
|
74
69
|
monthElement.textContent = monthToStr(fp.currentMonth, config.shorthand === true, fp.l10n);
|
|
75
70
|
fp.yearElements[0].closest(config.selectorFlatpickrMonthYearContainer).insertBefore(monthElement, fp.yearElements[0].closest(config.selectorFlatpickrYearContainer));
|
|
76
71
|
return monthElement;
|
|
77
72
|
}));
|
|
78
73
|
};
|
|
79
|
-
|
|
80
74
|
const updateCurrentMonth = () => {
|
|
81
75
|
if (fp.monthElements) {
|
|
82
76
|
const monthStr = monthToStr(fp.currentMonth, config.shorthand === true, fp.l10n);
|
|
@@ -88,11 +82,9 @@ const carbonFlatpickrMonthSelectPlugin = config => fp => {
|
|
|
88
82
|
});
|
|
89
83
|
}
|
|
90
84
|
};
|
|
91
|
-
|
|
92
85
|
const register = () => {
|
|
93
86
|
fp.loadedPlugins.push('carbonFlatpickrMonthSelectPlugin');
|
|
94
87
|
};
|
|
95
|
-
|
|
96
88
|
return {
|
|
97
89
|
onMonthChange: updateCurrentMonth,
|
|
98
90
|
onValueUpdate: updateCurrentMonth,
|
|
@@ -100,28 +92,24 @@ const carbonFlatpickrMonthSelectPlugin = config => fp => {
|
|
|
100
92
|
onReady: [setupElements, updateCurrentMonth, register]
|
|
101
93
|
};
|
|
102
94
|
};
|
|
95
|
+
|
|
103
96
|
/**
|
|
104
97
|
* Determine if every child in a list of children has no label specified
|
|
105
98
|
* @param {Array<ReactElement>} children
|
|
106
99
|
* @returns {boolean}
|
|
107
100
|
*/
|
|
108
|
-
|
|
109
|
-
|
|
110
101
|
function isLabelTextEmpty(children) {
|
|
111
102
|
return children.every(child => !child.props.labelText);
|
|
112
103
|
}
|
|
113
|
-
|
|
114
104
|
const rightArrowHTML = `<svg width="16px" height="16px" viewBox="0 0 16 16">
|
|
115
105
|
<polygon points="11,8 6,13 5.3,12.3 9.6,8 5.3,3.7 6,3 "/>
|
|
116
106
|
</svg>`;
|
|
117
107
|
const leftArrowHTML = `<svg width="16px" height="16px" viewBox="0 0 16 16">
|
|
118
108
|
<polygon points="5,8 10,3 10.7,3.7 6.4,8 10.7,12.3 10,13 "/>
|
|
119
109
|
</svg>`;
|
|
120
|
-
|
|
121
110
|
function updateClassNames(calendar, prefix) {
|
|
122
111
|
const calendarContainer = calendar.calendarContainer;
|
|
123
112
|
const daysContainer = calendar.days;
|
|
124
|
-
|
|
125
113
|
if (calendarContainer && daysContainer) {
|
|
126
114
|
// calendarContainer and daysContainer are undefined if flatpickr detects a mobile device
|
|
127
115
|
calendarContainer.classList.add(`${prefix}--date-picker__calendar`);
|
|
@@ -135,7 +123,6 @@ function updateClassNames(calendar, prefix) {
|
|
|
135
123
|
});
|
|
136
124
|
forEach.call(daysContainer.querySelectorAll('.flatpickr-day'), item => {
|
|
137
125
|
item.classList.add(`${prefix}--date-picker__day`);
|
|
138
|
-
|
|
139
126
|
if (item.classList.contains('today') && calendar.selectedDates.length > 0) {
|
|
140
127
|
item.classList.add('no-border');
|
|
141
128
|
} else if (item.classList.contains('today') && calendar.selectedDates.length === 0) {
|
|
@@ -144,7 +131,6 @@ function updateClassNames(calendar, prefix) {
|
|
|
144
131
|
});
|
|
145
132
|
}
|
|
146
133
|
}
|
|
147
|
-
|
|
148
134
|
const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_ref, ref) {
|
|
149
135
|
let {
|
|
150
136
|
allowInput,
|
|
@@ -184,28 +170,25 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
184
170
|
setHasInput(true);
|
|
185
171
|
}
|
|
186
172
|
}, []);
|
|
187
|
-
const lastStartValue = useRef('');
|
|
173
|
+
const lastStartValue = useRef('');
|
|
188
174
|
|
|
175
|
+
// fix datepicker deleting the selectedDate when the calendar closes
|
|
189
176
|
const onCalendarClose = (selectedDates, dateStr) => {
|
|
190
177
|
setTimeout(() => {
|
|
191
178
|
if (lastStartValue.current && selectedDates[0] && !startInputField.current.value) {
|
|
192
|
-
var _endInputField$curren;
|
|
193
|
-
|
|
194
179
|
startInputField.current.value = lastStartValue.current;
|
|
195
|
-
calendarRef.current.setDate([startInputField.current.value, endInputField
|
|
180
|
+
calendarRef.current.setDate([startInputField.current.value, endInputField?.current?.value], true, calendarRef.current.config.dateFormat);
|
|
196
181
|
}
|
|
197
|
-
|
|
198
182
|
if (onClose) {
|
|
199
183
|
onClose(calendarRef.current.selectedDates, dateStr, calendarRef.current);
|
|
200
184
|
}
|
|
201
185
|
});
|
|
202
186
|
};
|
|
203
|
-
|
|
204
187
|
const endInputField = useRef(null);
|
|
205
188
|
const calendarRef = useRef(null);
|
|
206
189
|
const savedOnChange = useSavedCallback(onChange);
|
|
207
190
|
const savedOnClose = useSavedCallback(datePickerType === 'range' ? onCalendarClose : onClose);
|
|
208
|
-
const savedOnOpen = useSavedCallback(
|
|
191
|
+
const savedOnOpen = useSavedCallback(onOpen);
|
|
209
192
|
const datePickerClasses = cx(`${prefix}--date-picker`, {
|
|
210
193
|
[`${prefix}--date-picker--short`]: short,
|
|
211
194
|
[`${prefix}--date-picker--light`]: light,
|
|
@@ -225,7 +208,6 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
225
208
|
readOnly
|
|
226
209
|
});
|
|
227
210
|
}
|
|
228
|
-
|
|
229
211
|
if (index === 1 && child.type === React__default.createElement(DatePickerInput, child.props).type) {
|
|
230
212
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
231
213
|
datePickerType,
|
|
@@ -233,14 +215,12 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
233
215
|
readOnly
|
|
234
216
|
});
|
|
235
217
|
}
|
|
236
|
-
|
|
237
218
|
if (index === 0) {
|
|
238
219
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
239
220
|
ref: startInputField,
|
|
240
221
|
readOnly
|
|
241
222
|
});
|
|
242
223
|
}
|
|
243
|
-
|
|
244
224
|
if (index === 1) {
|
|
245
225
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
246
226
|
ref: endInputField,
|
|
@@ -252,28 +232,23 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
252
232
|
if (datePickerType !== 'single' && datePickerType !== 'range') {
|
|
253
233
|
return;
|
|
254
234
|
}
|
|
255
|
-
|
|
256
235
|
if (!startInputField.current) {
|
|
257
236
|
return;
|
|
258
237
|
}
|
|
259
|
-
|
|
260
238
|
const onHook = (_electedDates, _dateStr, instance, prefix) => {
|
|
261
239
|
updateClassNames(instance, prefix);
|
|
262
|
-
|
|
263
|
-
if (startInputField !== null && startInputField !== void 0 && startInputField.current) {
|
|
240
|
+
if (startInputField?.current) {
|
|
264
241
|
startInputField.current.readOnly = readOnly;
|
|
265
242
|
}
|
|
266
|
-
|
|
267
|
-
if (endInputField !== null && endInputField !== void 0 && endInputField.current) {
|
|
243
|
+
if (endInputField?.current) {
|
|
268
244
|
endInputField.current.readOnly = readOnly;
|
|
269
245
|
}
|
|
270
|
-
};
|
|
271
|
-
// is provided, we return the default empty disabled array, allowing all dates.
|
|
272
|
-
|
|
246
|
+
};
|
|
273
247
|
|
|
248
|
+
// Logic to determine if `enable` or `disable` will be passed down. If neither
|
|
249
|
+
// is provided, we return the default empty disabled array, allowing all dates.
|
|
274
250
|
const enableOrDisable = enable ? 'enable' : 'disable';
|
|
275
251
|
let enableOrDisableArr;
|
|
276
|
-
|
|
277
252
|
if (!enable && !disable) {
|
|
278
253
|
enableOrDisableArr = [];
|
|
279
254
|
} else if (enable) {
|
|
@@ -281,18 +256,16 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
281
256
|
} else {
|
|
282
257
|
enableOrDisableArr = disable;
|
|
283
258
|
}
|
|
284
|
-
|
|
285
259
|
let localeData;
|
|
286
|
-
|
|
287
260
|
if (typeof locale === 'object') {
|
|
288
261
|
const location = locale.locale ? locale.locale : 'en';
|
|
289
|
-
localeData = {
|
|
262
|
+
localeData = {
|
|
263
|
+
...l10n[location],
|
|
290
264
|
...locale
|
|
291
265
|
};
|
|
292
266
|
} else {
|
|
293
267
|
localeData = l10n[locale];
|
|
294
268
|
}
|
|
295
|
-
|
|
296
269
|
const {
|
|
297
270
|
current: start
|
|
298
271
|
} = startInputField;
|
|
@@ -346,12 +319,10 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
346
319
|
};
|
|
347
320
|
const calendar = flatpickr(start, flatpickerconfig);
|
|
348
321
|
calendarRef.current = calendar;
|
|
349
|
-
|
|
350
322
|
function handleArrowDown(event) {
|
|
351
323
|
if (match(event, Escape)) {
|
|
352
324
|
calendar.calendarContainer.classList.remove('open');
|
|
353
325
|
}
|
|
354
|
-
|
|
355
326
|
if (match(event, ArrowDown)) {
|
|
356
327
|
const {
|
|
357
328
|
calendarContainer,
|
|
@@ -363,156 +334,127 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
363
334
|
(selectedDateElem || todayDateElem || calendarContainer.querySelector('.flatpickr-day[tabindex]') || calendarContainer).focus();
|
|
364
335
|
}
|
|
365
336
|
}
|
|
366
|
-
|
|
367
337
|
function handleOnChange(event) {
|
|
368
338
|
if (datePickerType == 'single') {
|
|
369
339
|
calendar.calendarContainer.classList.remove('open');
|
|
370
340
|
}
|
|
371
|
-
|
|
372
341
|
const {
|
|
373
342
|
target
|
|
374
343
|
} = event;
|
|
375
|
-
|
|
376
344
|
if (target === start) {
|
|
377
345
|
lastStartValue.current = start.value;
|
|
378
346
|
}
|
|
379
|
-
|
|
380
347
|
if (start.value !== '') {
|
|
381
348
|
return;
|
|
382
349
|
}
|
|
383
|
-
|
|
384
350
|
if (!calendar.selectedDates) {
|
|
385
351
|
return;
|
|
386
352
|
}
|
|
387
|
-
|
|
388
353
|
if (calendar.selectedDates.length === 0) {
|
|
389
354
|
return;
|
|
390
355
|
}
|
|
391
|
-
|
|
392
356
|
calendar.clear();
|
|
393
357
|
calendar.input.focus();
|
|
394
358
|
}
|
|
395
|
-
|
|
396
359
|
if (start) {
|
|
397
360
|
start.addEventListener('keydown', handleArrowDown);
|
|
398
361
|
start.addEventListener('change', handleOnChange);
|
|
399
|
-
|
|
400
362
|
if (calendar && calendar.calendarContainer) {
|
|
401
363
|
// Flatpickr's calendar dialog is not rendered in a landmark causing an
|
|
402
364
|
// error with IBM Equal Access Accessibility Checker so we add an aria
|
|
403
365
|
// role to the container div.
|
|
404
|
-
calendar.calendarContainer.setAttribute('role', 'application');
|
|
405
|
-
|
|
366
|
+
calendar.calendarContainer.setAttribute('role', 'application');
|
|
367
|
+
// IBM EAAC requires an aria-label on a role='region'
|
|
406
368
|
calendar.calendarContainer.setAttribute('aria-label', 'calendar-container');
|
|
407
369
|
}
|
|
408
370
|
}
|
|
409
|
-
|
|
410
371
|
if (end) {
|
|
411
372
|
end.addEventListener('keydown', handleArrowDown);
|
|
412
373
|
end.addEventListener('change', handleOnChange);
|
|
413
|
-
}
|
|
414
|
-
|
|
374
|
+
}
|
|
415
375
|
|
|
376
|
+
//component did unmount equivalent
|
|
416
377
|
return () => {
|
|
417
378
|
// Note: if the `startInputField` ref is undefined then calendar will be
|
|
418
379
|
// of type: Array and `destroy` will not be defined
|
|
419
380
|
if (calendar && calendar.destroy) {
|
|
420
381
|
calendar.destroy();
|
|
421
|
-
}
|
|
422
|
-
|
|
382
|
+
}
|
|
423
383
|
|
|
384
|
+
// prevent a duplicate date selection when a default value is set
|
|
424
385
|
if (value) {
|
|
425
|
-
if (startInputField
|
|
386
|
+
if (startInputField?.current) {
|
|
426
387
|
startInputField.current.value = '';
|
|
427
388
|
}
|
|
428
|
-
|
|
429
|
-
if (endInputField !== null && endInputField !== void 0 && endInputField.current) {
|
|
389
|
+
if (endInputField?.current) {
|
|
430
390
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
431
391
|
endInputField.current.value = '';
|
|
432
392
|
}
|
|
433
393
|
}
|
|
434
|
-
|
|
435
394
|
if (start) {
|
|
436
395
|
start.removeEventListener('keydown', handleArrowDown);
|
|
437
396
|
start.removeEventListener('change', handleOnChange);
|
|
438
397
|
}
|
|
439
|
-
|
|
440
398
|
if (end) {
|
|
441
399
|
end.removeEventListener('keydown', handleArrowDown);
|
|
442
400
|
end.removeEventListener('change', handleOnChange);
|
|
443
401
|
}
|
|
444
402
|
};
|
|
445
403
|
}, [savedOnChange, savedOnClose, savedOnOpen, readOnly, hasInput]); //eslint-disable-line react-hooks/exhaustive-deps
|
|
404
|
+
|
|
446
405
|
// this hook allows consumers to access the flatpickr calendar
|
|
447
406
|
// instance for cases where functions like open() or close()
|
|
448
407
|
// need to be imperatively called on the calendar
|
|
449
|
-
|
|
450
408
|
useImperativeHandle(ref, () => ({
|
|
451
409
|
get calendar() {
|
|
452
410
|
return calendarRef.current;
|
|
453
411
|
}
|
|
454
|
-
|
|
455
412
|
}));
|
|
456
413
|
useEffect(() => {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current = calendarRef.current) !== null && _calendarRef$current !== void 0 && _calendarRef$current.set) {
|
|
414
|
+
if (calendarRef?.current?.set) {
|
|
460
415
|
calendarRef.current.set({
|
|
461
416
|
dateFormat
|
|
462
417
|
});
|
|
463
418
|
}
|
|
464
419
|
}, [dateFormat]);
|
|
465
420
|
useEffect(() => {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current2 = calendarRef.current) !== null && _calendarRef$current2 !== void 0 && _calendarRef$current2.set) {
|
|
421
|
+
if (calendarRef?.current?.set) {
|
|
469
422
|
calendarRef.current.set('minDate', minDate);
|
|
470
423
|
}
|
|
471
424
|
}, [minDate]);
|
|
472
425
|
useEffect(() => {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current3 = calendarRef.current) !== null && _calendarRef$current3 !== void 0 && _calendarRef$current3.set) {
|
|
426
|
+
if (calendarRef?.current?.set) {
|
|
476
427
|
calendarRef.current.set('maxDate', maxDate);
|
|
477
428
|
}
|
|
478
429
|
}, [maxDate]);
|
|
479
430
|
useEffect(() => {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current4 = calendarRef.current) !== null && _calendarRef$current4 !== void 0 && _calendarRef$current4.set && disable) {
|
|
431
|
+
if (calendarRef?.current?.set && disable) {
|
|
483
432
|
calendarRef.current.set('disable', disable);
|
|
484
433
|
}
|
|
485
434
|
}, [disable]);
|
|
486
435
|
useEffect(() => {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current5 = calendarRef.current) !== null && _calendarRef$current5 !== void 0 && _calendarRef$current5.set && enable) {
|
|
436
|
+
if (calendarRef?.current?.set && enable) {
|
|
490
437
|
calendarRef.current.set('enable', enable);
|
|
491
438
|
}
|
|
492
439
|
}, [enable]);
|
|
493
440
|
useEffect(() => {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current6 = calendarRef.current) !== null && _calendarRef$current6 !== void 0 && _calendarRef$current6.set && inline) {
|
|
441
|
+
if (calendarRef?.current?.set && inline) {
|
|
497
442
|
calendarRef.current.set('inline', inline);
|
|
498
443
|
}
|
|
499
444
|
}, [inline]);
|
|
500
445
|
useEffect(() => {
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
if (calendarRef !== null && calendarRef !== void 0 && (_calendarRef$current7 = calendarRef.current) !== null && _calendarRef$current7 !== void 0 && _calendarRef$current7.set) {
|
|
446
|
+
if (calendarRef?.current?.set) {
|
|
504
447
|
if (value !== undefined) {
|
|
505
448
|
calendarRef.current.setDate(value);
|
|
506
449
|
}
|
|
507
|
-
|
|
508
|
-
|
|
450
|
+
updateClassNames(calendarRef.current, prefix);
|
|
451
|
+
//for simple date picker w/o calendar; initial mount may not have value
|
|
509
452
|
} else if (!calendarRef.current && value) {
|
|
510
453
|
startInputField.current.value = value;
|
|
511
454
|
}
|
|
512
455
|
}, [value, prefix]); //eslint-disable-line react-hooks/exhaustive-deps
|
|
513
456
|
|
|
514
457
|
let fluidError;
|
|
515
|
-
|
|
516
458
|
if (isFluid) {
|
|
517
459
|
if (invalid) {
|
|
518
460
|
fluidError = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(WarningFilled, {
|
|
@@ -523,7 +465,6 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
523
465
|
className: `${prefix}--form-requirement`
|
|
524
466
|
}, invalidText));
|
|
525
467
|
}
|
|
526
|
-
|
|
527
468
|
if (warn && !invalid) {
|
|
528
469
|
fluidError = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(WarningAltFilled, {
|
|
529
470
|
className: `${prefix}--date-picker__icon ${prefix}--date-picker__icon--warn`
|
|
@@ -534,7 +475,6 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
534
475
|
}, warnText));
|
|
535
476
|
}
|
|
536
477
|
}
|
|
537
|
-
|
|
538
478
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
539
479
|
className: wrapperClasses,
|
|
540
480
|
ref: ref
|
|
@@ -548,32 +488,26 @@ DatePicker.propTypes = {
|
|
|
548
488
|
* into the input field
|
|
549
489
|
*/
|
|
550
490
|
allowInput: PropTypes.bool,
|
|
551
|
-
|
|
552
491
|
/**
|
|
553
492
|
* The DOM element the Flatpicker should be inserted into. `<body>` by default.
|
|
554
493
|
*/
|
|
555
494
|
appendTo: PropTypes.object,
|
|
556
|
-
|
|
557
495
|
/**
|
|
558
496
|
* The child nodes.
|
|
559
497
|
*/
|
|
560
498
|
children: PropTypes.node,
|
|
561
|
-
|
|
562
499
|
/**
|
|
563
500
|
* The CSS class names.
|
|
564
501
|
*/
|
|
565
502
|
className: PropTypes.string,
|
|
566
|
-
|
|
567
503
|
/**
|
|
568
504
|
* flatpickr prop passthrough. Controls whether the calendar dropdown closes upon selection.
|
|
569
505
|
*/
|
|
570
506
|
closeOnSelect: PropTypes.bool,
|
|
571
|
-
|
|
572
507
|
/**
|
|
573
508
|
* The date format.
|
|
574
509
|
*/
|
|
575
510
|
dateFormat: PropTypes.string,
|
|
576
|
-
|
|
577
511
|
/**
|
|
578
512
|
* The type of the date picker:
|
|
579
513
|
*
|
|
@@ -582,100 +516,153 @@ DatePicker.propTypes = {
|
|
|
582
516
|
* * `range` - With calendar dropdown and a date range.
|
|
583
517
|
*/
|
|
584
518
|
datePickerType: PropTypes.oneOf(['simple', 'single', 'range']),
|
|
585
|
-
|
|
586
519
|
/**
|
|
587
520
|
* The flatpickr `disable` option that allows a user to disable certain dates.
|
|
588
521
|
*/
|
|
589
522
|
disable: PropTypes.array,
|
|
590
|
-
|
|
591
523
|
/**
|
|
592
524
|
* The flatpickr `enable` option that allows a user to enable certain dates.
|
|
593
525
|
*/
|
|
594
526
|
enable: PropTypes.array,
|
|
595
|
-
|
|
596
527
|
/**
|
|
597
528
|
* The flatpickr `inline` option.
|
|
598
529
|
*/
|
|
599
530
|
inline: PropTypes.bool,
|
|
600
|
-
|
|
601
531
|
/**
|
|
602
532
|
* Specify whether or not the control is invalid (Fluid only)
|
|
603
533
|
*/
|
|
604
534
|
invalid: PropTypes.bool,
|
|
605
|
-
|
|
606
535
|
/**
|
|
607
536
|
* Provide the text that is displayed when the control is in error state (Fluid Only)
|
|
608
537
|
*/
|
|
609
538
|
invalidText: PropTypes.node,
|
|
610
|
-
|
|
611
539
|
/**
|
|
612
540
|
* `true` to use the light version.
|
|
613
541
|
*/
|
|
614
542
|
light: deprecate(PropTypes.bool, 'The `light` prop for `DatePicker` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
615
|
-
|
|
616
543
|
/**
|
|
617
544
|
* The language locale used to format the days of the week, months, and numbers. The full list of supported locales can be found here https://github.com/flatpickr/flatpickr/tree/master/src/l10n
|
|
618
545
|
*/
|
|
619
|
-
locale: PropTypes.oneOfType([PropTypes.object, PropTypes.oneOf(['ar',
|
|
620
|
-
|
|
621
|
-
'
|
|
622
|
-
|
|
623
|
-
'
|
|
624
|
-
|
|
625
|
-
'
|
|
626
|
-
|
|
627
|
-
'
|
|
628
|
-
|
|
629
|
-
'
|
|
630
|
-
|
|
631
|
-
'
|
|
632
|
-
|
|
633
|
-
'
|
|
634
|
-
|
|
635
|
-
'
|
|
636
|
-
|
|
637
|
-
'
|
|
638
|
-
|
|
639
|
-
'
|
|
640
|
-
|
|
641
|
-
'
|
|
642
|
-
|
|
643
|
-
'
|
|
644
|
-
|
|
645
|
-
'
|
|
646
|
-
|
|
647
|
-
'
|
|
648
|
-
|
|
649
|
-
'
|
|
650
|
-
|
|
651
|
-
'
|
|
652
|
-
|
|
653
|
-
'
|
|
654
|
-
|
|
655
|
-
'
|
|
656
|
-
|
|
657
|
-
'
|
|
658
|
-
|
|
659
|
-
'
|
|
660
|
-
|
|
661
|
-
'
|
|
662
|
-
|
|
663
|
-
'
|
|
664
|
-
|
|
665
|
-
'
|
|
666
|
-
|
|
667
|
-
'
|
|
668
|
-
|
|
669
|
-
'
|
|
670
|
-
|
|
671
|
-
'
|
|
672
|
-
|
|
673
|
-
'
|
|
674
|
-
|
|
675
|
-
'
|
|
676
|
-
|
|
677
|
-
'
|
|
678
|
-
|
|
546
|
+
locale: PropTypes.oneOfType([PropTypes.object, PropTypes.oneOf(['ar',
|
|
547
|
+
// Arabic
|
|
548
|
+
'at',
|
|
549
|
+
// Austria
|
|
550
|
+
'az',
|
|
551
|
+
// Azerbaijan
|
|
552
|
+
'be',
|
|
553
|
+
// Belarusian
|
|
554
|
+
'bg',
|
|
555
|
+
// Bulgarian
|
|
556
|
+
'bn',
|
|
557
|
+
// Bangla
|
|
558
|
+
'bs',
|
|
559
|
+
// Bosnia
|
|
560
|
+
'cat',
|
|
561
|
+
// Catalan
|
|
562
|
+
'cs',
|
|
563
|
+
// Czech
|
|
564
|
+
'cy',
|
|
565
|
+
// Welsh
|
|
566
|
+
'da',
|
|
567
|
+
// Danish
|
|
568
|
+
'de',
|
|
569
|
+
// German
|
|
570
|
+
'en',
|
|
571
|
+
// English
|
|
572
|
+
'eo',
|
|
573
|
+
// Esperanto
|
|
574
|
+
'es',
|
|
575
|
+
// Spanish
|
|
576
|
+
'et',
|
|
577
|
+
// Estonian
|
|
578
|
+
'fa',
|
|
579
|
+
// Persian
|
|
580
|
+
'fi',
|
|
581
|
+
// Finnish
|
|
582
|
+
'fo',
|
|
583
|
+
// Faroese
|
|
584
|
+
'fr',
|
|
585
|
+
// French
|
|
586
|
+
'ga',
|
|
587
|
+
// Gaelic
|
|
588
|
+
'gr',
|
|
589
|
+
// Greek
|
|
590
|
+
'he',
|
|
591
|
+
// Hebrew
|
|
592
|
+
'hi',
|
|
593
|
+
// Hindi
|
|
594
|
+
'hr',
|
|
595
|
+
// Croatian
|
|
596
|
+
'hu',
|
|
597
|
+
// Hungarian
|
|
598
|
+
'id',
|
|
599
|
+
// Indonesian
|
|
600
|
+
'is',
|
|
601
|
+
// Icelandic
|
|
602
|
+
'it',
|
|
603
|
+
// Italian
|
|
604
|
+
'ja',
|
|
605
|
+
// Japanese
|
|
606
|
+
'ka',
|
|
607
|
+
// Georgian
|
|
608
|
+
'km',
|
|
609
|
+
// Khmer
|
|
610
|
+
'ko',
|
|
611
|
+
// Korean
|
|
612
|
+
'kz',
|
|
613
|
+
// Kazakh
|
|
614
|
+
'lt',
|
|
615
|
+
// Lithuanian
|
|
616
|
+
'lv',
|
|
617
|
+
// Latvian
|
|
618
|
+
'mk',
|
|
619
|
+
// Macedonian
|
|
620
|
+
'mn',
|
|
621
|
+
// Mongolian
|
|
622
|
+
'ms',
|
|
623
|
+
// Malaysian
|
|
624
|
+
'my',
|
|
625
|
+
// Burmese
|
|
626
|
+
'nl',
|
|
627
|
+
// Dutch
|
|
628
|
+
'no',
|
|
629
|
+
// Norwegian
|
|
630
|
+
'pa',
|
|
631
|
+
// Punjabi
|
|
632
|
+
'pl',
|
|
633
|
+
// Polish
|
|
634
|
+
'pt',
|
|
635
|
+
// Portuguese
|
|
636
|
+
'ro',
|
|
637
|
+
// Romanian
|
|
638
|
+
'ru',
|
|
639
|
+
// Russian
|
|
640
|
+
'si',
|
|
641
|
+
// Sinhala
|
|
642
|
+
'sk',
|
|
643
|
+
// Slovak
|
|
644
|
+
'sl',
|
|
645
|
+
// Slovenian
|
|
646
|
+
'sq',
|
|
647
|
+
// Albanian
|
|
648
|
+
'sr',
|
|
649
|
+
// Serbian
|
|
650
|
+
'sv',
|
|
651
|
+
// Swedish
|
|
652
|
+
'th',
|
|
653
|
+
// Thai
|
|
654
|
+
'tr',
|
|
655
|
+
// Turkish
|
|
656
|
+
'uk',
|
|
657
|
+
// Ukrainian
|
|
658
|
+
'uz',
|
|
659
|
+
// Uzbek
|
|
660
|
+
'uz_latn',
|
|
661
|
+
// Uzbek Latin
|
|
662
|
+
'vn',
|
|
663
|
+
// Vietnamese
|
|
664
|
+
'zh_tw',
|
|
665
|
+
// Mandarin Traditional
|
|
679
666
|
'zh' // Mandarin
|
|
680
667
|
])]),
|
|
681
668
|
|
|
@@ -683,50 +670,41 @@ DatePicker.propTypes = {
|
|
|
683
670
|
* The maximum date that a user can pick to.
|
|
684
671
|
*/
|
|
685
672
|
maxDate: PropTypes.string,
|
|
686
|
-
|
|
687
673
|
/**
|
|
688
674
|
* The minimum date that a user can start picking from.
|
|
689
675
|
*/
|
|
690
676
|
minDate: PropTypes.string,
|
|
691
|
-
|
|
692
677
|
/**
|
|
693
678
|
* The `change` event handler.
|
|
694
679
|
*/
|
|
695
680
|
onChange: PropTypes.func,
|
|
696
|
-
|
|
697
681
|
/**
|
|
698
682
|
* The `close` event handler.
|
|
699
683
|
*/
|
|
700
684
|
onClose: PropTypes.func,
|
|
701
|
-
|
|
702
685
|
/**
|
|
703
686
|
* The `open` event handler.
|
|
704
687
|
*/
|
|
705
688
|
onOpen: PropTypes.func,
|
|
706
|
-
|
|
707
689
|
/**
|
|
708
690
|
* whether the DatePicker is to be readOnly
|
|
709
691
|
* if boolean applies to all inputs
|
|
710
692
|
* if array applies to each input in order
|
|
711
693
|
*/
|
|
712
694
|
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),
|
|
713
|
-
|
|
714
695
|
/**
|
|
715
696
|
* `true` to use the short version.
|
|
716
697
|
*/
|
|
717
698
|
short: PropTypes.bool,
|
|
718
|
-
|
|
719
699
|
/**
|
|
720
700
|
* The value of the date value provided to flatpickr, could
|
|
721
701
|
* be a date, a date number, a date string, an array of dates.
|
|
722
702
|
*/
|
|
723
703
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object])), PropTypes.object, PropTypes.number]),
|
|
724
|
-
|
|
725
704
|
/**
|
|
726
705
|
* Specify whether the control is currently in warning state (Fluid only)
|
|
727
706
|
*/
|
|
728
707
|
warn: PropTypes.bool,
|
|
729
|
-
|
|
730
708
|
/**
|
|
731
709
|
* Provide the text that is displayed when the control is in warning state (Fluid only)
|
|
732
710
|
*/
|