@lobehub/ui 6.15.2 → 6.15.4
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/ActionIconGroup.mjs.map +1 -1
- 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/Anchor.mjs +1 -1
- 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/SplitButton.mjs.map +1 -1
- 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/theme.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/RangePicker.mjs.map +1 -1
- package/es/DatePicker/SinglePicker.mjs.map +1 -1
- 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/geometry.mjs +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/legacyDate.mjs.map +1 -1
- package/es/DatePicker/locale.d.mts +1 -2
- package/es/DatePicker/locale.mjs.map +1 -1
- package/es/DatePicker/type.d.mts +1 -2
- package/es/DatePicker/usePickerShared.mjs.map +1 -1
- 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/EditableText.mjs.map +1 -1
- package/es/EditableText/type.d.mts +1 -2
- package/es/EditorSlashMenu/EditorSlashMenu.d.mts +1 -2
- package/es/EditorSlashMenu/EditorSlashMenu.mjs.map +1 -1
- package/es/EditorSlashMenu/atoms.d.mts +1 -2
- 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/Empty.mjs.map +1 -1
- 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/tanstack.mjs.map +1 -1
- 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/HtmlPreview.mjs.map +1 -1
- package/es/HtmlPreview/Iframe.d.mts +1 -2
- package/es/HtmlPreview/Iframe.mjs.map +1 -1
- 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/ProTable.mjs.map +1 -1
- package/es/ProTable/hooks/useFetchData.mjs.map +1 -1
- package/es/ProTable/hooks/useFullscreen.mjs.map +1 -1
- package/es/ProTable/hooks/useProRequest.mjs.map +1 -1
- package/es/ProTable/locale.d.mts +1 -2
- package/es/ProTable/parts/LightFilter.mjs.map +1 -1
- package/es/ProTable/parts/renderValue.mjs.map +1 -1
- 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/Segmented.mjs.map +1 -1
- 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/hooks.mjs.map +1 -1
- 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/SelectionCells.mjs.map +1 -1
- 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/Text.mjs.map +1 -1
- 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/Toc.mjs +1 -1
- 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/CenterPlay.mjs.map +1 -1
- 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/store.mjs.map +1 -1
- 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/AgentSkillCard.mjs +2 -2
- package/es/awesome/AgentSkillCard/AgentSkillCard.mjs.map +1 -1
- package/es/awesome/AgentSkillCard/agents.d.mts +1 -2
- package/es/awesome/AgentSkillCard/type.d.mts +2 -3
- 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/SpotlightCard.mjs.map +1 -1
- 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/BackBottom.mjs.map +1 -1
- 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/index.mjs.map +1 -1
- 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/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/Spine.mjs.map +1 -1
- 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/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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.mjs","names":["lobeTheme"],"sources":["../../src/CodeDiff/theme.ts"],"sourcesContent":["import type { FileDiffOptions } from '@pierre/diffs';\nimport { registerCustomTheme, resolveTheme } from '@pierre/diffs';\n\nimport lobeHighlightsTheme from '@/Highlighter/theme/lobe-highlights-theme';\nimport lobeTheme from '@/Highlighter/theme/lobe-theme';\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nimport type { DiffViewMode } from './type';\n\nlet isLobeDiffThemeRegistered = false;\n\nexport const registerLobeDiffThemes = () => {\n if (isLobeDiffThemeRegistered) return;\n\n registerCustomTheme('lobe-theme', () => Promise.resolve(lobeHighlightsTheme), 'zed');\n registerCustomTheme('lobe-theme', () => Promise.resolve(lobeTheme as any));\n // Without an explicit backend, resolveTheme falls back to shiki and pulls shiki/core in eagerly.\n void resolveTheme('lobe-theme', 'highlights');\n\n isLobeDiffThemeRegistered = true;\n};\n\nconst customSeparatorCSS = `\n :host {\n --diffs-dark-bg: transparent !important;\n --diffs-light-bg: transparent !important;\n --diffs-gap-fallback: 8px;\n --diffs-added-light: ${cssVar.colorSuccessHover};\n --diffs-added-dark: ${cssVar.colorSuccessBorderHover};\n --diffs-modified-light: ${cssVar.colorInfoHover};\n --diffs-modified-dark: ${cssVar.colorInfoBorderHover};\n --diffs-deleted-light: ${cssVar.colorErrorHover};\n --diffs-deleted-dark: ${cssVar.colorErrorBorderHover};\n }\n\n [data-gutter-buffer] {\n opacity: 0.2 !important;\n }\n\n [data-code] {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n [data-gutter] {\n backdrop-filter: blur(16px) !important;\n }\n`;\n\nexport const getLobeDiffOptions = ({\n diffOptions,\n isDarkMode,\n viewMode,\n}: {\n diffOptions?: FileDiffOptions<string, undefined>;\n isDarkMode: boolean;\n viewMode: DiffViewMode;\n}): FileDiffOptions<string, undefined> => ({\n theme: {\n dark: 'lobe-theme',\n light: 'lobe-theme',\n },\n themeType: isDarkMode ? 'dark' : 'light',\n diffStyle: viewMode,\n disableFileHeader: true,\n preferredHighlighter: 'highlights',\n unsafeCSS: customSeparatorCSS,\n ...diffOptions,\n});\n"],"mappings":";;;;;AASA,IAAI,4BAA4B;AAEhC,MAAa,+BAA+B;CAC1C,IAAI,2BAA2B;CAE/B,oBAAoB,oBAAoB,QAAQ,QAAQ,mBAAmB,GAAG,KAAK;CACnF,oBAAoB,oBAAoB,QAAQ,QAAQA,kBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.mjs","names":["lobeTheme"],"sources":["../../src/CodeDiff/theme.ts"],"sourcesContent":["import type { FileDiffOptions } from '@pierre/diffs';\nimport { registerCustomTheme, resolveTheme } from '@pierre/diffs';\n\nimport lobeHighlightsTheme from '@/Highlighter/theme/lobe-highlights-theme';\nimport lobeTheme from '@/Highlighter/theme/lobe-theme';\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nimport type { DiffViewMode } from './type';\n\nlet isLobeDiffThemeRegistered = false;\n\nexport const registerLobeDiffThemes = () => {\n if (isLobeDiffThemeRegistered) return;\n\n registerCustomTheme('lobe-theme', () => Promise.resolve(lobeHighlightsTheme), 'zed');\n registerCustomTheme('lobe-theme', () => Promise.resolve(lobeTheme as any));\n // Without an explicit backend, resolveTheme falls back to shiki and pulls shiki/core in eagerly.\n void resolveTheme('lobe-theme', 'highlights');\n\n isLobeDiffThemeRegistered = true;\n};\n\nconst customSeparatorCSS = `\n :host {\n --diffs-dark-bg: transparent !important;\n --diffs-light-bg: transparent !important;\n --diffs-gap-fallback: 8px;\n --diffs-added-light: ${cssVar.colorSuccessHover};\n --diffs-added-dark: ${cssVar.colorSuccessBorderHover};\n --diffs-modified-light: ${cssVar.colorInfoHover};\n --diffs-modified-dark: ${cssVar.colorInfoBorderHover};\n --diffs-deleted-light: ${cssVar.colorErrorHover};\n --diffs-deleted-dark: ${cssVar.colorErrorBorderHover};\n }\n\n [data-gutter-buffer] {\n opacity: 0.2 !important;\n }\n\n [data-code] {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n [data-gutter] {\n backdrop-filter: blur(16px) !important;\n }\n`;\n\nexport const getLobeDiffOptions = ({\n diffOptions,\n isDarkMode,\n viewMode,\n}: {\n diffOptions?: FileDiffOptions<string, undefined>;\n isDarkMode: boolean;\n viewMode: DiffViewMode;\n}): FileDiffOptions<string, undefined> => ({\n theme: {\n dark: 'lobe-theme',\n light: 'lobe-theme',\n },\n themeType: isDarkMode ? 'dark' : 'light',\n diffStyle: viewMode,\n disableFileHeader: true,\n preferredHighlighter: 'highlights',\n unsafeCSS: customSeparatorCSS,\n ...diffOptions,\n});\n"],"mappings":";;;;;AASA,IAAI,4BAA4B;AAEhC,MAAa,+BAA+B;CAC1C,IAAI,2BAA2B;CAE/B,oBAAoB,oBAAoB,QAAQ,QAAQ,mBAAmB,GAAG,KAAK;CACnF,oBAAoB,oBAAoB,QAAQ,QAAQA,kBAAgB,CAAC;CAEpE,aAAa,cAAc,YAAY;CAE5C,4BAA4B;AAC9B;AAEA,MAAM,qBAAqB;;;;;2BAKA,OAAO,kBAAkB;0BAC1B,OAAO,wBAAwB;8BAC3B,OAAO,eAAe;6BACvB,OAAO,qBAAqB;6BAC5B,OAAO,gBAAgB;4BACxB,OAAO,sBAAsB;;;;;;;;;;;;;;;;AAiBzD,MAAa,sBAAsB,EACjC,aACA,YACA,gBAKyC;CACzC,OAAO;EACL,MAAM;EACN,OAAO;CACT;CACA,WAAW,aAAa,SAAS;CACjC,WAAW;CACX,mBAAmB;CACnB,sBAAsB;CACtB,WAAW;CACX,GAAG;AACL"}
|
package/es/CodeDiff/type.d.mts
CHANGED
package/es/CodeEditor/type.d.mts
CHANGED
|
@@ -4,12 +4,12 @@ import { accordionStyles } from "../Accordion/style.mjs";
|
|
|
4
4
|
import { collapsibleClasses } from "./stable.mjs";
|
|
5
5
|
import { memo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { Collapsible } from "@base-ui/react/collapsible";
|
|
7
|
+
import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
|
|
8
8
|
// src/Collapsible/Collapsible.tsx
|
|
9
|
-
const Collapsible
|
|
9
|
+
const Collapsible = memo(({ open, keepMounted, children, className, contentClassName, contentStyle, style }) => /* @__PURE__ */ jsx(Collapsible$1.Root, {
|
|
10
10
|
className: collapsibleClasses(),
|
|
11
11
|
open,
|
|
12
|
-
children: /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
12
|
+
children: /* @__PURE__ */ jsx(Collapsible$1.Panel, {
|
|
13
13
|
className: cx(accordionStyles.panel, collapsibleClasses("panel"), className),
|
|
14
14
|
keepMounted,
|
|
15
15
|
style,
|
|
@@ -20,7 +20,7 @@ const Collapsible$1 = memo(({ open, keepMounted, children, className, contentCla
|
|
|
20
20
|
})
|
|
21
21
|
})
|
|
22
22
|
}));
|
|
23
|
-
Collapsible
|
|
24
|
-
export { Collapsible
|
|
23
|
+
Collapsible.displayName = "Collapsible";
|
|
24
|
+
export { Collapsible as default };
|
|
25
25
|
|
|
26
26
|
//# sourceMappingURL=Collapsible.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.mjs","names":["
|
|
1
|
+
{"version":3,"file":"Collapsible.mjs","names":["BaseUICollapsible"],"sources":["../../src/Collapsible/Collapsible.tsx"],"sourcesContent":["'use client';\n\nimport { Collapsible as BaseUICollapsible } from '@base-ui/react/collapsible';\nimport { memo } from 'react';\n\nimport { cx } from '@/styles';\n\nimport { accordionStyles } from '../Accordion/atoms';\nimport { collapsibleClasses } from './stable';\nimport type { CollapsibleProps } from './type';\n\nconst Collapsible = memo<CollapsibleProps>(\n ({ open, keepMounted, children, className, contentClassName, contentStyle, style }) => (\n <BaseUICollapsible.Root className={collapsibleClasses()} open={open}>\n <BaseUICollapsible.Panel\n className={cx(accordionStyles.panel, collapsibleClasses('panel'), className)}\n keepMounted={keepMounted}\n style={style}\n >\n <div\n className={cx(accordionStyles.content, collapsibleClasses('content'), contentClassName)}\n style={contentStyle}\n >\n {children}\n </div>\n </BaseUICollapsible.Panel>\n </BaseUICollapsible.Root>\n ),\n);\n\nCollapsible.displayName = 'Collapsible';\n\nexport default Collapsible;\n"],"mappings":";;;;;;;;AAWA,MAAM,cAAc,MACjB,EAAE,MAAM,aAAa,UAAU,WAAW,kBAAkB,cAAc,YACzE,oBAACA,cAAkB,MAAnB;CAAwB,WAAW,mBAAmB;CAAS;CAC7D,UAAA,oBAACA,cAAkB,OAAnB;EACE,WAAW,GAAG,gBAAgB,OAAO,mBAAmB,OAAO,GAAG,SAAS;EAC9D;EACN;EAEP,UAAA,oBAAC,OAAD;GACE,WAAW,GAAG,gBAAgB,SAAS,mBAAmB,SAAS,GAAG,gBAAgB;GACtF,OAAO;GAEN;EACE,CAAA;CACkB,CAAA;AACH,CAAA,CAE5B;AAEA,YAAY,cAAc"}
|
|
@@ -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 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangePicker.mjs","names":["clsx","RcRangePicker"],"sources":["../../src/DatePicker/RangePicker.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { ArrowRight } from 'lucide-react';\n\nimport Icon from '@/Icon';\n\nimport { RangePicker as RcRangePicker } from './core';\nimport type { GenerateConfig } from './core/generate';\nimport { isNativeDateConfig, normalizeLegacyDateProps } from './legacyDate';\nimport { usePickerLocale } from './locale';\nimport { dateRangePickerClasses } from './stable';\nimport type { DateRangePickerProps, RangePickerComponent } from './type';\nimport { usePanelKeyboard } from './usePanelKeyboard';\nimport { usePickerShared } from './usePickerShared';\nimport { usePresetActive } from './usePresetActive';\n\nconst generateRangePicker = <DateType extends object>(generateConfig: GenerateConfig<DateType>) => {\n const RangePicker = (rawProps: DateRangePickerProps<DateType>) => {\n const normalized = normalizeLegacyDateProps(rawProps, generateConfig);\n // The default (native Date) picker keeps the previous lobe contract: a cleared range is\n // `[null, null]` with empty strings, never `null`.\n const props =\n isNativeDateConfig(generateConfig) && normalized.onChange\n ? {\n ...normalized,\n onChange: (dates: any, dateStrings: any) =>\n (normalized.onChange as any)(dates ?? [null, null], dateStrings ?? ['', '']),\n }\n : normalized;\n const {\n allowClear,\n allowEmpty,\n cellRender,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n dropdownClassName,\n direction,\n disabled,\n disabledDate,\n getPopupContainer,\n id,\n locale: localeOverride,\n maxDate,\n minDate,\n mode,\n monthCellRender,\n needConfirm,\n nextIcon,\n onBlur,\n onKeyDown,\n onCalendarChange,\n onChange,\n onFocus,\n onOk,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n order,\n picker = 'date',\n pickerValue,\n placeholder,\n popupClassName,\n popupStyle,\n prevIcon,\n renderExtraFooter,\n rootClassName,\n separator,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n value,\n variant,\n ...rest\n } = props;\n const { locale, rangePlaceholder } = usePickerLocale(localeOverride);\n const keyboard = usePanelKeyboard({\n cellRender,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n direction,\n generateConfig,\n mode,\n monthCellRender,\n onChange,\n onFocus,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker,\n pickerValue,\n range: true,\n value,\n });\n const shared = usePickerShared({\n stable: dateRangePickerClasses,\n allowClear,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n defaultOpen,\n dropdownClassName,\n generateConfig,\n getPopupContainer,\n maxDate,\n minDate,\n needConfirm,\n nextIcon,\n onKeyDown,\n onOpenChange: keyboard.onOpenChange,\n open,\n picker,\n popupClassName,\n popupStyle,\n prevIcon,\n rootClassName: clsx(keyboard.scopeClassName, rootClassName),\n semanticProps: props,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n variant,\n });\n\n const presetActive = usePresetActive((rest as any).presets, value, defaultValue);\n\n return (\n <RcRangePicker<DateType>\n {...rest}\n {...shared}\n allowEmpty={allowEmpty}\n cellRender={keyboard.cellRender}\n dateRender={dateRender}\n defaultPickerValue={defaultPickerValue as any}\n defaultValue={defaultValue as any}\n direction={direction}\n disabled={disabled}\n disabledDate={disabledDate}\n id={id}\n locale={locale.lang}\n mode={mode as any}\n monthCellRender={monthCellRender}\n order={order}\n picker={picker}\n pickerValue={keyboard.pickerValue}\n placeholder={placeholder ?? rangePlaceholder(picker)}\n presets={presetActive.presets as any}\n renderExtraFooter={renderExtraFooter}\n separator={separator ?? <Icon icon={ArrowRight} size={14} />}\n value={value as any}\n onBlur={onBlur as any}\n onCalendarChange={onCalendarChange as any}\n onFocus={keyboard.onFocus}\n onOk={onOk as any}\n onPanelChange={keyboard.onPanelChange}\n onPickerValueChange={keyboard.onPickerValueChange}\n onChange={(...args: any[]) => {\n presetActive.track(args[0]);\n (keyboard.onChange as any)(...args);\n }}\n />\n );\n };\n RangePicker.displayName = 'RangePicker';\n return RangePicker as RangePickerComponent<DateType>;\n};\n\nexport default generateRangePicker;\n"],"mappings":";;;;;;;;;;;;;AAiBA,MAAM,uBAAgD,mBAA6C;CACjG,MAAM,eAAe,aAA6C;EAChE,MAAM,aAAa,yBAAyB,UAAU,cAAc;EAGpE,MAAM,QACJ,mBAAmB,cAAc,KAAK,WAAW,WAC7C;GACE,GAAG;GACH,WAAW,OAAY,gBACpB,WAAW,SAAiB,SAAS,CAAC,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC;EAC/E,IACA;EACN,MAAM,EACJ,YACA,YACA,YACA,cACA,WACA,WACA,YACA,YACA,YACA,aACA,oBACA,cACA,mBACA,WACA,UACA,cACA,mBACA,IACA,QAAQ,gBACR,SACA,SACA,MACA,iBACA,aACA,UACA,QACA,WACA,kBACA,UACA,SACA,MACA,cACA,eACA,qBACA,MACA,OACA,SAAS,QACT,aACA,aACA,gBACA,YACA,UACA,mBACA,eACA,WACA,QACA,MACA,QACA,QACA,YACA,eACA,eACA,OACA,SACA,GAAG,SACD;EACJ,MAAM,EAAE,QAAQ,qBAAqB,gBAAgB,cAAc;EACnE,MAAM,WAAW,iBAAiB;GAChC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,OAAO;GACP;EACF,CAAC;EACD,MAAM,SAAS,gBAAgB;GAC7B,QAAQ;GACR;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,cAAc,SAAS;GACvB;GACA;GACA;GACA;GACA;GACA,eAAeA,OAAK,SAAS,gBAAgB,aAAa;GAC1D,eAAe;GACf;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EAED,MAAM,eAAe,gBAAiB,KAAa,SAAS,OAAO,YAAY;EAE/E,OACE,oBAACC,gBAAD;GACE,GAAI;GACJ,GAAI;GACQ;GACZ,YAAY,SAAS;GACT;GACQ;GACN;GACH;GACD;GACI;GACV;GACJ,QAAQ,OAAO;GACT;GACW;GACV;GACC;GACR,aAAa,SAAS;GACtB,aAAa,eAAe,iBAAiB,MAAM;GACnD,SAAS,aAAa;GACH;GACnB,WAAW,aAAa,oBAAC,MAAD;IAAM,MAAM;IAAY,MAAM;GAAK,CAAA;GACpD;GACC;GACU;GAClB,SAAS,SAAS;GACZ;GACN,eAAe,SAAS;GACxB,qBAAqB,SAAS;GAC9B,WAAW,GAAG,SAAgB;IAC5B,aAAa,MAAM,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"RangePicker.mjs","names":["clsx","RcRangePicker"],"sources":["../../src/DatePicker/RangePicker.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { ArrowRight } from 'lucide-react';\n\nimport Icon from '@/Icon';\n\nimport { RangePicker as RcRangePicker } from './core';\nimport type { GenerateConfig } from './core/generate';\nimport { isNativeDateConfig, normalizeLegacyDateProps } from './legacyDate';\nimport { usePickerLocale } from './locale';\nimport { dateRangePickerClasses } from './stable';\nimport type { DateRangePickerProps, RangePickerComponent } from './type';\nimport { usePanelKeyboard } from './usePanelKeyboard';\nimport { usePickerShared } from './usePickerShared';\nimport { usePresetActive } from './usePresetActive';\n\nconst generateRangePicker = <DateType extends object>(generateConfig: GenerateConfig<DateType>) => {\n const RangePicker = (rawProps: DateRangePickerProps<DateType>) => {\n const normalized = normalizeLegacyDateProps(rawProps, generateConfig);\n // The default (native Date) picker keeps the previous lobe contract: a cleared range is\n // `[null, null]` with empty strings, never `null`.\n const props =\n isNativeDateConfig(generateConfig) && normalized.onChange\n ? {\n ...normalized,\n onChange: (dates: any, dateStrings: any) =>\n (normalized.onChange as any)(dates ?? [null, null], dateStrings ?? ['', '']),\n }\n : normalized;\n const {\n allowClear,\n allowEmpty,\n cellRender,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n dropdownClassName,\n direction,\n disabled,\n disabledDate,\n getPopupContainer,\n id,\n locale: localeOverride,\n maxDate,\n minDate,\n mode,\n monthCellRender,\n needConfirm,\n nextIcon,\n onBlur,\n onKeyDown,\n onCalendarChange,\n onChange,\n onFocus,\n onOk,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n order,\n picker = 'date',\n pickerValue,\n placeholder,\n popupClassName,\n popupStyle,\n prevIcon,\n renderExtraFooter,\n rootClassName,\n separator,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n value,\n variant,\n ...rest\n } = props;\n const { locale, rangePlaceholder } = usePickerLocale(localeOverride);\n const keyboard = usePanelKeyboard({\n cellRender,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n direction,\n generateConfig,\n mode,\n monthCellRender,\n onChange,\n onFocus,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker,\n pickerValue,\n range: true,\n value,\n });\n const shared = usePickerShared({\n stable: dateRangePickerClasses,\n allowClear,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n defaultOpen,\n dropdownClassName,\n generateConfig,\n getPopupContainer,\n maxDate,\n minDate,\n needConfirm,\n nextIcon,\n onKeyDown,\n onOpenChange: keyboard.onOpenChange,\n open,\n picker,\n popupClassName,\n popupStyle,\n prevIcon,\n rootClassName: clsx(keyboard.scopeClassName, rootClassName),\n semanticProps: props,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n variant,\n });\n\n const presetActive = usePresetActive((rest as any).presets, value, defaultValue);\n\n return (\n <RcRangePicker<DateType>\n {...rest}\n {...shared}\n allowEmpty={allowEmpty}\n cellRender={keyboard.cellRender}\n dateRender={dateRender}\n defaultPickerValue={defaultPickerValue as any}\n defaultValue={defaultValue as any}\n direction={direction}\n disabled={disabled}\n disabledDate={disabledDate}\n id={id}\n locale={locale.lang}\n mode={mode as any}\n monthCellRender={monthCellRender}\n order={order}\n picker={picker}\n pickerValue={keyboard.pickerValue}\n placeholder={placeholder ?? rangePlaceholder(picker)}\n presets={presetActive.presets as any}\n renderExtraFooter={renderExtraFooter}\n separator={separator ?? <Icon icon={ArrowRight} size={14} />}\n value={value as any}\n onBlur={onBlur as any}\n onCalendarChange={onCalendarChange as any}\n onFocus={keyboard.onFocus}\n onOk={onOk as any}\n onPanelChange={keyboard.onPanelChange}\n onPickerValueChange={keyboard.onPickerValueChange}\n onChange={(...args: any[]) => {\n presetActive.track(args[0]);\n (keyboard.onChange as any)(...args);\n }}\n />\n );\n };\n RangePicker.displayName = 'RangePicker';\n return RangePicker as RangePickerComponent<DateType>;\n};\n\nexport default generateRangePicker;\n"],"mappings":";;;;;;;;;;;;;AAiBA,MAAM,uBAAgD,mBAA6C;CACjG,MAAM,eAAe,aAA6C;EAChE,MAAM,aAAa,yBAAyB,UAAU,cAAc;EAGpE,MAAM,QACJ,mBAAmB,cAAc,KAAK,WAAW,WAC7C;GACE,GAAG;GACH,WAAW,OAAY,gBACpB,WAAW,SAAiB,SAAS,CAAC,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC;EAC/E,IACA;EACN,MAAM,EACJ,YACA,YACA,YACA,cACA,WACA,WACA,YACA,YACA,YACA,aACA,oBACA,cACA,mBACA,WACA,UACA,cACA,mBACA,IACA,QAAQ,gBACR,SACA,SACA,MACA,iBACA,aACA,UACA,QACA,WACA,kBACA,UACA,SACA,MACA,cACA,eACA,qBACA,MACA,OACA,SAAS,QACT,aACA,aACA,gBACA,YACA,UACA,mBACA,eACA,WACA,QACA,MACA,QACA,QACA,YACA,eACA,eACA,OACA,SACA,GAAG,SACD;EACJ,MAAM,EAAE,QAAQ,qBAAqB,gBAAgB,cAAc;EACnE,MAAM,WAAW,iBAAiB;GAChC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,OAAO;GACP;EACF,CAAC;EACD,MAAM,SAAS,gBAAgB;GAC7B,QAAQ;GACR;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,cAAc,SAAS;GACvB;GACA;GACA;GACA;GACA;GACA,eAAeA,OAAK,SAAS,gBAAgB,aAAa;GAC1D,eAAe;GACf;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EAED,MAAM,eAAe,gBAAiB,KAAa,SAAS,OAAO,YAAY;EAE/E,OACE,oBAACC,gBAAD;GACE,GAAI;GACJ,GAAI;GACQ;GACZ,YAAY,SAAS;GACT;GACQ;GACN;GACH;GACD;GACI;GACV;GACJ,QAAQ,OAAO;GACT;GACW;GACV;GACC;GACR,aAAa,SAAS;GACtB,aAAa,eAAe,iBAAiB,MAAM;GACnD,SAAS,aAAa;GACH;GACnB,WAAW,aAAa,oBAAC,MAAD;IAAM,MAAM;IAAY,MAAM;GAAK,CAAA;GACpD;GACC;GACU;GAClB,SAAS,SAAS;GACZ;GACN,eAAe,SAAS;GACxB,qBAAqB,SAAS;GAC9B,WAAW,GAAG,SAAgB;IAC5B,aAAa,MAAM,KAAK,EAAE;IACzB,SAAS,SAAiB,GAAG,IAAI;GACpC;EACD,CAAA;CAEL;CACA,YAAY,cAAc;CAC1B,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SinglePicker.mjs","names":["clsx","RcPicker"],"sources":["../../src/DatePicker/SinglePicker.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { X } from 'lucide-react';\n\nimport Icon from '@/Icon';\n\nimport RcPicker from './core';\nimport type { GenerateConfig } from './core/generate';\nimport type { PickerMode } from './core/interface';\nimport { normalizeLegacyDateProps } from './legacyDate';\nimport { usePickerLocale } from './locale';\nimport { datePickerClasses } from './stable';\nimport { PREFIX_CLS } from './style';\nimport type { GeneratedDatePicker, PickerProps, SinglePickerComponent } from './type';\nimport { usePanelKeyboard } from './usePanelKeyboard';\nimport { usePickerShared, withDefault } from './usePickerShared';\nimport { usePresetActive } from './usePresetActive';\n\nconst defaultRemoveIcon = <Icon icon={X} size={10} style={{ strokeWidth: 3 }} />;\n\nconst generateSinglePicker = <DateType extends object>(\n generateConfig: GenerateConfig<DateType>,\n) => {\n const getPicker = (presetPicker?: PickerMode, displayName = 'DatePicker') => {\n const Picker = (rawProps: PickerProps<DateType, any>) => {\n const props = normalizeLegacyDateProps(rawProps, generateConfig);\n const {\n allowClear,\n cellRender,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n dropdownClassName,\n direction,\n getPopupContainer,\n locale: localeOverride,\n maxDate,\n minDate,\n mode,\n monthCellRender,\n multiple,\n needConfirm,\n nextIcon,\n onKeyDown,\n onCalendarChange,\n onChange,\n onFocus,\n onOk,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker: pickerProp,\n pickerValue,\n placeholder,\n popupClassName,\n popupStyle,\n prevIcon,\n ref,\n removeIcon,\n renderExtraFooter,\n rootClassName,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n value,\n variant,\n ...rest\n } = props;\n const picker = presetPicker ?? pickerProp ?? 'date';\n const { locale, placeholder: defaultPlaceholder } = usePickerLocale(localeOverride);\n const keyboard = usePanelKeyboard({\n cellRender,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n direction,\n generateConfig,\n mode,\n monthCellRender,\n onChange,\n onFocus,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker,\n pickerValue,\n value,\n });\n const shared = usePickerShared({\n stable: datePickerClasses,\n allowClear,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n defaultOpen,\n dropdownClassName,\n generateConfig,\n getPopupContainer,\n maxDate,\n minDate,\n needConfirm,\n nextIcon,\n onKeyDown,\n onOpenChange: keyboard.onOpenChange,\n open,\n picker,\n popupClassName,\n popupStyle,\n prevIcon,\n rootClassName: clsx(keyboard.scopeClassName, rootClassName),\n semanticProps: props,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n variant,\n });\n\n const presetActive = usePresetActive(\n (rest as any).presets,\n multiple ? undefined : value,\n multiple ? undefined : defaultValue,\n );\n\n return (\n <RcPicker<DateType>\n {...rest}\n {...shared}\n presets={presetActive.presets as any}\n // No footer row by default: Today / Now only when asked for (showNow or the\n // deprecated showToday); showTime + needConfirm still shows OK.\n cellRender={keyboard.cellRender}\n dateRender={dateRender}\n defaultPickerValue={defaultPickerValue as any}\n defaultValue={defaultValue ?? undefined}\n direction={direction}\n locale={locale.lang}\n mode={mode as any}\n monthCellRender={monthCellRender}\n multiple={multiple}\n picker={picker}\n pickerValue={keyboard.pickerValue}\n placeholder={placeholder ?? defaultPlaceholder(picker)}\n ref={ref}\n removeIcon={withDefault(removeIcon, defaultRemoveIcon)}\n renderExtraFooter={renderExtraFooter}\n showNow={(rest as any).showNow ?? (rest as any).showToday ?? false}\n value={value as any}\n classNames={\n multiple\n ? {\n ...shared.classNames,\n popup: {\n ...shared.classNames.popup,\n root: clsx(shared.classNames.popup.root, `${PREFIX_CLS}-dropdown-multiple`),\n },\n }\n : shared.classNames\n }\n onCalendarChange={onCalendarChange as any}\n onFocus={keyboard.onFocus}\n onOk={onOk as any}\n onPanelChange={keyboard.onPanelChange}\n onPickerValueChange={keyboard.onPickerValueChange}\n onChange={(...args: any[]) => {\n presetActive.track(args[0]);\n (keyboard.onChange as any)(...args);\n }}\n />\n );\n };\n Picker.displayName = displayName;\n return Picker as SinglePickerComponent<DateType, any>;\n };\n\n return {\n DatePicker: getPicker() as GeneratedDatePicker<DateType>,\n MonthPicker: getPicker('month', 'MonthPicker'),\n QuarterPicker: getPicker('quarter', 'QuarterPicker'),\n TimePicker: getPicker('time', 'TimePicker'),\n WeekPicker: getPicker('week', 'WeekPicker'),\n YearPicker: getPicker('year', 'YearPicker'),\n };\n};\n\nexport default generateSinglePicker;\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAM,oBAAoB,oBAAC,MAAD;CAAM,MAAM;CAAG,MAAM;CAAI,OAAO,EAAE,aAAa,EAAE;AAAI,CAAA;AAE/E,MAAM,wBACJ,mBACG;CACH,MAAM,aAAa,cAA2B,cAAc,iBAAiB;EAC3E,MAAM,UAAU,aAAyC;GACvD,MAAM,QAAQ,yBAAyB,UAAU,cAAc;GAC/D,MAAM,EACJ,YACA,YACA,cACA,WACA,WACA,YACA,YACA,YACA,aACA,oBACA,cACA,mBACA,WACA,mBACA,QAAQ,gBACR,SACA,SACA,MACA,iBACA,UACA,aACA,UACA,WACA,kBACA,UACA,SACA,MACA,cACA,eACA,qBACA,MACA,QAAQ,YACR,aACA,aACA,gBACA,YACA,UACA,KACA,YACA,mBACA,eACA,QACA,MACA,QACA,QACA,YACA,eACA,eACA,OACA,SACA,GAAG,SACD;GACJ,MAAM,SAAS,gBAAgB,cAAc;GAC7C,MAAM,EAAE,QAAQ,aAAa,uBAAuB,gBAAgB,cAAc;GAClF,MAAM,WAAW,iBAAiB;IAChC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,CAAC;GACD,MAAM,SAAS,gBAAgB;IAC7B,QAAQ;IACR;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,cAAc,SAAS;IACvB;IACA;IACA;IACA;IACA;IACA,eAAeA,OAAK,SAAS,gBAAgB,aAAa;IAC1D,eAAe;IACf;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,CAAC;GAED,MAAM,eAAe,gBAClB,KAAa,SACd,WAAW,KAAA,IAAY,OACvB,WAAW,KAAA,IAAY,YACzB;GAEA,OACE,oBAACC,cAAD;IACE,GAAI;IACJ,GAAI;IACJ,SAAS,aAAa;IAGtB,YAAY,SAAS;IACT;IACQ;IACpB,cAAc,gBAAgB,KAAA;IACnB;IACX,QAAQ,OAAO;IACT;IACW;IACP;IACF;IACR,aAAa,SAAS;IACtB,aAAa,eAAe,mBAAmB,MAAM;IAChD;IACL,YAAY,YAAY,YAAY,iBAAiB;IAClC;IACnB,SAAU,KAAa,WAAY,KAAa,aAAa;IACtD;IACP,YACE,WACI;KACE,GAAG,OAAO;KACV,OAAO;MACL,GAAG,OAAO,WAAW;MACrB,MAAMD,OAAK,OAAO,WAAW,MAAM,MAAM,GAAG,WAAW,mBAAmB;KAC5E;IACF,IACA,OAAO;IAEK;IAClB,SAAS,SAAS;IACZ;IACN,eAAe,SAAS;IACxB,qBAAqB,SAAS;IAC9B,WAAW,GAAG,SAAgB;KAC5B,aAAa,MAAM,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"SinglePicker.mjs","names":["clsx","RcPicker"],"sources":["../../src/DatePicker/SinglePicker.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { X } from 'lucide-react';\n\nimport Icon from '@/Icon';\n\nimport RcPicker from './core';\nimport type { GenerateConfig } from './core/generate';\nimport type { PickerMode } from './core/interface';\nimport { normalizeLegacyDateProps } from './legacyDate';\nimport { usePickerLocale } from './locale';\nimport { datePickerClasses } from './stable';\nimport { PREFIX_CLS } from './style';\nimport type { GeneratedDatePicker, PickerProps, SinglePickerComponent } from './type';\nimport { usePanelKeyboard } from './usePanelKeyboard';\nimport { usePickerShared, withDefault } from './usePickerShared';\nimport { usePresetActive } from './usePresetActive';\n\nconst defaultRemoveIcon = <Icon icon={X} size={10} style={{ strokeWidth: 3 }} />;\n\nconst generateSinglePicker = <DateType extends object>(\n generateConfig: GenerateConfig<DateType>,\n) => {\n const getPicker = (presetPicker?: PickerMode, displayName = 'DatePicker') => {\n const Picker = (rawProps: PickerProps<DateType, any>) => {\n const props = normalizeLegacyDateProps(rawProps, generateConfig);\n const {\n allowClear,\n cellRender,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n dropdownClassName,\n direction,\n getPopupContainer,\n locale: localeOverride,\n maxDate,\n minDate,\n mode,\n monthCellRender,\n multiple,\n needConfirm,\n nextIcon,\n onKeyDown,\n onCalendarChange,\n onChange,\n onFocus,\n onOk,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker: pickerProp,\n pickerValue,\n placeholder,\n popupClassName,\n popupStyle,\n prevIcon,\n ref,\n removeIcon,\n renderExtraFooter,\n rootClassName,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n value,\n variant,\n ...rest\n } = props;\n const picker = presetPicker ?? pickerProp ?? 'date';\n const { locale, placeholder: defaultPlaceholder } = usePickerLocale(localeOverride);\n const keyboard = usePanelKeyboard({\n cellRender,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n direction,\n generateConfig,\n mode,\n monthCellRender,\n onChange,\n onFocus,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker,\n pickerValue,\n value,\n });\n const shared = usePickerShared({\n stable: datePickerClasses,\n allowClear,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n defaultOpen,\n dropdownClassName,\n generateConfig,\n getPopupContainer,\n maxDate,\n minDate,\n needConfirm,\n nextIcon,\n onKeyDown,\n onOpenChange: keyboard.onOpenChange,\n open,\n picker,\n popupClassName,\n popupStyle,\n prevIcon,\n rootClassName: clsx(keyboard.scopeClassName, rootClassName),\n semanticProps: props,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n variant,\n });\n\n const presetActive = usePresetActive(\n (rest as any).presets,\n multiple ? undefined : value,\n multiple ? undefined : defaultValue,\n );\n\n return (\n <RcPicker<DateType>\n {...rest}\n {...shared}\n presets={presetActive.presets as any}\n // No footer row by default: Today / Now only when asked for (showNow or the\n // deprecated showToday); showTime + needConfirm still shows OK.\n cellRender={keyboard.cellRender}\n dateRender={dateRender}\n defaultPickerValue={defaultPickerValue as any}\n defaultValue={defaultValue ?? undefined}\n direction={direction}\n locale={locale.lang}\n mode={mode as any}\n monthCellRender={monthCellRender}\n multiple={multiple}\n picker={picker}\n pickerValue={keyboard.pickerValue}\n placeholder={placeholder ?? defaultPlaceholder(picker)}\n ref={ref}\n removeIcon={withDefault(removeIcon, defaultRemoveIcon)}\n renderExtraFooter={renderExtraFooter}\n showNow={(rest as any).showNow ?? (rest as any).showToday ?? false}\n value={value as any}\n classNames={\n multiple\n ? {\n ...shared.classNames,\n popup: {\n ...shared.classNames.popup,\n root: clsx(shared.classNames.popup.root, `${PREFIX_CLS}-dropdown-multiple`),\n },\n }\n : shared.classNames\n }\n onCalendarChange={onCalendarChange as any}\n onFocus={keyboard.onFocus}\n onOk={onOk as any}\n onPanelChange={keyboard.onPanelChange}\n onPickerValueChange={keyboard.onPickerValueChange}\n onChange={(...args: any[]) => {\n presetActive.track(args[0]);\n (keyboard.onChange as any)(...args);\n }}\n />\n );\n };\n Picker.displayName = displayName;\n return Picker as SinglePickerComponent<DateType, any>;\n };\n\n return {\n DatePicker: getPicker() as GeneratedDatePicker<DateType>,\n MonthPicker: getPicker('month', 'MonthPicker'),\n QuarterPicker: getPicker('quarter', 'QuarterPicker'),\n TimePicker: getPicker('time', 'TimePicker'),\n WeekPicker: getPicker('week', 'WeekPicker'),\n YearPicker: getPicker('year', 'YearPicker'),\n };\n};\n\nexport default generateSinglePicker;\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAM,oBAAoB,oBAAC,MAAD;CAAM,MAAM;CAAG,MAAM;CAAI,OAAO,EAAE,aAAa,EAAE;AAAI,CAAA;AAE/E,MAAM,wBACJ,mBACG;CACH,MAAM,aAAa,cAA2B,cAAc,iBAAiB;EAC3E,MAAM,UAAU,aAAyC;GACvD,MAAM,QAAQ,yBAAyB,UAAU,cAAc;GAC/D,MAAM,EACJ,YACA,YACA,cACA,WACA,WACA,YACA,YACA,YACA,aACA,oBACA,cACA,mBACA,WACA,mBACA,QAAQ,gBACR,SACA,SACA,MACA,iBACA,UACA,aACA,UACA,WACA,kBACA,UACA,SACA,MACA,cACA,eACA,qBACA,MACA,QAAQ,YACR,aACA,aACA,gBACA,YACA,UACA,KACA,YACA,mBACA,eACA,QACA,MACA,QACA,QACA,YACA,eACA,eACA,OACA,SACA,GAAG,SACD;GACJ,MAAM,SAAS,gBAAgB,cAAc;GAC7C,MAAM,EAAE,QAAQ,aAAa,uBAAuB,gBAAgB,cAAc;GAClF,MAAM,WAAW,iBAAiB;IAChC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,CAAC;GACD,MAAM,SAAS,gBAAgB;IAC7B,QAAQ;IACR;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,cAAc,SAAS;IACvB;IACA;IACA;IACA;IACA;IACA,eAAeA,OAAK,SAAS,gBAAgB,aAAa;IAC1D,eAAe;IACf;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,CAAC;GAED,MAAM,eAAe,gBAClB,KAAa,SACd,WAAW,KAAA,IAAY,OACvB,WAAW,KAAA,IAAY,YACzB;GAEA,OACE,oBAACC,cAAD;IACE,GAAI;IACJ,GAAI;IACJ,SAAS,aAAa;IAGtB,YAAY,SAAS;IACT;IACQ;IACpB,cAAc,gBAAgB,KAAA;IACnB;IACX,QAAQ,OAAO;IACT;IACW;IACP;IACF;IACR,aAAa,SAAS;IACtB,aAAa,eAAe,mBAAmB,MAAM;IAChD;IACL,YAAY,YAAY,YAAY,iBAAiB;IAClC;IACnB,SAAU,KAAa,WAAY,KAAa,aAAa;IACtD;IACP,YACE,WACI;KACE,GAAG,OAAO;KACV,OAAO;MACL,GAAG,OAAO,WAAW;MACrB,MAAMD,OAAK,OAAO,WAAW,MAAM,MAAM,GAAG,WAAW,mBAAmB;KAC5E;IACF,IACA,OAAO;IAEK;IAClB,SAAS,SAAS;IACZ;IACN,eAAe,SAAS;IACxB,qBAAqB,SAAS;IAC9B,WAAW,GAAG,SAAgB;KAC5B,aAAa,MAAM,KAAK,EAAE;KACzB,SAAS,SAAiB,GAAG,IAAI;IACpC;GACD,CAAA;EAEL;EACA,OAAO,cAAc;EACrB,OAAO;CACT;CAEA,OAAO;EACL,YAAY,UAAU;EACtB,aAAa,UAAU,SAAS,aAAa;EAC7C,eAAe,UAAU,WAAW,eAAe;EACnD,YAAY,UAAU,QAAQ,YAAY;EAC1C,YAAY,UAAU,QAAQ,YAAY;EAC1C,YAAY,UAAU,QAAQ,YAAY;CAC5C;AACF"}
|
|
@@ -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":"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"}
|
|
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":"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"}
|
|
@@ -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'> {}
|