@lobehub/ui 1.171.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/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 +8 -4
- 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,5 +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
|
-
var _excluded = ["children", "id", "style"];
|
|
4
|
+
var _excluded = ["variant", "className", "children", "id", "style"];
|
|
3
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; }
|
|
4
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; }
|
|
5
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; }
|
|
@@ -9,9 +11,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
9
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; }
|
|
10
12
|
import { useSortable } from '@dnd-kit/sortable';
|
|
11
13
|
import { CSS } from '@dnd-kit/utilities';
|
|
14
|
+
import { cva } from 'class-variance-authority';
|
|
12
15
|
import { createContext, memo, useMemo } from 'react';
|
|
13
16
|
import { Flexbox } from 'react-layout-kit';
|
|
14
|
-
import { useStyles } from "
|
|
17
|
+
import { useStyles } from "../style";
|
|
15
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
19
|
export var SortableItemContext = /*#__PURE__*/createContext({
|
|
17
20
|
attributes: {},
|
|
@@ -19,12 +22,39 @@ export var SortableItemContext = /*#__PURE__*/createContext({
|
|
|
19
22
|
ref: function ref() {}
|
|
20
23
|
});
|
|
21
24
|
var SortableItem = /*#__PURE__*/memo(function (_ref) {
|
|
22
|
-
var
|
|
25
|
+
var _ref$variant = _ref.variant,
|
|
26
|
+
variant = _ref$variant === void 0 ? 'borderless' : _ref$variant,
|
|
27
|
+
className = _ref.className,
|
|
28
|
+
children = _ref.children,
|
|
23
29
|
id = _ref.id,
|
|
24
30
|
style = _ref.style,
|
|
25
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
32
|
var _useStyles = useStyles(),
|
|
33
|
+
cx = _useStyles.cx,
|
|
27
34
|
styles = _useStyles.styles;
|
|
35
|
+
var variants = useMemo(function () {
|
|
36
|
+
return cva(styles.item, {
|
|
37
|
+
compoundVariants: [{
|
|
38
|
+
className: styles.itemVariant,
|
|
39
|
+
variant: 'outlined'
|
|
40
|
+
}, {
|
|
41
|
+
className: styles.itemVariant,
|
|
42
|
+
variant: 'filled'
|
|
43
|
+
}],
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
variant: 'borderless'
|
|
46
|
+
},
|
|
47
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
48
|
+
variants: {
|
|
49
|
+
variant: {
|
|
50
|
+
filled: styles.filled,
|
|
51
|
+
outlined: styles.outlined,
|
|
52
|
+
borderless: styles.borderless
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
|
56
|
+
});
|
|
57
|
+
}, [styles]);
|
|
28
58
|
var _useSortable = useSortable({
|
|
29
59
|
id: id
|
|
30
60
|
}),
|
|
@@ -42,12 +72,15 @@ var SortableItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
42
72
|
ref: setActivatorNodeRef
|
|
43
73
|
};
|
|
44
74
|
}, [attributes, listeners, setActivatorNodeRef]);
|
|
45
|
-
return /*#__PURE__*/_jsx(SortableItemContext
|
|
75
|
+
return /*#__PURE__*/_jsx(SortableItemContext, {
|
|
46
76
|
value: context,
|
|
47
77
|
children: /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
48
78
|
align: 'center',
|
|
49
79
|
as: 'li',
|
|
50
|
-
className:
|
|
80
|
+
className: cx(variants({
|
|
81
|
+
className: className,
|
|
82
|
+
variant: variant
|
|
83
|
+
})),
|
|
51
84
|
gap: 4,
|
|
52
85
|
horizontal: true,
|
|
53
86
|
ref: setNodeRef,
|
|
@@ -61,4 +94,5 @@ var SortableItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
61
94
|
}))
|
|
62
95
|
});
|
|
63
96
|
});
|
|
97
|
+
SortableItem.displayName = 'SortableItem';
|
|
64
98
|
export default SortableItem;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import { DragOverlay, defaultDropAnimationSideEffects } from '@dnd-kit/core';
|
|
2
4
|
import { memo } from 'react';
|
|
3
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -17,4 +19,5 @@ var SortableOverlay = /*#__PURE__*/memo(function (_ref) {
|
|
|
17
19
|
children: children
|
|
18
20
|
});
|
|
19
21
|
});
|
|
22
|
+
SortableOverlay.displayName = 'SortableOverlay';
|
|
20
23
|
export default SortableOverlay;
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import DragHandle from './DragHandle';
|
|
4
|
-
import SortableItem from './SortableItem';
|
|
5
|
-
interface BaseItem {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
id: string | number;
|
|
8
|
-
}
|
|
9
|
-
export interface SortableListProps extends Omit<FlexboxProps, 'onChange'> {
|
|
10
|
-
items: BaseItem[];
|
|
11
|
-
onChange(items: BaseItem[]): void;
|
|
12
|
-
renderItem(item: BaseItem): ReactNode;
|
|
13
|
-
}
|
|
14
|
-
export interface ISortableList {
|
|
15
|
-
(props: SortableListProps): ReactNode;
|
|
16
|
-
DragHandle: typeof DragHandle;
|
|
17
|
-
Item: typeof SortableItem;
|
|
18
|
-
}
|
|
19
|
-
declare const SortableList: ISortableList;
|
|
20
|
-
export default SortableList;
|
|
1
|
+
export { default } from './SortableList';
|
|
2
|
+
export type * from './type';
|
package/es/SortableList/index.js
CHANGED
|
@@ -1,98 +1 @@
|
|
|
1
|
-
|
|
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 = ["items", "onChange", "renderItem", "gap"];
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
-
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."); }
|
|
12
|
-
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); }
|
|
13
|
-
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; }
|
|
14
|
-
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; } }
|
|
15
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
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; }
|
|
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; }
|
|
18
|
-
import { DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
|
|
19
|
-
import { restrictToVerticalAxis, restrictToWindowEdges } from '@dnd-kit/modifiers';
|
|
20
|
-
import { SortableContext, arrayMove, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
21
|
-
import { Fragment, memo, useMemo, useState } from 'react';
|
|
22
|
-
import { Flexbox } from 'react-layout-kit';
|
|
23
|
-
import DragHandle from "./DragHandle";
|
|
24
|
-
import SortableItem from "./SortableItem";
|
|
25
|
-
import SortableOverlay from "./SortableOverlay";
|
|
26
|
-
import { useStyles } from "./style";
|
|
27
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
-
var SortableListParent = /*#__PURE__*/memo(function (_ref) {
|
|
30
|
-
var items = _ref.items,
|
|
31
|
-
onChange = _ref.onChange,
|
|
32
|
-
renderItem = _ref.renderItem,
|
|
33
|
-
_ref$gap = _ref.gap,
|
|
34
|
-
gap = _ref$gap === void 0 ? 8 : _ref$gap,
|
|
35
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
-
var _useState = useState(null),
|
|
37
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
active = _useState2[0],
|
|
39
|
-
setActive = _useState2[1];
|
|
40
|
-
var _useStyles = useStyles(),
|
|
41
|
-
styles = _useStyles.styles;
|
|
42
|
-
var activeItem = useMemo(function () {
|
|
43
|
-
return items.find(function (item) {
|
|
44
|
-
return item.id === (active === null || active === void 0 ? void 0 : active.id);
|
|
45
|
-
});
|
|
46
|
-
}, [active, items]);
|
|
47
|
-
var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
48
|
-
coordinateGetter: sortableKeyboardCoordinates
|
|
49
|
-
}));
|
|
50
|
-
return /*#__PURE__*/_jsxs(DndContext, {
|
|
51
|
-
modifiers: [restrictToVerticalAxis, restrictToWindowEdges],
|
|
52
|
-
onDragCancel: function onDragCancel() {
|
|
53
|
-
setActive(null);
|
|
54
|
-
},
|
|
55
|
-
onDragEnd: function onDragEnd(_ref2) {
|
|
56
|
-
var active = _ref2.active,
|
|
57
|
-
over = _ref2.over;
|
|
58
|
-
if (over && active.id !== (over === null || over === void 0 ? void 0 : over.id)) {
|
|
59
|
-
var activeIndex = items.findIndex(function (_ref3) {
|
|
60
|
-
var id = _ref3.id;
|
|
61
|
-
return id === active.id;
|
|
62
|
-
});
|
|
63
|
-
var overIndex = items.findIndex(function (_ref4) {
|
|
64
|
-
var id = _ref4.id;
|
|
65
|
-
return id === over.id;
|
|
66
|
-
});
|
|
67
|
-
onChange(arrayMove(items, activeIndex, overIndex));
|
|
68
|
-
}
|
|
69
|
-
setActive(null);
|
|
70
|
-
},
|
|
71
|
-
onDragStart: function onDragStart(_ref5) {
|
|
72
|
-
var active = _ref5.active;
|
|
73
|
-
setActive(active);
|
|
74
|
-
},
|
|
75
|
-
sensors: sensors,
|
|
76
|
-
children: [/*#__PURE__*/_jsx(SortableContext, {
|
|
77
|
-
items: items,
|
|
78
|
-
strategy: verticalListSortingStrategy,
|
|
79
|
-
children: /*#__PURE__*/_jsx(Flexbox, _objectSpread(_objectSpread({
|
|
80
|
-
as: 'ul',
|
|
81
|
-
className: styles.container,
|
|
82
|
-
gap: gap
|
|
83
|
-
}, rest), {}, {
|
|
84
|
-
children: items.map(function (item) {
|
|
85
|
-
return /*#__PURE__*/_jsx(Fragment, {
|
|
86
|
-
children: renderItem(item)
|
|
87
|
-
}, item.id);
|
|
88
|
-
})
|
|
89
|
-
}))
|
|
90
|
-
}), /*#__PURE__*/_jsx(SortableOverlay, {
|
|
91
|
-
children: activeItem ? renderItem(activeItem) : null
|
|
92
|
-
})]
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
var SortableList = SortableListParent;
|
|
96
|
-
SortableList.Item = SortableItem;
|
|
97
|
-
SortableList.DragHandle = DragHandle;
|
|
98
|
-
export default SortableList;
|
|
1
|
+
export { default } from "./SortableList";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
2
|
+
borderless: string;
|
|
2
3
|
container: import("antd-style").SerializedStyles;
|
|
4
|
+
filled: string;
|
|
3
5
|
item: import("antd-style").SerializedStyles;
|
|
6
|
+
itemVariant: import("antd-style").SerializedStyles;
|
|
7
|
+
outlined: string;
|
|
4
8
|
}>;
|
package/es/SortableList/style.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
var _templateObject, _templateObject2;
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref) {
|
|
5
|
-
var css = _ref.css
|
|
5
|
+
var css = _ref.css,
|
|
6
|
+
stylish = _ref.stylish,
|
|
7
|
+
token = _ref.token;
|
|
6
8
|
return {
|
|
9
|
+
borderless: stylish.variantBorderlessWithoutHover,
|
|
7
10
|
container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0;\n list-style: none;\n "]))),
|
|
8
|
-
|
|
11
|
+
filled: stylish.variantFilledWithoutHover,
|
|
12
|
+
item: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: hidden;\n box-sizing: border-box;\n list-style: none;\n border-radius: ", "px;\n "])), token.borderRadius),
|
|
13
|
+
itemVariant: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-block: 4px;\n padding-inline: 4px 16px;\n "]))),
|
|
14
|
+
outlined: stylish.variantOutlinedWithoutHover
|
|
9
15
|
};
|
|
10
16
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode, Ref } from 'react';
|
|
2
|
+
import type { FlexboxProps } from 'react-layout-kit';
|
|
3
|
+
export interface SortableListItem {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
id: string | number;
|
|
6
|
+
}
|
|
7
|
+
export interface SortableListProps extends Omit<FlexboxProps, 'onChange'> {
|
|
8
|
+
items: SortableListItem[];
|
|
9
|
+
onChange(items: SortableListItem[]): void;
|
|
10
|
+
ref?: Ref<HTMLUListElement>;
|
|
11
|
+
renderItem(item: SortableListItem): ReactNode;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Tabs/Tabs.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use client';
|
|
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", "compact", "variant", "items"];
|
|
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; }
|
|
12
|
+
import { Tabs as AntdTabs } from 'antd';
|
|
13
|
+
import { cva } from 'class-variance-authority';
|
|
14
|
+
import { MoreHorizontalIcon } from 'lucide-react';
|
|
15
|
+
import { memo, useMemo } from 'react';
|
|
16
|
+
import ActionIcon from "../ActionIcon";
|
|
17
|
+
import { useStyles } from "./style";
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
var Tabs = /*#__PURE__*/memo(function (_ref) {
|
|
20
|
+
var className = _ref.className,
|
|
21
|
+
compact = _ref.compact,
|
|
22
|
+
_ref$variant = _ref.variant,
|
|
23
|
+
variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
|
|
24
|
+
items = _ref.items,
|
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
var _useStyles = useStyles(),
|
|
27
|
+
styles = _useStyles.styles,
|
|
28
|
+
cx = _useStyles.cx;
|
|
29
|
+
var hasContent = items === null || items === void 0 ? void 0 : items.some(function (item) {
|
|
30
|
+
return !!item.children;
|
|
31
|
+
});
|
|
32
|
+
var variants = useMemo(function () {
|
|
33
|
+
return cva(styles.root, {
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
compact: false,
|
|
36
|
+
underlined: false,
|
|
37
|
+
variant: 'rounded'
|
|
38
|
+
},
|
|
39
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
40
|
+
variants: {
|
|
41
|
+
variant: {
|
|
42
|
+
square: null,
|
|
43
|
+
rounded: styles.rounded,
|
|
44
|
+
point: styles.point
|
|
45
|
+
},
|
|
46
|
+
compact: {
|
|
47
|
+
false: styles.margin,
|
|
48
|
+
true: styles.compact
|
|
49
|
+
},
|
|
50
|
+
underlined: {
|
|
51
|
+
false: styles.hideHolder,
|
|
52
|
+
true: null
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
|
56
|
+
});
|
|
57
|
+
}, [styles]);
|
|
58
|
+
return /*#__PURE__*/_jsx(AntdTabs, _objectSpread({
|
|
59
|
+
className: cx(variants({
|
|
60
|
+
compact: compact,
|
|
61
|
+
underlined: hasContent,
|
|
62
|
+
variant: variant
|
|
63
|
+
}), className),
|
|
64
|
+
items: items,
|
|
65
|
+
more: {
|
|
66
|
+
icon: /*#__PURE__*/_jsx(ActionIcon, {
|
|
67
|
+
icon: MoreHorizontalIcon
|
|
68
|
+
})
|
|
69
|
+
},
|
|
70
|
+
popupClassName: cx(styles.dropdown)
|
|
71
|
+
}, rest));
|
|
72
|
+
});
|
|
73
|
+
Tabs.displayName = 'Tabs';
|
|
74
|
+
export default Tabs;
|
package/es/Tabs/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Tabs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
2
|
+
compact: import("antd-style").SerializedStyles;
|
|
3
|
+
dropdown: import("antd-style").SerializedStyles;
|
|
4
|
+
hideHolder: import("antd-style").SerializedStyles;
|
|
5
|
+
margin: import("antd-style").SerializedStyles;
|
|
6
|
+
point: import("antd-style").SerializedStyles;
|
|
7
|
+
root: import("antd-style").SerializedStyles;
|
|
8
|
+
rounded: import("antd-style").SerializedStyles;
|
|
9
|
+
}>;
|
package/es/Tabs/style.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
export var useStyles = createStyles(function (_ref) {
|
|
5
|
+
var css = _ref.css,
|
|
6
|
+
token = _ref.token,
|
|
7
|
+
prefixCls = _ref.prefixCls;
|
|
8
|
+
return {
|
|
9
|
+
compact: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", "-tabs {\n .", "-tabs-tab {\n margin: 4px;\n\n + .", "-tabs-tab {\n margin: 4px;\n }\n }\n }\n "])), prefixCls, prefixCls, prefixCls),
|
|
10
|
+
dropdown: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", "-tabs-dropdown-menu {\n padding: 4px;\n border: 1px solid ", ";\n\n .", "-tabs-dropdown-menu-item {\n border-radius: ", "px;\n }\n }\n "])), prefixCls, token.colorBorderSecondary, prefixCls, token.borderRadius),
|
|
11
|
+
hideHolder: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &.", "-tabs {\n .", "-tabs-content-holder {\n display: none;\n }\n\n .", "-tabs-nav {\n margin: 0;\n\n &::before {\n display: none;\n }\n }\n }\n "])), prefixCls, prefixCls, prefixCls),
|
|
12
|
+
margin: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n &.", "-tabs {\n .", "-tabs-tab {\n margin: 8px;\n\n + .", "-tabs-tab {\n margin: 8px;\n }\n }\n }\n "])), prefixCls, prefixCls, prefixCls),
|
|
13
|
+
point: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n &.", "-tabs {\n &.", "-tabs-top {\n .", "-tabs-ink-bar {\n width: 8px !important;\n height: 4px;\n border-start-start-radius: 4px;\n border-start-end-radius: 4px;\n }\n }\n\n &.", "-tabs-bottom {\n .", "-tabs-ink-bar {\n width: 8px !important;\n height: 4px;\n border-end-start-radius: 4px;\n border-end-end-radius: 4px;\n }\n }\n\n &.", "-tabs-left {\n .", "-tabs-ink-bar {\n width: 4px;\n height: 8px !important;\n border-start-start-radius: 4px;\n border-end-start-radius: 4px;\n }\n }\n\n &.", "-tabs-right {\n .", "-tabs-ink-bar {\n width: 4px;\n height: 8px !important;\n border-start-end-radius: 4px;\n border-end-end-radius: 4px;\n }\n }\n }\n "])), prefixCls, prefixCls, prefixCls, prefixCls, prefixCls, prefixCls, prefixCls, prefixCls, prefixCls),
|
|
14
|
+
root: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n &.", "-tabs {\n .", "-tabs-tab {\n padding-block: 8px;\n padding-inline: 12px;\n color: ", ";\n transition: background-color 100ms ease-out;\n\n &:hover {\n color: ", ";\n background: ", ";\n border-radius: ", "px;\n }\n }\n }\n "])), prefixCls, prefixCls, token.colorTextSecondary, token.colorText, token.colorFillTertiary, token.borderRadius),
|
|
15
|
+
rounded: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n &.", "-tabs {\n &.", "-tabs-top {\n .", "-tabs-ink-bar {\n height: 3px;\n border-start-start-radius: 3px;\n border-start-end-radius: 3px;\n }\n }\n\n &.", "-tabs-bottom {\n .", "-tabs-ink-bar {\n height: 3px;\n border-end-start-radius: 3px;\n border-end-end-radius: 3px;\n }\n }\n\n &.", "-tabs-left {\n .", "-tabs-ink-bar {\n width: 3px;\n border-start-start-radius: 3px;\n border-end-start-radius: 3px;\n }\n }\n\n &.", "-tabs-right {\n .", "-tabs-ink-bar {\n width: 3px;\n border-start-end-radius: 3px;\n border-end-end-radius: 3px;\n }\n }\n }\n "])), prefixCls, prefixCls, prefixCls, prefixCls, prefixCls, prefixCls, prefixCls, prefixCls, prefixCls)
|
|
16
|
+
};
|
|
17
|
+
});
|
package/es/Tabs/type.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/Tag/Tag.d.ts
ADDED
package/es/Tag/Tag.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use client';
|
|
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", "ref", "size", "color", "variant", "children", "onClick", "style"];
|
|
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; }
|
|
12
|
+
import { Tag as AntTag } from 'antd';
|
|
13
|
+
import { cva } from 'class-variance-authority';
|
|
14
|
+
import { memo, useMemo } from 'react';
|
|
15
|
+
import { colorsPreset, colorsPresetSystem, presetColors, presetSystemColors } from "./utils";
|
|
16
|
+
import { useStyles } from "./styles";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
var Tag = /*#__PURE__*/memo(function (_ref) {
|
|
19
|
+
var className = _ref.className,
|
|
20
|
+
ref = _ref.ref,
|
|
21
|
+
_ref$size = _ref.size,
|
|
22
|
+
size = _ref$size === void 0 ? 'middle' : _ref$size,
|
|
23
|
+
color = _ref.color,
|
|
24
|
+
_ref$variant = _ref.variant,
|
|
25
|
+
variant = _ref$variant === void 0 ? 'filled' : _ref$variant,
|
|
26
|
+
children = _ref.children,
|
|
27
|
+
onClick = _ref.onClick,
|
|
28
|
+
style = _ref.style,
|
|
29
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
+
var _useStyles = useStyles(),
|
|
31
|
+
styles = _useStyles.styles,
|
|
32
|
+
cx = _useStyles.cx,
|
|
33
|
+
theme = _useStyles.theme;
|
|
34
|
+
var variants = useMemo(function () {
|
|
35
|
+
return cva(styles.root, {
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
size: 'middle',
|
|
38
|
+
variant: 'filled'
|
|
39
|
+
},
|
|
40
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
41
|
+
variants: {
|
|
42
|
+
variant: {
|
|
43
|
+
filled: styles.filled,
|
|
44
|
+
outlined: styles.outlined,
|
|
45
|
+
borderless: styles.borderless
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
small: styles.small,
|
|
49
|
+
middle: null,
|
|
50
|
+
large: styles.large
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
|
54
|
+
});
|
|
55
|
+
}, [styles]);
|
|
56
|
+
var colors = useMemo(function () {
|
|
57
|
+
var textColor = theme.colorTextSecondary;
|
|
58
|
+
var backgroundColor;
|
|
59
|
+
var borderColor;
|
|
60
|
+
var isFilled = variant === 'filled';
|
|
61
|
+
var isPresetColor = color && presetColors.includes(color);
|
|
62
|
+
var isPresetSystemColors = color && presetSystemColors.has(color);
|
|
63
|
+
var isHexColor = color && color.startsWith('#');
|
|
64
|
+
if (isPresetColor) {
|
|
65
|
+
textColor = colorsPreset(theme, color);
|
|
66
|
+
backgroundColor = colorsPreset(theme, color, 'fillTertiary');
|
|
67
|
+
borderColor = colorsPreset(theme, color, isFilled ? 'fillQuaternary' : 'fillTertiary');
|
|
68
|
+
}
|
|
69
|
+
if (isPresetSystemColors) {
|
|
70
|
+
textColor = colorsPresetSystem(theme, color);
|
|
71
|
+
backgroundColor = colorsPresetSystem(theme, color, 'fillTertiary');
|
|
72
|
+
borderColor = colorsPresetSystem(theme, color, isFilled ? 'fillQuaternary' : 'fillTertiary');
|
|
73
|
+
}
|
|
74
|
+
if (isHexColor) {
|
|
75
|
+
textColor = theme.colorBgLayout;
|
|
76
|
+
backgroundColor = color;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
backgroundColor: backgroundColor,
|
|
80
|
+
borderColor: borderColor,
|
|
81
|
+
textColor: textColor
|
|
82
|
+
};
|
|
83
|
+
}, [color, theme, variant]);
|
|
84
|
+
return /*#__PURE__*/_jsx(AntTag, _objectSpread(_objectSpread({
|
|
85
|
+
bordered: false,
|
|
86
|
+
className: cx(variants({
|
|
87
|
+
size: size,
|
|
88
|
+
variant: variant
|
|
89
|
+
}), className),
|
|
90
|
+
color: color,
|
|
91
|
+
onClick: onClick,
|
|
92
|
+
ref: ref,
|
|
93
|
+
style: _objectSpread({
|
|
94
|
+
background: colors === null || colors === void 0 ? void 0 : colors.backgroundColor,
|
|
95
|
+
borderColor: colors === null || colors === void 0 ? void 0 : colors.borderColor,
|
|
96
|
+
color: colors === null || colors === void 0 ? void 0 : colors.textColor,
|
|
97
|
+
cursor: onClick ? 'pointer' : undefined
|
|
98
|
+
}, style)
|
|
99
|
+
}, rest), {}, {
|
|
100
|
+
children: children
|
|
101
|
+
}));
|
|
102
|
+
});
|
|
103
|
+
Tag.displayName = 'Tag';
|
|
104
|
+
export default Tag;
|
package/es/Tag/index.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface TagProps extends AntTagProps {
|
|
4
|
-
icon?: ReactNode;
|
|
5
|
-
size?: 'default' | 'small';
|
|
6
|
-
}
|
|
7
|
-
declare const Tag: import("react").NamedExoticComponent<TagProps>;
|
|
8
|
-
export default Tag;
|
|
1
|
+
export { default } from './Tag';
|
|
2
|
+
export type * from './type';
|
package/es/Tag/index.js
CHANGED
|
@@ -1,50 +1 @@
|
|
|
1
|
-
|
|
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 = ["icon", "children", "size"];
|
|
5
|
-
var _templateObject, _templateObject2;
|
|
6
|
-
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; }
|
|
7
|
-
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; }
|
|
8
|
-
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; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
-
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); }
|
|
11
|
-
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; }
|
|
12
|
-
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; }
|
|
13
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
import { Tag as AntTag } from 'antd';
|
|
15
|
-
import { createStyles } from 'antd-style';
|
|
16
|
-
import { memo } from 'react';
|
|
17
|
-
import { Flexbox } from 'react-layout-kit';
|
|
18
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
var useStyles = createStyles(function (_ref) {
|
|
21
|
-
var cx = _ref.cx,
|
|
22
|
-
css = _ref.css,
|
|
23
|
-
token = _ref.token;
|
|
24
|
-
return {
|
|
25
|
-
small: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-block: 2px;\n padding-inline: 6px;\n line-height: 1;\n "]))),
|
|
26
|
-
tag: cx(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n user-select: none;\n color: ", " !important;\n background: ", ";\n border: ", "px;\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n "])), token.colorTextSecondary, token.colorFillSecondary, token.borderRadius, token.colorText, token.colorFill))
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
var Tag = /*#__PURE__*/memo(function (_ref2) {
|
|
30
|
-
var icon = _ref2.icon,
|
|
31
|
-
children = _ref2.children,
|
|
32
|
-
_ref2$size = _ref2.size,
|
|
33
|
-
size = _ref2$size === void 0 ? 'default' : _ref2$size,
|
|
34
|
-
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
35
|
-
var _useStyles = useStyles(),
|
|
36
|
-
styles = _useStyles.styles,
|
|
37
|
-
cx = _useStyles.cx;
|
|
38
|
-
return /*#__PURE__*/_jsx(AntTag, _objectSpread(_objectSpread({
|
|
39
|
-
bordered: false,
|
|
40
|
-
className: cx(styles.tag, size === 'small' && styles.small)
|
|
41
|
-
}, rest), {}, {
|
|
42
|
-
children: /*#__PURE__*/_jsxs(Flexbox, {
|
|
43
|
-
align: 'center',
|
|
44
|
-
gap: 4,
|
|
45
|
-
horizontal: true,
|
|
46
|
-
children: [icon, children]
|
|
47
|
-
})
|
|
48
|
-
}));
|
|
49
|
-
});
|
|
50
|
-
export default Tag;
|
|
1
|
+
export { default } from "./Tag";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
2
|
+
borderless: string;
|
|
3
|
+
filled: string;
|
|
4
|
+
large: import("antd-style").SerializedStyles;
|
|
5
|
+
outlined: string;
|
|
6
|
+
root: import("antd-style").SerializedStyles;
|
|
7
|
+
small: import("antd-style").SerializedStyles;
|
|
8
|
+
}>;
|
package/es/Tag/styles.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import { createStyles } from 'antd-style';
|
|
4
|
+
export var useStyles = createStyles(function (_ref) {
|
|
5
|
+
var stylish = _ref.stylish,
|
|
6
|
+
prefixCls = _ref.prefixCls,
|
|
7
|
+
css = _ref.css,
|
|
8
|
+
token = _ref.token;
|
|
9
|
+
return {
|
|
10
|
+
borderless: stylish.variantBorderlessWithoutHover,
|
|
11
|
+
filled: stylish.variantFilledWithoutHover,
|
|
12
|
+
large: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", "-tag {\n height: 28px;\n padding-inline: 12px;\n border-radius: 6px;\n }\n "])), prefixCls),
|
|
13
|
+
outlined: stylish.variantOutlinedWithoutHover,
|
|
14
|
+
root: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n &.", "-tag {\n user-select: none;\n\n display: flex;\n gap: 0.4em;\n align-items: center;\n justify-content: center;\n\n width: fit-content;\n height: 22px;\n margin: 0;\n\n line-height: 1.2;\n\n border-radius: 3px;\n\n span {\n margin: 0;\n }\n\n span:not(.anticon) {\n height: unset;\n line-height: inherit;\n }\n }\n "])), token.colorTextSecondary, prefixCls),
|
|
15
|
+
small: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &.", "-tag {\n height: 20px;\n padding-inline: 4px;\n }\n "])), prefixCls)
|
|
16
|
+
};
|
|
17
|
+
});
|
package/es/Tag/type.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TagProps as AntTagProps } from 'antd';
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
export interface TagProps extends Omit<AntTagProps, 'color'> {
|
|
4
|
+
color?: AntTagProps['color'] | 'info';
|
|
5
|
+
ref?: Ref<HTMLDivElement>;
|
|
6
|
+
size?: 'small' | 'middle' | 'large';
|
|
7
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
8
|
+
}
|
package/es/Tag/type.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const presetColors: string[];
|
|
2
|
+
export declare const presetSystemColors: Set<string>;
|
|
3
|
+
export declare const colorsPreset: (theme: any, type: string, ...keys: string[]) => string;
|
|
4
|
+
export declare const colorsPresetSystem: (theme: any, type: string, ...keys: string[]) => string;
|