@lobehub/ui 6.15.2 → 6.15.3
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/A/index.d.mts +1 -2
- package/es/Accordion/Accordion.d.mts +1 -2
- package/es/Accordion/atoms.d.mts +1 -2
- package/es/Accordion/style.d.mts +1 -2
- package/es/Accordion/type.d.mts +1 -2
- package/es/ActionIcon/ActionIcon.d.mts +1 -2
- package/es/ActionIcon/style.d.mts +1 -2
- package/es/ActionIcon/type.d.mts +1 -2
- package/es/ActionIconGroup/ActionIconGroup.d.mts +1 -2
- package/es/ActionIconGroup/type.d.mts +1 -2
- package/es/AgentAvatar/AgentAvatar.d.mts +1 -2
- package/es/AgentAvatar/type.d.mts +1 -2
- package/es/AgentAvatar/utils.d.mts +1 -2
- package/es/Alert/Alert.d.mts +1 -2
- package/es/Alert/style.d.mts +1 -2
- package/es/Alert/type.d.mts +1 -2
- package/es/Anchor/Anchor.d.mts +1 -2
- package/es/Anchor/type.d.mts +1 -2
- package/es/AutoComplete/AutoComplete.d.mts +1 -2
- package/es/AutoComplete/style.d.mts +2 -3
- package/es/AutoComplete/type.d.mts +1 -2
- package/es/Avatar/AvatarGroup/index.d.mts +1 -2
- package/es/Avatar/index.d.mts +1 -2
- package/es/Avatar/type.d.mts +1 -2
- package/es/Badge/Badge.d.mts +1 -2
- package/es/Badge/type.d.mts +1 -2
- package/es/Block/Block.d.mts +1 -2
- package/es/Block/type.d.mts +1 -2
- package/es/Breadcrumb/Breadcrumb.d.mts +1 -2
- package/es/Breadcrumb/type.d.mts +1 -2
- package/es/Burger/Burger.d.mts +1 -2
- package/es/Burger/type.d.mts +1 -2
- package/es/Button/Button.d.mts +1 -2
- package/es/Button/SplitButton.d.mts +1 -2
- package/es/Button/style.d.mts +1 -2
- package/es/Button/type.d.mts +1 -2
- package/es/Carousel/Carousel.d.mts +1 -2
- package/es/Carousel/type.d.mts +1 -2
- package/es/Checkbox/Checkbox.d.mts +1 -2
- package/es/Checkbox/Checkbox.mjs +6 -6
- package/es/Checkbox/Checkbox.mjs.map +1 -1
- package/es/Checkbox/CheckboxGroup.d.mts +1 -2
- package/es/Checkbox/CheckboxGroup.mjs +5 -5
- package/es/Checkbox/CheckboxGroup.mjs.map +1 -1
- package/es/Checkbox/style.d.mts +1 -2
- package/es/Checkbox/type.d.mts +1 -2
- package/es/CodeDiff/CodeDiff.d.mts +1 -2
- package/es/CodeDiff/PatchDiff.d.mts +1 -2
- package/es/CodeDiff/PatchDiff.mjs +5 -5
- package/es/CodeDiff/PatchDiff.mjs.map +1 -1
- package/es/CodeDiff/type.d.mts +1 -2
- package/es/CodeEditor/CodeEditor.d.mts +1 -2
- package/es/CodeEditor/type.d.mts +1 -2
- package/es/Collapsible/Collapsible.d.mts +1 -2
- package/es/Collapsible/Collapsible.mjs +5 -5
- package/es/Collapsible/Collapsible.mjs.map +1 -1
- package/es/Collapsible/type.d.mts +1 -2
- package/es/ColorPicker/ColorPicker.d.mts +1 -2
- package/es/ColorPicker/type.d.mts +1 -2
- package/es/ColorSwatches/ColorSwatches.d.mts +1 -2
- package/es/ColorSwatches/type.d.mts +1 -2
- package/es/ConfigProvider/AppElementContext.d.mts +1 -2
- package/es/ConfigProvider/index.d.mts +1 -2
- package/es/ContextMenu/ContextMenuHost.d.mts +1 -2
- package/es/ContextMenu/ContextMenuTrigger.d.mts +1 -2
- package/es/ContextMenu/renderItems.d.mts +1 -1
- package/es/ContextMenu/store.d.mts +1 -2
- package/es/ContextMenu/type.d.mts +1 -2
- package/es/CopyButton/CopyButton.d.mts +1 -2
- package/es/CopyButton/type.d.mts +1 -2
- package/es/DatePicker/DatePicker.d.mts +1 -2
- package/es/DatePicker/DateRangePicker.d.mts +1 -2
- package/es/DatePicker/DayjsDatePicker.d.mts +1 -2
- package/es/DatePicker/DayjsDateRangePicker.d.mts +1 -2
- package/es/DatePicker/core/PickerInput/Popup/Footer.mjs +2 -2
- package/es/DatePicker/core/PickerInput/Popup/Footer.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Popup/PopupPanel.mjs +4 -4
- package/es/DatePicker/core/PickerInput/Popup/PopupPanel.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Popup/index.mjs +14 -14
- package/es/DatePicker/core/PickerInput/Popup/index.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/RangePicker.d.mts +3 -4
- package/es/DatePicker/core/PickerInput/RangePicker.mjs +11 -11
- package/es/DatePicker/core/PickerInput/RangePicker.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Selector/ClearIcon.mjs +2 -2
- package/es/DatePicker/core/PickerInput/Selector/ClearIcon.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Selector/Icon.mjs +2 -2
- package/es/DatePicker/core/PickerInput/Selector/Icon.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Selector/Input.mjs +15 -15
- package/es/DatePicker/core/PickerInput/Selector/Input.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Selector/RangeSelector.d.mts +1 -2
- package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs +11 -11
- package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/HoverSelector.mjs +2 -2
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/HoverSelector.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs +6 -6
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Selector/hooks/useInputProps.mjs +4 -4
- package/es/DatePicker/core/PickerInput/Selector/hooks/useInputProps.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/Selector/hooks/useRootProps.mjs +2 -2
- package/es/DatePicker/core/PickerInput/Selector/hooks/useRootProps.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/SinglePicker.d.mts +6 -7
- package/es/DatePicker/core/PickerInput/SinglePicker.mjs +8 -8
- package/es/DatePicker/core/PickerInput/SinglePicker.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/context.mjs +2 -2
- package/es/DatePicker/core/PickerInput/context.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useCellRender.mjs +3 -3
- package/es/DatePicker/core/PickerInput/hooks/useCellRender.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useFieldFormat.mjs +2 -2
- package/es/DatePicker/core/PickerInput/hooks/useFieldFormat.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useFieldsInvalidate.mjs +3 -3
- package/es/DatePicker/core/PickerInput/hooks/useFieldsInvalidate.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useFilledProps.mjs +5 -5
- package/es/DatePicker/core/PickerInput/hooks/useFilledProps.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useFocusEvents.mjs +2 -2
- package/es/DatePicker/core/PickerInput/hooks/useFocusEvents.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useFocusLock.mjs +2 -2
- package/es/DatePicker/core/PickerInput/hooks/useFocusLock.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useHoverStore.mjs +3 -3
- package/es/DatePicker/core/PickerInput/hooks/useHoverStore.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useLockEffect.mjs +2 -2
- package/es/DatePicker/core/PickerInput/hooks/useLockEffect.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/usePickerRef.mjs +3 -3
- package/es/DatePicker/core/PickerInput/hooks/usePickerRef.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/usePresets.mjs +2 -2
- package/es/DatePicker/core/PickerInput/hooks/usePresets.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useRangePickerValue.mjs +4 -4
- package/es/DatePicker/core/PickerInput/hooks/useRangePickerValue.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useRangeValue.mjs +3 -3
- package/es/DatePicker/core/PickerInput/hooks/useRangeValue.mjs.map +1 -1
- package/es/DatePicker/core/PickerInput/hooks/useRangeValueChange.mjs +5 -5
- package/es/DatePicker/core/PickerInput/hooks/useRangeValueChange.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/PanelBody.mjs +2 -2
- package/es/DatePicker/core/PickerPanel/PanelBody.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/PanelHeader.mjs +6 -6
- package/es/DatePicker/core/PickerPanel/PanelHeader.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/ClockDial.mjs +3 -3
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/ClockDial.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs +2 -2
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/TimeColumn.mjs +3 -3
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/TimeColumn.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs +2 -2
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useScrollTo.mjs +5 -5
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useScrollTo.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useTimeState.mjs +7 -7
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useTimeState.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/context.mjs +6 -6
- package/es/DatePicker/core/PickerPanel/context.mjs.map +1 -1
- package/es/DatePicker/core/PickerPanel/index.mjs +12 -12
- package/es/DatePicker/core/PickerPanel/index.mjs.map +1 -1
- package/es/DatePicker/core/generate/index.d.mts +1 -2
- package/es/DatePicker/core/hooks/react.mjs +8 -8
- package/es/DatePicker/core/hooks/react.mjs.map +1 -1
- package/es/DatePicker/core/hooks/useSyncState.mjs +3 -3
- package/es/DatePicker/core/hooks/useSyncState.mjs.map +1 -1
- package/es/DatePicker/core/hooks/useTimeInfo.mjs +6 -6
- package/es/DatePicker/core/hooks/useTimeInfo.mjs.map +1 -1
- package/es/DatePicker/core/index.d.mts +28 -0
- package/es/DatePicker/core/interface.d.mts +1 -2
- package/es/DatePicker/generatePicker.d.mts +1 -2
- package/es/DatePicker/locale.d.mts +1 -2
- package/es/DatePicker/type.d.mts +1 -2
- package/es/Descriptions/Descriptions.d.mts +1 -2
- package/es/Descriptions/type.d.mts +1 -2
- package/es/Divider/Divider.d.mts +1 -2
- package/es/Divider/type.d.mts +1 -2
- package/es/DownloadButton/DownloadButton.d.mts +1 -2
- package/es/DownloadButton/type.d.mts +1 -2
- package/es/DraggablePanel/DraggablePanel.d.mts +1 -2
- package/es/DraggablePanel/atoms.d.mts +1 -2
- package/es/DraggablePanel/context.d.mts +1 -2
- package/es/DraggablePanel/core/axes.d.mts +1 -2
- package/es/DraggablePanel/core/controller.d.mts +1 -2
- package/es/DraggablePanel/type.d.mts +1 -2
- package/es/DraggableSideNav/DraggableSideNav.d.mts +1 -2
- package/es/DraggableSideNav/type.d.mts +1 -2
- package/es/Drawer/Drawer.d.mts +1 -2
- package/es/Drawer/atoms.d.mts +1 -2
- package/es/Drawer/constants.d.mts +1 -2
- package/es/Drawer/type.d.mts +1 -2
- package/es/DropdownMenu/DropdownMenu.d.mts +1 -2
- package/es/DropdownMenu/atoms.d.mts +1 -2
- package/es/DropdownMenu/renderItems.d.mts +1 -2
- package/es/DropdownMenu/style.d.mts +1 -2
- package/es/DropdownMenu/type.d.mts +1 -2
- package/es/EditableText/ControlInput.d.mts +1 -2
- package/es/EditableText/EditableText.d.mts +1 -2
- package/es/EditableText/type.d.mts +1 -2
- package/es/EditorSlashMenu/EditorSlashMenu.d.mts +1 -2
- package/es/EditorSlashMenu/atoms.d.mts +1 -2
- package/es/EditorSlashMenu/atoms.mjs +1 -0
- package/es/EditorSlashMenu/atoms.mjs.map +1 -1
- package/es/EditorSlashMenu/type.d.mts +1 -2
- package/es/EmojiPicker/EmojiPicker.d.mts +1 -2
- package/es/EmojiPicker/type.d.mts +1 -2
- package/es/Empty/Empty.d.mts +1 -2
- package/es/Empty/type.d.mts +1 -2
- package/es/FileTypeIcon/FileTypeIcon.d.mts +1 -2
- package/es/FileTypeIcon/type.d.mts +1 -2
- package/es/Flex/Center.d.mts +1 -2
- package/es/Flex/FlexBasic.d.mts +1 -2
- package/es/Flex/type.d.mts +1 -2
- package/es/FloatingPanel/FloatingPanel.d.mts +1 -2
- package/es/FloatingPanel/type.d.mts +1 -2
- package/es/FloatingSheet/FloatingSheet.d.mts +1 -2
- package/es/FloatingSheet/type.d.mts +1 -2
- package/es/FluentEmoji/FluentEmoji.d.mts +1 -2
- package/es/FluentEmoji/type.d.mts +1 -2
- package/es/FluentEmoji/utils.d.mts +1 -2
- package/es/FocusScope/FocusScope.d.mts +1 -2
- package/es/FocusScope/store.d.mts +1 -2
- package/es/FocusScope/style.d.mts +1 -2
- package/es/FocusScope/useScopeArrowNav.d.mts +1 -2
- package/es/FocusScope/useScopeSwitcher.d.mts +1 -2
- package/es/FontLoader/index.d.mts +1 -2
- package/es/FontLoader/index.mjs +2 -2
- package/es/FontLoader/index.mjs.map +1 -1
- package/es/Form/Form.mjs +5 -5
- package/es/Form/Form.mjs.map +1 -1
- package/es/Form/components/FormDivider.d.mts +1 -2
- package/es/Form/components/FormField.d.mts +1 -2
- package/es/Form/components/FormFlatGroup.d.mts +1 -2
- package/es/Form/components/FormFooter.d.mts +1 -2
- package/es/Form/components/FormGroup.d.mts +1 -2
- package/es/Form/components/FormSubmitFooter.d.mts +1 -2
- package/es/Form/components/FormTitle.d.mts +1 -2
- package/es/Form/context.d.mts +1 -2
- package/es/Form/index.d.mts +1 -2
- package/es/Form/type.d.mts +1 -2
- package/es/FormKit/Field.d.mts +1 -2
- package/es/FormKit/List.d.mts +1 -2
- package/es/FormKit/SubmitFooter.d.mts +1 -2
- package/es/FormKit/context.d.mts +1 -2
- package/es/FormKit/engine/types.d.mts +1 -2
- package/es/FormKit/index.d.mts +1 -2
- package/es/FormKit/schema.d.mts +1 -2
- package/es/FormKit/type.d.mts +1 -2
- package/es/FormKit/useForm.d.mts +1 -2
- package/es/FormKit/useWatch.d.mts +1 -2
- package/es/Freeze/Freeze.d.mts +1 -2
- package/es/Freeze/type.d.mts +1 -2
- package/es/GlobalFocusRing/index.d.mts +1 -2
- package/es/Grid/Grid.d.mts +1 -2
- package/es/Grid/type.d.mts +1 -2
- package/es/GroupAvatar/GroupAvatar.d.mts +1 -2
- package/es/GroupAvatar/type.d.mts +1 -2
- package/es/GuideCard/GuideCard.d.mts +1 -2
- package/es/GuideCard/type.d.mts +1 -2
- package/es/Header/Header.d.mts +1 -2
- package/es/Header/type.d.mts +1 -2
- package/es/Highlighter/Highlighter.d.mts +1 -2
- package/es/Highlighter/SyntaxHighlighter/index.d.mts +1 -2
- package/es/Highlighter/const.d.mts +1 -2
- package/es/Highlighter/theme/lobe-highlights-theme.d.mts +1 -2
- package/es/Highlighter/theme/lobe-theme.d.mts +1 -2
- package/es/Highlighter/type.d.mts +1 -2
- package/es/Hotkey/Hotkey.d.mts +1 -2
- package/es/Hotkey/const.d.mts +1 -2
- package/es/Hotkey/type.d.mts +1 -2
- package/es/Hotkey/utils.d.mts +1 -2
- package/es/HotkeyInput/HotkeyInput.d.mts +1 -2
- package/es/HotkeyInput/type.d.mts +1 -2
- package/es/HtmlPreview/HtmlPreview.d.mts +1 -2
- package/es/HtmlPreview/Iframe.d.mts +1 -2
- package/es/HtmlPreview/const.d.mts +1 -2
- package/es/HtmlPreview/injectAutoHeightScript.d.mts +1 -2
- package/es/HtmlPreview/type.d.mts +1 -2
- package/es/Icon/Icon.d.mts +1 -2
- package/es/Icon/components/IconProvider.d.mts +1 -2
- package/es/Icon/type.d.mts +1 -2
- package/es/Image/PreviewGroup.d.mts +1 -2
- package/es/Image/index.d.mts +1 -2
- package/es/Image/type.d.mts +1 -2
- package/es/Image/useImagePreview.d.mts +1 -2
- package/es/Image/viewer/geometry.d.mts +1 -2
- package/es/Image/viewer/registry.d.mts +1 -1
- package/es/ImageSelect/ImageSelect.d.mts +1 -2
- package/es/ImageSelect/type.d.mts +1 -2
- package/es/Input/Input.d.mts +1 -2
- package/es/Input/Input.mjs +5 -5
- package/es/Input/Input.mjs.map +1 -1
- package/es/Input/InputNumber.d.mts +1 -2
- package/es/Input/InputOTP.d.mts +1 -2
- package/es/Input/InputPassword.d.mts +1 -2
- package/es/Input/TextArea.d.mts +1 -2
- package/es/Input/style.d.mts +1 -2
- package/es/Input/type.d.mts +1 -2
- package/es/Layout/components/LayoutFooter.d.mts +1 -2
- package/es/Layout/components/LayoutHeader.d.mts +1 -2
- package/es/Layout/components/LayoutMain.d.mts +1 -2
- package/es/Layout/components/LayoutSidebar.d.mts +1 -2
- package/es/Layout/components/LayoutSidebarInner.d.mts +1 -2
- package/es/Layout/components/LayoutToc.d.mts +1 -2
- package/es/Layout/index.d.mts +1 -2
- package/es/Layout/type.d.mts +1 -2
- package/es/List/List.d.mts +1 -2
- package/es/List/ListRow.d.mts +1 -1
- package/es/List/type.d.mts +1 -2
- package/es/Markdown/Markdown.d.mts +1 -2
- package/es/Markdown/Typography.d.mts +1 -2
- package/es/Markdown/components/SearchResultCards/index.d.mts +1 -2
- package/es/Markdown/plugins/rehypeCustomFootnotes.d.mts +1 -2
- package/es/Markdown/plugins/rehypeKatexDir.d.mts +1 -2
- package/es/Markdown/plugins/remarkBr.d.mts +1 -2
- package/es/Markdown/plugins/remarkColor.d.mts +1 -2
- package/es/Markdown/plugins/remarkCustomFootnotes.d.mts +1 -2
- package/es/Markdown/plugins/remarkGfmPlus.d.mts +1 -2
- package/es/Markdown/plugins/remarkVideo.d.mts +1 -2
- package/es/Markdown/type.d.mts +1 -2
- package/es/MaskShadow/MaskShadow.d.mts +1 -2
- package/es/MaskShadow/type.d.mts +1 -2
- package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.d.mts +1 -2
- package/es/MaterialFileTypeIcon/icon-map.json.d.mts +1 -2
- package/es/MaterialFileTypeIcon/{icon-map.mjs → icon-map.json.mjs} +1 -1
- package/es/MaterialFileTypeIcon/icon-map.json.mjs.map +1 -0
- package/es/MaterialFileTypeIcon/type.d.mts +1 -2
- package/es/MaterialFileTypeIcon/utils.mjs +1 -1
- package/es/Mermaid/Mermaid.d.mts +1 -2
- package/es/Mermaid/SyntaxMermaid/index.d.mts +1 -2
- package/es/Mermaid/const.d.mts +1 -2
- package/es/Mermaid/index.d.mts +1 -2
- package/es/Mermaid/themes.d.mts +2 -3
- package/es/Mermaid/type.d.mts +1 -2
- package/es/Meta/Meta.d.mts +1 -2
- package/es/Modal/Modal.d.mts +1 -2
- package/es/Modal/atoms.d.mts +1 -2
- package/es/Modal/constants.d.mts +1 -2
- package/es/Modal/context.d.mts +1 -2
- package/es/Modal/imperative.d.mts +1 -2
- package/es/Modal/type.d.mts +1 -2
- package/es/MotionProvider/index.d.mts +1 -2
- package/es/Pagination/Pagination.d.mts +1 -2
- package/es/Pagination/type.d.mts +1 -2
- package/es/Popover/ArrowIcon.d.mts +1 -2
- package/es/Popover/Popover.d.mts +1 -2
- package/es/Popover/PopoverGroup.d.mts +1 -2
- package/es/Popover/PopoverPortal.d.mts +1 -2
- package/es/Popover/atoms.d.mts +1 -2
- package/es/Popover/context.d.mts +1 -2
- package/es/Popover/groupContext.d.mts +1 -2
- package/es/Popover/type.d.mts +10 -12
- package/es/ProTable/ProTable.d.mts +1 -2
- package/es/ProTable/locale.d.mts +1 -2
- package/es/ProTable/type.d.mts +1 -2
- package/es/Progress/Progress.d.mts +1 -2
- package/es/Progress/type.d.mts +1 -2
- package/es/ProgressiveBlur/ProgressiveBlur.d.mts +1 -2
- package/es/ProgressiveBlur/type.d.mts +1 -2
- package/es/QRCode/QRCode.d.mts +1 -2
- package/es/QRCode/type.d.mts +1 -2
- package/es/Radio/Radio.d.mts +1 -2
- package/es/Radio/Radio.mjs +6 -6
- package/es/Radio/Radio.mjs.map +1 -1
- package/es/Radio/RadioGroup.d.mts +1 -2
- package/es/Radio/RadioGroup.mjs +5 -5
- package/es/Radio/RadioGroup.mjs.map +1 -1
- package/es/Radio/style.d.mts +1 -2
- package/es/Radio/type.d.mts +1 -2
- package/es/Rate/Rate.d.mts +1 -2
- package/es/Rate/type.d.mts +1 -2
- package/es/Result/Result.d.mts +1 -2
- package/es/Result/type.d.mts +1 -2
- package/es/ScrollArea/ScrollArea.d.mts +1 -2
- package/es/ScrollArea/atoms.d.mts +1 -2
- package/es/ScrollArea/type.d.mts +1 -2
- package/es/ScrollShadow/ScrollShadow.d.mts +1 -2
- package/es/ScrollShadow/type.d.mts +1 -2
- package/es/SearchBar/SearchBar.d.mts +1 -2
- package/es/SearchBar/type.d.mts +1 -2
- package/es/Segmented/Segmented.d.mts +1 -2
- package/es/Segmented/atoms.d.mts +1 -2
- package/es/Segmented/type.d.mts +3 -4
- package/es/Select/Select.d.mts +1 -2
- package/es/Select/Select.mjs +9 -9
- package/es/Select/Select.mjs.map +1 -1
- package/es/Select/atoms.d.mts +1 -2
- package/es/Select/type.d.mts +1 -2
- package/es/SideNav/SideNav.d.mts +1 -2
- package/es/SideNav/type.d.mts +1 -2
- package/es/Skeleton/SkeletonAvatar.d.mts +1 -2
- package/es/Skeleton/SkeletonText.d.mts +1 -2
- package/es/Skeleton/index.d.mts +1 -2
- package/es/Skeleton/type.d.mts +1 -2
- package/es/Slider/Slider.d.mts +1 -2
- package/es/Slider/Slider.mjs +7 -7
- package/es/Slider/Slider.mjs.map +1 -1
- package/es/Slider/SliderWithInput.d.mts +1 -2
- package/es/Slider/style.d.mts +1 -2
- package/es/Slider/type.d.mts +1 -2
- package/es/Snippet/Snippet.d.mts +1 -2
- package/es/Snippet/type.d.mts +1 -2
- package/es/SortableList/SortableList.d.mts +1 -2
- package/es/SortableList/components/DragHandle.d.mts +1 -2
- package/es/SortableList/components/SortableItem.d.mts +1 -2
- package/es/SortableList/type.d.mts +1 -2
- package/es/Spin/Spin.d.mts +1 -2
- package/es/Spin/type.d.mts +1 -2
- package/es/Statistic/Statistic.d.mts +1 -2
- package/es/Statistic/formatValue.d.mts +1 -2
- package/es/Statistic/type.d.mts +1 -2
- package/es/Steps/Steps.d.mts +1 -2
- package/es/Steps/type.d.mts +1 -2
- package/es/Switch/Switch.d.mts +1 -2
- package/es/Switch/atoms.d.mts +1 -2
- package/es/Switch/style.d.mts +1 -2
- package/es/Switch/type.d.mts +1 -2
- package/es/Table/Column.d.mts +1 -2
- package/es/Table/ColumnGroup.d.mts +1 -2
- package/es/Table/Table.d.mts +1 -2
- package/es/Table/atoms/cells.d.mts +1 -2
- package/es/Table/atoms/layout.d.mts +1 -2
- package/es/Table/engine/types.d.mts +1 -1
- package/es/Table/internal.d.mts +1 -1
- package/es/Table/pipeline/columnUtils.d.mts +1 -2
- package/es/Table/pipeline/selectionUtils.d.mts +2 -3
- package/es/Table/render/Summary.d.mts +2 -3
- package/es/Table/store/createTableStore.d.mts +1 -1
- package/es/Table/type.d.mts +1 -2
- package/es/Tabs/Tabs.d.mts +1 -2
- package/es/Tabs/atoms.d.mts +1 -2
- package/es/Tabs/style.d.mts +1 -2
- package/es/Tabs/type.d.mts +1 -2
- package/es/Tag/Tag.d.mts +1 -2
- package/es/Tag/type.d.mts +1 -2
- package/es/Tag/utils.d.mts +1 -2
- package/es/Text/Text.d.mts +1 -2
- package/es/Text/style.d.mts +1 -2
- package/es/Text/type.d.mts +1 -2
- package/es/Toast/imperative.d.mts +1 -2
- package/es/Toast/type.d.mts +1 -2
- package/es/Toc/Toc.d.mts +1 -2
- package/es/Toc/toFlatTocItems.d.mts +1 -2
- package/es/Toc/tocPath.d.mts +1 -2
- package/es/Toc/type.d.mts +1 -2
- package/es/ToggleGroup/ToggleGroup.d.mts +1 -2
- package/es/ToggleGroup/atoms.d.mts +1 -2
- package/es/ToggleGroup/style.d.mts +1 -2
- package/es/ToggleGroup/type.d.mts +1 -2
- package/es/Tooltip/Tooltip.d.mts +1 -2
- package/es/Tooltip/TooltipGroup.d.mts +1 -2
- package/es/Tooltip/type.d.mts +8 -10
- package/es/Tree/Tree.d.mts +1 -2
- package/es/Tree/style.d.mts +1 -2
- package/es/Tree/type.d.mts +1 -2
- package/es/Tree/utils.d.mts +1 -2
- package/es/Upload/Upload.d.mts +1 -2
- package/es/Upload/Upload.mjs +5 -5
- package/es/Upload/Upload.mjs.map +1 -1
- package/es/Upload/UploadDragger.d.mts +1 -2
- package/es/Upload/type.d.mts +1 -2
- package/es/Video/index.d.mts +1 -2
- package/es/Video/parts/Caption.d.mts +1 -2
- package/es/Video/parts/CenterPlay.d.mts +1 -2
- package/es/Video/parts/Controls.d.mts +1 -2
- package/es/Video/parts/Frame.d.mts +1 -2
- package/es/Video/parts/LoadError.d.mts +1 -2
- package/es/Video/parts/Root.d.mts +1 -2
- package/es/Video/parts/SectionList.d.mts +1 -2
- package/es/Video/parts/Timeline.d.mts +1 -2
- package/es/Video/type.d.mts +1 -2
- package/es/Video/useVideo.d.mts +1 -2
- package/es/_virtual/_rolldown/runtime.mjs +4 -4
- package/es/awesome/AgentSkillCard/AgentSkillCard.d.mts +1 -2
- package/es/awesome/AgentSkillCard/agents.d.mts +1 -2
- package/es/awesome/AgentSkillCard/type.d.mts +1 -2
- package/es/awesome/AuroraBackground/AuroraBackground.d.mts +1 -2
- package/es/awesome/AuroraBackground/type.d.mts +1 -2
- package/es/awesome/BentoGrid/BentoCard.d.mts +1 -2
- package/es/awesome/BentoGrid/BentoGrid.d.mts +1 -2
- package/es/awesome/BentoGrid/type.d.mts +1 -2
- package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +1 -2
- package/es/awesome/BottomGradientButton/type.d.mts +1 -2
- package/es/awesome/CodeShowcase/CodeShowcase.d.mts +1 -2
- package/es/awesome/CodeShowcase/type.d.mts +1 -2
- package/es/awesome/FeatureGrid/FeatureGrid.d.mts +1 -2
- package/es/awesome/FeatureGrid/type.d.mts +1 -2
- package/es/awesome/Features/Features.d.mts +1 -2
- package/es/awesome/Features/type.d.mts +1 -2
- package/es/awesome/FluidGradient/FluidGradient.d.mts +1 -2
- package/es/awesome/FluidGradient/type.d.mts +1 -2
- package/es/awesome/Giscus/Giscus.d.mts +1 -2
- package/es/awesome/Giscus/type.d.mts +1 -2
- package/es/awesome/GradientButton/GradientButton.d.mts +1 -2
- package/es/awesome/GradientButton/type.d.mts +1 -2
- package/es/awesome/Grainient/Grainient.d.mts +1 -2
- package/es/awesome/Grainient/type.d.mts +1 -2
- package/es/awesome/GridBackground/GridBackground.d.mts +1 -2
- package/es/awesome/GridBackground/GridShowcase.d.mts +1 -2
- package/es/awesome/GridBackground/type.d.mts +1 -2
- package/es/awesome/Hero/Hero.d.mts +1 -2
- package/es/awesome/Hero/type.d.mts +1 -2
- package/es/awesome/InstallBanner/InstallBanner.d.mts +1 -2
- package/es/awesome/InstallBanner/type.d.mts +1 -2
- package/es/awesome/LandingHero/LandingHero.d.mts +1 -2
- package/es/awesome/LandingHero/type.d.mts +1 -2
- package/es/awesome/LandingSection/LandingSection.d.mts +1 -2
- package/es/awesome/LandingSection/type.d.mts +1 -2
- package/es/awesome/LogoMarquee/LogoMarquee.d.mts +1 -2
- package/es/awesome/LogoMarquee/type.d.mts +1 -2
- package/es/awesome/Spotlight/Spotlight.d.mts +1 -2
- package/es/awesome/Spotlight/type.d.mts +1 -2
- package/es/awesome/SpotlightCard/SpotlightCard.d.mts +1 -2
- package/es/awesome/SpotlightCard/type.d.mts +1 -2
- package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +1 -2
- package/es/awesome/TypewriterEffect/type.d.mts +1 -2
- package/es/awesome/landingActions.d.mts +1 -2
- package/es/awesome/landingLink.d.mts +1 -2
- package/es/awesome/landingTokens.d.mts +1 -2
- package/es/brand/BrandLoading/index.d.mts +1 -2
- package/es/brand/LobeChat/index.d.mts +1 -2
- package/es/brand/LobeChatText/index.d.mts +1 -2
- package/es/brand/LobeHub/index.d.mts +1 -2
- package/es/brand/LobeHubText/index.d.mts +1 -2
- package/es/brand/Logo3d/index.d.mts +1 -2
- package/es/brand/LogoFlat/index.d.mts +1 -2
- package/es/chat/BackBottom/BackBottom.d.mts +1 -2
- package/es/chat/BackBottom/type.d.mts +1 -2
- package/es/chat/ChatHeader/ChatHeaderTitle.d.mts +1 -2
- package/es/chat/ChatHeader/index.d.mts +1 -2
- package/es/chat/ChatHeader/type.d.mts +1 -2
- package/es/chat/ChatInputArea/components/ChatInputActionBar.d.mts +1 -2
- package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +1 -2
- package/es/chat/ChatInputArea/components/ChatSendButton.d.mts +1 -2
- package/es/chat/ChatInputArea/index.d.mts +1 -2
- package/es/chat/ChatInputArea/type.d.mts +1 -2
- package/es/chat/ChatItem/ChatItem.d.mts +1 -2
- package/es/chat/ChatItem/type.d.mts +1 -2
- package/es/chat/ChatList/ChatList.d.mts +1 -2
- package/es/chat/ChatList/components/ChatActionsBar.d.mts +1 -2
- package/es/chat/ChatList/type.d.mts +1 -2
- package/es/chat/EditableMessage/EditableMessage.d.mts +1 -2
- package/es/chat/EditableMessage/type.d.mts +1 -2
- package/es/chat/EditableMessageList/EditableMessageList.d.mts +1 -2
- package/es/chat/EditableMessageList/type.d.mts +1 -2
- package/es/chat/LoadingDots/LoadingDots.d.mts +1 -2
- package/es/chat/LoadingDots/type.d.mts +1 -2
- package/es/chat/MessageInput/MessageInput.d.mts +1 -2
- package/es/chat/MessageInput/type.d.mts +1 -2
- package/es/chat/MessageModal/MessageModal.d.mts +1 -2
- package/es/chat/MessageModal/type.d.mts +1 -2
- package/es/chat/TokenTag/TokenTag.d.mts +1 -2
- package/es/chat/TokenTag/type.d.mts +1 -2
- package/es/chat/types/chatMessage.d.mts +1 -2
- package/es/chat/types/error.d.mts +1 -2
- package/es/chat/types/llm.d.mts +1 -2
- package/es/chat/types/meta.d.mts +1 -2
- package/es/color/ColorScales/index.d.mts +1 -2
- package/es/color/CssVar/index.d.mts +1 -2
- package/es/color/colors/blue.d.mts +1 -2
- package/es/color/colors/cyan.d.mts +1 -2
- package/es/color/colors/geekblue.d.mts +1 -2
- package/es/color/colors/gold.d.mts +1 -2
- package/es/color/colors/gray.d.mts +1 -2
- package/es/color/colors/green.d.mts +1 -2
- package/es/color/colors/index.d.mts +1 -2
- package/es/color/colors/lime.d.mts +1 -2
- package/es/color/colors/magenta.d.mts +1 -2
- package/es/color/colors/orange.d.mts +1 -2
- package/es/color/colors/primary.d.mts +1 -2
- package/es/color/colors/purple.d.mts +1 -2
- package/es/color/colors/red.d.mts +1 -2
- package/es/color/colors/volcano.d.mts +1 -2
- package/es/color/colors/yellow.d.mts +1 -2
- package/es/color/neutrals/index.d.mts +1 -2
- package/es/color/neutrals/mauve.d.mts +1 -2
- package/es/color/neutrals/olive.d.mts +1 -2
- package/es/color/neutrals/sage.d.mts +1 -2
- package/es/color/neutrals/sand.d.mts +1 -2
- package/es/color/neutrals/slate.d.mts +1 -2
- package/es/color/status/index.d.mts +1 -2
- package/es/color/types.d.mts +1 -2
- package/es/dashboard/AuthLayout/Aside.d.mts +1 -2
- package/es/dashboard/AuthLayout/AuthLayout.d.mts +1 -2
- package/es/dashboard/AuthLayout/type.d.mts +1 -2
- package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +1 -2
- package/es/dashboard/AuthTools/AuthThemeSwitch.d.mts +1 -2
- package/es/dashboard/AuthTools/type.d.mts +1 -2
- package/es/dashboard/Breadcrumb/Breadcrumb.d.mts +1 -2
- package/es/dashboard/Breadcrumb/type.d.mts +1 -2
- package/es/dashboard/ChartGrid/ChartGrid.d.mts +1 -2
- package/es/dashboard/ChartGrid/type.d.mts +1 -2
- package/es/dashboard/ConsoleNav/ConsoleNav.d.mts +1 -2
- package/es/dashboard/ConsoleNav/Skeleton.d.mts +1 -2
- package/es/dashboard/ConsoleNav/active.d.mts +1 -2
- package/es/dashboard/ConsoleNav/type.d.mts +1 -2
- package/es/dashboard/ConsoleShell/ConsoleBrand.d.mts +1 -2
- package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -2
- package/es/dashboard/ConsoleShell/context.d.mts +1 -2
- package/es/dashboard/ConsoleShell/type.d.mts +1 -2
- package/es/dashboard/FilterSidebar/FilterSidebar.d.mts +1 -2
- package/es/dashboard/FilterSidebar/context.d.mts +2 -3
- package/es/dashboard/FilterSidebar/type.d.mts +1 -2
- package/es/dashboard/FilterStrip/FilterStrip.d.mts +1 -2
- package/es/dashboard/FilterStrip/type.d.mts +1 -2
- package/es/dashboard/LabelWithKey/LabelWithKey.d.mts +1 -2
- package/es/dashboard/LabelWithKey/type.d.mts +1 -2
- package/es/dashboard/MetricStrip/MetricStrip.d.mts +1 -2
- package/es/dashboard/MetricStrip/type.d.mts +1 -2
- package/es/dashboard/PageHeader/PageHeader.d.mts +1 -2
- package/es/dashboard/PageHeader/type.d.mts +1 -2
- package/es/dashboard/PageSkeleton/PageSkeleton.d.mts +1 -2
- package/es/dashboard/PageSkeleton/type.d.mts +1 -2
- package/es/dashboard/PageTabs/PageTabs.d.mts +1 -2
- package/es/dashboard/PageTabs/type.d.mts +1 -2
- package/es/dashboard/PageToolbar/PageToolbar.d.mts +1 -2
- package/es/dashboard/PageToolbar/type.d.mts +1 -2
- package/es/dashboard/PanelSurface/PanelSurface.d.mts +1 -2
- package/es/dashboard/PanelSurface/type.d.mts +1 -2
- package/es/dashboard/RouteProgress/RouteProgress.d.mts +1 -2
- package/es/dashboard/RouteProgress/type.d.mts +1 -2
- package/es/dashboard/Section/Section.d.mts +1 -2
- package/es/dashboard/Section/type.d.mts +1 -2
- package/es/dashboard/StatCard/StatCard.d.mts +1 -2
- package/es/dashboard/StatCard/type.d.mts +1 -2
- package/es/dashboard/Surface/Surface.d.mts +1 -2
- package/es/dashboard/Surface/link.d.mts +1 -2
- package/es/dashboard/Surface/style.d.mts +1 -2
- package/es/dashboard/Surface/type.d.mts +1 -2
- package/es/dashboard/TableIconActions/TableIconActions.d.mts +1 -2
- package/es/dashboard/TableIconActions/type.d.mts +1 -2
- package/es/dashboard/TitleWithTips/TitleWithTips.d.mts +1 -2
- package/es/dashboard/TitleWithTips/type.d.mts +1 -2
- package/es/eslint/index.d.mts +1 -2
- package/es/global.css +2 -2
- package/es/hooks/useMarkdown/utils.d.mts +1 -2
- package/es/hooks/useScroll.d.mts +1 -2
- package/es/i18n/context.d.mts +1 -2
- package/es/i18n/resources/en/burger.d.mts +1 -2
- package/es/i18n/resources/en/chat.d.mts +1 -2
- package/es/i18n/resources/en/colorPicker.d.mts +1 -2
- package/es/i18n/resources/en/common.d.mts +1 -2
- package/es/i18n/resources/en/datePicker.d.mts +1 -2
- package/es/i18n/resources/en/editableMessage.d.mts +1 -2
- package/es/i18n/resources/en/emojiPicker.d.mts +1 -2
- package/es/i18n/resources/en/form.d.mts +1 -2
- package/es/i18n/resources/en/hotkey.d.mts +1 -2
- package/es/i18n/resources/en/image.d.mts +1 -2
- package/es/i18n/resources/en/index.d.mts +1 -2
- package/es/i18n/resources/en/messageModal.d.mts +1 -2
- package/es/i18n/resources/en/qrCode.d.mts +1 -2
- package/es/i18n/resources/en/sideNav.d.mts +1 -2
- package/es/i18n/resources/en/table.d.mts +1 -2
- package/es/i18n/resources/en/toc.d.mts +1 -2
- package/es/i18n/resources/en/video.d.mts +1 -2
- package/es/i18n/resources/zhCn/burger.d.mts +1 -2
- package/es/i18n/resources/zhCn/chat.d.mts +1 -2
- package/es/i18n/resources/zhCn/colorPicker.d.mts +1 -2
- package/es/i18n/resources/zhCn/common.d.mts +1 -2
- package/es/i18n/resources/zhCn/datePicker.d.mts +1 -2
- package/es/i18n/resources/zhCn/editableMessage.d.mts +1 -2
- package/es/i18n/resources/zhCn/emojiPicker.d.mts +1 -2
- package/es/i18n/resources/zhCn/form.d.mts +1 -2
- package/es/i18n/resources/zhCn/hotkey.d.mts +1 -2
- package/es/i18n/resources/zhCn/image.d.mts +1 -2
- package/es/i18n/resources/zhCn/index.d.mts +1 -2
- package/es/i18n/resources/zhCn/messageModal.d.mts +1 -2
- package/es/i18n/resources/zhCn/qrCode.d.mts +1 -2
- package/es/i18n/resources/zhCn/sideNav.d.mts +1 -2
- package/es/i18n/resources/zhCn/table.d.mts +1 -2
- package/es/i18n/resources/zhCn/toc.d.mts +1 -2
- package/es/i18n/resources/zhCn/video.d.mts +1 -2
- package/es/i18n/types.d.mts +1 -2
- package/es/i18n/useTranslation.d.mts +1 -2
- package/es/icons/Auth0/components/Avatar.d.mts +1 -2
- package/es/icons/Auth0/components/Mono.d.mts +1 -2
- package/es/icons/Auth0/index.d.mts +1 -2
- package/es/icons/Authelia/components/Avatar.d.mts +1 -2
- package/es/icons/Authelia/components/Color.d.mts +1 -2
- package/es/icons/Authelia/components/Mono.d.mts +1 -2
- package/es/icons/Authelia/index.d.mts +1 -2
- package/es/icons/Authentik/components/Avatar.d.mts +1 -2
- package/es/icons/Authentik/components/Color.d.mts +1 -2
- package/es/icons/Authentik/components/Mono.d.mts +1 -2
- package/es/icons/Authentik/index.d.mts +1 -2
- package/es/icons/Casdoor/components/Avatar.d.mts +1 -2
- package/es/icons/Casdoor/components/Color.d.mts +1 -2
- package/es/icons/Casdoor/components/Mono.d.mts +1 -2
- package/es/icons/Casdoor/index.d.mts +1 -2
- package/es/icons/Clerk/components/Avatar.d.mts +1 -2
- package/es/icons/Clerk/components/Color.d.mts +1 -2
- package/es/icons/Clerk/components/Mono.d.mts +1 -2
- package/es/icons/Clerk/index.d.mts +1 -2
- package/es/icons/DingTalk/components/Avatar.d.mts +1 -2
- package/es/icons/DingTalk/components/Color.d.mts +1 -2
- package/es/icons/DingTalk/components/Mono.d.mts +1 -2
- package/es/icons/DingTalk/index.d.mts +1 -2
- package/es/icons/Discord/components/Avatar.d.mts +1 -2
- package/es/icons/Discord/components/Color.d.mts +1 -2
- package/es/icons/Discord/components/Mono.d.mts +1 -2
- package/es/icons/Discord/index.d.mts +1 -2
- package/es/icons/GoogleChat/components/Avatar.d.mts +1 -2
- package/es/icons/GoogleChat/components/Color.d.mts +1 -2
- package/es/icons/GoogleChat/components/Mono.d.mts +1 -2
- package/es/icons/GoogleChat/index.d.mts +1 -2
- package/es/icons/IMessage/components/Avatar.d.mts +1 -2
- package/es/icons/IMessage/components/Color.d.mts +1 -2
- package/es/icons/IMessage/components/Mono.d.mts +1 -2
- package/es/icons/IMessage/index.d.mts +1 -2
- package/es/icons/Lark/components/Avatar.d.mts +1 -2
- package/es/icons/Lark/components/Color.d.mts +1 -2
- package/es/icons/Lark/components/Mono.d.mts +1 -2
- package/es/icons/Lark/index.d.mts +1 -2
- package/es/icons/Line/components/Avatar.d.mts +1 -2
- package/es/icons/Line/components/Color.d.mts +1 -2
- package/es/icons/Line/components/Mono.d.mts +1 -2
- package/es/icons/Line/index.d.mts +1 -2
- package/es/icons/Logto/components/Avatar.d.mts +1 -2
- package/es/icons/Logto/components/Color.d.mts +1 -2
- package/es/icons/Logto/components/Mono.d.mts +1 -2
- package/es/icons/Logto/index.d.mts +1 -2
- package/es/icons/MicrosoftEntra/components/Avatar.d.mts +1 -2
- package/es/icons/MicrosoftEntra/components/Color.d.mts +1 -2
- package/es/icons/MicrosoftEntra/components/Mono.d.mts +1 -2
- package/es/icons/MicrosoftEntra/index.d.mts +1 -2
- package/es/icons/MicrosoftTeams/components/Avatar.d.mts +1 -2
- package/es/icons/MicrosoftTeams/components/Color.d.mts +1 -2
- package/es/icons/MicrosoftTeams/components/Mono.d.mts +1 -2
- package/es/icons/MicrosoftTeams/index.d.mts +1 -2
- package/es/icons/NextAuth/components/Avatar.d.mts +1 -2
- package/es/icons/NextAuth/components/Color.d.mts +1 -2
- package/es/icons/NextAuth/components/Mono.d.mts +1 -2
- package/es/icons/NextAuth/index.d.mts +1 -2
- package/es/icons/QQ/components/Avatar.d.mts +1 -2
- package/es/icons/QQ/components/Color.d.mts +1 -2
- package/es/icons/QQ/components/Mono.d.mts +1 -2
- package/es/icons/QQ/index.d.mts +1 -2
- package/es/icons/Slack/components/Avatar.d.mts +1 -2
- package/es/icons/Slack/components/Color.d.mts +1 -2
- package/es/icons/Slack/components/Mono.d.mts +1 -2
- package/es/icons/Slack/index.d.mts +1 -2
- package/es/icons/Telegram/components/Avatar.d.mts +1 -2
- package/es/icons/Telegram/components/Color.d.mts +1 -2
- package/es/icons/Telegram/components/Mono.d.mts +1 -2
- package/es/icons/Telegram/index.d.mts +1 -2
- package/es/icons/WeChat/components/Avatar.d.mts +1 -2
- package/es/icons/WeChat/components/Color.d.mts +1 -2
- package/es/icons/WeChat/components/Mono.d.mts +1 -2
- package/es/icons/WeChat/index.d.mts +1 -2
- package/es/icons/WhatsApp/components/Avatar.d.mts +1 -2
- package/es/icons/WhatsApp/components/Color.d.mts +1 -2
- package/es/icons/WhatsApp/components/Mono.d.mts +1 -2
- package/es/icons/WhatsApp/index.d.mts +1 -2
- package/es/icons/Zitadel/components/Avatar.d.mts +1 -2
- package/es/icons/Zitadel/components/Color.d.mts +1 -2
- package/es/icons/Zitadel/components/Mono.d.mts +1 -2
- package/es/icons/Zitadel/index.d.mts +1 -2
- package/es/icons/lucideExtra/AndroidIcon.d.mts +1 -2
- package/es/icons/lucideExtra/AppleIcon.d.mts +1 -2
- package/es/icons/lucideExtra/AppstoreIcon.d.mts +1 -2
- package/es/icons/lucideExtra/BotPromptIcon.d.mts +1 -2
- package/es/icons/lucideExtra/BrainOffIcon.d.mts +1 -2
- package/es/icons/lucideExtra/ChromeIcon.d.mts +1 -2
- package/es/icons/lucideExtra/CodepenIcon.d.mts +1 -2
- package/es/icons/lucideExtra/CodesandboxIcon.d.mts +1 -2
- package/es/icons/lucideExtra/CreateBotIcon.d.mts +1 -2
- package/es/icons/lucideExtra/DiscordIcon.d.mts +1 -2
- package/es/icons/lucideExtra/FacebookIcon.d.mts +1 -2
- package/es/icons/lucideExtra/FigmaIcon.d.mts +1 -2
- package/es/icons/lucideExtra/FramerIcon.d.mts +1 -2
- package/es/icons/lucideExtra/GithubIcon.d.mts +1 -2
- package/es/icons/lucideExtra/GitlabIcon.d.mts +1 -2
- package/es/icons/lucideExtra/GlobeOffIcon.d.mts +1 -2
- package/es/icons/lucideExtra/GooglePlayIcon.d.mts +1 -2
- package/es/icons/lucideExtra/GroupBotIcon.d.mts +1 -2
- package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +1 -2
- package/es/icons/lucideExtra/InstagramIcon.d.mts +1 -2
- package/es/icons/lucideExtra/LeftClickIcon.d.mts +1 -2
- package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +1 -2
- package/es/icons/lucideExtra/LinkedinIcon.d.mts +1 -2
- package/es/icons/lucideExtra/McpIcon.d.mts +1 -2
- package/es/icons/lucideExtra/NotionIcon.d.mts +1 -2
- package/es/icons/lucideExtra/PocketIcon.d.mts +1 -2
- package/es/icons/lucideExtra/ProviderIcon.d.mts +1 -2
- package/es/icons/lucideExtra/RailSymbolIcon.d.mts +1 -2
- package/es/icons/lucideExtra/RedditIcon.d.mts +1 -2
- package/es/icons/lucideExtra/RightClickIcon.d.mts +1 -2
- package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +1 -2
- package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +1 -2
- package/es/icons/lucideExtra/SkillsIcon.d.mts +1 -2
- package/es/icons/lucideExtra/SlackIcon.d.mts +1 -2
- package/es/icons/lucideExtra/ThinkIcon.d.mts +1 -2
- package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +1 -2
- package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +1 -2
- package/es/internal/controlSize.d.mts +1 -2
- package/es/internal/floating/collisionPadding.d.mts +1 -2
- package/es/internal/menu/baseItem.d.mts +1 -2
- package/es/internal/menu/checkboxItem.d.mts +1 -2
- package/es/internal/menu/itemInterface.d.mts +1 -2
- package/es/internal/menu/renderUtils.d.mts +1 -2
- package/es/internal/menu/switchItem.d.mts +1 -2
- package/es/internal/menu/type.d.mts +1 -2
- package/es/internal/virtual/MenuVirtualList.d.mts +1 -1
- package/es/internal/virtual/VirtualScrollArea.d.mts +1 -1
- package/es/internal/virtual/type.d.mts +1 -2
- package/es/internal/virtual/useMenuVirtualList.d.mts +1 -1
- package/es/mdx/Callout/index.d.mts +1 -2
- package/es/mdx/Cards/Card.d.mts +1 -2
- package/es/mdx/Cards/index.d.mts +1 -2
- package/es/mdx/FileTree/File.d.mts +1 -2
- package/es/mdx/FileTree/File.mjs +3 -3
- package/es/mdx/FileTree/File.mjs.map +1 -1
- package/es/mdx/FileTree/Folder.d.mts +1 -2
- package/es/mdx/FileTree/Folder.mjs +3 -3
- package/es/mdx/FileTree/Folder.mjs.map +1 -1
- package/es/mdx/FileTree/index.d.mts +1 -2
- package/es/mdx/Mdx/index.d.mts +1 -2
- package/es/mdx/Steps/index.d.mts +1 -2
- package/es/mdx/Tabs/Tab.d.mts +1 -2
- package/es/mdx/Tabs/index.d.mts +1 -2
- package/es/mdx/mdxComponents/CodeBlock.d.mts +1 -2
- package/es/mdx/mdxComponents/Image.d.mts +1 -2
- package/es/mdx/mdxComponents/Link.d.mts +1 -2
- package/es/mdx/mdxComponents/Pre.d.mts +1 -2
- package/es/mdx/mdxComponents/Video.d.mts +1 -2
- package/es/mdx/mdxComponents/index.d.mts +1 -2
- package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +1 -2
- package/es/mobile/ChatHeader/index.d.mts +1 -2
- package/es/mobile/ChatHeader/type.d.mts +1 -2
- package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +1 -2
- package/es/mobile/ChatInputArea/index.d.mts +1 -2
- package/es/mobile/ChatInputArea/type.d.mts +1 -2
- package/es/mobile/SafeArea/SafeArea.d.mts +1 -2
- package/es/mobile/SafeArea/type.d.mts +1 -2
- package/es/mobile/TabBar/TabBar.d.mts +1 -2
- package/es/mobile/TabBar/type.d.mts +1 -2
- package/es/node_modules/.pnpm/@eslint_core@1.2.1/node_modules/@eslint/core/dist/esm/types.d.mts +4 -2
- package/es/node_modules/.pnpm/@eslint_plugin-kit@0.7.3/node_modules/@eslint/plugin-kit/dist/cjs/index.d.mts +1 -2
- package/es/node_modules/.pnpm/@eslint_plugin-kit@0.7.3/node_modules/@eslint/plugin-kit/dist/cjs/types.d.mts +5 -2
- package/es/node_modules/.pnpm/@types_estree@1.0.10/node_modules/@types/estree/index.d.mts +1 -2
- package/es/node_modules/.pnpm/@types_json-schema@7.0.15/node_modules/@types/json-schema/index.d.mts +1 -2
- package/es/node_modules/.pnpm/@types_mdx@2.0.14/node_modules/@types/mdx/types.d.mts +1 -2
- package/es/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.mts +1 -2
- package/es/node_modules/.pnpm/eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2/node_modules/eslint/lib/types/index.d.mts +5 -2
- package/es/node_modules/.pnpm/unist-util-visit@5.2.0/node_modules/unist-util-visit/lib/index.mjs +2 -2
- package/es/spline/LogoThree/LogoSpline.d.mts +1 -2
- package/es/spline/LogoThree/index.d.mts +1 -2
- package/es/spline/Spline/Spine.d.mts +2 -3
- package/es/spline/Spline/type.d.mts +1 -2
- package/es/storybook/StoryBook/index.d.mts +1 -2
- package/es/styles/classNames.d.mts +1 -2
- package/es/styles/createGlobalStyle.d.mts +1 -2
- package/es/styles/css.d.mts +1 -2
- package/es/styles/customTheme.d.mts +1 -2
- package/es/styles/stylex/props.d.mts +1 -1
- package/es/styles/theme/createLobeToken.d.mts +1 -2
- package/es/styles/theme/customNeutral.d.mts +1 -2
- package/es/styles/theme/customPalette.d.mts +1 -2
- package/es/styles/theme/customPrimary.d.mts +1 -2
- package/es/styles/theme/customStylishStatic.d.mts +1 -2
- package/es/styles/theme/generateColorPalette.d.mts +1 -2
- package/es/styles/theme/scope.d.mts +1 -2
- package/es/styles/theme/themeCss.d.mts +1 -2
- package/es/styles/theme/themeCss.mjs +2 -2
- package/es/styles/theme/themeCss.mjs.map +1 -1
- package/es/styles/theme/token/font.d.mts +1 -2
- package/es/styles/theme/token/neutralText.d.mts +1 -2
- package/es/types/citation.d.mts +1 -2
- package/es/types/customStylish.d.mts +1 -2
- package/es/types/customToken.d.mts +1 -2
- package/es/types/index.d.mts +1 -2
- package/es/types/trigger.d.mts +1 -2
- package/es/utils/copyToClipboard.d.mts +1 -2
- package/es/utils/dom.d.mts +1 -2
- package/es/utils/genCdnUrl.d.mts +1 -2
- package/es/utils/parseTrigger.d.mts +1 -2
- package/es/utils/placement.d.mts +1 -2
- package/es/utils/smoothCorners.d.mts +2 -3
- package/package.json +1 -1
- package/es/MaterialFileTypeIcon/icon-map.mjs.map +0 -1
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export declare const useAppElement: () => HTMLDivElement | null;
|
|
2
|
-
//# sourceMappingURL=AppElementContext.d.mts.map
|
|
1
|
+
export declare const useAppElement: () => HTMLDivElement | null;
|
|
@@ -27,5 +27,4 @@ declare const ConfigProvider: import("react").NamedExoticComponent<ConfigProvide
|
|
|
27
27
|
export declare const useDirection: () => Direction;
|
|
28
28
|
export type CdnFn = ({ pkg, version, path }: CdnApi) => string;
|
|
29
29
|
export declare const useCdnFn: () => CdnFn;
|
|
30
|
-
export { ConfigProvider as default, useAppElement };
|
|
31
|
-
//# sourceMappingURL=index.d.mts.map
|
|
30
|
+
export { ConfigProvider as default, useAppElement };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export declare const ContextMenuHost: import("react").MemoExoticComponent<() => import("react").JSX.Element | null>;
|
|
2
|
-
//# sourceMappingURL=ContextMenuHost.d.mts.map
|
|
1
|
+
export declare const ContextMenuHost: import("react").MemoExoticComponent<() => import("react").JSX.Element | null>;
|
|
@@ -22,5 +22,4 @@ export type ContextMenuTriggerProps = Pick<VirtualListProps, 'virtual' | 'listIt
|
|
|
22
22
|
*/
|
|
23
23
|
onContextMenu?: (event: MouseEvent<HTMLElement>) => void;
|
|
24
24
|
} & Omit<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'children'>;
|
|
25
|
-
export declare const ContextMenuTrigger: React.NamedExoticComponent<ContextMenuTriggerProps>;
|
|
26
|
-
//# sourceMappingURL=ContextMenuTrigger.d.mts.map
|
|
25
|
+
export declare const ContextMenuTrigger: React.NamedExoticComponent<ContextMenuTriggerProps>;
|
|
@@ -29,5 +29,4 @@ export declare const showContextMenu: (items: ContextMenuItem[], options?: ShowC
|
|
|
29
29
|
* Useful for interactive menu items (e.g. checkbox) to avoid re-positioning.
|
|
30
30
|
*/
|
|
31
31
|
export declare const updateContextMenuItems: (items: ContextMenuItem[]) => void;
|
|
32
|
-
export declare const closeContextMenu: () => void;
|
|
33
|
-
//# sourceMappingURL=store.d.mts.map
|
|
32
|
+
export declare const closeContextMenu: () => void;
|
|
@@ -4,5 +4,4 @@ import { BaseMenuItemType } from "../internal/menu/baseItem.mjs";
|
|
|
4
4
|
import "../internal/menu/index.mjs";
|
|
5
5
|
export type ContextMenuCheckboxItem = MenuCheckboxItemType;
|
|
6
6
|
export type ContextMenuSwitchItem = MenuSwitchItemType;
|
|
7
|
-
export type ContextMenuItem = BaseMenuItemType;
|
|
8
|
-
//# sourceMappingURL=type.d.mts.map
|
|
7
|
+
export type ContextMenuItem = BaseMenuItemType;
|
package/es/CopyButton/type.d.mts
CHANGED
|
@@ -7,5 +7,4 @@ import { DatePickerType } from "./type.mjs";
|
|
|
7
7
|
* and `generatePicker`. For the antd `Dayjs` API use `DayjsDatePicker`.
|
|
8
8
|
*/
|
|
9
9
|
declare const DatePicker: DatePickerType;
|
|
10
|
-
export { DatePicker as default };
|
|
11
|
-
//# sourceMappingURL=DatePicker.d.mts.map
|
|
10
|
+
export { DatePicker as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RangePickerComponent } from "./type.mjs";
|
|
2
2
|
/** `DatePicker.RangePicker`, kept as a standalone export. */
|
|
3
3
|
declare const DateRangePicker: RangePickerComponent<Date>;
|
|
4
|
-
export { DateRangePicker as default };
|
|
5
|
-
//# sourceMappingURL=DateRangePicker.d.mts.map
|
|
4
|
+
export { DateRangePicker as default };
|
|
@@ -6,5 +6,4 @@ import { DayjsDatePickerType } from "./type.mjs";
|
|
|
6
6
|
* The default `DatePicker` export works with native `Date` (the previous lobe API).
|
|
7
7
|
*/
|
|
8
8
|
declare const DayjsDatePicker: DayjsDatePickerType;
|
|
9
|
-
export { DayjsDatePicker as default };
|
|
10
|
-
//# sourceMappingURL=DayjsDatePicker.d.mts.map
|
|
9
|
+
export { DayjsDatePicker as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RangePickerComponent } from "./type.mjs";
|
|
2
2
|
/** `DayjsDatePicker.RangePicker` (values are `Dayjs`), kept as a standalone export. */
|
|
3
3
|
declare const DayjsDateRangePicker: RangePickerComponent<import("dayjs").Dayjs>;
|
|
4
|
-
export { DayjsDateRangePicker as default };
|
|
5
|
-
//# sourceMappingURL=DayjsDateRangePicker.d.mts.map
|
|
4
|
+
export { DayjsDateRangePicker as default };
|
|
@@ -2,12 +2,12 @@ import useTimeInfo from "../../hooks/useTimeInfo.mjs";
|
|
|
2
2
|
import { isReactRenderable } from "../../utils/common.mjs";
|
|
3
3
|
import PickerContext from "../context.mjs";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
|
-
import * as React
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
// src/DatePicker/core/PickerInput/Popup/Footer.tsx
|
|
8
8
|
function Footer(props) {
|
|
9
9
|
const { mode, internalMode, renderExtraFooter, showNow, showTime, onSubmit, onNow, invalid, needConfirm, generateConfig, disabledDate } = props;
|
|
10
|
-
const { prefixCls, locale, button: Button = "button", classNames, styles } = React
|
|
10
|
+
const { prefixCls, locale, button: Button = "button", classNames, styles } = React.use(PickerContext);
|
|
11
11
|
const now = generateConfig.getNow();
|
|
12
12
|
const [getValidTime] = useTimeInfo(generateConfig, showTime, now);
|
|
13
13
|
const extraNode = renderExtraFooter?.(mode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.mjs","names":[
|
|
1
|
+
{"version":3,"file":"Footer.mjs","names":[],"sources":["../../../../../src/DatePicker/core/PickerInput/Popup/Footer.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport * as React from 'react';\n\nimport type { GenerateConfig } from '../../generate';\nimport useTimeInfo from '../../hooks/useTimeInfo';\nimport type { DisabledDate, InternalMode, PanelMode, SharedPickerProps } from '../../interface';\nimport { isReactRenderable } from '../../utils/common';\nimport PickerContext from '../context';\nimport type { PopupShowTimeConfig } from '.';\n\nexport interface FooterProps<DateType extends object = any> {\n disabledDate: DisabledDate<DateType>;\n generateConfig: GenerateConfig<DateType>;\n internalMode: InternalMode;\n // Invalid\n /** From Footer component used only. Check if can OK button click */\n invalid?: boolean;\n mode: PanelMode;\n needConfirm: boolean;\n // Now\n onNow: (now: DateType) => void;\n\n // Submit\n onSubmit: (date?: DateType) => void;\n\n renderExtraFooter?: SharedPickerProps['renderExtraFooter'];\n showNow: boolean;\n\n showTime?: PopupShowTimeConfig<DateType> | null;\n}\n\nexport default function Footer(props: FooterProps) {\n const {\n mode,\n internalMode,\n renderExtraFooter,\n showNow,\n showTime,\n onSubmit,\n onNow,\n invalid,\n needConfirm,\n generateConfig,\n disabledDate,\n } = props;\n\n const {\n prefixCls,\n locale,\n button: Button = 'button',\n classNames,\n styles,\n } = React.use(PickerContext);\n\n // >>> Now\n const now = generateConfig.getNow();\n\n const [getValidTime] = useTimeInfo(generateConfig, showTime, now);\n\n // ======================== Extra =========================\n const extraNode = renderExtraFooter?.(mode);\n\n // ======================== Ranges ========================\n const nowDisabled = disabledDate(now, {\n type: mode,\n });\n\n const onInternalNow = () => {\n if (!nowDisabled) {\n const validateNow = getValidTime(now);\n onNow(validateNow);\n }\n };\n\n const nowPrefixCls = `${prefixCls}-now`;\n const nowBtnPrefixCls = `${nowPrefixCls}-btn`;\n\n const presetNode = showNow && (\n <li className={nowPrefixCls}>\n <a\n aria-disabled={nowDisabled}\n className={clsx(nowBtnPrefixCls, nowDisabled && `${nowBtnPrefixCls}-disabled`)}\n onClick={onInternalNow}\n >\n {internalMode === 'date' ? locale.today : locale.now}\n </a>\n </li>\n );\n\n // >>> OK\n const okNode = needConfirm && (\n <li className={`${prefixCls}-ok`}>\n <Button disabled={invalid} onClick={onSubmit}>\n {locale.ok}\n </Button>\n </li>\n );\n\n const rangeNode = (presetNode || okNode) && (\n <ul className={`${prefixCls}-ranges`}>\n {presetNode}\n {okNode}\n </ul>\n );\n\n // ======================== Render ========================\n if (!isReactRenderable(extraNode) && !isReactRenderable(rangeNode)) {\n return null;\n }\n\n return (\n <div\n className={clsx(`${prefixCls}-footer`, classNames.popup.footer)}\n style={styles.popup.footer}\n >\n {isReactRenderable(extraNode) && (\n <div className={`${prefixCls}-footer-extra`}>{extraNode}</div>\n )}\n {rangeNode}\n </div>\n );\n}\n"],"mappings":";;;;;;;AA+BA,SAAwB,OAAO,OAAoB;CACjD,MAAM,EACJ,MACA,cACA,mBACA,SACA,UACA,UACA,OACA,SACA,aACA,gBACA,iBACE;CAEJ,MAAM,EACJ,WACA,QACA,QAAQ,SAAS,UACjB,YACA,WACE,MAAM,IAAI,aAAa;CAG3B,MAAM,MAAM,eAAe,OAAO;CAElC,MAAM,CAAC,gBAAgB,YAAY,gBAAgB,UAAU,GAAG;CAGhE,MAAM,YAAY,oBAAoB,IAAI;CAG1C,MAAM,cAAc,aAAa,KAAK,EACpC,MAAM,KACR,CAAC;CAED,MAAM,sBAAsB;EAC1B,IAAI,CAAC,aAAa;GAChB,MAAM,cAAc,aAAa,GAAG;GACpC,MAAM,WAAW;EACnB;CACF;CAEA,MAAM,eAAe,GAAG,UAAU;CAClC,MAAM,kBAAkB,GAAG,aAAa;CAExC,MAAM,aAAa,WACjB,oBAAC,MAAD;EAAI,WAAW;EACb,UAAA,oBAAC,KAAD;GACE,iBAAe;GACf,WAAW,KAAK,iBAAiB,eAAe,GAAG,gBAAgB,UAAU;GAC7E,SAAS;GAER,UAAA,iBAAiB,SAAS,OAAO,QAAQ,OAAO;EAChD,CAAA;CACD,CAAA;CAIN,MAAM,SAAS,eACb,oBAAC,MAAD;EAAI,WAAW,GAAG,UAAU;EAC1B,UAAA,oBAAC,QAAD;GAAQ,UAAU;GAAS,SAAS;GACjC,UAAA,OAAO;EACF,CAAA;CACN,CAAA;CAGN,MAAM,aAAa,cAAc,WAC/B,qBAAC,MAAD;EAAI,WAAW,GAAG,UAAU;EAA5B,UAAA,CACG,YACA,MACC;;CAIN,IAAI,CAAC,kBAAkB,SAAS,KAAK,CAAC,kBAAkB,SAAS,GAC/D,OAAO;CAGT,OACE,qBAAC,OAAD;EACE,WAAW,KAAK,GAAG,UAAU,UAAU,WAAW,MAAM,MAAM;EAC9D,OAAO,OAAO,MAAM;EAFtB,UAAA,CAIG,kBAAkB,SAAS,KAC1B,oBAAC,OAAD;GAAK,WAAW,GAAG,UAAU;GAAiB,UAAA;EAAe,CAAA,GAE9D,SACE;;AAET"}
|
|
@@ -2,16 +2,16 @@ import RefPanelPicker from "../../PickerPanel/index.mjs";
|
|
|
2
2
|
import { PickerHackContext } from "../../PickerPanel/context.mjs";
|
|
3
3
|
import PickerContext from "../context.mjs";
|
|
4
4
|
import { offsetPanelDate } from "../hooks/useRangePickerValue.mjs";
|
|
5
|
-
import * as React
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
// src/DatePicker/core/PickerInput/Popup/PopupPanel.tsx
|
|
8
8
|
function PopupPanel(props) {
|
|
9
9
|
const { picker, multiplePanel, pickerValue, onPickerValueChange, needConfirm, onSubmit, range, hoverValue, hoverRangeValue } = props;
|
|
10
|
-
const { prefixCls, generateConfig } = React
|
|
11
|
-
const internalOffsetDate = React
|
|
10
|
+
const { prefixCls, generateConfig } = React.use(PickerContext);
|
|
11
|
+
const internalOffsetDate = React.useCallback((date, offset) => {
|
|
12
12
|
return offsetPanelDate(generateConfig, picker, date, offset);
|
|
13
13
|
}, [generateConfig, picker]);
|
|
14
|
-
const nextPickerValue = React
|
|
14
|
+
const nextPickerValue = React.useMemo(() => internalOffsetDate(pickerValue, 1), [pickerValue, internalOffsetDate]);
|
|
15
15
|
const onSecondPickerValueChange = (nextDate) => {
|
|
16
16
|
onPickerValueChange(internalOffsetDate(nextDate, -1));
|
|
17
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupPanel.mjs","names":["
|
|
1
|
+
{"version":3,"file":"PopupPanel.mjs","names":["PickerPanel"],"sources":["../../../../../src/DatePicker/core/PickerInput/Popup/PopupPanel.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport PickerPanel, { type PickerPanelProps } from '../../PickerPanel';\nimport { PickerHackContext, type PickerHackContextProps } from '../../PickerPanel/context';\nimport PickerContext from '../context';\nimport { offsetPanelDate } from '../hooks/useRangePickerValue';\nimport { type FooterProps } from './Footer';\n\nexport type MustProp<DateType extends object> = Required<\n Pick<PickerPanelProps<DateType>, 'mode' | 'onPanelChange'>\n>;\n\nexport type PopupPanelProps<DateType extends object = any> = MustProp<DateType> &\n Omit<PickerPanelProps<DateType>, 'onPickerValueChange' | 'showTime'> &\n FooterProps<DateType> & {\n multiplePanel?: boolean;\n range?: boolean;\n\n onPickerValueChange: (date: DateType) => void;\n };\n\nexport default function PopupPanel<DateType extends object = any>(\n props: PopupPanelProps<DateType>,\n) {\n const {\n picker,\n multiplePanel,\n pickerValue,\n onPickerValueChange,\n needConfirm,\n onSubmit,\n range,\n hoverValue,\n hoverRangeValue,\n } = props;\n const { prefixCls, generateConfig } = React.use(PickerContext);\n\n // ======================== Offset ========================\n const internalOffsetDate = React.useCallback(\n (date: DateType, offset: number) => {\n return offsetPanelDate(generateConfig, picker!, date, offset);\n },\n [generateConfig, picker],\n );\n\n const nextPickerValue = React.useMemo(\n () => internalOffsetDate(pickerValue!, 1),\n [pickerValue, internalOffsetDate],\n );\n\n // Outside\n const onSecondPickerValueChange = (nextDate: DateType) => {\n onPickerValueChange(internalOffsetDate(nextDate, -1));\n };\n\n // ======================= Context ========================\n const sharedContext: PickerHackContextProps = {\n onCellDblClick: () => {\n if (needConfirm) {\n onSubmit();\n }\n },\n };\n\n const hideHeader = picker === 'time';\n\n // ======================== Props =========================\n const pickerProps: PickerPanelProps<DateType> = {\n ...props,\n hoverRangeValue: null,\n hideHeader,\n hoverValue,\n };\n\n if (range) {\n pickerProps.hoverRangeValue = hoverRangeValue;\n }\n\n // ======================== Render ========================\n // Multiple\n if (multiplePanel) {\n return (\n <div className={`${prefixCls}-panels`}>\n <PickerHackContext\n value={{\n ...sharedContext,\n hideNext: true,\n }}\n >\n <PickerPanel<DateType> {...pickerProps} />\n </PickerHackContext>\n <PickerHackContext\n value={{\n ...sharedContext,\n hidePrev: true,\n }}\n >\n <PickerPanel<DateType>\n {...pickerProps}\n pickerValue={nextPickerValue}\n onPickerValueChange={onSecondPickerValueChange}\n />\n </PickerHackContext>\n </div>\n );\n }\n\n // Single\n return (\n <PickerHackContext\n value={{\n ...sharedContext,\n }}\n >\n <PickerPanel {...pickerProps} />\n </PickerHackContext>\n );\n}\n"],"mappings":";;;;;;;AAqBA,SAAwB,WACtB,OACA;CACA,MAAM,EACJ,QACA,eACA,aACA,qBACA,aACA,UACA,OACA,YACA,oBACE;CACJ,MAAM,EAAE,WAAW,mBAAmB,MAAM,IAAI,aAAa;CAG7D,MAAM,qBAAqB,MAAM,aAC9B,MAAgB,WAAmB;EAClC,OAAO,gBAAgB,gBAAgB,QAAS,MAAM,MAAM;CAC9D,GACA,CAAC,gBAAgB,MAAM,CACzB;CAEA,MAAM,kBAAkB,MAAM,cACtB,mBAAmB,aAAc,CAAC,GACxC,CAAC,aAAa,kBAAkB,CAClC;CAGA,MAAM,6BAA6B,aAAuB;EACxD,oBAAoB,mBAAmB,UAAU,EAAE,CAAC;CACtD;CAGA,MAAM,gBAAwC,EAC5C,sBAAsB;EACpB,IAAI,aACF,SAAS;CAEb,EACF;CAEA,MAAM,aAAa,WAAW;CAG9B,MAAM,cAA0C;EAC9C,GAAG;EACH,iBAAiB;EACjB;EACA;CACF;CAEA,IAAI,OACF,YAAY,kBAAkB;CAKhC,IAAI,eACF,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,UAAU;EAA7B,UAAA,CACE,oBAAC,mBAAD;GACE,OAAO;IACL,GAAG;IACH,UAAU;GACZ;GAEA,UAAA,oBAACA,gBAAD,EAAuB,GAAI,YAAc,CAAA;EACxB,CAAA,GACnB,oBAAC,mBAAD;GACE,OAAO;IACL,GAAG;IACH,UAAU;GACZ;GAEA,UAAA,oBAACA,gBAAD;IACE,GAAI;IACJ,aAAa;IACb,qBAAqB;GACtB,CAAA;EACgB,CAAA,CAChB;;CAKT,OACE,oBAAC,mBAAD;EACE,OAAO,EACL,GAAG,cACL;EAEA,UAAA,oBAACA,gBAAD,EAAa,GAAI,YAAc,CAAA;CACd,CAAA;AAEvB"}
|
|
@@ -6,7 +6,7 @@ import Footer from "./Footer.mjs";
|
|
|
6
6
|
import PopupPanel from "./PopupPanel.mjs";
|
|
7
7
|
import PresetPanel from "./PresetPanel.mjs";
|
|
8
8
|
import { clsx } from "clsx";
|
|
9
|
-
import * as React
|
|
9
|
+
import * as React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
// src/DatePicker/core/PickerInput/Popup/index.tsx
|
|
12
12
|
function Popup(props) {
|
|
@@ -15,25 +15,25 @@ function Popup(props) {
|
|
|
15
15
|
0,
|
|
16
16
|
0
|
|
17
17
|
], presets, onPresetHover, onPresetSubmit, onFocus, onBlur, onPanelMouseDown, direction, value, onSelect, isInvalid, defaultOpenValue, onOk, onSubmit, classNames, styles } = props;
|
|
18
|
-
const { prefixCls } = React
|
|
18
|
+
const { prefixCls } = React.use(PickerContext);
|
|
19
19
|
const panelPrefixCls = `${prefixCls}-panel`;
|
|
20
20
|
const rtl = direction === "rtl";
|
|
21
|
-
const arrowRef = React
|
|
22
|
-
const wrapperRef = React
|
|
23
|
-
const panelContainerRef = React
|
|
21
|
+
const arrowRef = React.useRef(null);
|
|
22
|
+
const wrapperRef = React.useRef(null);
|
|
23
|
+
const panelContainerRef = React.useRef(null);
|
|
24
24
|
const mergedContainerRef = useMergeRefs([containerRef, panelContainerRef]);
|
|
25
|
-
const [containerWidth, setContainerWidth] = React
|
|
26
|
-
const [containerOffset, setContainerOffset] = React
|
|
27
|
-
const [arrowOffset, setArrowOffset] = React
|
|
25
|
+
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
26
|
+
const [containerOffset, setContainerOffset] = React.useState(0);
|
|
27
|
+
const [arrowOffset, setArrowOffset] = React.useState(0);
|
|
28
28
|
useResizeObserver(panelContainerRef, (element) => {
|
|
29
29
|
if (element.offsetWidth) setContainerWidth(element.offsetWidth);
|
|
30
30
|
}, !!range);
|
|
31
31
|
const [activeInputLeft, activeInputRight, selectorWidth] = activeInfo;
|
|
32
|
-
const [retryTimes, setRetryTimes] = React
|
|
33
|
-
React
|
|
32
|
+
const [retryTimes, setRetryTimes] = React.useState(0);
|
|
33
|
+
React.useEffect(() => {
|
|
34
34
|
setRetryTimes(10);
|
|
35
35
|
}, [activeInputLeft]);
|
|
36
|
-
React
|
|
36
|
+
React.useEffect(() => {
|
|
37
37
|
if (range && wrapperRef.current) {
|
|
38
38
|
const arrowWidth = arrowRef.current?.offsetWidth || 0;
|
|
39
39
|
const wrapperRect = wrapperRef.current.getBoundingClientRect();
|
|
@@ -60,9 +60,9 @@ function Popup(props) {
|
|
|
60
60
|
function filterEmpty(list) {
|
|
61
61
|
return list.filter((item) => item);
|
|
62
62
|
}
|
|
63
|
-
const valueList = React
|
|
63
|
+
const valueList = React.useMemo(() => filterEmpty(toArray(value)), [value]);
|
|
64
64
|
const isTimePickerEmptyValue = picker === "time" && !valueList.length;
|
|
65
|
-
const footerSubmitValue = React
|
|
65
|
+
const footerSubmitValue = React.useMemo(() => {
|
|
66
66
|
if (isTimePickerEmptyValue) return filterEmpty([defaultOpenValue]);
|
|
67
67
|
return valueList;
|
|
68
68
|
}, [
|
|
@@ -71,7 +71,7 @@ function Popup(props) {
|
|
|
71
71
|
defaultOpenValue
|
|
72
72
|
]);
|
|
73
73
|
const popupPanelValue = isTimePickerEmptyValue ? defaultOpenValue : valueList;
|
|
74
|
-
const disableSubmit = React
|
|
74
|
+
const disableSubmit = React.useMemo(() => {
|
|
75
75
|
if (!footerSubmitValue.length) return true;
|
|
76
76
|
return footerSubmitValue.some((val) => isInvalid(val));
|
|
77
77
|
}, [footerSubmitValue, isInvalid]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["React"],"sources":["../../../../../src/DatePicker/core/PickerInput/Popup/index.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport * as React from 'react';\n\nimport { useMergeRefs } from '@/utils/mergeRefs';\n\nimport { useResizeObserver } from '../../hooks/react';\nimport type {\n RangeTimeProps,\n SharedPickerProps,\n SharedTimeProps,\n ValueDate,\n} from '../../interface';\nimport { toArray } from '../../utils/miscUtil';\nimport PickerContext from '../context';\nimport Footer, { type FooterProps } from './Footer';\nimport PopupPanel, { type PopupPanelProps } from './PopupPanel';\nimport PresetPanel from './PresetPanel';\n\nexport type PopupShowTimeConfig<DateType extends object = any> = Omit<\n RangeTimeProps<DateType>,\n 'defaultValue' | 'defaultOpenValue' | 'disabledTime'\n> &\n Pick<SharedTimeProps<DateType>, 'disabledTime'>;\n\nexport interface PopupProps<DateType extends object = any, PresetValue = DateType>\n extends\n Pick<React.InputHTMLAttributes<HTMLDivElement>, 'onFocus' | 'onBlur'>,\n FooterProps<DateType>,\n PopupPanelProps<DateType> {\n // Range\n activeInfo?: [activeInputLeft: number, activeInputRight: number, selectorWidth: number];\n classNames?: SharedPickerProps['classNames'];\n\n containerRef?: React.Ref<HTMLDivElement>;\n // Fill\n /** TimePicker or showTime only */\n defaultOpenValue: DateType;\n // Direction\n direction?: 'ltr' | 'rtl';\n\n isInvalid: (date: DateType | DateType[]) => boolean;\n // Change\n needConfirm: boolean;\n\n onOk: VoidFunction;\n\n onPanelMouseDown?: React.MouseEventHandler<HTMLDivElement>;\n onPresetHover: (presetValue: PresetValue) => void;\n onPresetSubmit: (presetValue: PresetValue) => void;\n\n panelRender?: SharedPickerProps['panelRender'];\n\n // Presets\n presets: ValueDate<DateType>[];\n styles?: SharedPickerProps['styles'];\n}\n\nexport default function Popup<DateType extends object = any>(props: PopupProps<DateType>) {\n const {\n containerRef,\n panelRender,\n internalMode,\n picker,\n showNow,\n\n // Range\n range,\n multiple,\n activeInfo = [0, 0, 0],\n\n // Presets\n presets,\n onPresetHover,\n onPresetSubmit,\n\n // Focus\n onFocus,\n onBlur,\n onPanelMouseDown,\n\n // Direction\n direction,\n\n // Change\n value,\n onSelect,\n isInvalid,\n defaultOpenValue,\n onOk,\n onSubmit,\n classNames,\n styles,\n } = props;\n\n const { prefixCls } = React.use(PickerContext);\n const panelPrefixCls = `${prefixCls}-panel`;\n\n const rtl = direction === 'rtl';\n\n // ========================= Refs =========================\n const arrowRef = React.useRef<HTMLDivElement>(null);\n const wrapperRef = React.useRef<HTMLDivElement>(null);\n const panelContainerRef = React.useRef<HTMLDivElement>(null);\n const mergedContainerRef = useMergeRefs([containerRef, panelContainerRef]);\n\n // ======================== Offset ========================\n const [containerWidth, setContainerWidth] = React.useState<number>(0);\n const [containerOffset, setContainerOffset] = React.useState<number>(0);\n const [arrowOffset, setArrowOffset] = React.useState<number>(0);\n\n useResizeObserver(\n panelContainerRef,\n (element) => {\n if (element.offsetWidth) {\n setContainerWidth(element.offsetWidth);\n }\n },\n !!range,\n );\n\n const [activeInputLeft, activeInputRight, selectorWidth] = activeInfo;\n const [retryTimes, setRetryTimes] = React.useState(0);\n\n React.useEffect(() => {\n setRetryTimes(10);\n }, [activeInputLeft]);\n\n React.useEffect(() => {\n // `activeOffset` is always align with the active input element\n // So we need only check container contains the `activeOffset`\n if (range && wrapperRef.current) {\n // Offset in case container has border radius\n const arrowWidth = arrowRef.current?.offsetWidth || 0;\n\n // Arrow Offset\n const wrapperRect = wrapperRef.current.getBoundingClientRect();\n if (!wrapperRect.height || wrapperRect.right < 0) {\n setRetryTimes((times) => Math.max(0, times - 1));\n return;\n }\n\n const nextArrowOffset =\n (rtl ? activeInputRight - arrowWidth : activeInputLeft) - wrapperRect.left;\n setArrowOffset(nextArrowOffset);\n\n // Container Offset\n if (containerWidth && containerWidth < selectorWidth) {\n const offset = rtl\n ? wrapperRect.right - (activeInputRight - arrowWidth + containerWidth)\n : activeInputLeft + arrowWidth - wrapperRect.left - containerWidth;\n\n const safeOffset = Math.max(0, offset);\n setContainerOffset(safeOffset);\n } else {\n setContainerOffset(0);\n }\n }\n }, [retryTimes, rtl, containerWidth, activeInputLeft, activeInputRight, selectorWidth, range]);\n\n // ======================== Custom ========================\n function filterEmpty<T>(list: T[]) {\n return list.filter((item) => item);\n }\n\n const valueList = React.useMemo(() => filterEmpty(toArray(value)), [value]);\n\n const isTimePickerEmptyValue = picker === 'time' && !valueList.length;\n\n const footerSubmitValue = React.useMemo(() => {\n if (isTimePickerEmptyValue) {\n return filterEmpty([defaultOpenValue]);\n }\n return valueList;\n }, [isTimePickerEmptyValue, valueList, defaultOpenValue]);\n\n const popupPanelValue = isTimePickerEmptyValue ? defaultOpenValue : valueList;\n\n const disableSubmit = React.useMemo(() => {\n // Empty is invalid\n if (!footerSubmitValue.length) {\n return true;\n }\n\n return footerSubmitValue.some((val) => isInvalid(val));\n }, [footerSubmitValue, isInvalid]);\n\n const onFooterSubmit = () => {\n // For TimePicker, we will additional trigger the value update\n if (isTimePickerEmptyValue) {\n onSelect!(defaultOpenValue);\n }\n\n onOk();\n onSubmit();\n };\n\n let mergedNodes: React.ReactNode = (\n <div className={`${prefixCls}-panel-layout`}>\n {/* `any` here since PresetPanel is reused for both Single & Range Picker which means return type is not stable */}\n <PresetPanel<any>\n prefixCls={prefixCls}\n presets={presets}\n onClick={onPresetSubmit}\n onHover={onPresetHover}\n />\n <div>\n <PopupPanel {...props} value={popupPanelValue} />\n <Footer\n {...props}\n invalid={disableSubmit}\n showNow={multiple ? false : showNow}\n onSubmit={onFooterSubmit}\n />\n </div>\n </div>\n );\n\n if (panelRender) {\n mergedNodes = panelRender(mergedNodes);\n }\n\n // ======================== Render ========================\n const containerPrefixCls = `${panelPrefixCls}-container`;\n\n const marginLeft = 'marginLeft';\n const marginRight = 'marginRight';\n\n // Container\n let renderNode = (\n <div\n ref={mergedContainerRef}\n tabIndex={-1}\n className={clsx(\n containerPrefixCls,\n // Used for Today Button style, safe to remove if no need\n `${prefixCls}-${internalMode}-panel-container`,\n classNames?.popup?.container,\n )}\n onBlur={onBlur}\n style={{\n [rtl ? marginRight : marginLeft]: containerOffset,\n [rtl ? marginLeft : marginRight]: 'auto',\n ...styles?.popup?.container,\n }}\n // Still wish not to lose focus on mouse down\n // onMouseDown={(e) => {\n // // e.preventDefault();\n // }}\n onFocus={onFocus}\n onMouseDown={onPanelMouseDown}\n >\n {mergedNodes}\n </div>\n );\n\n if (range) {\n renderNode = (\n <div\n className={clsx(`${prefixCls}-range-wrapper`, `${prefixCls}-${picker}-range-wrapper`)}\n ref={wrapperRef}\n onMouseDown={onPanelMouseDown}\n >\n <div className={`${prefixCls}-range-arrow`} ref={arrowRef} style={{ left: arrowOffset }} />\n\n {/* Watch for container size */}\n {renderNode}\n </div>\n );\n }\n\n return renderNode;\n}\n"],"mappings":";;;;;;;;;;;AAyDA,SAAwB,MAAqC,OAA6B;CACxF,MAAM,EACJ,cACA,aACA,cACA,QACA,SAGA,OACA,UACA,aAAa;EAAC;EAAG;EAAG;CAAC,GAGrB,SACA,eACA,gBAGA,SACA,QACA,kBAGA,WAGA,OACA,UACA,WACA,kBACA,MACA,UACA,YACA,WACE;CAEJ,MAAM,EAAE,cAAcA,QAAM,IAAI,aAAa;CAC7C,MAAM,iBAAiB,GAAG,UAAU;CAEpC,MAAM,MAAM,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O;EACpB;EAKS;EACT,aAAa;EAEZ,UAAA;CACE,CAAA;CAGP,IAAI,OACF,aACE,qBAAC,OAAD;EACE,WAAW,KAAK,GAAG,UAAU,iBAAiB,GAAG,UAAU,GAAG,OAAO,eAAe;EACpF,KAAK;EACL,aAAa;EAHf,UAAA,CAKE,oBAAC,OAAD;GAAK,WAAW,GAAG,UAAU;GAAe,KAAK;GAAU,OAAO,EAAE,MAAM,YAAY;EAAI,CAAA,GAGzF,UACE;;CAIT,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../src/DatePicker/core/PickerInput/Popup/index.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport * as React from 'react';\n\nimport { useMergeRefs } from '@/utils/mergeRefs';\n\nimport { useResizeObserver } from '../../hooks/react';\nimport type {\n RangeTimeProps,\n SharedPickerProps,\n SharedTimeProps,\n ValueDate,\n} from '../../interface';\nimport { toArray } from '../../utils/miscUtil';\nimport PickerContext from '../context';\nimport Footer, { type FooterProps } from './Footer';\nimport PopupPanel, { type PopupPanelProps } from './PopupPanel';\nimport PresetPanel from './PresetPanel';\n\nexport type PopupShowTimeConfig<DateType extends object = any> = Omit<\n RangeTimeProps<DateType>,\n 'defaultValue' | 'defaultOpenValue' | 'disabledTime'\n> &\n Pick<SharedTimeProps<DateType>, 'disabledTime'>;\n\nexport interface PopupProps<DateType extends object = any, PresetValue = DateType>\n extends\n Pick<React.InputHTMLAttributes<HTMLDivElement>, 'onFocus' | 'onBlur'>,\n FooterProps<DateType>,\n PopupPanelProps<DateType> {\n // Range\n activeInfo?: [activeInputLeft: number, activeInputRight: number, selectorWidth: number];\n classNames?: SharedPickerProps['classNames'];\n\n containerRef?: React.Ref<HTMLDivElement>;\n // Fill\n /** TimePicker or showTime only */\n defaultOpenValue: DateType;\n // Direction\n direction?: 'ltr' | 'rtl';\n\n isInvalid: (date: DateType | DateType[]) => boolean;\n // Change\n needConfirm: boolean;\n\n onOk: VoidFunction;\n\n onPanelMouseDown?: React.MouseEventHandler<HTMLDivElement>;\n onPresetHover: (presetValue: PresetValue) => void;\n onPresetSubmit: (presetValue: PresetValue) => void;\n\n panelRender?: SharedPickerProps['panelRender'];\n\n // Presets\n presets: ValueDate<DateType>[];\n styles?: SharedPickerProps['styles'];\n}\n\nexport default function Popup<DateType extends object = any>(props: PopupProps<DateType>) {\n const {\n containerRef,\n panelRender,\n internalMode,\n picker,\n showNow,\n\n // Range\n range,\n multiple,\n activeInfo = [0, 0, 0],\n\n // Presets\n presets,\n onPresetHover,\n onPresetSubmit,\n\n // Focus\n onFocus,\n onBlur,\n onPanelMouseDown,\n\n // Direction\n direction,\n\n // Change\n value,\n onSelect,\n isInvalid,\n defaultOpenValue,\n onOk,\n onSubmit,\n classNames,\n styles,\n } = props;\n\n const { prefixCls } = React.use(PickerContext);\n const panelPrefixCls = `${prefixCls}-panel`;\n\n const rtl = direction === 'rtl';\n\n // ========================= Refs =========================\n const arrowRef = React.useRef<HTMLDivElement>(null);\n const wrapperRef = React.useRef<HTMLDivElement>(null);\n const panelContainerRef = React.useRef<HTMLDivElement>(null);\n const mergedContainerRef = useMergeRefs([containerRef, panelContainerRef]);\n\n // ======================== Offset ========================\n const [containerWidth, setContainerWidth] = React.useState<number>(0);\n const [containerOffset, setContainerOffset] = React.useState<number>(0);\n const [arrowOffset, setArrowOffset] = React.useState<number>(0);\n\n useResizeObserver(\n panelContainerRef,\n (element) => {\n if (element.offsetWidth) {\n setContainerWidth(element.offsetWidth);\n }\n },\n !!range,\n );\n\n const [activeInputLeft, activeInputRight, selectorWidth] = activeInfo;\n const [retryTimes, setRetryTimes] = React.useState(0);\n\n React.useEffect(() => {\n setRetryTimes(10);\n }, [activeInputLeft]);\n\n React.useEffect(() => {\n // `activeOffset` is always align with the active input element\n // So we need only check container contains the `activeOffset`\n if (range && wrapperRef.current) {\n // Offset in case container has border radius\n const arrowWidth = arrowRef.current?.offsetWidth || 0;\n\n // Arrow Offset\n const wrapperRect = wrapperRef.current.getBoundingClientRect();\n if (!wrapperRect.height || wrapperRect.right < 0) {\n setRetryTimes((times) => Math.max(0, times - 1));\n return;\n }\n\n const nextArrowOffset =\n (rtl ? activeInputRight - arrowWidth : activeInputLeft) - wrapperRect.left;\n setArrowOffset(nextArrowOffset);\n\n // Container Offset\n if (containerWidth && containerWidth < selectorWidth) {\n const offset = rtl\n ? wrapperRect.right - (activeInputRight - arrowWidth + containerWidth)\n : activeInputLeft + arrowWidth - wrapperRect.left - containerWidth;\n\n const safeOffset = Math.max(0, offset);\n setContainerOffset(safeOffset);\n } else {\n setContainerOffset(0);\n }\n }\n }, [retryTimes, rtl, containerWidth, activeInputLeft, activeInputRight, selectorWidth, range]);\n\n // ======================== Custom ========================\n function filterEmpty<T>(list: T[]) {\n return list.filter((item) => item);\n }\n\n const valueList = React.useMemo(() => filterEmpty(toArray(value)), [value]);\n\n const isTimePickerEmptyValue = picker === 'time' && !valueList.length;\n\n const footerSubmitValue = React.useMemo(() => {\n if (isTimePickerEmptyValue) {\n return filterEmpty([defaultOpenValue]);\n }\n return valueList;\n }, [isTimePickerEmptyValue, valueList, defaultOpenValue]);\n\n const popupPanelValue = isTimePickerEmptyValue ? defaultOpenValue : valueList;\n\n const disableSubmit = React.useMemo(() => {\n // Empty is invalid\n if (!footerSubmitValue.length) {\n return true;\n }\n\n return footerSubmitValue.some((val) => isInvalid(val));\n }, [footerSubmitValue, isInvalid]);\n\n const onFooterSubmit = () => {\n // For TimePicker, we will additional trigger the value update\n if (isTimePickerEmptyValue) {\n onSelect!(defaultOpenValue);\n }\n\n onOk();\n onSubmit();\n };\n\n let mergedNodes: React.ReactNode = (\n <div className={`${prefixCls}-panel-layout`}>\n {/* `any` here since PresetPanel is reused for both Single & Range Picker which means return type is not stable */}\n <PresetPanel<any>\n prefixCls={prefixCls}\n presets={presets}\n onClick={onPresetSubmit}\n onHover={onPresetHover}\n />\n <div>\n <PopupPanel {...props} value={popupPanelValue} />\n <Footer\n {...props}\n invalid={disableSubmit}\n showNow={multiple ? false : showNow}\n onSubmit={onFooterSubmit}\n />\n </div>\n </div>\n );\n\n if (panelRender) {\n mergedNodes = panelRender(mergedNodes);\n }\n\n // ======================== Render ========================\n const containerPrefixCls = `${panelPrefixCls}-container`;\n\n const marginLeft = 'marginLeft';\n const marginRight = 'marginRight';\n\n // Container\n let renderNode = (\n <div\n ref={mergedContainerRef}\n tabIndex={-1}\n className={clsx(\n containerPrefixCls,\n // Used for Today Button style, safe to remove if no need\n `${prefixCls}-${internalMode}-panel-container`,\n classNames?.popup?.container,\n )}\n onBlur={onBlur}\n style={{\n [rtl ? marginRight : marginLeft]: containerOffset,\n [rtl ? marginLeft : marginRight]: 'auto',\n ...styles?.popup?.container,\n }}\n // Still wish not to lose focus on mouse down\n // onMouseDown={(e) => {\n // // e.preventDefault();\n // }}\n onFocus={onFocus}\n onMouseDown={onPanelMouseDown}\n >\n {mergedNodes}\n </div>\n );\n\n if (range) {\n renderNode = (\n <div\n className={clsx(`${prefixCls}-range-wrapper`, `${prefixCls}-${picker}-range-wrapper`)}\n ref={wrapperRef}\n onMouseDown={onPanelMouseDown}\n >\n <div className={`${prefixCls}-range-arrow`} ref={arrowRef} style={{ left: arrowOffset }} />\n\n {/* Watch for container size */}\n {renderNode}\n </div>\n );\n }\n\n return renderNode;\n}\n"],"mappings":";;;;;;;;;;;AAyDA,SAAwB,MAAqC,OAA6B;CACxF,MAAM,EACJ,cACA,aACA,cACA,QACA,SAGA,OACA,UACA,aAAa;EAAC;EAAG;EAAG;CAAC,GAGrB,SACA,eACA,gBAGA,SACA,QACA,kBAGA,WAGA,OACA,UACA,WACA,kBACA,MACA,UACA,YACA,WACE;CAEJ,MAAM,EAAE,cAAc,MAAM,IAAI,aAAa;CAC7C,MAAM,iBAAiB,GAAG,UAAU;CAEpC,MAAM,MAAM,cAAc;CAG1B,MAAM,WAAW,MAAM,OAAuB,IAAI;CAClD,MAAM,aAAa,MAAM,OAAuB,IAAI;CACpD,MAAM,oBAAoB,M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AAiB,GAAG,UAAU,GAAG,OAAO,eAAe;EACpF,KAAK;EACL,aAAa;EAHf,UAAA,CAKE,oBAAC,OAAD;GAAK,WAAW,GAAG,UAAU;GAAe,KAAK;GAAU,OAAO,EAAE,MAAM,YAAY;EAAI,CAAA,GAGzF,UACE;;CAIT,OAAO;AACT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseInfo, PanelMode, RangeTimeProps, SharedPickerProps, ValueDate } from "../interface.mjs";
|
|
2
2
|
import { SelectorIdType } from "./Selector/RangeSelector.mjs";
|
|
3
|
-
import * as React
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
export type RangeValueType<DateType> = [start: DateType | null | undefined, end: DateType | null | undefined];
|
|
5
5
|
/** Used for change event, it should always be not undefined */
|
|
6
6
|
export type NoUndefinedRangeValueType<DateType> = [start: DateType | null, end: DateType | null];
|
|
@@ -41,9 +41,8 @@ export interface BaseRangePickerProps<DateType extends object> extends Omit<Shar
|
|
|
41
41
|
presets?: ValueDate<Exclude<RangeValueType<DateType>, null>>[];
|
|
42
42
|
/** @deprecated Please use `presets` instead */
|
|
43
43
|
ranges?: Record<string, Exclude<RangeValueType<DateType>, null> | (() => Exclude<RangeValueType<DateType>, null>)>;
|
|
44
|
-
separator?: React
|
|
44
|
+
separator?: React.ReactNode;
|
|
45
45
|
showTime?: boolean | RangeTimeProps<DateType>;
|
|
46
46
|
value?: RangeValueType<DateType> | null;
|
|
47
47
|
}
|
|
48
|
-
export interface RangePickerProps<DateType extends object> extends BaseRangePickerProps<DateType>, Omit<RangeTimeProps<DateType>, 'format' | 'defaultValue' | 'defaultOpenValue'> {}
|
|
49
|
-
//# sourceMappingURL=RangePicker.d.mts.map
|
|
48
|
+
export interface RangePickerProps<DateType extends object> extends BaseRangePickerProps<DateType>, Omit<RangeTimeProps<DateType>, 'format' | 'defaultValue' | 'defaultOpenValue'> {}
|
|
@@ -21,7 +21,7 @@ import useShowNow from "./hooks/useShowNow.mjs";
|
|
|
21
21
|
import Popup from "./Popup/index.mjs";
|
|
22
22
|
import RefRangeSelector from "./Selector/RangeSelector.mjs";
|
|
23
23
|
import { clsx } from "clsx";
|
|
24
|
-
import * as React
|
|
24
|
+
import * as React from "react";
|
|
25
25
|
import { jsx } from "react/jsx-runtime";
|
|
26
26
|
// src/DatePicker/core/PickerInput/RangePicker.tsx
|
|
27
27
|
function separateConfig(config, defaultConfig) {
|
|
@@ -42,7 +42,7 @@ function RangePicker(props, ref) {
|
|
|
42
42
|
});
|
|
43
43
|
const { prefixCls, rootClassName, styles: propStyles, classNames: propClassNames, previewValue, defaultValue, value, needConfirm, onClear, onKeyDown, disabled, allowEmpty, disabledDate, minDate, maxDate, defaultOpen, open, onOpenChange, locale, generateConfig, picker, showNow, showToday, showTime, mode, onPanelChange, onCalendarChange, onOk, defaultPickerValue, pickerValue, onPickerValueChange, inputReadOnly, suffixIcon, onFocus, onBlur, presets, ranges, components, cellRender, dateRender, monthCellRender, onClick } = filledProps;
|
|
44
44
|
const selectorRef = usePickerRef(ref);
|
|
45
|
-
const popupRef = React
|
|
45
|
+
const popupRef = React.useRef(null);
|
|
46
46
|
const [mergedClassNames, mergedStyles] = useSemantic(propClassNames, propStyles);
|
|
47
47
|
const [mergedOpen, setMergeOpen] = useOpen(open, defaultOpen, disabled, onOpenChange);
|
|
48
48
|
const triggerOpen = (nextOpen, config) => {
|
|
@@ -73,7 +73,7 @@ function RangePicker(props, ref) {
|
|
|
73
73
|
if (!firstMount && !mergedOpen) triggerRangeValueChange(rangeValueIndex ?? activeIndex, "popupClose");
|
|
74
74
|
}, [mergedOpen]);
|
|
75
75
|
/** Used for Popup panel */
|
|
76
|
-
const mergedShowTime = React
|
|
76
|
+
const mergedShowTime = React.useMemo(() => {
|
|
77
77
|
if (!showTime) return null;
|
|
78
78
|
const { disabledTime } = showTime;
|
|
79
79
|
const proxyDisabledTime = disabledTime ? (date) => {
|
|
@@ -134,17 +134,17 @@ function RangePicker(props, ref) {
|
|
|
134
134
|
triggerOpen(false, { force: true });
|
|
135
135
|
onClear?.();
|
|
136
136
|
};
|
|
137
|
-
const [hoverSource, setHoverSource] = React
|
|
138
|
-
const [internalHoverValues, setInternalHoverValues] = React
|
|
139
|
-
const hoverValues = React
|
|
137
|
+
const [hoverSource, setHoverSource] = React.useState(null);
|
|
138
|
+
const [internalHoverValues, setInternalHoverValues] = React.useState(null);
|
|
139
|
+
const hoverValues = React.useMemo(() => {
|
|
140
140
|
return internalHoverValues || calendarValue;
|
|
141
141
|
}, [calendarValue, internalHoverValues]);
|
|
142
142
|
const showWeakHover = hoverSource === "cell" && !calendarValue[(activeIndex + 1) % 2] && !isSameTimestamp(generateConfig, calendarValue[activeIndex], mergedValue[activeIndex]);
|
|
143
143
|
const activeHoverValue = internalHoverValues?.[activeIndex];
|
|
144
|
-
React
|
|
144
|
+
React.useEffect(() => {
|
|
145
145
|
if (!mergedOpen) setInternalHoverValues(null);
|
|
146
146
|
}, [mergedOpen]);
|
|
147
|
-
const [activeInfo, setActiveInfo] = React
|
|
147
|
+
const [activeInfo, setActiveInfo] = React.useState([
|
|
148
148
|
0,
|
|
149
149
|
0,
|
|
150
150
|
0
|
|
@@ -182,7 +182,7 @@ function RangePicker(props, ref) {
|
|
|
182
182
|
const isPopupInvalidateDate = useEvent((date) => {
|
|
183
183
|
return isInvalidateDate(date, { activeIndex });
|
|
184
184
|
});
|
|
185
|
-
const panelProps = React
|
|
185
|
+
const panelProps = React.useMemo(() => {
|
|
186
186
|
const domProps = pickAttrs(filledProps);
|
|
187
187
|
return omit(filledProps, [
|
|
188
188
|
...Object.keys(domProps),
|
|
@@ -256,7 +256,7 @@ function RangePicker(props, ref) {
|
|
|
256
256
|
}
|
|
257
257
|
onKeyDown?.(event, preventDefault);
|
|
258
258
|
};
|
|
259
|
-
const context = React
|
|
259
|
+
const context = React.useMemo(() => ({
|
|
260
260
|
prefixCls,
|
|
261
261
|
locale,
|
|
262
262
|
generateConfig,
|
|
@@ -335,7 +335,7 @@ function RangePicker(props, ref) {
|
|
|
335
335
|
})
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
|
-
const RefRangePicker = React
|
|
338
|
+
const RefRangePicker = React.forwardRef(RangePicker);
|
|
339
339
|
if (process.env.NODE_ENV !== "production") RefRangePicker.displayName = "RefRangePicker";
|
|
340
340
|
export { RefRangePicker as default };
|
|
341
341
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangePicker.mjs","names":["React","RangeSelector"],"sources":["../../../../src/DatePicker/core/PickerInput/RangePicker.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport * as React from 'react';\n\nimport { useControlledState, useEvent, useLayoutEffect } from '../hooks/react';\nimport useSemantic from '../hooks/useSemantic';\nimport type {\n BaseInfo,\n InternalMode,\n OnOpenChange,\n OpenConfig,\n PanelMode,\n RangePickerRef,\n RangeTimeProps,\n SelectorProps,\n SharedHTMLAttrs,\n SharedPickerProps,\n ValueDate,\n} from '../interface';\nimport type { PickerPanelProps } from '../PickerPanel';\nimport PickerPopup from '../PickerPopup';\nimport { omit, pickAttrs, warning } from '../utils/common';\nimport { isSameTimestamp } from '../utils/dateUtil';\nimport { fillIndex, getFromDate, toArray } from '../utils/miscUtil';\nimport PickerContext from './context';\nimport useCellRender from './hooks/useCellRender';\nimport useFieldsInvalidate from './hooks/useFieldsInvalidate';\nimport useFilledProps from './hooks/useFilledProps';\nimport useFocusEvents, { isTargetInContainers } from './hooks/useFocusEvents';\nimport useFocusLock from './hooks/useFocusLock';\nimport useOpen from './hooks/useOpen';\nimport usePickerRef from './hooks/usePickerRef';\nimport usePresets from './hooks/usePresets';\nimport useRangeDisabledDate from './hooks/useRangeDisabledDate';\nimport useRangePickerValue from './hooks/useRangePickerValue';\nimport useRangeValue, { useInnerValue } from './hooks/useRangeValue';\nimport useRangeValueChange, { type RangeValueChangeSource } from './hooks/useRangeValueChange';\nimport useShowNow from './hooks/useShowNow';\nimport Popup, { type PopupShowTimeConfig } from './Popup';\nimport RangeSelector, {\n type RangeSelectorRef,\n type SelectorIdType,\n} from './Selector/RangeSelector';\n\nfunction separateConfig<T>(config: T | [T, T] | null | undefined, defaultConfig: T): [T, T] {\n const singleConfig = config ?? defaultConfig;\n\n if (Array.isArray(singleConfig)) {\n return singleConfig;\n }\n\n return [singleConfig, singleConfig];\n}\n\nexport type RangeValueType<DateType> = [\n start: DateType | null | undefined,\n end: DateType | null | undefined,\n];\n\n/** Used for change event, it should always be not undefined */\nexport type NoUndefinedRangeValueType<DateType> = [start: DateType | null, end: DateType | null];\n\nexport interface BaseRangePickerProps<DateType extends object> extends Omit<\n SharedPickerProps<DateType>,\n 'showTime' | 'id'\n> {\n allowEmpty?: boolean | [boolean, boolean];\n\n // Picker Value\n /**\n * Config the popup panel date.\n * Every time active the input to open popup will reset with `defaultPickerValue`.\n *\n * Note: `defaultPickerValue` priority is higher than `value` for the first open.\n */\n defaultPickerValue?: [DateType, DateType] | DateType | null;\n\n defaultValue?: RangeValueType<DateType>;\n // Control\n disabled?: boolean | [boolean, boolean];\n // Structure\n id?: SelectorIdType;\n // Mode\n mode?: [startMode: PanelMode, endMode: PanelMode];\n onCalendarChange?: (\n dates: NoUndefinedRangeValueType<DateType>,\n dateStrings: [string, string],\n info: BaseInfo,\n ) => void;\n\n onChange?: (\n dates: NoUndefinedRangeValueType<DateType> | null,\n dateStrings: [string, string],\n ) => void;\n\n onOk?: (values: NoUndefinedRangeValueType<DateType>) => void;\n /** Trigger on each `mode` or `pickerValue` changed. */\n onPanelChange?: (\n values: NoUndefinedRangeValueType<DateType>,\n modes: [startMode: PanelMode, endMode: PanelMode],\n ) => void;\n /**\n * Each popup panel `pickerValue` includes `mode` change will trigger the callback.\n * @param date The changed picker value\n * @param info.source `panel` from the panel click. `reset` from popup open or field typing\n * @param info.mode Next `mode` panel\n */\n onPickerValueChange?: (\n date: [DateType, DateType],\n info: BaseInfo & {\n source: 'reset' | 'panel';\n mode: [PanelMode, PanelMode];\n },\n ) => void;\n\n /**\n * Config each start & end field popup panel date.\n * When config `pickerValue`, you must also provide `onPickerValueChange` to handle changes.\n */\n pickerValue?: [DateType, DateType] | DateType | null;\n // Placeholder\n placeholder?: [string, string];\n\n // Preset\n presets?: ValueDate<Exclude<RangeValueType<DateType>, null>>[];\n /** @deprecated Please use `presets` instead */\n ranges?: Record<\n string,\n Exclude<RangeValueType<DateType>, null> | (() => Exclude<RangeValueType<DateType>, null>)\n >;\n\n separator?: React.ReactNode;\n\n // Time\n showTime?: boolean | RangeTimeProps<DateType>;\n // Value\n value?: RangeValueType<DateType> | null;\n}\n\nexport interface RangePickerProps<DateType extends object>\n extends\n BaseRangePickerProps<DateType>,\n Omit<RangeTimeProps<DateType>, 'format' | 'defaultValue' | 'defaultOpenValue'> {}\n\nfunction getActiveRange(activeIndex: number) {\n return activeIndex === 1 ? 'end' : 'start';\n}\n\nfunction RangePicker<DateType extends object = any>(\n props: RangePickerProps<DateType>,\n ref: React.Ref<RangePickerRef>,\n) {\n // ========================= Prop =========================\n const [filledProps, internalPicker, complexPicker, formatList, maskFormat, isInvalidateDate] =\n useFilledProps(props, () => {\n const { disabled, allowEmpty } = props;\n\n const mergedDisabled = separateConfig(disabled, false);\n const mergedAllowEmpty = separateConfig(allowEmpty, false);\n\n return {\n disabled: mergedDisabled,\n allowEmpty: mergedAllowEmpty,\n };\n });\n\n const {\n // Style\n prefixCls,\n rootClassName,\n styles: propStyles,\n classNames: propClassNames,\n\n previewValue,\n // Value\n defaultValue,\n value,\n needConfirm,\n onClear,\n onKeyDown,\n\n // Disabled\n disabled,\n allowEmpty,\n disabledDate,\n minDate,\n maxDate,\n\n // Open\n defaultOpen,\n open,\n onOpenChange,\n\n // Picker\n locale,\n generateConfig,\n picker,\n showNow,\n showToday,\n showTime,\n\n // Mode\n mode,\n onPanelChange,\n onCalendarChange,\n onOk,\n\n // Picker Value\n defaultPickerValue,\n pickerValue,\n onPickerValueChange,\n\n // Format\n inputReadOnly,\n\n suffixIcon,\n\n // Focus\n onFocus,\n onBlur,\n\n // Presets\n presets,\n ranges,\n\n // Render\n components,\n cellRender,\n dateRender,\n monthCellRender,\n\n // Native\n onClick,\n } = filledProps;\n\n // ========================= Refs =========================\n const selectorRef = usePickerRef<Parameters<RangePickerRef['focus']>[0], RangeSelectorRef>(ref);\n const popupRef = React.useRef<HTMLDivElement>(null);\n\n // ======================= Semantic =======================\n const [mergedClassNames, mergedStyles] = useSemantic(propClassNames, propStyles);\n\n // ========================= Open =========================\n const [mergedOpen, setMergeOpen] = useOpen(open, defaultOpen, disabled, onOpenChange);\n\n const triggerOpen: OnOpenChange = (nextOpen, config?: OpenConfig) => {\n // No need to open if all disabled\n if (disabled.some((fieldDisabled) => !fieldDisabled) || !nextOpen) {\n setMergeOpen(nextOpen, config);\n }\n };\n\n // ======================== Values ========================\n const [mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, triggerOk] =\n useInnerValue<RangeValueType<DateType>, DateType>(\n generateConfig,\n locale,\n formatList,\n true,\n false,\n defaultValue,\n value,\n onCalendarChange,\n onOk,\n );\n\n const calendarValue = getCalendarValue();\n\n // ======================== Focus =========================\n const isInternalPickerElement = useEvent((element: EventTarget | null) =>\n isTargetInContainers(element, [selectorRef.current!.nativeElement, popupRef.current]),\n );\n\n const [focused, onFieldFocus, onFieldBlur] = useFocusEvents(\n isInternalPickerElement,\n (index, event) => {\n onFocus?.(event, {\n range: getActiveRange(index),\n });\n },\n (index, event) => {\n onBlur?.(event, {\n range: getActiveRange(index),\n });\n },\n () => {\n triggerOpen(false);\n },\n );\n\n // ======================== Value =========================\n const [\n /** Trigger `onChange` by check `disabledDate` */\n flushSubmit,\n /** Trigger `onChange` directly without check `disabledDate` */\n triggerSubmitChange,\n /** Reset uncommitted values */\n resetValue,\n ] = useRangeValue<RangeValueType<DateType>, DateType>(\n filledProps,\n mergedValue,\n setInnerValue,\n getCalendarValue,\n triggerCalendarChange,\n disabled,\n formatList,\n isInvalidateDate,\n );\n\n const triggerFieldCalendarChange = useEvent((index: number, date: DateType) => {\n triggerCalendarChange(fillIndex(getCalendarValue(), index, date));\n });\n\n const flushFieldSubmit = useEvent((index: number, needTriggerChange: boolean) => {\n flushSubmit(index, needTriggerChange);\n\n if (needTriggerChange) {\n triggerOpen(false, { force: true });\n }\n });\n\n const enabledFieldCount = disabled.filter((fieldDisabled) => !fieldDisabled).length;\n const [\n rangeValueIndex,\n activeIndex,\n forceFocus,\n triggeredFields,\n triggerRangeValueChange,\n resetRangeValueChange,\n ] = useRangeValueChange(\n enabledFieldCount,\n needConfirm,\n allowEmpty,\n getCalendarValue,\n triggerFieldCalendarChange,\n flushFieldSubmit,\n resetValue,\n );\n\n useFocusLock(rangeValueIndex, forceFocus, selectorRef, popupRef, triggerOpen);\n\n // Finalize the current interaction only after the popup is actually closed.\n // 仅在 popup 实际关闭后,统一收口当前交互。\n useLayoutEffect(\n (firstMount) => {\n if (!firstMount && !mergedOpen) {\n triggerRangeValueChange(rangeValueIndex ?? activeIndex, 'popupClose');\n }\n },\n [mergedOpen],\n );\n\n // ======================= ShowTime =======================\n /** Used for Popup panel */\n const mergedShowTime = React.useMemo<\n (PopupShowTimeConfig<DateType> & Pick<RangeTimeProps<DateType>, 'defaultOpenValue'>) | null\n >(() => {\n if (!showTime) {\n return null;\n }\n\n const { disabledTime } = showTime;\n\n const proxyDisabledTime = disabledTime\n ? (date: DateType) => {\n const range = getActiveRange(activeIndex);\n const fromDate = getFromDate(calendarValue, triggeredFields, activeIndex);\n return disabledTime(date, range, {\n from: fromDate,\n });\n }\n : undefined;\n\n return { ...showTime, disabledTime: proxyDisabledTime };\n }, [showTime, activeIndex, calendarValue, triggeredFields]);\n\n // ========================= Mode =========================\n const [modes, setModes] = useControlledState<[PanelMode, PanelMode]>([picker, picker], mode);\n\n const mergedMode = modes[activeIndex] || picker;\n\n /** Extends from `mergedMode` to patch `datetime` mode */\n const internalMode: InternalMode =\n mergedMode === 'date' && mergedShowTime ? 'datetime' : mergedMode;\n\n // ====================== PanelCount ======================\n const multiplePanel = internalMode === picker && internalMode !== 'time';\n\n // ======================= Show Now =======================\n const mergedShowNow = useShowNow(picker, mergedMode, showNow, showToday, true);\n\n // ===================== DisabledDate =====================\n const mergedDisabledDate = useRangeDisabledDate(\n calendarValue,\n disabled,\n activeIndex,\n triggeredFields,\n generateConfig,\n locale,\n disabledDate,\n );\n\n // ======================= Validate =======================\n const [submitInvalidates, onSelectorInvalid] = useFieldsInvalidate(\n calendarValue,\n isInvalidateDate,\n allowEmpty,\n );\n\n // ===================== Picker Value =====================\n const [currentPickerValue, setCurrentPickerValue] = useRangePickerValue(\n generateConfig,\n locale,\n calendarValue,\n modes,\n mergedOpen,\n focused,\n activeIndex,\n internalPicker,\n multiplePanel,\n defaultPickerValue,\n pickerValue,\n mergedShowTime?.defaultOpenValue,\n onPickerValueChange,\n minDate,\n maxDate,\n );\n\n // >>> Mode need wait for `pickerValue`\n const triggerModeChange = useEvent(\n (nextPickerValue: DateType | null, nextMode: PanelMode, triggerEvent?: boolean) => {\n const clone = fillIndex(modes, activeIndex, nextMode);\n\n if (clone[0] !== modes[0] || clone[1] !== modes[1]) {\n setModes(clone);\n }\n\n // Compatible with `onPanelChange`\n if (onPanelChange && triggerEvent !== false) {\n const clonePickerValue: RangeValueType<DateType> = [...calendarValue];\n if (nextPickerValue) {\n clonePickerValue[activeIndex] = nextPickerValue;\n }\n onPanelChange(clonePickerValue as NoUndefinedRangeValueType<DateType>, clone);\n }\n },\n );\n\n // ======================== Change ========================\n const fillCalendarValue = (date: DateType, index: number) =>\n // Trigger change only when date changed\n fillIndex(calendarValue, index, date);\n\n // ======================== Submit ========================\n /**\n * Trigger by confirm operation.\n * This function has already handle the `needConfirm` check logic.\n * - Selector: enter key\n * - Panel: OK button\n */\n const triggerPartConfirm = (\n date?: DateType | null,\n source: RangeValueChangeSource = 'confirm',\n ) => {\n triggerRangeValueChange(activeIndex, source, date ?? undefined);\n };\n\n // ======================== Click =========================\n const onSelectorClick: React.MouseEventHandler<HTMLDivElement> = (event) => {\n const rootNode = (event.target as HTMLElement).getRootNode();\n if (\n !selectorRef.current!.nativeElement.contains(\n (rootNode as Document | ShadowRoot).activeElement ?? document.activeElement,\n )\n ) {\n // Click to focus the enabled input\n const enabledIndex = disabled.findIndex((d) => !d);\n if (enabledIndex >= 0) {\n selectorRef.current!.focus({ index: enabledIndex });\n }\n }\n\n triggerOpen(true);\n\n onClick?.(event);\n };\n\n const onSelectorClear = () => {\n resetRangeValueChange();\n triggerSubmitChange(null);\n triggerOpen(false, { force: true });\n onClear?.();\n };\n\n // ======================== Hover =========================\n const [hoverSource, setHoverSource] = React.useState<'cell' | 'preset' | null>(null);\n const [internalHoverValues, setInternalHoverValues] =\n React.useState<RangeValueType<DateType> | null>(null);\n\n const hoverValues = React.useMemo(() => {\n return internalHoverValues || calendarValue;\n }, [calendarValue, internalHoverValues]);\n\n // \"Weak\" hover only highlights the hovered cell instead of composing a range.\n // Use it while choosing the first value so the pending selection remains selected.\n const showWeakHover =\n // Preset hover always previews the whole range.\n hoverSource === 'cell' &&\n // Once the other field has a value, range hover takes precedence.\n !calendarValue[(activeIndex + 1) % 2] &&\n // Only a changed active value needs weak hover.\n !isSameTimestamp(generateConfig, calendarValue[activeIndex], mergedValue[activeIndex]);\n const activeHoverValue = internalHoverValues?.[activeIndex];\n\n // Clean up `internalHoverValues` when closed\n React.useEffect(() => {\n if (!mergedOpen) {\n setInternalHoverValues(null);\n }\n }, [mergedOpen]);\n\n // ========================================================\n // == Panels ==\n // ========================================================\n // Save the offset with active bar position\n // const [activeOffset, setActiveOffset] = React.useState(0);\n const [activeInfo, setActiveInfo] = React.useState<\n [activeInputLeft: number, activeInputRight: number, selectorWidth: number]\n >([0, 0, 0]);\n\n const onSetHover = (date: RangeValueType<DateType> | null, source: 'cell' | 'preset') => {\n if (previewValue !== 'hover') {\n return;\n }\n setInternalHoverValues(date);\n setHoverSource(source);\n };\n\n // ======================= Presets ========================\n const presetList = usePresets(presets, ranges);\n\n const onPresetHover = (nextValues: RangeValueType<DateType> | null) => {\n onSetHover(nextValues, 'preset');\n };\n\n const onPresetSubmit = (nextValues: RangeValueType<DateType>) => {\n const passed = triggerSubmitChange(nextValues);\n\n if (passed) {\n triggerOpen(false, { force: true });\n }\n };\n\n const onNow = (now: DateType) => {\n triggerPartConfirm(now);\n };\n\n // ======================== Panel =========================\n const onPanelHover = (date: DateType) => {\n onSetHover(date ? fillCalendarValue(date, activeIndex) : null, 'cell');\n };\n\n // >>> Focus\n const onPanelFocus: React.FocusEventHandler<HTMLElement> = (event) => {\n triggerOpen(true);\n onFieldFocus(activeIndex, 'panel', event);\n };\n\n // >>> Calendar\n const onPanelSelect: PickerPanelProps<DateType>['onSelect'] = (date: DateType) => {\n const panelFinished = !complexPicker && internalPicker === internalMode;\n\n triggerRangeValueChange(\n activeIndex,\n panelFinished ? 'panel-final' : 'panel-intermediate',\n date,\n );\n };\n\n // >>> Close\n const onPopupClose = () => {\n triggerOpen(false);\n };\n\n // >>> cellRender\n const onInternalCellRender = useCellRender(\n cellRender,\n dateRender,\n monthCellRender,\n getActiveRange(activeIndex),\n );\n\n // >>> Value\n const panelValue = calendarValue[activeIndex] || null;\n\n // >>> invalid\n const isPopupInvalidateDate = useEvent((date: DateType) => {\n return isInvalidateDate(date, {\n activeIndex,\n });\n });\n\n const panelProps = React.useMemo(() => {\n const domProps = pickAttrs(filledProps);\n const restProps = omit(filledProps, [\n ...(Object.keys(domProps) as (keyof SharedHTMLAttrs)[]),\n 'onChange',\n 'onCalendarChange',\n 'onClear',\n 'style',\n 'className',\n 'onPanelChange',\n 'disabledTime',\n 'classNames',\n 'styles',\n ]);\n return restProps;\n }, [filledProps]);\n\n // >>> Render\n const panel = (\n <Popup<any>\n containerRef={popupRef}\n // MISC\n {...panelProps}\n defaultOpenValue={toArray(showTime?.defaultOpenValue)[activeIndex]}\n hoverRangeValue={showWeakHover ? null : hoverValues}\n internalMode={internalMode}\n multiplePanel={multiplePanel}\n showNow={mergedShowNow}\n styles={mergedStyles}\n value={panelValue}\n onChange={null}\n onFocus={onPanelFocus}\n onPresetHover={onPresetHover}\n onSubmit={(date) => triggerPartConfirm(date, 'confirm')}\n activeInfo={activeInfo}\n // Disabled\n disabledDate={mergedDisabledDate}\n cellRender={onInternalCellRender}\n // Styles\n classNames={mergedClassNames}\n isInvalid={isPopupInvalidateDate}\n // Focus\n mode={mergedMode}\n showTime={mergedShowTime}\n // Range\n range\n onBlur={(event) => onFieldBlur(activeIndex, 'panel', event)}\n // Mode\n picker={picker}\n onHover={onPanelHover}\n // Submit\n needConfirm={needConfirm}\n onOk={triggerOk}\n // Preset\n presets={presetList}\n onPanelChange={triggerModeChange}\n // Value\n format={maskFormat}\n onPickerValueChange={setCurrentPickerValue}\n // Hover\n hoverValue={showWeakHover && activeHoverValue ? [activeHoverValue] : null}\n // Render\n onPresetSubmit={onPresetSubmit}\n // Now\n onNow={onNow}\n onSelect={onPanelSelect}\n // PickerValue\n pickerValue={currentPickerValue}\n />\n );\n\n // ========================================================\n // == Selector ==\n // ========================================================\n\n // ======================== Change ========================\n const onSelectorChange = (date: DateType, index?: number) => {\n triggerRangeValueChange(index!, 'input', date);\n };\n\n const onSelectorInputChange = () => {\n triggerRangeValueChange(activeIndex, 'input');\n };\n\n // ======================= Selector =======================\n const onSelectorFocus: SelectorProps['onFocus'] = (event, index) => {\n triggerRangeValueChange(index!, 'field-switch');\n\n triggerOpen(true, {\n inherit: true,\n });\n\n onFieldFocus(index!, 'input', event);\n };\n\n const onSelectorBlur: SelectorProps['onBlur'] = (event, index) => {\n onFieldBlur(index!, 'input', event);\n };\n\n const onSelectorKeyDown: SelectorProps['onKeyDown'] = (event, preventDefault) => {\n if (event.key === 'Tab') {\n triggerPartConfirm(null, 'keyboard-submit-weak');\n } else if (event.key === 'Escape') {\n triggerRangeValueChange(activeIndex, 'esc');\n triggerOpen(false);\n }\n\n onKeyDown?.(event, preventDefault);\n };\n\n // ======================= Context ========================\n const context = React.useMemo(\n () => ({\n prefixCls,\n locale,\n generateConfig,\n button: components.button,\n input: components.input,\n classNames: mergedClassNames,\n styles: mergedStyles,\n }),\n [\n prefixCls,\n locale,\n generateConfig,\n components.button,\n components.input,\n mergedClassNames,\n mergedStyles,\n ],\n );\n\n // ======================== Effect ========================\n // >>> Mode\n // Reset for every active\n useLayoutEffect(() => {\n if (mergedOpen && activeIndex !== undefined) {\n // Legacy compatible. This effect update should not trigger `onPanelChange`\n triggerModeChange(null, picker, false);\n }\n }, [mergedOpen, activeIndex, picker]);\n\n // ====================== DevWarning ======================\n if (process.env.NODE_ENV !== 'production') {\n const isIndexEmpty = (index: number) => {\n return (\n // Value is empty\n !value?.[index] &&\n // DefaultValue is empty\n !defaultValue?.[index]\n );\n };\n\n if (\n disabled.some(\n (fieldDisabled, index) => fieldDisabled && isIndexEmpty(index) && !allowEmpty[index],\n )\n ) {\n warning(\n false,\n '`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.',\n );\n }\n }\n\n // ======================== Render ========================\n return (\n <PickerContext value={context}>\n <PickerPopup\n direction={filledProps.direction}\n getAnchor={() => selectorRef.current?.nativeElement}\n getPopupContainer={filledProps.getPopupContainer}\n inline={filledProps.inlinePopup}\n placement={filledProps.placement}\n popupElement={panel}\n popupStyle={mergedStyles.popup.root}\n popupClassName={clsx(rootClassName, mergedClassNames.popup.root)}\n // Visible\n visible={mergedOpen}\n onClose={onPopupClose}\n // Range\n range\n >\n <RangeSelector\n // Shared\n {...filledProps}\n // Ref\n activeHelp={!!internalHoverValues}\n focused={focused}\n maskFormat={maskFormat}\n open={mergedOpen}\n onBlur={onSelectorBlur}\n onChange={onSelectorChange}\n onFocus={onSelectorFocus}\n onKeyDown={onSelectorKeyDown}\n activeIndex={focused || mergedOpen ? activeIndex : null}\n // Active\n allHelp={!!internalHoverValues && hoverSource === 'preset'}\n inputReadOnly={inputReadOnly}\n // Disabled\n disabled={disabled}\n ref={selectorRef}\n // Style\n className={clsx(filledProps.className, rootClassName, mergedClassNames.root)}\n style={{ ...mergedStyles.root, ...filledProps.style }}\n // Icon\n suffixIcon={suffixIcon}\n onClear={onSelectorClear}\n // Invalid\n invalid={submitInvalidates}\n // Open\n onInputChange={onSelectorInputChange}\n // Format\n format={formatList}\n onInvalid={onSelectorInvalid}\n // Offset\n onActiveInfo={setActiveInfo}\n onOpenChange={triggerOpen}\n // Click\n onClick={onSelectorClick}\n onSubmit={() => triggerPartConfirm(null, 'keyboard-submit')}\n // Change\n value={hoverValues}\n />\n </PickerPopup>\n </PickerContext>\n );\n}\n\nconst RefRangePicker = React.forwardRef(RangePicker) as <DateType extends object = any>(\n props: RangePickerProps<DateType> & React.RefAttributes<RangePickerRef>,\n) => React.ReactElement;\n\nif (process.env.NODE_ENV !== 'production') {\n (RefRangePicker as any).displayName = 'RefRangePicker';\n}\n\nexport default RefRangePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAS,eAAkB,QAAuC,eAA0B;CAC1F,MAAM,eAAe,UAAU;CAE/B,IAAI,MAAM,QAAQ,YAAY,GAC5B,OAAO;CAGT,OAAO,CAAC,cAAc,YAAY;AACpC;AA4FA,SAAS,eAAe,aAAqB;CAC3C,OAAO,gBAAgB,IAAI,QAAQ;AACrC;AAEA,SAAS,YACP,OACA,KACA;CAEA,MAAM,CAAC,aAAa,gBAAgB,eAAe,YAAY,YAAY,oBACzE,eAAe,aAAa;EAC1B,MAAM,EAAE,UAAU,eAAe;EAKjC,OAAO;GACL,UAJqB,eAAe,UAAU,KAIvB;GACvB,YAJuB,eAAe,YAAY,KAIvB;EAC7B;CACF,CAAC;CAEH,MAAM,EAEJ,WACA,eACA,QAAQ,YACR,YAAY,gBAEZ,cAEA,cACA,OACA,aACA,SACA,WAGA,UACA,YACA,cACA,SACA,SAGA,aACA,MACA,cAGA,QACA,gBACA,QACA,SACA,WACA,UAGA,MACA,eACA,kBACA,MAGA,oBACA,aACA,qBAGA,eAEA,YAGA,SACA,QAGA,SACA,QAGA,YACA,YACA,YACA,iBAGA,YACE;CAG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C,IAAI,QAAQ,IAAI,aAAa,cAAc;EACzC,MAAM,gBAAgB,UAAkB;GACtC,OAEE,CAAC,QAAQ,UAET,CAAC,eAAe;EAEpB;EAEA,IACE,SAAS,MACN,eAAe,UAAU,iBAAiB,aAAa,KAAK,KAAK,CAAC,WAAW,MAChF,GAEA,QACE,OACA,+FACF;CAEJ;CAGA,OACE,oBAAC,eAAD;EAAe,OAAO;EACpB,UAAA,oBAAC,aAAD;GACE,WAAW,YAAY;GACvB,iBAAiB,YAAY,SAAS;GACtC,mBAAmB,YAAY;GAC/B,QAAQ,YAAY;GACpB,WAAW,YAAY;GACvB,cAAc;GACd,YAAY,aAAa,MAAM;GAC/B,gBAAgB,KAAK,eAAe,iBAAiB,MAAM,IAAI;GAE/D,SAAS;GACT,SAAS;GAET,OAAA;GAEA,UAAA,oBAACC,kBAAD;IAEE,GAAI;IAEJ,YAAY,CAAC,CAAC;IACL;IACG;IACZ,MAAM;IACN,QAAQ;IACR,UAAU;IACV,SAAS;IACT,WAAW;IACX,aAAa,WAAW,aAAa,cAAc;IAEnD,SAAS,CAAC,CAAC,uBAAuB,gBAAgB;IACnC;IAEL;IACV,KAAK;IAEL,WAAW,KAAK,YAAY,WAAW,eAAe,iBAAiB,IAAI;IAC3E,OAAO;KAAE,GAAG,aAAa;KAAM,GAAG,YAAY;IAAM;IAExC;IACZ,SAAS;IAET,SAAS;IAET,eAAe;IAEf,QAAQ;IACR,WAAW;IAEX,cAAc;IACd,cAAc;IAEd,SAAS;IACT,gBAAgB,mBAAmB,MAAM,iBAAiB;IAE1D,OAAO;GACR,CAAA;EACU,CAAA;CACA,CAAA;AAEnB;AAEA,MAAM,iBAAiBD,QAAM,WAAW,WAAW;AAInD,IAAI,QAAQ,IAAI,aAAa,cAC3B,eAAwB,cAAc"}
|
|
1
|
+
{"version":3,"file":"RangePicker.mjs","names":["RangeSelector"],"sources":["../../../../src/DatePicker/core/PickerInput/RangePicker.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport * as React from 'react';\n\nimport { useControlledState, useEvent, useLayoutEffect } from '../hooks/react';\nimport useSemantic from '../hooks/useSemantic';\nimport type {\n BaseInfo,\n InternalMode,\n OnOpenChange,\n OpenConfig,\n PanelMode,\n RangePickerRef,\n RangeTimeProps,\n SelectorProps,\n SharedHTMLAttrs,\n SharedPickerProps,\n ValueDate,\n} from '../interface';\nimport type { PickerPanelProps } from '../PickerPanel';\nimport PickerPopup from '../PickerPopup';\nimport { omit, pickAttrs, warning } from '../utils/common';\nimport { isSameTimestamp } from '../utils/dateUtil';\nimport { fillIndex, getFromDate, toArray } from '../utils/miscUtil';\nimport PickerContext from './context';\nimport useCellRender from './hooks/useCellRender';\nimport useFieldsInvalidate from './hooks/useFieldsInvalidate';\nimport useFilledProps from './hooks/useFilledProps';\nimport useFocusEvents, { isTargetInContainers } from './hooks/useFocusEvents';\nimport useFocusLock from './hooks/useFocusLock';\nimport useOpen from './hooks/useOpen';\nimport usePickerRef from './hooks/usePickerRef';\nimport usePresets from './hooks/usePresets';\nimport useRangeDisabledDate from './hooks/useRangeDisabledDate';\nimport useRangePickerValue from './hooks/useRangePickerValue';\nimport useRangeValue, { useInnerValue } from './hooks/useRangeValue';\nimport useRangeValueChange, { type RangeValueChangeSource } from './hooks/useRangeValueChange';\nimport useShowNow from './hooks/useShowNow';\nimport Popup, { type PopupShowTimeConfig } from './Popup';\nimport RangeSelector, {\n type RangeSelectorRef,\n type SelectorIdType,\n} from './Selector/RangeSelector';\n\nfunction separateConfig<T>(config: T | [T, T] | null | undefined, defaultConfig: T): [T, T] {\n const singleConfig = config ?? defaultConfig;\n\n if (Array.isArray(singleConfig)) {\n return singleConfig;\n }\n\n return [singleConfig, singleConfig];\n}\n\nexport type RangeValueType<DateType> = [\n start: DateType | null | undefined,\n end: DateType | null | undefined,\n];\n\n/** Used for change event, it should always be not undefined */\nexport type NoUndefinedRangeValueType<DateType> = [start: DateType | null, end: DateType | null];\n\nexport interface BaseRangePickerProps<DateType extends object> extends Omit<\n SharedPickerProps<DateType>,\n 'showTime' | 'id'\n> {\n allowEmpty?: boolean | [boolean, boolean];\n\n // Picker Value\n /**\n * Config the popup panel date.\n * Every time active the input to open popup will reset with `defaultPickerValue`.\n *\n * Note: `defaultPickerValue` priority is higher than `value` for the first open.\n */\n defaultPickerValue?: [DateType, DateType] | DateType | null;\n\n defaultValue?: RangeValueType<DateType>;\n // Control\n disabled?: boolean | [boolean, boolean];\n // Structure\n id?: SelectorIdType;\n // Mode\n mode?: [startMode: PanelMode, endMode: PanelMode];\n onCalendarChange?: (\n dates: NoUndefinedRangeValueType<DateType>,\n dateStrings: [string, string],\n info: BaseInfo,\n ) => void;\n\n onChange?: (\n dates: NoUndefinedRangeValueType<DateType> | null,\n dateStrings: [string, string],\n ) => void;\n\n onOk?: (values: NoUndefinedRangeValueType<DateType>) => void;\n /** Trigger on each `mode` or `pickerValue` changed. */\n onPanelChange?: (\n values: NoUndefinedRangeValueType<DateType>,\n modes: [startMode: PanelMode, endMode: PanelMode],\n ) => void;\n /**\n * Each popup panel `pickerValue` includes `mode` change will trigger the callback.\n * @param date The changed picker value\n * @param info.source `panel` from the panel click. `reset` from popup open or field typing\n * @param info.mode Next `mode` panel\n */\n onPickerValueChange?: (\n date: [DateType, DateType],\n info: BaseInfo & {\n source: 'reset' | 'panel';\n mode: [PanelMode, PanelMode];\n },\n ) => void;\n\n /**\n * Config each start & end field popup panel date.\n * When config `pickerValue`, you must also provide `onPickerValueChange` to handle changes.\n */\n pickerValue?: [DateType, DateType] | DateType | null;\n // Placeholder\n placeholder?: [string, string];\n\n // Preset\n presets?: ValueDate<Exclude<RangeValueType<DateType>, null>>[];\n /** @deprecated Please use `presets` instead */\n ranges?: Record<\n string,\n Exclude<RangeValueType<DateType>, null> | (() => Exclude<RangeValueType<DateType>, null>)\n >;\n\n separator?: React.ReactNode;\n\n // Time\n showTime?: boolean | RangeTimeProps<DateType>;\n // Value\n value?: RangeValueType<DateType> | null;\n}\n\nexport interface RangePickerProps<DateType extends object>\n extends\n BaseRangePickerProps<DateType>,\n Omit<RangeTimeProps<DateType>, 'format' | 'defaultValue' | 'defaultOpenValue'> {}\n\nfunction getActiveRange(activeIndex: number) {\n return activeIndex === 1 ? 'end' : 'start';\n}\n\nfunction RangePicker<DateType extends object = any>(\n props: RangePickerProps<DateType>,\n ref: React.Ref<RangePickerRef>,\n) {\n // ========================= Prop =========================\n const [filledProps, internalPicker, complexPicker, formatList, maskFormat, isInvalidateDate] =\n useFilledProps(props, () => {\n const { disabled, allowEmpty } = props;\n\n const mergedDisabled = separateConfig(disabled, false);\n const mergedAllowEmpty = separateConfig(allowEmpty, false);\n\n return {\n disabled: mergedDisabled,\n allowEmpty: mergedAllowEmpty,\n };\n });\n\n const {\n // Style\n prefixCls,\n rootClassName,\n styles: propStyles,\n classNames: propClassNames,\n\n previewValue,\n // Value\n defaultValue,\n value,\n needConfirm,\n onClear,\n onKeyDown,\n\n // Disabled\n disabled,\n allowEmpty,\n disabledDate,\n minDate,\n maxDate,\n\n // Open\n defaultOpen,\n open,\n onOpenChange,\n\n // Picker\n locale,\n generateConfig,\n picker,\n showNow,\n showToday,\n showTime,\n\n // Mode\n mode,\n onPanelChange,\n onCalendarChange,\n onOk,\n\n // Picker Value\n defaultPickerValue,\n pickerValue,\n onPickerValueChange,\n\n // Format\n inputReadOnly,\n\n suffixIcon,\n\n // Focus\n onFocus,\n onBlur,\n\n // Presets\n presets,\n ranges,\n\n // Render\n components,\n cellRender,\n dateRender,\n monthCellRender,\n\n // Native\n onClick,\n } = filledProps;\n\n // ========================= Refs =========================\n const selectorRef = usePickerRef<Parameters<RangePickerRef['focus']>[0], RangeSelectorRef>(ref);\n const popupRef = React.useRef<HTMLDivElement>(null);\n\n // ======================= Semantic =======================\n const [mergedClassNames, mergedStyles] = useSemantic(propClassNames, propStyles);\n\n // ========================= Open =========================\n const [mergedOpen, setMergeOpen] = useOpen(open, defaultOpen, disabled, onOpenChange);\n\n const triggerOpen: OnOpenChange = (nextOpen, config?: OpenConfig) => {\n // No need to open if all disabled\n if (disabled.some((fieldDisabled) => !fieldDisabled) || !nextOpen) {\n setMergeOpen(nextOpen, config);\n }\n };\n\n // ======================== Values ========================\n const [mergedValue, setInnerValue, getCalendarValue, triggerCalendarChange, triggerOk] =\n useInnerValue<RangeValueType<DateType>, DateType>(\n generateConfig,\n locale,\n formatList,\n true,\n false,\n defaultValue,\n value,\n onCalendarChange,\n onOk,\n );\n\n const calendarValue = getCalendarValue();\n\n // ======================== Focus =========================\n const isInternalPickerElement = useEvent((element: EventTarget | null) =>\n isTargetInContainers(element, [selectorRef.current!.nativeElement, popupRef.current]),\n );\n\n const [focused, onFieldFocus, onFieldBlur] = useFocusEvents(\n isInternalPickerElement,\n (index, event) => {\n onFocus?.(event, {\n range: getActiveRange(index),\n });\n },\n (index, event) => {\n onBlur?.(event, {\n range: getActiveRange(index),\n });\n },\n () => {\n triggerOpen(false);\n },\n );\n\n // ======================== Value =========================\n const [\n /** Trigger `onChange` by check `disabledDate` */\n flushSubmit,\n /** Trigger `onChange` directly without check `disabledDate` */\n triggerSubmitChange,\n /** Reset uncommitted values */\n resetValue,\n ] = useRangeValue<RangeValueType<DateType>, DateType>(\n filledProps,\n mergedValue,\n setInnerValue,\n getCalendarValue,\n triggerCalendarChange,\n disabled,\n formatList,\n isInvalidateDate,\n );\n\n const triggerFieldCalendarChange = useEvent((index: number, date: DateType) => {\n triggerCalendarChange(fillIndex(getCalendarValue(), index, date));\n });\n\n const flushFieldSubmit = useEvent((index: number, needTriggerChange: boolean) => {\n flushSubmit(index, needTriggerChange);\n\n if (needTriggerChange) {\n triggerOpen(false, { force: true });\n }\n });\n\n const enabledFieldCount = disabled.filter((fieldDisabled) => !fieldDisabled).length;\n const [\n rangeValueIndex,\n activeIndex,\n forceFocus,\n triggeredFields,\n triggerRangeValueChange,\n resetRangeValueChange,\n ] = useRangeValueChange(\n enabledFieldCount,\n needConfirm,\n allowEmpty,\n getCalendarValue,\n triggerFieldCalendarChange,\n flushFieldSubmit,\n resetValue,\n );\n\n useFocusLock(rangeValueIndex, forceFocus, selectorRef, popupRef, triggerOpen);\n\n // Finalize the current interaction only after the popup is actually closed.\n // 仅在 popup 实际关闭后,统一收口当前交互。\n useLayoutEffect(\n (firstMount) => {\n if (!firstMount && !mergedOpen) {\n triggerRangeValueChange(rangeValueIndex ?? activeIndex, 'popupClose');\n }\n },\n [mergedOpen],\n );\n\n // ======================= ShowTime =======================\n /** Used for Popup panel */\n const mergedShowTime = React.useMemo<\n (PopupShowTimeConfig<DateType> & Pick<RangeTimeProps<DateType>, 'defaultOpenValue'>) | null\n >(() => {\n if (!showTime) {\n return null;\n }\n\n const { disabledTime } = showTime;\n\n const proxyDisabledTime = disabledTime\n ? (date: DateType) => {\n const range = getActiveRange(activeIndex);\n const fromDate = getFromDate(calendarValue, triggeredFields, activeIndex);\n return disabledTime(date, range, {\n from: fromDate,\n });\n }\n : undefined;\n\n return { ...showTime, disabledTime: proxyDisabledTime };\n }, [showTime, activeIndex, calendarValue, triggeredFields]);\n\n // ========================= Mode =========================\n const [modes, setModes] = useControlledState<[PanelMode, PanelMode]>([picker, picker], mode);\n\n const mergedMode = modes[activeIndex] || picker;\n\n /** Extends from `mergedMode` to patch `datetime` mode */\n const internalMode: InternalMode =\n mergedMode === 'date' && mergedShowTime ? 'datetime' : mergedMode;\n\n // ====================== PanelCount ======================\n const multiplePanel = internalMode === picker && internalMode !== 'time';\n\n // ======================= Show Now =======================\n const mergedShowNow = useShowNow(picker, mergedMode, showNow, showToday, true);\n\n // ===================== DisabledDate =====================\n const mergedDisabledDate = useRangeDisabledDate(\n calendarValue,\n disabled,\n activeIndex,\n triggeredFields,\n generateConfig,\n locale,\n disabledDate,\n );\n\n // ======================= Validate =======================\n const [submitInvalidates, onSelectorInvalid] = useFieldsInvalidate(\n calendarValue,\n isInvalidateDate,\n allowEmpty,\n );\n\n // ===================== Picker Value =====================\n const [currentPickerValue, setCurrentPickerValue] = useRangePickerValue(\n generateConfig,\n locale,\n calendarValue,\n modes,\n mergedOpen,\n focused,\n activeIndex,\n internalPicker,\n multiplePanel,\n defaultPickerValue,\n pickerValue,\n mergedShowTime?.defaultOpenValue,\n onPickerValueChange,\n minDate,\n maxDate,\n );\n\n // >>> Mode need wait for `pickerValue`\n const triggerModeChange = useEvent(\n (nextPickerValue: DateType | null, nextMode: PanelMode, triggerEvent?: boolean) => {\n const clone = fillIndex(modes, activeIndex, nextMode);\n\n if (clone[0] !== modes[0] || clone[1] !== modes[1]) {\n setModes(clone);\n }\n\n // Compatible with `onPanelChange`\n if (onPanelChange && triggerEvent !== false) {\n const clonePickerValue: RangeValueType<DateType> = [...calendarValue];\n if (nextPickerValue) {\n clonePickerValue[activeIndex] = nextPickerValue;\n }\n onPanelChange(clonePickerValue as NoUndefinedRangeValueType<DateType>, clone);\n }\n },\n );\n\n // ======================== Change ========================\n const fillCalendarValue = (date: DateType, index: number) =>\n // Trigger change only when date changed\n fillIndex(calendarValue, index, date);\n\n // ======================== Submit ========================\n /**\n * Trigger by confirm operation.\n * This function has already handle the `needConfirm` check logic.\n * - Selector: enter key\n * - Panel: OK button\n */\n const triggerPartConfirm = (\n date?: DateType | null,\n source: RangeValueChangeSource = 'confirm',\n ) => {\n triggerRangeValueChange(activeIndex, source, date ?? undefined);\n };\n\n // ======================== Click =========================\n const onSelectorClick: React.MouseEventHandler<HTMLDivElement> = (event) => {\n const rootNode = (event.target as HTMLElement).getRootNode();\n if (\n !selectorRef.current!.nativeElement.contains(\n (rootNode as Document | ShadowRoot).activeElement ?? document.activeElement,\n )\n ) {\n // Click to focus the enabled input\n const enabledIndex = disabled.findIndex((d) => !d);\n if (enabledIndex >= 0) {\n selectorRef.current!.focus({ index: enabledIndex });\n }\n }\n\n triggerOpen(true);\n\n onClick?.(event);\n };\n\n const onSelectorClear = () => {\n resetRangeValueChange();\n triggerSubmitChange(null);\n triggerOpen(false, { force: true });\n onClear?.();\n };\n\n // ======================== Hover =========================\n const [hoverSource, setHoverSource] = React.useState<'cell' | 'preset' | null>(null);\n const [internalHoverValues, setInternalHoverValues] =\n React.useState<RangeValueType<DateType> | null>(null);\n\n const hoverValues = React.useMemo(() => {\n return internalHoverValues || calendarValue;\n }, [calendarValue, internalHoverValues]);\n\n // \"Weak\" hover only highlights the hovered cell instead of composing a range.\n // Use it while choosing the first value so the pending selection remains selected.\n const showWeakHover =\n // Preset hover always previews the whole range.\n hoverSource === 'cell' &&\n // Once the other field has a value, range hover takes precedence.\n !calendarValue[(activeIndex + 1) % 2] &&\n // Only a changed active value needs weak hover.\n !isSameTimestamp(generateConfig, calendarValue[activeIndex], mergedValue[activeIndex]);\n const activeHoverValue = internalHoverValues?.[activeIndex];\n\n // Clean up `internalHoverValues` when closed\n React.useEffect(() => {\n if (!mergedOpen) {\n setInternalHoverValues(null);\n }\n }, [mergedOpen]);\n\n // ========================================================\n // == Panels ==\n // ========================================================\n // Save the offset with active bar position\n // const [activeOffset, setActiveOffset] = React.useState(0);\n const [activeInfo, setActiveInfo] = React.useState<\n [activeInputLeft: number, activeInputRight: number, selectorWidth: number]\n >([0, 0, 0]);\n\n const onSetHover = (date: RangeValueType<DateType> | null, source: 'cell' | 'preset') => {\n if (previewValue !== 'hover') {\n return;\n }\n setInternalHoverValues(date);\n setHoverSource(source);\n };\n\n // ======================= Presets ========================\n const presetList = usePresets(presets, ranges);\n\n const onPresetHover = (nextValues: RangeValueType<DateType> | null) => {\n onSetHover(nextValues, 'preset');\n };\n\n const onPresetSubmit = (nextValues: RangeValueType<DateType>) => {\n const passed = triggerSubmitChange(nextValues);\n\n if (passed) {\n triggerOpen(false, { force: true });\n }\n };\n\n const onNow = (now: DateType) => {\n triggerPartConfirm(now);\n };\n\n // ======================== Panel =========================\n const onPanelHover = (date: DateType) => {\n onSetHover(date ? fillCalendarValue(date, activeIndex) : null, 'cell');\n };\n\n // >>> Focus\n const onPanelFocus: React.FocusEventHandler<HTMLElement> = (event) => {\n triggerOpen(true);\n onFieldFocus(activeIndex, 'panel', event);\n };\n\n // >>> Calendar\n const onPanelSelect: PickerPanelProps<DateType>['onSelect'] = (date: DateType) => {\n const panelFinished = !complexPicker && internalPicker === internalMode;\n\n triggerRangeValueChange(\n activeIndex,\n panelFinished ? 'panel-final' : 'panel-intermediate',\n date,\n );\n };\n\n // >>> Close\n const onPopupClose = () => {\n triggerOpen(false);\n };\n\n // >>> cellRender\n const onInternalCellRender = useCellRender(\n cellRender,\n dateRender,\n monthCellRender,\n getActiveRange(activeIndex),\n );\n\n // >>> Value\n const panelValue = calendarValue[activeIndex] || null;\n\n // >>> invalid\n const isPopupInvalidateDate = useEvent((date: DateType) => {\n return isInvalidateDate(date, {\n activeIndex,\n });\n });\n\n const panelProps = React.useMemo(() => {\n const domProps = pickAttrs(filledProps);\n const restProps = omit(filledProps, [\n ...(Object.keys(domProps) as (keyof SharedHTMLAttrs)[]),\n 'onChange',\n 'onCalendarChange',\n 'onClear',\n 'style',\n 'className',\n 'onPanelChange',\n 'disabledTime',\n 'classNames',\n 'styles',\n ]);\n return restProps;\n }, [filledProps]);\n\n // >>> Render\n const panel = (\n <Popup<any>\n containerRef={popupRef}\n // MISC\n {...panelProps}\n defaultOpenValue={toArray(showTime?.defaultOpenValue)[activeIndex]}\n hoverRangeValue={showWeakHover ? null : hoverValues}\n internalMode={internalMode}\n multiplePanel={multiplePanel}\n showNow={mergedShowNow}\n styles={mergedStyles}\n value={panelValue}\n onChange={null}\n onFocus={onPanelFocus}\n onPresetHover={onPresetHover}\n onSubmit={(date) => triggerPartConfirm(date, 'confirm')}\n activeInfo={activeInfo}\n // Disabled\n disabledDate={mergedDisabledDate}\n cellRender={onInternalCellRender}\n // Styles\n classNames={mergedClassNames}\n isInvalid={isPopupInvalidateDate}\n // Focus\n mode={mergedMode}\n showTime={mergedShowTime}\n // Range\n range\n onBlur={(event) => onFieldBlur(activeIndex, 'panel', event)}\n // Mode\n picker={picker}\n onHover={onPanelHover}\n // Submit\n needConfirm={needConfirm}\n onOk={triggerOk}\n // Preset\n presets={presetList}\n onPanelChange={triggerModeChange}\n // Value\n format={maskFormat}\n onPickerValueChange={setCurrentPickerValue}\n // Hover\n hoverValue={showWeakHover && activeHoverValue ? [activeHoverValue] : null}\n // Render\n onPresetSubmit={onPresetSubmit}\n // Now\n onNow={onNow}\n onSelect={onPanelSelect}\n // PickerValue\n pickerValue={currentPickerValue}\n />\n );\n\n // ========================================================\n // == Selector ==\n // ========================================================\n\n // ======================== Change ========================\n const onSelectorChange = (date: DateType, index?: number) => {\n triggerRangeValueChange(index!, 'input', date);\n };\n\n const onSelectorInputChange = () => {\n triggerRangeValueChange(activeIndex, 'input');\n };\n\n // ======================= Selector =======================\n const onSelectorFocus: SelectorProps['onFocus'] = (event, index) => {\n triggerRangeValueChange(index!, 'field-switch');\n\n triggerOpen(true, {\n inherit: true,\n });\n\n onFieldFocus(index!, 'input', event);\n };\n\n const onSelectorBlur: SelectorProps['onBlur'] = (event, index) => {\n onFieldBlur(index!, 'input', event);\n };\n\n const onSelectorKeyDown: SelectorProps['onKeyDown'] = (event, preventDefault) => {\n if (event.key === 'Tab') {\n triggerPartConfirm(null, 'keyboard-submit-weak');\n } else if (event.key === 'Escape') {\n triggerRangeValueChange(activeIndex, 'esc');\n triggerOpen(false);\n }\n\n onKeyDown?.(event, preventDefault);\n };\n\n // ======================= Context ========================\n const context = React.useMemo(\n () => ({\n prefixCls,\n locale,\n generateConfig,\n button: components.button,\n input: components.input,\n classNames: mergedClassNames,\n styles: mergedStyles,\n }),\n [\n prefixCls,\n locale,\n generateConfig,\n components.button,\n components.input,\n mergedClassNames,\n mergedStyles,\n ],\n );\n\n // ======================== Effect ========================\n // >>> Mode\n // Reset for every active\n useLayoutEffect(() => {\n if (mergedOpen && activeIndex !== undefined) {\n // Legacy compatible. This effect update should not trigger `onPanelChange`\n triggerModeChange(null, picker, false);\n }\n }, [mergedOpen, activeIndex, picker]);\n\n // ====================== DevWarning ======================\n if (process.env.NODE_ENV !== 'production') {\n const isIndexEmpty = (index: number) => {\n return (\n // Value is empty\n !value?.[index] &&\n // DefaultValue is empty\n !defaultValue?.[index]\n );\n };\n\n if (\n disabled.some(\n (fieldDisabled, index) => fieldDisabled && isIndexEmpty(index) && !allowEmpty[index],\n )\n ) {\n warning(\n false,\n '`disabled` should not set with empty `value`. You should set `allowEmpty` or `value` instead.',\n );\n }\n }\n\n // ======================== Render ========================\n return (\n <PickerContext value={context}>\n <PickerPopup\n direction={filledProps.direction}\n getAnchor={() => selectorRef.current?.nativeElement}\n getPopupContainer={filledProps.getPopupContainer}\n inline={filledProps.inlinePopup}\n placement={filledProps.placement}\n popupElement={panel}\n popupStyle={mergedStyles.popup.root}\n popupClassName={clsx(rootClassName, mergedClassNames.popup.root)}\n // Visible\n visible={mergedOpen}\n onClose={onPopupClose}\n // Range\n range\n >\n <RangeSelector\n // Shared\n {...filledProps}\n // Ref\n activeHelp={!!internalHoverValues}\n focused={focused}\n maskFormat={maskFormat}\n open={mergedOpen}\n onBlur={onSelectorBlur}\n onChange={onSelectorChange}\n onFocus={onSelectorFocus}\n onKeyDown={onSelectorKeyDown}\n activeIndex={focused || mergedOpen ? activeIndex : null}\n // Active\n allHelp={!!internalHoverValues && hoverSource === 'preset'}\n inputReadOnly={inputReadOnly}\n // Disabled\n disabled={disabled}\n ref={selectorRef}\n // Style\n className={clsx(filledProps.className, rootClassName, mergedClassNames.root)}\n style={{ ...mergedStyles.root, ...filledProps.style }}\n // Icon\n suffixIcon={suffixIcon}\n onClear={onSelectorClear}\n // Invalid\n invalid={submitInvalidates}\n // Open\n onInputChange={onSelectorInputChange}\n // Format\n format={formatList}\n onInvalid={onSelectorInvalid}\n // Offset\n onActiveInfo={setActiveInfo}\n onOpenChange={triggerOpen}\n // Click\n onClick={onSelectorClick}\n onSubmit={() => triggerPartConfirm(null, 'keyboard-submit')}\n // Change\n value={hoverValues}\n />\n </PickerPopup>\n </PickerContext>\n );\n}\n\nconst RefRangePicker = React.forwardRef(RangePicker) as <DateType extends object = any>(\n props: RangePickerProps<DateType> & React.RefAttributes<RangePickerRef>,\n) => React.ReactElement;\n\nif (process.env.NODE_ENV !== 'production') {\n (RefRangePicker as any).displayName = 'RefRangePicker';\n}\n\nexport default RefRangePicker;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAS,eAAkB,QAAuC,eAA0B;CAC1F,MAAM,eAAe,UAAU;CAE/B,IAAI,MAAM,QAAQ,YAAY,GAC5B,OAAO;CAGT,OAAO,CAAC,cAAc,YAAY;AACpC;AA4FA,SAAS,eAAe,aAAqB;CAC3C,OAAO,gBAAgB,IAAI,QAAQ;AACrC;AAEA,SAAS,YACP,OACA,KACA;CAEA,MAAM,CAAC,aAAa,gBAAgB,eAAe,YAAY,YAAY,oBACzE,eAAe,aAAa;EAC1B,MAAM,EAAE,UAAU,eAAe;EAKjC,OAAO;GACL,UAJqB,eAAe,UAAU,KAIvB;GACvB,YAJuB,eAAe,YAAY,KAIvB;EAC7B;CACF,CAAC;CAEH,MAAM,EAEJ,WACA,eACA,QAAQ,YACR,YAAY,gBAEZ,cAEA,cACA,OACA,aACA,SACA,WAGA,UACA,YACA,cACA,SACA,SAGA,aACA,MACA,cAGA,QACA,gBACA,QACA,SACA,WACA,UAGA,MACA,eACA,kBACA,MAGA,oBACA,aACA,qBAGA,eAEA,YAGA,SACA,QAGA,SACA,QAGA,YACA,YACA,YACA,iBAGA,YACE;CAGJ,MAAM,cAAc,aAAuE,GAAG;CAC9F,MAAM,WAAW,MAAM,OAAuB,IAAI;CAGlD,MAAM,CAAC,kBAAkB,gBAAgB,YAAY,gBAAgB,UAAU;CAG/E,MAAM,CAAC,YAAY,gBAAgB,QAAQ,MAAM,aAAa,UAAU,YAAY;CAEpF,MAAM,eAA6B,UAAU,WAAwB;EAEnE,IAAI,SAAS,MAAM,kBAAkB,CAAC,aAAa,KAAK,CAAC,UACvD,aAAa,UAAU,MAAM;CAEjC;CAGA,MAAM,CAAC,aAAa,eAAe,kBAAkB,uBAAuB,aAC1E,cAC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