@lobehub/ui 1.171.0 → 2.0.1
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.ts +5 -3
- package/es/A/index.js +7 -10
- package/es/ActionIcon/ActionIcon.d.ts +4 -0
- package/es/ActionIcon/ActionIcon.js +158 -0
- package/es/ActionIcon/components/utils.d.ts +5 -0
- package/es/ActionIcon/components/utils.js +47 -0
- package/es/ActionIcon/index.d.ts +2 -70
- package/es/ActionIcon/index.js +1 -130
- package/es/ActionIcon/style.d.ts +13 -9
- package/es/ActionIcon/style.js +17 -14
- package/es/ActionIcon/type.d.ts +25 -0
- package/es/ActionIconGroup/ActionIconGroup.d.ts +4 -0
- package/es/ActionIconGroup/ActionIconGroup.js +135 -0
- package/es/ActionIconGroup/index.d.ts +2 -57
- package/es/ActionIconGroup/index.js +1 -88
- package/es/ActionIconGroup/style.d.ts +8 -4
- package/es/ActionIconGroup/style.js +10 -6
- package/es/ActionIconGroup/type.d.ts +19 -0
- package/es/Alert/Alert.d.ts +4 -0
- package/es/Alert/Alert.js +244 -0
- package/es/Alert/index.d.ts +2 -18
- package/es/Alert/index.js +1 -146
- package/es/Alert/style.d.ts +6 -5
- package/es/Alert/style.js +15 -13
- package/es/Alert/type.d.ts +22 -0
- package/es/AutoComplete/Select.d.ts +4 -0
- package/es/AutoComplete/Select.js +56 -0
- package/es/AutoComplete/index.d.ts +2 -0
- package/es/AutoComplete/index.js +1 -0
- package/es/AutoComplete/style.d.ts +7 -0
- package/es/AutoComplete/style.js +15 -0
- package/es/AutoComplete/type.d.ts +4 -0
- package/es/AutoComplete/type.js +1 -0
- package/es/Avatar/Avatar.d.ts +4 -0
- package/es/Avatar/Avatar.js +136 -0
- package/es/Avatar/AvatarGroup/index.d.ts +4 -0
- package/es/Avatar/AvatarGroup/index.js +92 -0
- package/es/Avatar/AvatarGroup/style.d.ts +4 -0
- package/es/Avatar/AvatarGroup/style.js +12 -0
- package/es/Avatar/index.d.ts +9 -28
- package/es/Avatar/index.js +6 -80
- package/es/Avatar/style.d.ts +7 -6
- package/es/Avatar/style.js +10 -10
- package/es/Avatar/type.d.ts +41 -0
- package/es/Avatar/type.js +1 -0
- package/es/Block/Block.d.ts +4 -0
- package/es/Block/Block.js +87 -0
- package/es/Block/index.d.ts +2 -0
- package/es/Block/index.js +1 -0
- package/es/Block/style.d.ts +12 -0
- package/es/Block/style.js +20 -0
- package/es/Block/type.d.ts +9 -0
- package/es/Block/type.js +1 -0
- package/es/Burger/Burger.d.ts +4 -0
- package/es/Burger/Burger.js +83 -0
- package/es/Burger/index.d.ts +2 -39
- package/es/Burger/index.js +1 -79
- package/es/Burger/type.d.ts +21 -0
- package/es/Burger/type.js +1 -0
- package/es/Button/Button.d.ts +4 -0
- package/es/Button/Button.js +99 -0
- package/es/Button/index.d.ts +2 -0
- package/es/Button/index.js +1 -0
- package/es/Button/style.d.ts +7 -0
- package/es/Button/style.js +16 -0
- package/es/Button/type.d.ts +10 -0
- package/es/Button/type.js +1 -0
- package/es/CodeEditor/CodeEditor.d.ts +4 -0
- package/es/CodeEditor/CodeEditor.js +114 -0
- package/es/CodeEditor/index.d.ts +2 -52
- package/es/CodeEditor/index.js +1 -429
- package/es/CodeEditor/style.d.ts +5 -6
- package/es/CodeEditor/style.js +10 -12
- package/es/CodeEditor/type.d.ts +21 -0
- package/es/CodeEditor/type.js +1 -0
- package/es/Collapse/Collapse.d.ts +4 -0
- package/es/Collapse/Collapse.js +152 -0
- package/es/Collapse/index.d.ts +2 -14
- package/es/Collapse/index.js +2 -61
- package/es/Collapse/style.d.ts +11 -11
- package/es/Collapse/style.js +19 -22
- package/es/Collapse/type.d.ts +29 -0
- package/es/Collapse/type.js +1 -0
- package/es/ColorSwatches/ColorSwatches.d.ts +4 -0
- package/es/ColorSwatches/ColorSwatches.js +129 -0
- package/es/ColorSwatches/index.d.ts +2 -22
- package/es/ColorSwatches/index.js +2 -140
- package/es/ColorSwatches/type.d.ts +23 -0
- package/es/ColorSwatches/type.js +1 -0
- package/es/ConfigProvider/index.js +3 -19
- package/es/CopyButton/CopyButton.d.ts +4 -0
- package/es/CopyButton/CopyButton.js +64 -0
- package/es/CopyButton/index.d.ts +2 -10
- package/es/CopyButton/index.js +2 -67
- package/es/CopyButton/type.d.ts +4 -0
- package/es/CopyButton/type.js +1 -0
- package/es/DatePicker/DatePicker.d.ts +4 -0
- package/es/DatePicker/DatePicker.js +56 -0
- package/es/DatePicker/index.d.ts +2 -0
- package/es/DatePicker/index.js +1 -0
- package/es/DatePicker/style.d.ts +7 -0
- package/es/DatePicker/style.js +14 -0
- package/es/DatePicker/type.d.ts +4 -0
- package/es/DatePicker/type.js +1 -0
- package/es/DraggablePanel/DraggablePanel.d.ts +4 -0
- package/es/DraggablePanel/DraggablePanel.js +340 -0
- package/es/DraggablePanel/components/DraggablePanelBody.js +1 -0
- package/es/DraggablePanel/components/DraggablePanelContainer.js +1 -0
- package/es/DraggablePanel/components/DraggablePanelFooter.js +1 -0
- package/es/DraggablePanel/components/DraggablePanelHeader.js +3 -8
- package/es/DraggablePanel/components/style.d.ts +1 -0
- package/es/DraggablePanel/components/style.js +6 -5
- package/es/DraggablePanel/index.d.ts +18 -98
- package/es/DraggablePanel/index.js +15 -250
- package/es/DraggablePanel/style.d.ts +15 -9
- package/es/DraggablePanel/style.js +65 -28
- package/es/DraggablePanel/type.d.ts +37 -0
- package/es/DraggablePanel/type.js +1 -0
- package/es/DraggablePanel/utils.d.ts +2 -2
- package/es/Drawer/Drawer.d.ts +4 -0
- package/es/Drawer/Drawer.js +176 -0
- package/es/Drawer/index.d.ts +2 -26
- package/es/Drawer/index.js +1 -174
- package/es/Drawer/type.d.ts +25 -0
- package/es/Drawer/type.js +1 -0
- package/es/Dropdown/Dropdown.d.ts +4 -0
- package/es/Dropdown/Dropdown.js +44 -0
- package/es/Dropdown/index.d.ts +2 -0
- package/es/Dropdown/index.js +1 -0
- package/es/Dropdown/type.d.ts +8 -0
- package/es/Dropdown/type.js +1 -0
- package/es/EditableText/ControlInput.d.ts +16 -0
- package/es/{components → EditableText}/ControlInput.js +56 -43
- package/es/EditableText/EditableText.d.ts +4 -0
- package/es/EditableText/EditableText.js +126 -0
- package/es/EditableText/index.d.ts +2 -9
- package/es/EditableText/index.js +1 -61
- package/es/EditableText/type.d.ts +19 -0
- package/es/EditableText/type.js +1 -0
- package/es/EmojiPicker/AvatarUploader.js +14 -17
- package/es/EmojiPicker/EmojiPicker.d.ts +4 -0
- package/es/EmojiPicker/EmojiPicker.js +212 -0
- package/es/EmojiPicker/index.d.ts +2 -47
- package/es/EmojiPicker/index.js +1 -264
- package/es/EmojiPicker/style.d.ts +1 -2
- package/es/EmojiPicker/style.js +5 -6
- package/es/EmojiPicker/type.d.ts +44 -0
- package/es/EmojiPicker/type.js +1 -0
- package/es/FileTypeIcon/FileTypeIcon.d.ts +4 -0
- package/es/FileTypeIcon/FileTypeIcon.js +84 -0
- package/es/FileTypeIcon/components/FileIcon.d.ts +12 -0
- package/es/{Swatches/index.js → FileTypeIcon/components/FileIcon.js} +40 -50
- package/es/FileTypeIcon/components/FolderIcon.d.ts +12 -0
- package/es/FileTypeIcon/components/FolderIcon.js +52 -0
- package/es/FileTypeIcon/index.d.ts +2 -13
- package/es/FileTypeIcon/index.js +1 -123
- package/es/{mobile/MobileNavBar → FileTypeIcon}/style.d.ts +1 -3
- package/es/FileTypeIcon/style.js +11 -0
- package/es/FileTypeIcon/type.d.ts +13 -0
- package/es/FileTypeIcon/type.js +1 -0
- package/es/FluentEmoji/FluentEmoji.d.ts +4 -0
- package/es/FluentEmoji/FluentEmoji.js +78 -0
- package/es/FluentEmoji/index.d.ts +2 -22
- package/es/FluentEmoji/index.js +1 -68
- package/es/FluentEmoji/type.d.ts +10 -0
- package/es/FluentEmoji/type.js +1 -0
- package/es/FluentEmoji/utils.d.ts +1 -1
- package/es/FluentEmoji/utils.js +1 -1
- package/es/FontLoader/index.d.ts +0 -3
- package/es/FontLoader/index.js +19 -4
- package/es/Footer/Footer.d.ts +4 -0
- package/es/Footer/Footer.js +46 -0
- package/es/Footer/index.d.ts +2 -24
- package/es/Footer/index.js +1 -29
- package/es/Footer/style.d.ts +1 -1
- package/es/Footer/style.js +2 -2
- package/es/Footer/type.d.ts +9 -0
- package/es/Footer/type.js +1 -0
- package/es/Form/Form.d.ts +4 -0
- package/es/Form/Form.js +184 -0
- package/es/Form/components/FormDivider.d.ts +3 -4
- package/es/Form/components/FormDivider.js +23 -7
- package/es/Form/components/FormFlatGroup.d.ts +1 -5
- package/es/Form/components/FormFlatGroup.js +26 -13
- package/es/Form/components/FormFooter.d.ts +1 -3
- package/es/Form/components/FormFooter.js +7 -16
- package/es/Form/components/FormGroup.d.ts +2 -42
- package/es/Form/components/FormGroup.js +56 -54
- package/es/Form/components/FormItem.d.ts +1 -20
- package/es/Form/components/FormItem.js +47 -34
- package/es/Form/components/FormProvider.js +5 -3
- package/es/Form/components/FormSubmitFooter.d.ts +2 -19
- package/es/Form/components/FormSubmitFooter.js +35 -39
- package/es/Form/components/FormTitle.d.ts +2 -11
- package/es/Form/components/FormTitle.js +43 -40
- package/es/Form/components/merge.d.ts +19 -0
- package/es/Form/components/merge.js +112 -0
- package/es/Form/index.d.ts +12 -18
- package/es/Form/index.js +8 -142
- package/es/Form/style.d.ts +35 -2
- package/es/Form/style.js +67 -4
- package/es/Form/type.d.ts +110 -0
- package/es/Form/type.js +1 -0
- package/es/FormModal/FormModal.d.ts +4 -0
- package/es/FormModal/FormModal.js +143 -0
- package/es/FormModal/index.d.ts +2 -19
- package/es/FormModal/index.js +1 -138
- package/es/FormModal/type.d.ts +20 -0
- package/es/FormModal/type.js +1 -0
- package/es/Grid/Grid.d.ts +4 -0
- package/es/Grid/Grid.js +43 -0
- package/es/Grid/index.d.ts +2 -16
- package/es/Grid/index.js +1 -53
- package/es/Grid/style.d.ts +5 -0
- package/es/Grid/style.js +11 -0
- package/es/Grid/type.d.ts +8 -0
- package/es/Grid/type.js +1 -0
- package/es/GuideCard/GuideCard.d.ts +4 -0
- package/es/GuideCard/GuideCard.js +116 -0
- package/es/GuideCard/index.d.ts +2 -0
- package/es/GuideCard/index.js +1 -0
- package/es/{EmptyCard → GuideCard}/style.d.ts +7 -2
- package/es/GuideCard/style.js +22 -0
- package/es/GuideCard/type.d.ts +31 -0
- package/es/GuideCard/type.js +1 -0
- package/es/Header/Header.d.ts +4 -0
- package/es/Header/Header.js +102 -0
- package/es/Header/index.d.ts +2 -42
- package/es/Header/index.js +1 -100
- package/es/Header/style.d.ts +1 -2
- package/es/Header/style.js +5 -7
- package/es/Header/type.d.ts +14 -0
- package/es/Header/type.js +1 -0
- package/es/Highlighter/FullFeatured.d.ts +5 -3
- package/es/Highlighter/FullFeatured.js +90 -47
- package/es/Highlighter/Highlighter.d.ts +4 -0
- package/es/Highlighter/Highlighter.js +130 -0
- package/es/Highlighter/SyntaxHighlighter/index.d.ts +1 -6
- package/es/Highlighter/SyntaxHighlighter/index.js +61 -31
- package/es/Highlighter/SyntaxHighlighter/style.d.ts +4 -1
- package/es/Highlighter/SyntaxHighlighter/style.js +8 -7
- package/es/Highlighter/const.d.ts +7 -0
- package/es/Highlighter/const.js +17 -0
- package/es/Highlighter/index.d.ts +4 -6
- package/es/Highlighter/index.js +2 -99
- package/es/Highlighter/style.d.ts +15 -5
- package/es/Highlighter/style.js +22 -12
- package/es/Highlighter/type.d.ts +18 -34
- package/es/Hotkey/Hotkey.d.ts +4 -0
- package/es/Hotkey/Hotkey.js +197 -0
- package/es/Hotkey/const.d.ts +34 -0
- package/es/Hotkey/const.js +49 -0
- package/es/Hotkey/index.d.ts +3 -20
- package/es/Hotkey/index.js +2 -165
- package/es/Hotkey/style.d.ts +7 -1
- package/es/Hotkey/style.js +14 -5
- package/es/Hotkey/type.d.ts +15 -34
- package/es/Hotkey/type.js +1 -49
- package/es/Hotkey/utils.js +1 -1
- package/es/HotkeyInput/HotkeyInput.d.ts +4 -0
- package/es/HotkeyInput/HotkeyInput.js +322 -0
- package/es/HotkeyInput/index.d.ts +2 -27
- package/es/HotkeyInput/index.js +2 -282
- package/es/HotkeyInput/style.d.ts +9 -7
- package/es/HotkeyInput/style.js +15 -14
- package/es/HotkeyInput/type.d.ts +26 -0
- package/es/HotkeyInput/type.js +1 -0
- package/es/Icon/Icon.d.ts +4 -0
- package/es/Icon/Icon.js +86 -0
- package/es/Icon/components/IconProvider.d.ts +9 -0
- package/es/Icon/components/IconProvider.js +17 -0
- package/es/Icon/components/utils.d.ts +8 -0
- package/es/Icon/components/utils.js +45 -0
- package/es/Icon/index.d.ts +3 -28
- package/es/Icon/index.js +2 -55
- package/es/Icon/type.d.ts +15 -0
- package/es/Icon/type.js +1 -0
- package/es/Image/Image.d.ts +4 -0
- package/es/Image/Image.js +122 -0
- package/es/Image/PreviewGroup.d.ts +4 -0
- package/es/Image/{ImageGallery.js → PreviewGroup.js} +7 -6
- package/es/Image/{Preview.d.ts → components/Preview.d.ts} +1 -1
- package/es/Image/components/Toolbar.d.ts +10 -0
- package/es/Image/components/Toolbar.js +56 -0
- package/es/Image/components/usePreview.d.ts +4 -0
- package/es/Image/components/usePreview.js +84 -0
- package/es/Image/components/usePreviewGroup.d.ts +4 -0
- package/es/Image/components/usePreviewGroup.js +84 -0
- package/es/Image/index.d.ts +9 -19
- package/es/Image/index.js +6 -95
- package/es/Image/style.d.ts +10 -4
- package/es/Image/style.js +21 -12
- package/es/Image/type.d.ts +38 -0
- package/es/Image/type.js +1 -0
- package/es/ImageSelect/ImageSelect.d.ts +4 -0
- package/es/{SelectWithImg/index.js → ImageSelect/ImageSelect.js} +25 -24
- package/es/ImageSelect/index.d.ts +2 -0
- package/es/ImageSelect/index.js +2 -0
- package/es/{SelectWithImg → ImageSelect}/styles.d.ts +1 -2
- package/es/ImageSelect/styles.js +15 -0
- package/es/{SelectWithImg/index.d.ts → ImageSelect/type.d.ts} +9 -9
- package/es/ImageSelect/type.js +1 -0
- package/es/Img/index.d.ts +6 -5
- package/es/Img/index.js +11 -13
- package/es/Input/Input.d.ts +4 -0
- package/es/Input/Input.js +58 -0
- package/es/Input/InputNumber.d.ts +4 -0
- package/es/Input/InputNumber.js +58 -0
- package/es/Input/InputOPT.d.ts +4 -0
- package/es/Input/InputOPT.js +58 -0
- package/es/Input/InputPassword.d.ts +4 -0
- package/es/Input/InputPassword.js +58 -0
- package/es/Input/TextArea.d.ts +4 -0
- package/es/Input/TextArea.js +64 -0
- package/es/Input/index.d.ts +6 -24
- package/es/Input/index.js +5 -54
- package/es/Input/style.d.ts +11 -5
- package/es/Input/style.js +14 -7
- package/es/Input/type.d.ts +26 -0
- package/es/Input/type.js +1 -0
- package/es/Layout/Layout.d.ts +4 -0
- package/es/Layout/Layout.js +80 -0
- package/es/Layout/components/LayoutFooter.d.ts +3 -0
- package/es/Layout/components/LayoutFooter.js +29 -0
- package/es/Layout/components/LayoutHeader.d.ts +4 -0
- package/es/Layout/components/LayoutHeader.js +34 -0
- package/es/Layout/components/LayoutMain.d.ts +3 -0
- package/es/{TabsNav/index.js → Layout/components/LayoutMain.js} +14 -12
- package/es/Layout/components/LayoutSidebar.d.ts +4 -0
- package/es/Layout/components/LayoutSidebar.js +34 -0
- package/es/Layout/components/LayoutSidebarInner.d.ts +4 -0
- package/es/Layout/components/LayoutSidebarInner.js +30 -0
- package/es/Layout/components/LayoutToc.d.ts +4 -0
- package/es/Layout/components/LayoutToc.js +34 -0
- package/es/Layout/index.d.ts +24 -65
- package/es/Layout/index.js +21 -184
- package/es/Layout/style.d.ts +1 -2
- package/es/Layout/style.js +12 -14
- package/es/Layout/type.d.ts +28 -0
- package/es/Layout/type.js +1 -0
- package/es/List/List.d.ts +4 -0
- package/es/List/List.js +63 -0
- package/es/List/ListItem/index.d.ts +3 -20
- package/es/List/ListItem/index.js +51 -39
- package/es/List/ListItem/style.d.ts +3 -3
- package/es/List/ListItem/style.js +14 -11
- package/es/List/index.d.ts +10 -5
- package/es/List/index.js +5 -6
- package/es/List/type.d.ts +50 -0
- package/es/List/type.js +1 -0
- package/es/Markdown/Markdown.d.ts +4 -0
- package/es/Markdown/Markdown.js +202 -0
- package/es/Markdown/Typography.d.ts +3 -9
- package/es/Markdown/Typography.js +9 -5
- package/es/Markdown/index.d.ts +3 -44
- package/es/Markdown/index.js +2 -234
- package/es/Markdown/markdown.style.d.ts +4 -1
- package/es/Markdown/markdown.style.js +5 -2
- package/es/Markdown/type.d.ts +49 -0
- package/es/Markdown/type.js +1 -0
- package/es/Markdown/utils.d.ts +15 -0
- package/es/Markdown/utils.js +55 -0
- package/es/MaskShadow/MaskShadow.d.ts +4 -0
- package/es/MaskShadow/MaskShadow.js +54 -0
- package/es/MaskShadow/index.d.ts +2 -0
- package/es/MaskShadow/index.js +1 -0
- package/es/MaskShadow/style.d.ts +7 -0
- package/es/MaskShadow/style.js +14 -0
- package/es/MaskShadow/type.d.ts +6 -0
- package/es/MaskShadow/type.js +1 -0
- package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.d.ts +4 -0
- package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.js +86 -0
- package/es/MaterialFileTypeIcon/icon-map.json +1 -3713
- package/es/MaterialFileTypeIcon/index.d.ts +2 -12
- package/es/MaterialFileTypeIcon/index.js +1 -85
- package/es/MaterialFileTypeIcon/type.d.ts +13 -0
- package/es/MaterialFileTypeIcon/type.js +1 -0
- package/es/MaterialFileTypeIcon/utils.d.ts +5 -6
- package/es/Menu/Menu.d.ts +4 -0
- package/es/Menu/Menu.js +102 -0
- package/es/Menu/index.d.ts +3 -0
- package/es/Menu/index.js +2 -0
- package/es/{TabsNav → Menu}/style.d.ts +5 -1
- package/es/Menu/style.js +18 -0
- package/es/Menu/type.d.ts +32 -0
- package/es/Menu/type.js +1 -0
- package/es/Menu/utils.d.ts +3 -0
- package/es/Menu/utils.js +47 -0
- package/es/Mermaid/FullFeatured.js +80 -29
- package/es/Mermaid/Mermaid.d.ts +5 -0
- package/es/Mermaid/Mermaid.js +130 -0
- package/es/Mermaid/SyntaxMermaid/index.d.ts +4 -0
- package/es/Mermaid/SyntaxMermaid/index.js +87 -0
- package/es/Mermaid/const.d.ts +7 -0
- package/es/Mermaid/const.js +24 -0
- package/es/Mermaid/index.d.ts +4 -5
- package/es/Mermaid/index.js +3 -96
- package/es/Mermaid/type.d.ts +16 -5
- package/es/Modal/Modal.d.ts +4 -0
- package/es/Modal/Modal.js +173 -0
- package/es/Modal/index.d.ts +2 -13
- package/es/Modal/index.js +1 -168
- package/es/Modal/style.d.ts +2 -4
- package/es/Modal/style.js +6 -8
- package/es/Modal/type.d.ts +9 -0
- package/es/Modal/type.js +1 -0
- package/es/ScrollShadow/ScrollShadow.d.ts +4 -0
- package/es/ScrollShadow/ScrollShadow.js +153 -0
- package/es/ScrollShadow/index.d.ts +2 -0
- package/es/ScrollShadow/index.js +1 -0
- package/es/ScrollShadow/style.d.ts +12 -0
- package/es/ScrollShadow/style.js +21 -0
- package/es/ScrollShadow/type.d.ts +15 -0
- package/es/ScrollShadow/type.js +1 -0
- package/es/ScrollShadow/useScrollOverflow.d.ts +21 -0
- package/es/ScrollShadow/useScrollOverflow.js +83 -0
- package/es/SearchBar/SearchBar.d.ts +4 -0
- package/es/SearchBar/SearchBar.js +126 -0
- package/es/{SearchResultCard → SearchBar/components/SearchResultCard}/index.d.ts +1 -5
- package/es/{EmptyCard → SearchBar/components/SearchResultCard}/index.js +54 -52
- package/es/SearchBar/components/SearchResultCard/style.d.ts +5 -0
- package/es/SearchBar/components/SearchResultCard/style.js +12 -0
- package/es/SearchBar/components/SearchResultCards/index.d.ts +4 -0
- package/es/SearchBar/components/SearchResultCards/index.js +39 -0
- package/es/SearchBar/index.d.ts +3 -34
- package/es/SearchBar/index.js +2 -132
- package/es/SearchBar/style.d.ts +0 -1
- package/es/SearchBar/style.js +3 -4
- package/es/SearchBar/type.d.ts +38 -0
- package/es/SearchBar/type.js +1 -0
- package/es/Segmented/Segmented.d.ts +4 -0
- package/es/Segmented/Segmented.js +69 -0
- package/es/Segmented/index.d.ts +2 -0
- package/es/Segmented/index.js +1 -0
- package/es/Segmented/style.d.ts +8 -0
- package/es/Segmented/style.js +16 -0
- package/es/Segmented/type.d.ts +11 -0
- package/es/Segmented/type.js +1 -0
- package/es/Select/Select.d.ts +4 -0
- package/es/Select/Select.js +70 -0
- package/es/Select/index.d.ts +2 -0
- package/es/Select/index.js +1 -0
- package/es/Select/style.d.ts +7 -0
- package/es/Select/style.js +16 -0
- package/es/Select/type.d.ts +9 -0
- package/es/Select/type.js +1 -0
- package/es/SideNav/SideNav.d.ts +4 -0
- package/es/SideNav/SideNav.js +51 -0
- package/es/SideNav/index.d.ts +2 -18
- package/es/SideNav/index.js +1 -50
- package/es/SideNav/style.js +1 -1
- package/es/SideNav/type.d.ts +7 -0
- package/es/SideNav/type.js +1 -0
- package/es/SliderWithInput/SliderWithInput.d.ts +4 -0
- package/es/SliderWithInput/SliderWithInput.js +95 -0
- package/es/SliderWithInput/index.d.ts +2 -11
- package/es/SliderWithInput/index.js +1 -77
- package/es/SliderWithInput/type.d.ts +18 -0
- package/es/SliderWithInput/type.js +1 -0
- package/es/Snippet/Snippet.d.ts +4 -0
- package/es/Snippet/Snippet.js +82 -0
- package/es/Snippet/index.d.ts +2 -34
- package/es/Snippet/index.js +1 -54
- package/es/Snippet/style.d.ts +7 -2
- package/es/Snippet/style.js +8 -5
- package/es/Snippet/type.d.ts +12 -0
- package/es/Snippet/type.js +1 -0
- package/es/SortableList/SortableList.d.ts +11 -0
- package/es/{Image/usePreview.js → SortableList/SortableList.js} +76 -86
- package/es/SortableList/components/DragHandle.d.ts +4 -0
- package/es/SortableList/{DragHandle.js → components/DragHandle.js} +9 -6
- package/es/SortableList/{SortableItem.d.ts → components/SortableItem.d.ts} +1 -0
- package/es/SortableList/{SortableItem.js → components/SortableItem.js} +39 -5
- package/es/SortableList/{SortableOverlay.js → components/SortableOverlay.js} +3 -0
- package/es/SortableList/index.d.ts +2 -20
- package/es/SortableList/index.js +1 -98
- package/es/SortableList/style.d.ts +4 -0
- package/es/SortableList/style.js +9 -3
- package/es/SortableList/type.d.ts +12 -0
- package/es/SortableList/type.js +1 -0
- package/es/Tabs/Tabs.d.ts +4 -0
- package/es/Tabs/Tabs.js +74 -0
- package/es/Tabs/index.d.ts +2 -0
- package/es/Tabs/index.js +1 -0
- package/es/Tabs/style.d.ts +9 -0
- package/es/Tabs/style.js +17 -0
- package/es/Tabs/type.d.ts +5 -0
- package/es/Tabs/type.js +1 -0
- package/es/Tag/Tag.d.ts +4 -0
- package/es/Tag/Tag.js +104 -0
- package/es/Tag/index.d.ts +2 -8
- package/es/Tag/index.js +1 -50
- package/es/Tag/styles.d.ts +8 -0
- package/es/Tag/styles.js +17 -0
- package/es/Tag/type.d.ts +8 -0
- package/es/Tag/type.js +1 -0
- package/es/Tag/utils.d.ts +4 -0
- package/es/Tag/utils.js +15 -0
- package/es/ThemeProvider/GlobalStyle/antdOverride.js +1 -1
- package/es/ThemeProvider/Meta.d.ts +1 -5
- package/es/ThemeProvider/ThemeProvider.d.ts +4 -0
- package/es/ThemeProvider/ThemeProvider.js +91 -0
- package/es/ThemeProvider/index.d.ts +3 -28
- package/es/ThemeProvider/index.js +2 -91
- package/es/ThemeProvider/type.d.ts +25 -0
- package/es/ThemeProvider/type.js +1 -0
- package/es/ThemeSwitch/ThemeSwitch.d.ts +4 -0
- package/es/ThemeSwitch/ThemeSwitch.js +85 -0
- package/es/ThemeSwitch/index.d.ts +2 -33
- package/es/ThemeSwitch/index.js +1 -91
- package/es/ThemeSwitch/type.d.ts +15 -0
- package/es/ThemeSwitch/type.js +1 -0
- package/es/Toc/Toc.d.ts +4 -0
- package/es/Toc/Toc.js +43 -0
- package/es/Toc/TocMobile.d.ts +1 -54
- package/es/Toc/TocMobile.js +12 -35
- package/es/Toc/index.d.ts +2 -11
- package/es/Toc/index.js +1 -41
- package/es/Toc/style.js +1 -1
- package/es/Toc/type.d.ts +17 -0
- package/es/Toc/type.js +1 -0
- package/es/Toc/utils.d.ts +11 -0
- package/es/Toc/utils.js +17 -0
- package/es/Tooltip/Tooltip.d.ts +4 -0
- package/es/Tooltip/Tooltip.js +52 -0
- package/es/Tooltip/index.d.ts +2 -10
- package/es/Tooltip/index.js +1 -49
- package/es/Tooltip/type.d.ts +10 -0
- package/es/Tooltip/type.js +1 -0
- package/es/Video/index.d.ts +24 -9
- package/es/Video/index.js +82 -45
- package/es/Video/style.d.ts +9 -5
- package/es/Video/style.js +18 -11
- package/es/awesome/AuroraBackground/AuroraBackground.d.ts +4 -0
- package/es/awesome/{GaussianBackground/index.js → AuroraBackground/AuroraBackground.js} +22 -29
- package/es/awesome/AuroraBackground/index.d.ts +2 -4
- package/es/awesome/AuroraBackground/index.js +1 -38
- package/es/awesome/AuroraBackground/style.js +2 -2
- package/es/awesome/AuroraBackground/type.d.ts +13 -0
- package/es/awesome/AuroraBackground/type.js +1 -0
- package/es/awesome/BottomGradientButton/BottomGradientButton.d.ts +3 -0
- package/es/awesome/BottomGradientButton/BottomGradientButton.js +39 -0
- package/es/awesome/BottomGradientButton/index.d.ts +2 -0
- package/es/awesome/BottomGradientButton/index.js +1 -0
- package/es/awesome/BottomGradientButton/style.d.ts +1 -0
- package/es/awesome/BottomGradientButton/style.js +10 -0
- package/es/awesome/BottomGradientButton/type.d.ts +2 -0
- package/es/awesome/BottomGradientButton/type.js +1 -0
- package/es/awesome/Features/FeatureItem.d.ts +4 -0
- package/es/awesome/Features/{Item.js → FeatureItem.js} +9 -6
- package/es/awesome/Features/Features.d.ts +4 -0
- package/es/awesome/Features/Features.js +41 -0
- package/es/awesome/Features/index.d.ts +2 -24
- package/es/awesome/Features/index.js +1 -40
- package/es/awesome/Features/type.d.ts +27 -0
- package/es/awesome/Features/type.js +1 -0
- package/es/awesome/Giscus/Giscus.d.ts +4 -0
- package/es/awesome/Giscus/Giscus.js +51 -0
- package/es/awesome/Giscus/index.d.ts +2 -8
- package/es/awesome/Giscus/index.js +1 -50
- package/es/awesome/Giscus/type.d.ts +6 -0
- package/es/awesome/Giscus/type.js +1 -0
- package/es/awesome/GradientButton/GradientButton.d.ts +4 -0
- package/es/awesome/GradientButton/GradientButton.js +40 -0
- package/es/awesome/GradientButton/index.d.ts +2 -7
- package/es/awesome/GradientButton/index.js +1 -37
- package/es/awesome/GradientButton/style.d.ts +2 -2
- package/es/awesome/GradientButton/style.js +5 -4
- package/es/awesome/GradientButton/type.d.ts +4 -0
- package/es/awesome/GradientButton/type.js +1 -0
- package/es/awesome/GridBackground/GridBackground.d.ts +4 -0
- package/es/awesome/GridBackground/GridBackground.js +108 -0
- package/es/awesome/GridBackground/GridShowcase.d.ts +1 -6
- package/es/awesome/GridBackground/GridShowcase.js +2 -1
- package/es/awesome/GridBackground/{Grid.d.ts → components/Grid.d.ts} +2 -2
- package/es/awesome/GridBackground/{Grid.js → components/Grid.js} +14 -14
- package/es/awesome/GridBackground/index.d.ts +3 -16
- package/es/awesome/GridBackground/index.js +2 -107
- package/es/awesome/GridBackground/type.d.ts +18 -0
- package/es/awesome/GridBackground/type.js +1 -0
- package/es/awesome/Hero/Hero.d.ts +4 -0
- package/es/awesome/Hero/Hero.js +100 -0
- package/es/awesome/Hero/index.d.ts +2 -43
- package/es/awesome/Hero/index.js +1 -103
- package/es/awesome/Hero/type.d.ts +14 -0
- package/es/awesome/Hero/type.js +1 -0
- package/es/awesome/Spline/ParentSize.d.ts +6 -5
- package/es/awesome/Spline/ParentSize.js +7 -5
- package/es/awesome/Spline/Spine.d.ts +6 -0
- package/es/awesome/Spline/Spine.js +148 -0
- package/es/awesome/Spline/index.d.ts +2 -20
- package/es/awesome/Spline/index.js +1 -146
- package/es/awesome/Spline/type.d.ts +17 -0
- package/es/awesome/Spline/type.js +1 -0
- package/es/awesome/Spotlight/Spotlight.d.ts +4 -0
- package/es/awesome/Spotlight/Spotlight.js +45 -0
- package/es/awesome/Spotlight/index.d.ts +2 -11
- package/es/awesome/Spotlight/index.js +1 -79
- package/es/awesome/Spotlight/type.d.ts +4 -0
- package/es/awesome/Spotlight/type.js +1 -0
- package/es/awesome/Spotlight/useMouseOffset.d.ts +1 -0
- package/es/awesome/{GaussianBackground/useGaussianBackground.js → Spotlight/useMouseOffset.js} +32 -13
- package/es/awesome/SpotlightCard/SpotlightCard.d.ts +4 -0
- package/es/awesome/SpotlightCard/SpotlightCard.js +90 -0
- package/es/awesome/SpotlightCard/SpotlightCardItem.d.ts +1 -5
- package/es/awesome/SpotlightCard/SpotlightCardItem.js +3 -0
- package/es/awesome/SpotlightCard/index.d.ts +2 -14
- package/es/awesome/SpotlightCard/index.js +1 -89
- package/es/awesome/SpotlightCard/type.d.ts +16 -0
- package/es/awesome/SpotlightCard/type.js +1 -0
- package/es/awesome/index.d.ts +4 -5
- package/es/awesome/index.js +2 -3
- package/es/brand/BrandLoading/index.js +1 -0
- package/es/brand/LobeChat/index.d.ts +0 -11
- package/es/brand/LobeChat/index.js +1 -0
- package/es/brand/LobeChatText/index.js +1 -0
- package/es/brand/LobeHub/index.d.ts +0 -11
- package/es/brand/LobeHub/index.js +1 -0
- package/es/brand/LobeHubText/index.js +1 -0
- package/es/brand/Logo3d/index.js +3 -0
- package/es/brand/LogoFlat/index.d.ts +3 -3
- package/es/brand/LogoFlat/index.js +5 -5
- package/es/brand/LogoMono/index.d.ts +3 -3
- package/es/brand/LogoMono/index.js +5 -5
- package/es/brand/LogoThree/Loading.js +1 -3
- package/es/brand/LogoThree/index.js +1 -0
- package/es/chat/BackBottom/BackBottom.d.ts +4 -0
- package/es/chat/BackBottom/BackBottom.js +63 -0
- package/es/chat/BackBottom/index.d.ts +2 -13
- package/es/chat/BackBottom/index.js +1 -62
- package/es/chat/BackBottom/style.d.ts +1 -1
- package/es/chat/BackBottom/style.js +2 -6
- package/es/chat/BackBottom/type.d.ts +11 -0
- package/es/chat/BackBottom/type.js +1 -0
- package/es/chat/Bubble/Bubble.d.ts +4 -0
- package/es/chat/Bubble/Bubble.js +60 -0
- package/es/chat/Bubble/index.d.ts +2 -0
- package/es/chat/Bubble/index.js +1 -0
- package/es/chat/Bubble/style.d.ts +7 -0
- package/es/chat/Bubble/style.js +16 -0
- package/es/chat/Bubble/type.d.ts +7 -0
- package/es/chat/Bubble/type.js +1 -0
- package/es/chat/ChatHeader/ChatHeader.d.ts +4 -0
- package/es/chat/ChatHeader/ChatHeader.js +79 -0
- package/es/chat/ChatHeader/ChatHeaderTitle.d.ts +2 -6
- package/es/chat/ChatHeader/ChatHeaderTitle.js +5 -19
- package/es/chat/ChatHeader/index.d.ts +9 -23
- package/es/chat/ChatHeader/index.js +6 -81
- package/es/chat/ChatHeader/style.d.ts +9 -1
- package/es/chat/ChatHeader/style.js +16 -7
- package/es/{mobile/MobileNavBar/index.d.ts → chat/ChatHeader/type.d.ts} +13 -13
- package/es/chat/ChatHeader/type.js +1 -0
- package/es/chat/ChatInputArea/ChatInputArea.d.ts +4 -20
- package/es/chat/ChatInputArea/ChatInputArea.js +20 -30
- package/es/chat/ChatInputArea/components/ChatInputActionBar.d.ts +4 -0
- package/es/chat/ChatInputArea/components/ChatInputActionBar.js +57 -0
- package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.ts +4 -0
- package/es/chat/ChatInputArea/{ChatInputAreaInner.js → components/ChatInputAreaInner.js} +9 -7
- package/es/chat/ChatInputArea/components/ChatSendButton.d.ts +4 -0
- package/es/chat/ChatInputArea/components/ChatSendButton.js +83 -0
- package/es/chat/ChatInputArea/index.d.ts +17 -4
- package/es/chat/ChatInputArea/index.js +12 -4
- package/es/chat/ChatInputArea/style.d.ts +10 -0
- package/es/chat/ChatInputArea/style.js +21 -0
- package/es/chat/ChatInputArea/type.d.ts +50 -0
- package/es/chat/ChatInputArea/type.js +1 -0
- package/es/chat/ChatItem/ChatItem.d.ts +5 -0
- package/es/chat/ChatItem/ChatItem.js +183 -0
- package/es/chat/ChatItem/components/Actions.d.ts +2 -2
- package/es/chat/ChatItem/components/Actions.js +2 -2
- package/es/chat/ChatItem/components/Avatar.d.ts +2 -1
- package/es/chat/ChatItem/components/Avatar.js +2 -0
- package/es/chat/ChatItem/components/Loading.js +1 -1
- package/es/chat/ChatItem/components/MessageContent.d.ts +1 -1
- package/es/chat/ChatItem/components/MessageContent.js +2 -2
- package/es/chat/ChatItem/index.d.ts +2 -5
- package/es/chat/ChatItem/index.js +1 -180
- package/es/chat/ChatItem/style.d.ts +1 -1
- package/es/chat/ChatItem/style.js +9 -9
- package/es/chat/ChatItem/type.d.ts +5 -4
- package/es/chat/ChatList/ChatList.d.ts +4 -0
- package/es/chat/ChatList/ChatList.js +70 -0
- package/es/chat/ChatList/components/ChatActionsBar.d.ts +4 -0
- package/es/chat/ChatList/{ActionsBar.js → components/ChatActionsBar.js} +10 -7
- package/es/chat/ChatList/components/ChatListItem.d.ts +4 -0
- package/es/chat/ChatList/{Item.js → components/ChatListItem.js} +11 -10
- package/es/chat/ChatList/{HistoryDivider.js → components/HistoryDivider.js} +2 -2
- package/es/{hooks → chat/ChatList/components}/useChatListActionsBar.d.ts +5 -5
- package/es/chat/ChatList/index.d.ts +3 -15
- package/es/chat/ChatList/index.js +2 -70
- package/es/chat/ChatList/{Item.d.ts → type.d.ts} +22 -11
- package/es/chat/ChatList/type.js +1 -0
- package/es/chat/EditableMessage/EditableMessage.d.ts +4 -0
- package/es/chat/EditableMessage/EditableMessage.js +113 -0
- package/es/chat/EditableMessage/index.d.ts +2 -78
- package/es/chat/EditableMessage/index.js +1 -111
- package/es/chat/EditableMessage/type.d.ts +36 -0
- package/es/chat/EditableMessage/type.js +1 -0
- package/es/chat/EditableMessageList/EditableMessageList.d.ts +4 -0
- package/es/chat/EditableMessageList/EditableMessageList.js +109 -0
- package/es/chat/EditableMessageList/index.d.ts +2 -20
- package/es/chat/EditableMessageList/index.js +1 -113
- package/es/chat/EditableMessageList/messageReducer.d.ts +1 -2
- package/es/chat/EditableMessageList/type.d.ts +6 -0
- package/es/chat/EditableMessageList/type.js +1 -0
- package/es/chat/MessageInput/MessageInput.d.ts +4 -0
- package/es/chat/MessageInput/MessageInput.js +123 -0
- package/es/chat/MessageInput/index.d.ts +2 -45
- package/es/chat/MessageInput/index.js +1 -131
- package/es/chat/MessageInput/type.d.ts +24 -0
- package/es/chat/MessageInput/type.js +1 -0
- package/es/chat/MessageModal/MessageModal.d.ts +4 -0
- package/es/chat/MessageModal/MessageModal.js +110 -0
- package/es/chat/MessageModal/TextArea.d.ts +1 -1
- package/es/chat/MessageModal/index.d.ts +2 -41
- package/es/chat/MessageModal/index.js +1 -129
- package/es/chat/MessageModal/type.d.ts +22 -0
- package/es/chat/MessageModal/type.js +1 -0
- package/es/chat/TokenTag/TokenTag.d.ts +4 -0
- package/es/chat/TokenTag/TokenTag.js +95 -0
- package/es/chat/TokenTag/index.d.ts +2 -25
- package/es/chat/TokenTag/index.js +1 -71
- package/es/chat/TokenTag/style.d.ts +5 -6
- package/es/chat/TokenTag/style.js +8 -30
- package/es/chat/TokenTag/type.d.ts +15 -0
- package/es/chat/TokenTag/type.js +1 -0
- package/es/chat/index.d.ts +4 -5
- package/es/chat/index.js +5 -6
- package/es/chat/types/chatMessage.js +1 -0
- package/es/chat/types/index.d.ts +4 -0
- package/es/chat/types/index.js +4 -0
- package/es/chat/types/meta.js +1 -0
- package/es/color/colors/gold.js +2 -2
- package/es/color/colors/gray.js +1 -1
- package/es/color/colors/green.js +3 -3
- package/es/color/colors/orange.js +2 -2
- package/es/color/colors/purple.js +1 -1
- package/es/color/colors/volcano.js +1 -1
- package/es/hooks/useCopied.js +2 -0
- package/es/hooks/useHighlight.d.ts +9 -4
- package/es/hooks/useHighlight.js +42 -24
- package/es/hooks/useMermaid.d.ts +5 -1
- package/es/hooks/useMermaid.js +10 -6
- package/es/icons/Auth0/components/Mono.js +2 -3
- package/es/icons/Authelia/components/Color.js +2 -3
- package/es/icons/Authelia/components/Mono.js +2 -3
- package/es/icons/Authentik/components/Color.js +2 -3
- package/es/icons/Authentik/components/Mono.js +2 -3
- package/es/icons/Casdoor/components/Color.js +2 -3
- package/es/icons/Casdoor/components/Mono.js +2 -3
- package/es/icons/Clerk/components/Color.js +2 -3
- package/es/icons/Clerk/components/Mono.js +2 -3
- package/es/icons/Logto/components/Color.js +2 -3
- package/es/icons/Logto/components/Mono.js +2 -3
- package/es/icons/MicrosoftEntra/components/Color.js +2 -3
- package/es/icons/MicrosoftEntra/components/Mono.js +2 -3
- package/es/icons/NextAuth/components/Color.js +2 -3
- package/es/icons/NextAuth/components/Mono.js +2 -3
- package/es/icons/Zitadel/components/Color.js +2 -3
- package/es/icons/Zitadel/components/Mono.js +2 -3
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.js +1 -0
- package/es/icons/lucideExtra/DiscordIcon.d.ts +3 -0
- package/es/icons/lucideExtra/DiscordIcon.js +17 -0
- package/es/icons/lucideExtra/GlobeOffIcon.d.ts +3 -0
- package/es/icons/lucideExtra/GlobeOffIcon.js +25 -0
- package/es/icons/lucideExtra/LeftClickIcon.d.ts +3 -0
- package/es/icons/lucideExtra/LeftClickIcon.js +11 -0
- package/es/icons/lucideExtra/LeftDoubleClickIcon.d.ts +3 -0
- package/es/{Hotkey/components → icons/lucideExtra}/LeftDoubleClickIcon.js +4 -3
- package/es/icons/lucideExtra/RightClickIcon.d.ts +3 -0
- package/es/icons/lucideExtra/RightClickIcon.js +11 -0
- package/es/icons/lucideExtra/RightDoubleClickIcon.d.ts +3 -0
- package/es/{Hotkey/components → icons/lucideExtra}/RightDoubleClickIcon.js +4 -3
- package/es/icons/lucideExtra/index.d.ts +6 -0
- package/es/icons/lucideExtra/index.js +6 -0
- package/es/index.d.ts +63 -7
- package/es/index.js +62 -7
- package/es/mdx/Callout/index.js +44 -45
- package/es/{awesome/GaussianBackground → mdx/Callout}/style.d.ts +1 -1
- package/es/mdx/Callout/style.js +11 -0
- package/es/mdx/Cards/Card.d.ts +3 -3
- package/es/mdx/Cards/Card.js +12 -7
- package/es/mdx/Cards/index.d.ts +1 -1
- package/es/mdx/Cards/index.js +10 -17
- package/es/{Mermaid/components → mdx/Cards}/style.d.ts +1 -1
- package/es/mdx/Cards/style.js +9 -0
- package/es/mdx/FileTree/File.js +1 -0
- package/es/mdx/FileTree/Folder.js +1 -0
- package/es/mdx/FileTree/index.js +6 -14
- package/es/mdx/FileTree/style.d.ts +3 -0
- package/es/mdx/FileTree/style.js +10 -0
- package/es/mdx/Mdx/index.d.ts +1 -1
- package/es/mdx/Mdx/index.js +4 -3
- package/es/mdx/Steps/index.js +6 -14
- package/es/mdx/Steps/style.d.ts +3 -0
- package/es/mdx/Steps/style.js +10 -0
- package/es/mdx/Tabs/Tab.js +1 -0
- package/es/mdx/Tabs/index.d.ts +2 -2
- package/es/mdx/Tabs/index.js +14 -25
- package/es/mdx/Tabs/style.d.ts +4 -0
- package/es/mdx/Tabs/style.js +12 -0
- package/es/mdx/mdxComponents/Citation/PopoverPanel.d.ts +2 -2
- package/es/mdx/mdxComponents/Citation/PopoverPanel.js +4 -3
- package/es/mdx/mdxComponents/Citation/index.d.ts +2 -2
- package/es/mdx/mdxComponents/Citation/index.js +4 -4
- package/es/mdx/mdxComponents/CodeBlock.d.ts +1 -1
- package/es/mdx/mdxComponents/CodeBlock.js +1 -0
- package/es/mdx/mdxComponents/Footnotes.d.ts +2 -2
- package/es/mdx/mdxComponents/Footnotes.js +5 -2
- package/es/mdx/mdxComponents/Image.d.ts +2 -5
- package/es/mdx/mdxComponents/Image.js +4 -20
- package/es/mdx/mdxComponents/Link.d.ts +3 -3
- package/es/mdx/mdxComponents/Link.js +3 -0
- package/es/mdx/mdxComponents/Pre.d.ts +1 -1
- package/es/mdx/mdxComponents/Pre.js +13 -15
- package/es/mdx/mdxComponents/Section.d.ts +2 -2
- package/es/mdx/mdxComponents/Section.js +16 -4
- package/es/mdx/mdxComponents/Video.d.ts +2 -5
- package/es/mdx/mdxComponents/Video.js +3 -19
- package/es/mobile/ChatHeader/ChatHeader.d.ts +4 -0
- package/es/mobile/ChatHeader/ChatHeader.js +88 -0
- package/es/mobile/ChatHeader/ChatHeaderTitle.d.ts +4 -0
- package/es/mobile/ChatHeader/ChatHeaderTitle.js +58 -0
- package/es/mobile/ChatHeader/index.d.ts +11 -0
- package/es/mobile/ChatHeader/index.js +6 -0
- package/es/mobile/ChatHeader/style.d.ts +14 -0
- package/es/mobile/{MobileNavBar → ChatHeader}/style.js +12 -1
- package/es/mobile/ChatHeader/type.d.ts +31 -0
- package/es/mobile/ChatHeader/type.js +1 -0
- package/es/mobile/ChatInputArea/ChatInputArea.d.ts +4 -0
- package/es/mobile/{MobileChatInputArea/index.js → ChatInputArea/ChatInputArea.js} +29 -41
- package/es/mobile/ChatInputArea/components/ChatSendButton.d.ts +4 -0
- package/es/mobile/{MobileChatInputArea/SendButton.js → ChatInputArea/components/ChatSendButton.js} +20 -27
- package/es/mobile/ChatInputArea/index.d.ts +11 -0
- package/es/mobile/ChatInputArea/index.js +6 -0
- package/es/mobile/ChatInputArea/style.d.ts +7 -0
- package/es/mobile/ChatInputArea/style.js +14 -0
- package/es/mobile/ChatInputArea/type.d.ts +19 -0
- package/es/mobile/ChatInputArea/type.js +1 -0
- package/es/mobile/SafeArea/SafeArea.d.ts +4 -0
- package/es/mobile/{MobileSafeArea/index.js → SafeArea/SafeArea.js} +4 -3
- package/es/mobile/SafeArea/index.d.ts +2 -0
- package/es/mobile/SafeArea/index.js +1 -0
- package/es/mobile/SafeArea/type.d.ts +4 -0
- package/es/mobile/SafeArea/type.js +1 -0
- package/es/mobile/TabBar/TabBar.d.ts +4 -0
- package/es/mobile/TabBar/TabBar.js +84 -0
- package/es/mobile/TabBar/index.d.ts +2 -0
- package/es/mobile/TabBar/index.js +1 -0
- package/es/mobile/{MobileTabBar → TabBar}/style.js +1 -2
- package/es/mobile/TabBar/type.d.ts +16 -0
- package/es/mobile/TabBar/type.js +1 -0
- package/es/mobile/index.d.ts +4 -6
- package/es/mobile/index.js +4 -6
- package/es/storybook/StoryBook/index.d.ts +3 -9
- package/es/storybook/StoryBook/index.js +14 -14
- package/es/styles/theme/antdTheme.js +28 -0
- package/es/styles/theme/customStylish.js +19 -8
- package/es/styles/theme/customToken.d.ts +1 -1
- package/es/styles/theme/customToken.js +2 -1
- package/es/styles/theme/generateColorPalette.js +2 -1
- package/es/styles/theme/token/base.js +3 -3
- package/es/styles/theme/token/light.js +2 -2
- package/es/types/customStylish.d.ts +12 -1
- package/es/types/customToken.d.ts +9 -2
- package/es/types/customToken.js +1 -0
- package/es/types/index.d.ts +1 -3
- package/es/types/index.js +0 -3
- package/es/utils/genCdnUrl.js +0 -23
- package/package.json +10 -6
- package/es/ActionIcon/calcSize.d.ts +0 -5
- package/es/ActionIcon/calcSize.js +0 -40
- package/es/ContextMenu/index.d.ts +0 -5
- package/es/ContextMenu/index.js +0 -17
- package/es/EmptyCard/index.d.ts +0 -19
- package/es/EmptyCard/style.js +0 -15
- package/es/Hotkey/components/LeftClickIcon.d.ts +0 -3
- package/es/Hotkey/components/LeftClickIcon.js +0 -10
- package/es/Hotkey/components/LeftDoubleClickIcon.d.ts +0 -3
- package/es/Hotkey/components/RightClickIcon.d.ts +0 -3
- package/es/Hotkey/components/RightClickIcon.js +0 -10
- package/es/Hotkey/components/RightDoubleClickIcon.d.ts +0 -3
- package/es/Icon/calcSize.d.ts +0 -5
- package/es/Icon/calcSize.js +0 -39
- package/es/Icon/icons/DiscordIcon.d.ts +0 -3
- package/es/Icon/icons/DiscordIcon.js +0 -20
- package/es/Icon/icons/index.d.ts +0 -1
- package/es/Icon/icons/index.js +0 -1
- package/es/Image/ImageGallery.d.ts +0 -11
- package/es/Image/usePreview.d.ts +0 -7
- package/es/MaterialFileTypeIcon/types.d.ts +0 -5
- package/es/Mermaid/components/Controls.d.ts +0 -3
- package/es/Mermaid/components/Controls.js +0 -49
- package/es/Mermaid/components/MermaidContainer.d.ts +0 -5
- package/es/Mermaid/components/MermaidContainer.js +0 -42
- package/es/Mermaid/components/MermaidZoomableContainer.d.ts +0 -5
- package/es/Mermaid/components/MermaidZoomableContainer.js +0 -21
- package/es/Mermaid/components/style.js +0 -12
- package/es/Mermaid/style.d.ts +0 -8
- package/es/Mermaid/style.js +0 -22
- package/es/SearchResultCard/index.js +0 -79
- package/es/SearchResultCards/index.d.ts +0 -12
- package/es/SearchResultCards/index.js +0 -30
- package/es/SelectWithImg/styles.js +0 -17
- package/es/SortableList/DragHandle.d.ts +0 -4
- package/es/Swatches/index.d.ts +0 -25
- package/es/Swatches/style.d.ts +0 -4
- package/es/Swatches/style.js +0 -11
- package/es/TabsNav/index.d.ts +0 -7
- package/es/TabsNav/style.js +0 -15
- package/es/awesome/Features/Item.d.ts +0 -55
- package/es/awesome/GaussianBackground/index.d.ts +0 -17
- package/es/awesome/GaussianBackground/style.js +0 -11
- package/es/awesome/GaussianBackground/useGaussianBackground.d.ts +0 -7
- package/es/awesome/GaussianBackground/vendor/gaussianBackground.d.ts +0 -38
- package/es/awesome/GaussianBackground/vendor/gaussianBackground.js +0 -226
- package/es/awesome/GaussianBackground/vendor/stackBlur.d.ts +0 -1
- package/es/awesome/GaussianBackground/vendor/stackBlur.js +0 -188
- package/es/awesome/GaussianBackground/vendor/stackBlurTable.d.ts +0 -2
- package/es/awesome/GaussianBackground/vendor/stackBlurTable.js +0 -2
- package/es/chat/ChatInputArea/ChatInputActionBar.d.ts +0 -9
- package/es/chat/ChatInputArea/ChatInputActionBar.js +0 -54
- package/es/chat/ChatInputArea/ChatInputAreaInner.d.ts +0 -12
- package/es/chat/ChatInputArea/SendButton.d.ts +0 -17
- package/es/chat/ChatInputArea/SendButton.js +0 -76
- package/es/chat/ChatList/ActionsBar.d.ts +0 -12
- package/es/components/ControlInput.d.ts +0 -22
- package/es/components.d.ts +0 -71
- package/es/components.js +0 -69
- package/es/hooks/languageMap.d.ts +0 -2
- package/es/hooks/languageMap.js +0 -1
- package/es/mobile/MobileChatInputArea/SendButton.d.ts +0 -9
- package/es/mobile/MobileChatInputArea/index.d.ts +0 -15
- package/es/mobile/MobileNavBar/MobileNavBarTitle.d.ts +0 -8
- package/es/mobile/MobileNavBar/MobileNavBarTitle.js +0 -70
- package/es/mobile/MobileNavBar/index.js +0 -75
- package/es/mobile/MobileSafeArea/index.d.ts +0 -7
- package/es/mobile/MobileTabBar/index.d.ts +0 -18
- package/es/mobile/MobileTabBar/index.js +0 -71
- /package/es/{MaterialFileTypeIcon/types.js → ActionIcon/type.js} +0 -0
- /package/es/{types/chatMessage.js → ActionIconGroup/type.js} +0 -0
- /package/es/{types/meta.js → Alert/type.js} +0 -0
- /package/es/Image/{Preview.js → components/Preview.js} +0 -0
- /package/es/SortableList/{SortableOverlay.d.ts → components/SortableOverlay.d.ts} +0 -0
- /package/es/chat/ChatList/{HistoryDivider.d.ts → components/HistoryDivider.d.ts} +0 -0
- /package/es/{hooks → chat/ChatList/components}/useChatListActionsBar.js +0 -0
- /package/es/{types → chat/types}/chatMessage.d.ts +0 -0
- /package/es/{types → chat/types}/error.d.ts +0 -0
- /package/es/{types → chat/types}/error.js +0 -0
- /package/es/{types → chat/types}/llm.d.ts +0 -0
- /package/es/{types → chat/types}/llm.js +0 -0
- /package/es/{types → chat/types}/meta.d.ts +0 -0
- /package/es/mobile/{MobileSafeArea → SafeArea}/style.d.ts +0 -0
- /package/es/mobile/{MobileSafeArea → SafeArea}/style.js +0 -0
- /package/es/mobile/{MobileTabBar → TabBar}/style.d.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
4
|
var _excluded = ["enableReset", "buttonProps", "float", "onReset", "saveButtonProps", "resetButtonProps", "enableUnsavedWarning", "children", "texts", "className"];
|
|
3
|
-
var _templateObject, _templateObject2;
|
|
4
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -14,43 +15,33 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
14
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
|
-
|
|
18
|
-
import { Button, Form } from 'antd';
|
|
19
|
-
import { createStyles } from 'antd-style';
|
|
18
|
+
import { Form } from 'antd';
|
|
20
19
|
import isEqual from 'fast-deep-equal';
|
|
21
20
|
import { motion } from 'framer-motion';
|
|
22
|
-
import { merge } from 'lodash-es';
|
|
23
21
|
import { InfoIcon } from 'lucide-react';
|
|
24
|
-
import { memo, useEffect, useState } from 'react';
|
|
22
|
+
import { memo, useEffect, useMemo, useState } from 'react';
|
|
25
23
|
import { Flexbox } from 'react-layout-kit';
|
|
24
|
+
import Button from "../../Button";
|
|
26
25
|
import Icon from "../../Icon";
|
|
26
|
+
import { useSubmitFooterStyles as useStyles } from "../style";
|
|
27
27
|
import { useFormContext } from "./FormProvider";
|
|
28
|
+
import { merge, removeUndefined } from "./merge";
|
|
28
29
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
30
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
30
31
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
float = _ref2.float,
|
|
45
|
-
onReset = _ref2.onReset,
|
|
46
|
-
saveButtonProps = _ref2.saveButtonProps,
|
|
47
|
-
resetButtonProps = _ref2.resetButtonProps,
|
|
48
|
-
_ref2$enableUnsavedWa = _ref2.enableUnsavedWarning,
|
|
49
|
-
enableUnsavedWarning = _ref2$enableUnsavedWa === void 0 ? true : _ref2$enableUnsavedWa,
|
|
50
|
-
children = _ref2.children,
|
|
51
|
-
texts = _ref2.texts,
|
|
52
|
-
className = _ref2.className,
|
|
53
|
-
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
32
|
+
var FormSubmitFooter = /*#__PURE__*/memo(function (_ref) {
|
|
33
|
+
var _ref$enableReset = _ref.enableReset,
|
|
34
|
+
enableReset = _ref$enableReset === void 0 ? true : _ref$enableReset,
|
|
35
|
+
buttonProps = _ref.buttonProps,
|
|
36
|
+
float = _ref.float,
|
|
37
|
+
onReset = _ref.onReset,
|
|
38
|
+
saveButtonProps = _ref.saveButtonProps,
|
|
39
|
+
resetButtonProps = _ref.resetButtonProps,
|
|
40
|
+
enableUnsavedWarning = _ref.enableUnsavedWarning,
|
|
41
|
+
children = _ref.children,
|
|
42
|
+
texts = _ref.texts,
|
|
43
|
+
className = _ref.className,
|
|
44
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
54
45
|
var _useFormContext = useFormContext(),
|
|
55
46
|
form = _useFormContext.form,
|
|
56
47
|
initialValues = _useFormContext.initialValues,
|
|
@@ -59,16 +50,23 @@ var FormSubmitFooter = /*#__PURE__*/memo(function (_ref2) {
|
|
|
59
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
60
51
|
hasUnsavedChanges = _useState2[0],
|
|
61
52
|
setHasUnsavedChanges = _useState2[1];
|
|
62
|
-
var values = Form.useWatch([], form);
|
|
53
|
+
var values = Form.useWatch([], form) || {};
|
|
63
54
|
var _useStyles = useStyles(),
|
|
64
55
|
cx = _useStyles.cx,
|
|
65
56
|
styles = _useStyles.styles,
|
|
66
57
|
theme = _useStyles.theme;
|
|
58
|
+
var v = useMemo(function () {
|
|
59
|
+
return removeUndefined(values);
|
|
60
|
+
}, [values]);
|
|
61
|
+
var initialV = useMemo(function () {
|
|
62
|
+
return removeUndefined(initialValues);
|
|
63
|
+
}, [initialValues]);
|
|
64
|
+
var mergedV = useMemo(function () {
|
|
65
|
+
return merge(initialV, v);
|
|
66
|
+
}, [v, initialV]);
|
|
67
67
|
useEffect(function () {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
setHasUnsavedChanges(!isEqual(v, initialValues));
|
|
71
|
-
}, [values, initialValues, submitLoading]);
|
|
68
|
+
setHasUnsavedChanges(!isEqual(mergedV, initialV));
|
|
69
|
+
}, [mergedV, initialV, submitLoading]);
|
|
72
70
|
var fn = function fn(e) {
|
|
73
71
|
if (hasUnsavedChanges) {
|
|
74
72
|
e.returnValue = (texts === null || texts === void 0 ? void 0 : texts.unSavedWarning) || 'You have unsaved changes. Are you sure you want to leave?';
|
|
@@ -90,9 +88,7 @@ var FormSubmitFooter = /*#__PURE__*/memo(function (_ref2) {
|
|
|
90
88
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
91
89
|
color: theme.colorTextDescription,
|
|
92
90
|
icon: InfoIcon,
|
|
93
|
-
size:
|
|
94
|
-
fontSize: 12
|
|
95
|
-
},
|
|
91
|
+
size: 12,
|
|
96
92
|
style: {
|
|
97
93
|
marginLeft: 8
|
|
98
94
|
}
|
|
@@ -106,11 +102,10 @@ var FormSubmitFooter = /*#__PURE__*/memo(function (_ref2) {
|
|
|
106
102
|
children: (texts === null || texts === void 0 ? void 0 : texts.unSaved) || 'Unsaved changes'
|
|
107
103
|
})]
|
|
108
104
|
}), children, enableReset && (float || hasUnsavedChanges) && /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({
|
|
109
|
-
color: "default",
|
|
110
105
|
htmlType: "button",
|
|
111
106
|
onClick: function onClick() {
|
|
107
|
+
onReset === null || onReset === void 0 || onReset(v, initialV);
|
|
112
108
|
form === null || form === void 0 || form.resetFields();
|
|
113
|
-
onReset === null || onReset === void 0 || onReset();
|
|
114
109
|
},
|
|
115
110
|
shape: float ? 'round' : undefined,
|
|
116
111
|
variant: 'filled'
|
|
@@ -165,4 +160,5 @@ var FormSubmitFooter = /*#__PURE__*/memo(function (_ref2) {
|
|
|
165
160
|
}))
|
|
166
161
|
});
|
|
167
162
|
});
|
|
163
|
+
FormSubmitFooter.displayName = 'FormSubmitFooter';
|
|
168
164
|
export default FormSubmitFooter;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
4
|
-
formTitle: import("antd-style").SerializedStyles;
|
|
5
|
-
}>;
|
|
6
|
-
export interface FormTitleProps extends DivProps {
|
|
7
|
-
avatar?: ReactNode;
|
|
8
|
-
desc?: ReactNode;
|
|
9
|
-
tag?: string;
|
|
10
|
-
title: string;
|
|
11
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FormTitleProps } from '../type';
|
|
12
3
|
declare const FormTitle: import("react").NamedExoticComponent<FormTitleProps>;
|
|
13
4
|
export default FormTitle;
|
|
@@ -1,55 +1,58 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
var _excluded = ["tag", "title", "desc", "avatar", "classNames", "styles"];
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
12
|
import { memo } from 'react';
|
|
7
13
|
import { Flexbox } from 'react-layout-kit';
|
|
8
14
|
import Tag from "../../Tag";
|
|
15
|
+
import { useTitleStyles as useStyles } from "../style";
|
|
9
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var FormTitle = /*#__PURE__*/memo(function (_ref2) {
|
|
20
|
-
var className = _ref2.className,
|
|
21
|
-
tag = _ref2.tag,
|
|
22
|
-
title = _ref2.title,
|
|
23
|
-
desc = _ref2.desc,
|
|
24
|
-
avatar = _ref2.avatar;
|
|
18
|
+
var FormTitle = /*#__PURE__*/memo(function (_ref) {
|
|
19
|
+
var tag = _ref.tag,
|
|
20
|
+
title = _ref.title,
|
|
21
|
+
desc = _ref.desc,
|
|
22
|
+
avatar = _ref.avatar,
|
|
23
|
+
classNames = _ref.classNames,
|
|
24
|
+
customStyles = _ref.styles,
|
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
26
|
var _useStyles = useStyles(),
|
|
26
27
|
cx = _useStyles.cx,
|
|
27
28
|
styles = _useStyles.styles;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
30
|
+
align: "center",
|
|
31
|
+
gap: 8,
|
|
32
|
+
horizontal: true
|
|
33
|
+
}, rest), {}, {
|
|
34
|
+
children: [avatar, /*#__PURE__*/_jsxs(Flexbox, {
|
|
35
|
+
className: cx(styles.content, classNames === null || classNames === void 0 ? void 0 : classNames.content),
|
|
33
36
|
gap: 8,
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.content,
|
|
38
|
+
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
39
|
+
align: 'center',
|
|
40
|
+
className: cx(styles.title, classNames === null || classNames === void 0 ? void 0 : classNames.title),
|
|
41
|
+
direction: 'horizontal',
|
|
42
|
+
gap: 8,
|
|
43
|
+
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.title,
|
|
44
|
+
children: [title, tag && /*#__PURE__*/_jsx(Tag, {
|
|
45
|
+
className: classNames === null || classNames === void 0 ? void 0 : classNames.tag,
|
|
46
|
+
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.tag,
|
|
47
|
+
children: tag
|
|
48
|
+
})]
|
|
49
|
+
}), desc && /*#__PURE__*/_jsx("small", {
|
|
50
|
+
className: cx(styles.desc, classNames === null || classNames === void 0 ? void 0 : classNames.desc),
|
|
51
|
+
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.desc,
|
|
52
|
+
children: desc
|
|
36
53
|
})]
|
|
37
|
-
}), desc && /*#__PURE__*/_jsx("small", {
|
|
38
|
-
style: {
|
|
39
|
-
marginBottom: 2,
|
|
40
|
-
marginTop: 6
|
|
41
|
-
},
|
|
42
|
-
children: desc
|
|
43
54
|
})]
|
|
44
|
-
});
|
|
45
|
-
if (avatar) {
|
|
46
|
-
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
47
|
-
align: "center",
|
|
48
|
-
gap: 8,
|
|
49
|
-
horizontal: true,
|
|
50
|
-
children: [avatar, titleNode]
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return titleNode;
|
|
55
|
+
}));
|
|
54
56
|
});
|
|
57
|
+
FormTitle.displayName = 'FormTitle';
|
|
55
58
|
export default FormTitle;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { merge as _merge } from 'lodash-es';
|
|
2
|
+
export declare const removeUndefined: (obj: any) => any;
|
|
3
|
+
/**
|
|
4
|
+
* 用于合并对象,如果是数组则直接替换
|
|
5
|
+
* @param target
|
|
6
|
+
* @param source
|
|
7
|
+
*/
|
|
8
|
+
export declare const merge: typeof _merge;
|
|
9
|
+
type MergeableItem = {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Merge two arrays based on id, preserving metadata from default items
|
|
15
|
+
* @param defaultItems Items with default configuration and metadata
|
|
16
|
+
* @param userItems User-defined items with higher priority
|
|
17
|
+
*/
|
|
18
|
+
export declare const mergeArrayById: <T extends MergeableItem>(defaultItems: T[], userItems: T[]) => T[];
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
11
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
12
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
import { isEmpty, isObject, mergeWith, pickBy } from 'lodash-es';
|
|
19
|
+
export var removeUndefined = function removeUndefined(obj) {
|
|
20
|
+
if (!isObject(obj)) return obj;
|
|
21
|
+
if (Array.isArray(obj)) {
|
|
22
|
+
return obj.map(function (item) {
|
|
23
|
+
return removeUndefined(item);
|
|
24
|
+
}).filter(function (item) {
|
|
25
|
+
return item !== undefined;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return pickBy(Object.entries(obj).reduce(function (acc, _ref) {
|
|
29
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
30
|
+
key = _ref2[0],
|
|
31
|
+
value = _ref2[1];
|
|
32
|
+
acc[key] = removeUndefined(value);
|
|
33
|
+
return acc;
|
|
34
|
+
}, {}), function (value) {
|
|
35
|
+
return value !== undefined;
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 用于合并对象,如果是数组则直接替换
|
|
41
|
+
* @param target
|
|
42
|
+
* @param source
|
|
43
|
+
*/
|
|
44
|
+
export var merge = function merge(target, source) {
|
|
45
|
+
return mergeWith({}, target, source, function (obj, src) {
|
|
46
|
+
if (Array.isArray(obj)) return src;
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Merge two arrays based on id, preserving metadata from default items
|
|
51
|
+
* @param defaultItems Items with default configuration and metadata
|
|
52
|
+
* @param userItems User-defined items with higher priority
|
|
53
|
+
*/
|
|
54
|
+
export var mergeArrayById = function mergeArrayById(defaultItems, userItems) {
|
|
55
|
+
// Create a map of default items for faster lookup
|
|
56
|
+
var defaultItemsMap = new Map(defaultItems.map(function (item) {
|
|
57
|
+
return [item.id, item];
|
|
58
|
+
}));
|
|
59
|
+
|
|
60
|
+
// 使用 Map 存储合并结果,这样重复 ID 的后项会自然覆盖前项
|
|
61
|
+
var mergedItemsMap = new Map();
|
|
62
|
+
|
|
63
|
+
// Process user items with default metadata
|
|
64
|
+
var _iterator = _createForOfIteratorHelper(userItems),
|
|
65
|
+
_step;
|
|
66
|
+
try {
|
|
67
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
68
|
+
var userItem = _step.value;
|
|
69
|
+
var defaultItem = defaultItemsMap.get(userItem.id);
|
|
70
|
+
if (!defaultItem) {
|
|
71
|
+
mergedItemsMap.set(userItem.id, userItem);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
var mergedItem = _objectSpread({}, defaultItem);
|
|
75
|
+
for (var _i = 0, _Object$entries = Object.entries(userItem); _i < _Object$entries.length; _i++) {
|
|
76
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
77
|
+
_key = _Object$entries$_i[0],
|
|
78
|
+
value = _Object$entries$_i[1];
|
|
79
|
+
if (value !== null && value !== undefined && !(_typeof(value) === 'object' && isEmpty(value))) {
|
|
80
|
+
// @ts-expect-error
|
|
81
|
+
mergedItem[_key] = value;
|
|
82
|
+
}
|
|
83
|
+
if (_typeof(value) === 'object' && !isEmpty(value)) {
|
|
84
|
+
// @ts-expect-error
|
|
85
|
+
mergedItem[_key] = merge(defaultItem[_key], value);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
mergedItemsMap.set(userItem.id, mergedItem);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// 添加只在默认配置中存在的项
|
|
92
|
+
} catch (err) {
|
|
93
|
+
_iterator.e(err);
|
|
94
|
+
} finally {
|
|
95
|
+
_iterator.f();
|
|
96
|
+
}
|
|
97
|
+
var _iterator2 = _createForOfIteratorHelper(defaultItems),
|
|
98
|
+
_step2;
|
|
99
|
+
try {
|
|
100
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
101
|
+
var item = _step2.value;
|
|
102
|
+
if (!mergedItemsMap.has(item.id)) {
|
|
103
|
+
mergedItemsMap.set(item.id, item);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
} catch (err) {
|
|
107
|
+
_iterator2.e(err);
|
|
108
|
+
} finally {
|
|
109
|
+
_iterator2.f();
|
|
110
|
+
}
|
|
111
|
+
return _toConsumableArray(mergedItemsMap.values());
|
|
112
|
+
};
|
package/es/Form/index.d.ts
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
|
-
import { Form as AntForm,
|
|
1
|
+
import { Form as AntForm, type FormInstance } from 'antd';
|
|
2
2
|
import { type ReactNode, RefAttributes } from 'react';
|
|
3
|
-
import FormGroup
|
|
4
|
-
import FormItem
|
|
3
|
+
import FormGroup from './components/FormGroup';
|
|
4
|
+
import FormItem from './components/FormItem';
|
|
5
5
|
import FormSubmitFooter from './components/FormSubmitFooter';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
collapsible?: boolean;
|
|
10
|
-
defaultActiveKey?: (string | number)[];
|
|
11
|
-
footer?: ReactNode;
|
|
12
|
-
gap?: number | string;
|
|
13
|
-
itemMinWidth?: FormItemProps['minWidth'];
|
|
14
|
-
items?: ItemGroup[] | FormItemProps[];
|
|
15
|
-
itemsType?: ItemsType;
|
|
16
|
-
onCollapse?: (key: (string | number)[]) => void;
|
|
17
|
-
variant?: FormVariant;
|
|
18
|
-
}
|
|
19
|
-
export type { FormInstance } from 'antd';
|
|
20
|
-
export interface IForm {
|
|
6
|
+
import FormTitle from './components/FormTitle';
|
|
7
|
+
import type { FormProps } from './type';
|
|
8
|
+
interface IForm {
|
|
21
9
|
(props: FormProps & RefAttributes<FormInstance>): ReactNode;
|
|
22
10
|
Group: typeof FormGroup;
|
|
23
11
|
Item: typeof FormItem;
|
|
24
12
|
Provider: typeof AntForm.Provider;
|
|
25
13
|
SubmitFooter: typeof FormSubmitFooter;
|
|
14
|
+
Title: typeof FormTitle;
|
|
26
15
|
useForm: typeof AntForm.useForm;
|
|
27
16
|
}
|
|
28
17
|
declare const Form: IForm;
|
|
29
18
|
export default Form;
|
|
19
|
+
export { default as FormGroup } from './components/FormGroup';
|
|
20
|
+
export { default as FormItem } from './components/FormItem';
|
|
21
|
+
export { default as FormSubmitFooter } from './components/FormSubmitFooter';
|
|
22
|
+
export { default as FormTitle } from './components/FormTitle';
|
|
23
|
+
export type * from './type';
|
package/es/Form/index.js
CHANGED
|
@@ -1,154 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
var _excluded = ["className", "itemMinWidth", "footer", "form", "items", "children", "itemsType", "variant", "gap", "style", "collapsible", "defaultActiveKey", "initialValues", "activeKey", "onCollapse", "onFinish"];
|
|
5
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
6
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
7
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
8
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
16
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
20
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
21
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
24
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25
3
|
import { Form as AntForm } from 'antd';
|
|
26
|
-
import
|
|
27
|
-
import { forwardRef, useState } from 'react';
|
|
28
|
-
import FormFlatGroup from "./components/FormFlatGroup";
|
|
4
|
+
import FormParent from "./Form";
|
|
29
5
|
import FormGroup from "./components/FormGroup";
|
|
30
6
|
import FormItem from "./components/FormItem";
|
|
31
|
-
import { FormProvider } from "./components/FormProvider";
|
|
32
7
|
import FormSubmitFooter from "./components/FormSubmitFooter";
|
|
33
|
-
import
|
|
34
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
35
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
36
|
-
var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
37
|
-
var className = _ref.className,
|
|
38
|
-
itemMinWidth = _ref.itemMinWidth,
|
|
39
|
-
footer = _ref.footer,
|
|
40
|
-
form = _ref.form,
|
|
41
|
-
_ref$items = _ref.items,
|
|
42
|
-
items = _ref$items === void 0 ? [] : _ref$items,
|
|
43
|
-
children = _ref.children,
|
|
44
|
-
_ref$itemsType = _ref.itemsType,
|
|
45
|
-
itemsType = _ref$itemsType === void 0 ? 'group' : _ref$itemsType,
|
|
46
|
-
_ref$variant = _ref.variant,
|
|
47
|
-
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
48
|
-
gap = _ref.gap,
|
|
49
|
-
style = _ref.style,
|
|
50
|
-
collapsible = _ref.collapsible,
|
|
51
|
-
defaultActiveKey = _ref.defaultActiveKey,
|
|
52
|
-
initialValues = _ref.initialValues,
|
|
53
|
-
activeKey = _ref.activeKey,
|
|
54
|
-
_onCollapse = _ref.onCollapse,
|
|
55
|
-
onFinish = _ref.onFinish,
|
|
56
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
57
|
-
var _useStyles = useStyles(),
|
|
58
|
-
cx = _useStyles.cx,
|
|
59
|
-
s = _useStyles.styles;
|
|
60
|
-
var _useState = useState(false),
|
|
61
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
62
|
-
submitLoading = _useState2[0],
|
|
63
|
-
setSubmitLoading = _useState2[1];
|
|
64
|
-
var mapFlat = function mapFlat(item, itemIndex) {
|
|
65
|
-
return /*#__PURE__*/_jsx(FormItem, _objectSpread({
|
|
66
|
-
divider: itemIndex !== 0,
|
|
67
|
-
minWidth: itemMinWidth,
|
|
68
|
-
variant: variant
|
|
69
|
-
}, item), itemIndex);
|
|
70
|
-
};
|
|
71
|
-
var mapTree = function mapTree(group, groupIndex) {
|
|
72
|
-
var key = (group === null || group === void 0 ? void 0 : group.key) || groupIndex;
|
|
73
|
-
return /*#__PURE__*/_jsx(FormGroup, {
|
|
74
|
-
active: activeKey && group !== null && group !== void 0 && group.key ? activeKey.includes(key) : undefined,
|
|
75
|
-
collapsible: isUndefined(group.collapsible) ? collapsible : group.collapsible,
|
|
76
|
-
defaultActive: defaultActiveKey && group !== null && group !== void 0 && group.key ? defaultActiveKey.includes(key) : group === null || group === void 0 ? void 0 : group.defaultActive,
|
|
77
|
-
extra: group === null || group === void 0 ? void 0 : group.extra,
|
|
78
|
-
icon: group === null || group === void 0 ? void 0 : group.icon,
|
|
79
|
-
keyValue: key,
|
|
80
|
-
onCollapse: function onCollapse(active) {
|
|
81
|
-
var keys = activeKey || defaultActiveKey || [];
|
|
82
|
-
keys = keys.filter(function (k) {
|
|
83
|
-
return k !== key;
|
|
84
|
-
});
|
|
85
|
-
_onCollapse === null || _onCollapse === void 0 || _onCollapse(active ? [].concat(_toConsumableArray(keys), [key]) : keys);
|
|
86
|
-
},
|
|
87
|
-
title: group.title,
|
|
88
|
-
variant: (group === null || group === void 0 ? void 0 : group.variant) || variant,
|
|
89
|
-
children: Array.isArray(group.children) ? group.children.filter(function (item) {
|
|
90
|
-
return !item.hidden;
|
|
91
|
-
}).map(function (item, i) {
|
|
92
|
-
return mapFlat(item, i);
|
|
93
|
-
}) : group.children
|
|
94
|
-
}, key);
|
|
95
|
-
};
|
|
96
|
-
return /*#__PURE__*/_jsx(FormProvider, {
|
|
97
|
-
config: {
|
|
98
|
-
form: form,
|
|
99
|
-
initialValues: initialValues,
|
|
100
|
-
submitLoading: submitLoading
|
|
101
|
-
},
|
|
102
|
-
children: /*#__PURE__*/_jsxs(AntForm, _objectSpread(_objectSpread({
|
|
103
|
-
className: cx(s.form, variant === 'pure' && s.pure, s.mobile, className),
|
|
104
|
-
colon: false,
|
|
105
|
-
form: form,
|
|
106
|
-
initialValues: initialValues,
|
|
107
|
-
layout: 'horizontal',
|
|
108
|
-
onFinish: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
109
|
-
var _args = arguments;
|
|
110
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
111
|
-
while (1) switch (_context.prev = _context.next) {
|
|
112
|
-
case 0:
|
|
113
|
-
if (onFinish) {
|
|
114
|
-
_context.next = 2;
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
return _context.abrupt("return");
|
|
118
|
-
case 2:
|
|
119
|
-
setSubmitLoading(true);
|
|
120
|
-
_context.next = 5;
|
|
121
|
-
return onFinish.apply(void 0, _args);
|
|
122
|
-
case 5:
|
|
123
|
-
setSubmitLoading(false);
|
|
124
|
-
case 6:
|
|
125
|
-
case "end":
|
|
126
|
-
return _context.stop();
|
|
127
|
-
}
|
|
128
|
-
}, _callee);
|
|
129
|
-
})),
|
|
130
|
-
ref: ref,
|
|
131
|
-
style: _objectSpread({
|
|
132
|
-
gap: gap
|
|
133
|
-
}, style)
|
|
134
|
-
}, rest), {}, {
|
|
135
|
-
children: [items && (items === null || items === void 0 ? void 0 : items.length) > 0 ? itemsType === 'group' ? items === null || items === void 0 ? void 0 : items.map(function (item, i) {
|
|
136
|
-
return mapTree(item, i);
|
|
137
|
-
}) : /*#__PURE__*/_jsx(FormFlatGroup, {
|
|
138
|
-
variant: variant,
|
|
139
|
-
children: items === null || items === void 0 ? void 0 : items.filter(function (item) {
|
|
140
|
-
return !item.hidden;
|
|
141
|
-
}).map(function (item, i) {
|
|
142
|
-
return mapFlat(item, i);
|
|
143
|
-
})
|
|
144
|
-
}) : undefined, children, footer]
|
|
145
|
-
}))
|
|
146
|
-
});
|
|
147
|
-
});
|
|
8
|
+
import FormTitle from "./components/FormTitle";
|
|
148
9
|
var Form = FormParent;
|
|
149
10
|
Form.Item = FormItem;
|
|
150
11
|
Form.Group = FormGroup;
|
|
12
|
+
Form.Title = FormTitle;
|
|
151
13
|
Form.useForm = AntForm.useForm;
|
|
152
14
|
Form.Provider = AntForm.Provider;
|
|
153
15
|
Form.SubmitFooter = FormSubmitFooter;
|
|
154
|
-
export default Form;
|
|
16
|
+
export default Form;
|
|
17
|
+
export { default as FormGroup } from "./components/FormGroup";
|
|
18
|
+
export { default as FormItem } from "./components/FormItem";
|
|
19
|
+
export { default as FormSubmitFooter } from "./components/FormSubmitFooter";
|
|
20
|
+
export { default as FormTitle } from "./components/FormTitle";
|