@lobehub/ui 4.30.2 → 4.31.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/Accordion/Accordion.d.mts +2 -2
- package/es/Accordion/Accordion.mjs +2 -2
- package/es/Accordion/Accordion.mjs.map +1 -1
- package/es/Accordion/AccordionItem.d.mts +2 -2
- package/es/Accordion/AccordionItem.mjs +2 -2
- package/es/Accordion/AccordionItem.mjs.map +1 -1
- package/es/ActionIcon/ActionIcon.d.mts +2 -2
- package/es/Alert/Alert.d.mts +2 -2
- package/es/AutoComplete/Select.d.mts +2 -2
- package/es/Avatar/AvatarGroup/index.d.mts +2 -2
- package/es/Burger/Burger.d.mts +2 -2
- package/es/Checkbox/Checkbox.mjs +2 -2
- package/es/Checkbox/Checkbox.mjs.map +1 -1
- package/es/Checkbox/CheckboxGroup.mjs +2 -2
- package/es/Checkbox/CheckboxGroup.mjs.map +1 -1
- package/es/CodeDiff/CodeDiff.d.mts +2 -2
- package/es/CodeDiff/PatchDiff.d.mts +2 -2
- package/es/CodeEditor/CodeEditor.d.mts +2 -2
- package/es/CodeEditor/CodeEditor.mjs +2 -2
- package/es/CodeEditor/CodeEditor.mjs.map +1 -1
- package/es/Collapse/Collapse.d.mts +2 -2
- package/es/ColorSwatches/ColorSwatches.mjs +2 -2
- package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
- package/es/ConfigProvider/index.d.mts +2 -2
- package/es/ContextMenu/ContextMenuHost.mjs +1 -1
- package/es/ContextMenu/ContextMenuHost.mjs.map +1 -1
- package/es/ContextMenu/index.d.mts +4 -2
- package/es/ContextMenu/renderItems.d.mts +4 -0
- package/es/ContextMenu/renderItems.mjs +21 -32
- package/es/ContextMenu/renderItems.mjs.map +1 -1
- package/es/ContextMenu/store.d.mts +7 -2
- package/es/ContextMenu/store.mjs +4 -1
- package/es/ContextMenu/store.mjs.map +1 -1
- package/es/CopyButton/CopyButton.d.mts +2 -2
- package/es/DatePicker/DatePicker.d.mts +2 -2
- package/es/DraggablePanel/DraggablePanel.mjs +2 -2
- package/es/DraggablePanel/DraggablePanel.mjs.map +1 -1
- package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.mjs +2 -2
- package/es/DraggablePanel/components/DraggablePanelHeader.mjs.map +1 -1
- package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
- package/es/DraggableSideNav/DraggableSideNav.mjs +2 -2
- package/es/DraggableSideNav/DraggableSideNav.mjs.map +1 -1
- package/es/Drawer/Drawer.d.mts +2 -2
- package/es/Dropdown/Dropdown.d.mts +2 -2
- package/es/DropdownMenu/DropdownMenu.d.mts +2 -2
- package/es/DropdownMenu/DropdownMenu.mjs +7 -3
- package/es/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/es/DropdownMenu/index.d.mts +3 -2
- package/es/DropdownMenu/renderItems.d.mts +3 -3
- package/es/DropdownMenu/renderItems.mjs +20 -30
- package/es/DropdownMenu/renderItems.mjs.map +1 -1
- package/es/DropdownMenu/type.d.mts +9 -0
- package/es/EditableText/EditableText.d.mts +2 -2
- package/es/EditableText/EditableText.mjs +2 -2
- package/es/EditableText/EditableText.mjs.map +1 -1
- package/es/EditorSlashMenu/atoms.d.mts +12 -12
- package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
- package/es/EmojiPicker/EmojiPicker.mjs +3 -3
- package/es/EmojiPicker/EmojiPicker.mjs.map +1 -1
- package/es/Flex/FlexBasic.d.mts +2 -2
- package/es/FontLoader/index.d.mts +2 -2
- package/es/Footer/Footer.d.mts +2 -2
- package/es/Form/components/FormGroup.d.mts +2 -2
- package/es/Form/components/FormItem.d.mts +2 -2
- package/es/Form/components/FormSubmitFooter.d.mts +2 -2
- package/es/FormModal/FormModal.d.mts +2 -2
- package/es/GuideCard/GuideCard.d.mts +2 -2
- package/es/Header/Header.d.mts +2 -2
- package/es/Highlighter/Highlighter.d.mts +2 -2
- package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
- package/es/Hotkey/Hotkey.d.mts +2 -2
- package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
- package/es/HotkeyInput/HotkeyInput.mjs +2 -2
- package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
- package/es/Icon/Icon.d.mts +2 -2
- package/es/Icon/components/IconProvider.d.mts +3 -3
- package/es/Image/PreviewGroup.d.mts +2 -2
- package/es/ImageSelect/ImageSelect.d.mts +2 -2
- package/es/ImageSelect/ImageSelect.mjs +2 -2
- package/es/ImageSelect/ImageSelect.mjs.map +1 -1
- package/es/Input/Input.d.mts +2 -2
- package/es/Input/InputNumber.d.mts +2 -2
- package/es/Input/InputOPT.d.mts +2 -2
- package/es/Input/InputPassword.d.mts +2 -2
- package/es/Input/TextArea.d.mts +2 -2
- package/es/Layout/components/LayoutFooter.d.mts +2 -2
- package/es/Layout/components/LayoutHeader.d.mts +2 -2
- package/es/Layout/components/LayoutMain.d.mts +2 -2
- package/es/Layout/components/LayoutSidebar.d.mts +2 -2
- package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
- package/es/Layout/components/LayoutToc.d.mts +2 -2
- package/es/LobeSelect/LobeSelect.d.mts +2 -2
- package/es/LobeSelect/atoms.d.mts +3 -3
- package/es/LobeSwitch/LobeSwitch.d.mts +2 -2
- package/es/LobeSwitch/atoms.d.mts +4 -4
- package/es/LobeSwitch/atoms.mjs +2 -2
- package/es/LobeSwitch/atoms.mjs.map +1 -1
- package/es/Markdown/Markdown.d.mts +2 -2
- package/es/Markdown/Typography.d.mts +2 -2
- package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
- package/es/MaskShadow/MaskShadow.d.mts +2 -2
- package/es/Menu/Menu.d.mts +2 -2
- package/es/Menu/baseItem.d.mts +21 -3
- package/es/Menu/index.d.mts +3 -2
- package/es/Menu/index.mjs +2 -1
- package/es/Menu/renderUtils.d.mts +35 -0
- package/es/Menu/renderUtils.mjs +46 -0
- package/es/Menu/renderUtils.mjs.map +1 -0
- package/es/Mermaid/Mermaid.d.mts +2 -2
- package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
- package/es/Modal/Modal.d.mts +2 -2
- package/es/Modal/ModalProvider.d.mts +2 -2
- package/es/Modal/imperative.d.mts +2 -2
- package/es/MotionProvider/index.d.mts +2 -2
- package/es/Popover/ArrowIcon.d.mts +2 -2
- package/es/Popover/atoms.d.mts +9 -9
- package/es/Popover/context.d.mts +2 -2
- package/es/SearchBar/SearchBar.d.mts +2 -2
- package/es/SearchBar/SearchBar.mjs +2 -2
- package/es/SearchBar/SearchBar.mjs.map +1 -1
- package/es/Segmented/Segmented.d.mts +2 -2
- package/es/Select/Select.d.mts +2 -2
- package/es/SideNav/SideNav.d.mts +2 -2
- package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
- package/es/SortableList/components/DragHandle.d.mts +2 -2
- package/es/SortableList/components/SortableItem.d.mts +2 -2
- package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
- package/es/Toast/imperative.d.mts +3 -3
- package/es/Toc/Toc.d.mts +2 -2
- package/es/Toc/TocMobile.mjs +2 -2
- package/es/Toc/TocMobile.mjs.map +1 -1
- package/es/Video/index.d.mts +2 -2
- package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
- package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
- package/es/awesome/Features/Features.d.mts +2 -2
- package/es/awesome/Giscus/Giscus.d.mts +2 -2
- package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
- package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
- package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
- package/es/awesome/Hero/Hero.d.mts +2 -2
- package/es/awesome/Spline/Spine.d.mts +2 -2
- package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
- package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
- package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
- package/es/brand/LobeChat/index.d.mts +2 -2
- package/es/brand/LobeHub/index.d.mts +2 -2
- package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
- package/es/brand/LogoThree/index.d.mts +2 -2
- package/es/chat/BackBottom/BackBottom.d.mts +2 -2
- package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
- package/es/chat/ChatItem/ChatItem.d.mts +2 -2
- package/es/chat/ChatList/ChatList.d.mts +2 -2
- package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
- package/es/chat/EditableMessage/EditableMessage.mjs +3 -3
- package/es/chat/EditableMessage/EditableMessage.mjs.map +1 -1
- package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
- package/es/chat/MessageInput/MessageInput.d.mts +2 -2
- package/es/chat/MessageModal/MessageModal.d.mts +2 -2
- package/es/chat/MessageModal/MessageModal.mjs +3 -3
- package/es/chat/MessageModal/MessageModal.mjs.map +1 -1
- package/es/color/ColorScales/index.d.mts +2 -2
- package/es/color/CssVar/index.d.mts +2 -2
- package/es/i18n/context.d.mts +2 -2
- package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
- package/es/icons/lucideExtra/CreateBotIcon.d.mts +2 -2
- package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GlobeOffIcon.d.mts +2 -2
- package/es/icons/lucideExtra/GroupBotIcon.d.mts +2 -2
- package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
- package/es/icons/lucideExtra/LeftClickIcon.d.mts +2 -2
- package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +2 -2
- package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
- package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
- package/es/icons/lucideExtra/RightClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
- package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
- package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
- package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
- package/es/index.d.mts +1 -1
- package/es/index.mjs +1 -1
- package/es/mdx/Mdx/index.d.mts +2 -2
- package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
- package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
- package/es/mobile/TabBar/TabBar.d.mts +2 -2
- package/es/mobile/TabBar/TabBar.mjs +2 -2
- package/es/mobile/TabBar/TabBar.mjs.map +1 -1
- package/es/storybook/StoryBook/index.d.mts +2 -2
- package/package.json +1 -1
package/es/LobeSwitch/atoms.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { rootVariants, styles, thumbVariants } from "./style.mjs";
|
|
|
5
5
|
import { createContext, useContext, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { cx } from "antd-style";
|
|
8
|
-
import
|
|
8
|
+
import useMergeState from "use-merge-value";
|
|
9
9
|
import { Switch } from "@base-ui/react/switch";
|
|
10
10
|
|
|
11
11
|
//#region src/LobeSwitch/atoms.tsx
|
|
@@ -19,7 +19,7 @@ const LobeSwitchRoot = ({ checked, className, defaultChecked, onCheckedChange, o
|
|
|
19
19
|
const Motion = useMotionComponent();
|
|
20
20
|
const [isPressed, setIsPressed] = useState(false);
|
|
21
21
|
const lastEventRef = useRef(null);
|
|
22
|
-
const [isChecked, setIsChecked] =
|
|
22
|
+
const [isChecked, setIsChecked] = useMergeState(defaultChecked ?? false, {
|
|
23
23
|
defaultValue: defaultChecked,
|
|
24
24
|
onChange: (value) => {
|
|
25
25
|
if (lastEventRef.current) onCheckedChange?.(value, lastEventRef.current);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atoms.mjs","names":[],"sources":["../../src/LobeSwitch/atoms.tsx"],"sourcesContent":["'use client';\n\nimport { Switch } from '@base-ui/react/switch';\nimport { cx } from 'antd-style';\nimport type { KeyboardEvent, MouseEvent } from 'react';\nimport { createContext, useContext, useMemo, useRef, useState } from 'react';\nimport useControlledState from 'use-merge-value';\n\nimport { useMotionComponent } from '@/MotionProvider';\n\nimport { rootVariants, styles, thumbVariants } from './style';\nimport type {\n LobeSwitchChangeEventHandler,\n LobeSwitchContextType,\n LobeSwitchIconPosition,\n LobeSwitchIconProps,\n LobeSwitchRootProps,\n LobeSwitchThumbProps,\n} from './type';\n\nconst LobeSwitchContext = createContext<LobeSwitchContextType | null>(null);\n\nexport const useLobeSwitchContext = () => {\n const context = useContext(LobeSwitchContext);\n if (!context) {\n throw new Error('useLobeSwitchContext must be used within a LobeSwitchRoot');\n }\n return context;\n};\n\ntype LobeSwitchRootInternalProps = Omit<LobeSwitchRootProps, 'onCheckedChange' | 'onClick'> & {\n onCheckedChange?: LobeSwitchChangeEventHandler;\n onClick?: LobeSwitchChangeEventHandler;\n};\n\nexport const LobeSwitchRoot = ({\n checked,\n className,\n defaultChecked,\n onCheckedChange,\n onClick,\n size = 'default',\n children,\n disabled,\n readOnly,\n required,\n inputRef,\n id,\n name,\n ...rest\n}: LobeSwitchRootInternalProps) => {\n const Motion = useMotionComponent();\n const [isPressed, setIsPressed] = useState(false);\n const lastEventRef = useRef<MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>>(\n null,\n );\n\n const [isChecked, setIsChecked] = useControlledState(defaultChecked ?? false, {\n defaultValue: defaultChecked,\n onChange: (value: boolean) => {\n if (lastEventRef.current) {\n onCheckedChange?.(value, lastEventRef.current);\n }\n },\n value: checked,\n });\n\n const baseClassName = rootVariants({ size });\n\n const contextValue = useMemo(\n () => ({\n isChecked: Boolean(isChecked),\n isPressed,\n setIsChecked: (value: boolean) => setIsChecked(value),\n setIsPressed,\n }),\n [isChecked, isPressed, setIsChecked],\n );\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n lastEventRef.current = event;\n onClick?.(!isChecked, event);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n lastEventRef.current = event;\n }\n (rest as any).onKeyDown?.(event);\n };\n\n return (\n <LobeSwitchContext.Provider value={contextValue}>\n <Switch.Root\n checked={isChecked}\n defaultChecked={defaultChecked}\n disabled={disabled}\n id={id}\n inputRef={inputRef}\n name={name}\n onCheckedChange={setIsChecked}\n readOnly={readOnly}\n render={\n <Motion.button\n {...rest}\n className={cx(baseClassName, className)}\n initial={false}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onTap={() => setIsPressed(false)}\n onTapCancel={() => setIsPressed(false)}\n onTapStart={() => setIsPressed(true)}\n whileTap=\"tap\"\n />\n }\n required={required}\n >\n {children}\n </Switch.Root>\n </LobeSwitchContext.Provider>\n );\n};\n\nLobeSwitchRoot.displayName = 'LobeSwitchRoot';\n\nexport const LobeSwitchThumb = ({\n className,\n pressedAnimation,\n size = 'default',\n transition = { damping: 25, stiffness: 300, type: 'spring' },\n children,\n ...rest\n}: LobeSwitchThumbProps) => {\n const Motion = useMotionComponent();\n const { isPressed } = useLobeSwitchContext();\n const baseClassName = thumbVariants({ size });\n\n const defaultPressedAnimation = {\n width: size === 'small' ? 16 : 22,\n };\n\n return (\n <Switch.Thumb\n render={\n <Motion.span\n animate={isPressed ? pressedAnimation || defaultPressedAnimation : undefined}\n className={cx(baseClassName, className)}\n layout\n transition={transition}\n {...rest}\n >\n {children}\n </Motion.span>\n }\n />\n );\n};\n\nLobeSwitchThumb.displayName = 'LobeSwitchThumb';\n\nconst getIconPositionClass = (position: LobeSwitchIconPosition, size: 'default' | 'small') => {\n if (position === 'thumb') return styles.iconThumb;\n if (position === 'left') return size === 'small' ? styles.iconLeftSmall : styles.iconLeft;\n return size === 'small' ? styles.iconRightSmall : styles.iconRight;\n};\n\nexport const LobeSwitchIcon = ({\n children,\n className,\n position,\n transition = { bounce: 0, type: 'spring' },\n ...rest\n}: LobeSwitchIconProps & { children?: React.ReactNode; size?: 'default' | 'small' }) => {\n const Motion = useMotionComponent();\n const { isChecked } = useLobeSwitchContext();\n const size = (rest as any).size || 'default';\n\n const isAnimated = useMemo(() => {\n if (position === 'right') return !isChecked;\n if (position === 'left') return isChecked;\n if (position === 'thumb') return true;\n return false;\n }, [position, isChecked]);\n\n const positionClass = getIconPositionClass(position, size);\n\n return (\n <Motion.span\n animate={isAnimated ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0 }}\n className={cx(styles.icon, positionClass, className)}\n transition={transition}\n {...rest}\n >\n {children}\n </Motion.span>\n );\n};\n\nLobeSwitchIcon.displayName = 'LobeSwitchIcon';\n\nexport { styles as lobeSwitchStyles } from './style';\n"],"mappings":";;;;;;;;;;;AAoBA,MAAM,oBAAoB,cAA4C,KAAK;AAE3E,MAAa,6BAA6B;CACxC,MAAM,UAAU,WAAW,kBAAkB;AAC7C,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,4DAA4D;AAE9E,QAAO;;AAQT,MAAa,kBAAkB,EAC7B,SACA,WACA,gBACA,iBACA,SACA,OAAO,WACP,UACA,UACA,UACA,UACA,UACA,IACA,MACA,GAAG,WAC8B;CACjC,MAAM,SAAS,oBAAoB;CACnC,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CACjD,MAAM,eAAe,OACnB,KACD;CAED,MAAM,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"atoms.mjs","names":["useControlledState"],"sources":["../../src/LobeSwitch/atoms.tsx"],"sourcesContent":["'use client';\n\nimport { Switch } from '@base-ui/react/switch';\nimport { cx } from 'antd-style';\nimport type { KeyboardEvent, MouseEvent } from 'react';\nimport { createContext, useContext, useMemo, useRef, useState } from 'react';\nimport useControlledState from 'use-merge-value';\n\nimport { useMotionComponent } from '@/MotionProvider';\n\nimport { rootVariants, styles, thumbVariants } from './style';\nimport type {\n LobeSwitchChangeEventHandler,\n LobeSwitchContextType,\n LobeSwitchIconPosition,\n LobeSwitchIconProps,\n LobeSwitchRootProps,\n LobeSwitchThumbProps,\n} from './type';\n\nconst LobeSwitchContext = createContext<LobeSwitchContextType | null>(null);\n\nexport const useLobeSwitchContext = () => {\n const context = useContext(LobeSwitchContext);\n if (!context) {\n throw new Error('useLobeSwitchContext must be used within a LobeSwitchRoot');\n }\n return context;\n};\n\ntype LobeSwitchRootInternalProps = Omit<LobeSwitchRootProps, 'onCheckedChange' | 'onClick'> & {\n onCheckedChange?: LobeSwitchChangeEventHandler;\n onClick?: LobeSwitchChangeEventHandler;\n};\n\nexport const LobeSwitchRoot = ({\n checked,\n className,\n defaultChecked,\n onCheckedChange,\n onClick,\n size = 'default',\n children,\n disabled,\n readOnly,\n required,\n inputRef,\n id,\n name,\n ...rest\n}: LobeSwitchRootInternalProps) => {\n const Motion = useMotionComponent();\n const [isPressed, setIsPressed] = useState(false);\n const lastEventRef = useRef<MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>>(\n null,\n );\n\n const [isChecked, setIsChecked] = useControlledState(defaultChecked ?? false, {\n defaultValue: defaultChecked,\n onChange: (value: boolean) => {\n if (lastEventRef.current) {\n onCheckedChange?.(value, lastEventRef.current);\n }\n },\n value: checked,\n });\n\n const baseClassName = rootVariants({ size });\n\n const contextValue = useMemo(\n () => ({\n isChecked: Boolean(isChecked),\n isPressed,\n setIsChecked: (value: boolean) => setIsChecked(value),\n setIsPressed,\n }),\n [isChecked, isPressed, setIsChecked],\n );\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n lastEventRef.current = event;\n onClick?.(!isChecked, event);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLButtonElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n lastEventRef.current = event;\n }\n (rest as any).onKeyDown?.(event);\n };\n\n return (\n <LobeSwitchContext.Provider value={contextValue}>\n <Switch.Root\n checked={isChecked}\n defaultChecked={defaultChecked}\n disabled={disabled}\n id={id}\n inputRef={inputRef}\n name={name}\n onCheckedChange={setIsChecked}\n readOnly={readOnly}\n render={\n <Motion.button\n {...rest}\n className={cx(baseClassName, className)}\n initial={false}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onTap={() => setIsPressed(false)}\n onTapCancel={() => setIsPressed(false)}\n onTapStart={() => setIsPressed(true)}\n whileTap=\"tap\"\n />\n }\n required={required}\n >\n {children}\n </Switch.Root>\n </LobeSwitchContext.Provider>\n );\n};\n\nLobeSwitchRoot.displayName = 'LobeSwitchRoot';\n\nexport const LobeSwitchThumb = ({\n className,\n pressedAnimation,\n size = 'default',\n transition = { damping: 25, stiffness: 300, type: 'spring' },\n children,\n ...rest\n}: LobeSwitchThumbProps) => {\n const Motion = useMotionComponent();\n const { isPressed } = useLobeSwitchContext();\n const baseClassName = thumbVariants({ size });\n\n const defaultPressedAnimation = {\n width: size === 'small' ? 16 : 22,\n };\n\n return (\n <Switch.Thumb\n render={\n <Motion.span\n animate={isPressed ? pressedAnimation || defaultPressedAnimation : undefined}\n className={cx(baseClassName, className)}\n layout\n transition={transition}\n {...rest}\n >\n {children}\n </Motion.span>\n }\n />\n );\n};\n\nLobeSwitchThumb.displayName = 'LobeSwitchThumb';\n\nconst getIconPositionClass = (position: LobeSwitchIconPosition, size: 'default' | 'small') => {\n if (position === 'thumb') return styles.iconThumb;\n if (position === 'left') return size === 'small' ? styles.iconLeftSmall : styles.iconLeft;\n return size === 'small' ? styles.iconRightSmall : styles.iconRight;\n};\n\nexport const LobeSwitchIcon = ({\n children,\n className,\n position,\n transition = { bounce: 0, type: 'spring' },\n ...rest\n}: LobeSwitchIconProps & { children?: React.ReactNode; size?: 'default' | 'small' }) => {\n const Motion = useMotionComponent();\n const { isChecked } = useLobeSwitchContext();\n const size = (rest as any).size || 'default';\n\n const isAnimated = useMemo(() => {\n if (position === 'right') return !isChecked;\n if (position === 'left') return isChecked;\n if (position === 'thumb') return true;\n return false;\n }, [position, isChecked]);\n\n const positionClass = getIconPositionClass(position, size);\n\n return (\n <Motion.span\n animate={isAnimated ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0 }}\n className={cx(styles.icon, positionClass, className)}\n transition={transition}\n {...rest}\n >\n {children}\n </Motion.span>\n );\n};\n\nLobeSwitchIcon.displayName = 'LobeSwitchIcon';\n\nexport { styles as lobeSwitchStyles } from './style';\n"],"mappings":";;;;;;;;;;;AAoBA,MAAM,oBAAoB,cAA4C,KAAK;AAE3E,MAAa,6BAA6B;CACxC,MAAM,UAAU,WAAW,kBAAkB;AAC7C,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,4DAA4D;AAE9E,QAAO;;AAQT,MAAa,kBAAkB,EAC7B,SACA,WACA,gBACA,iBACA,SACA,OAAO,WACP,UACA,UACA,UACA,UACA,UACA,IACA,MACA,GAAG,WAC8B;CACjC,MAAM,SAAS,oBAAoB;CACnC,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CACjD,MAAM,eAAe,OACnB,KACD;CAED,MAAM,CAAC,WAAW,gBAAgBA,cAAmB,kBAAkB,OAAO;EAC5E,cAAc;EACd,WAAW,UAAmB;AAC5B,OAAI,aAAa,QACf,mBAAkB,OAAO,aAAa,QAAQ;;EAGlD,OAAO;EACR,CAAC;CAEF,MAAM,gBAAgB,aAAa,EAAE,MAAM,CAAC;CAE5C,MAAM,eAAe,eACZ;EACL,WAAW,QAAQ,UAAU;EAC7B;EACA,eAAe,UAAmB,aAAa,MAAM;EACrD;EACD,GACD;EAAC;EAAW;EAAW;EAAa,CACrC;CAED,MAAM,eAAe,UAAyC;AAC5D,eAAa,UAAU;AACvB,YAAU,CAAC,WAAW,MAAM;;CAG9B,MAAM,iBAAiB,UAA4C;AACjE,MAAI,MAAM,QAAQ,WAAW,MAAM,QAAQ,IACzC,cAAa,UAAU;AAEzB,EAAC,KAAa,YAAY,MAAM;;AAGlC,QACE,oBAAC,kBAAkB;EAAS,OAAO;YACjC,oBAAC,OAAO;GACN,SAAS;GACO;GACN;GACN;GACM;GACJ;GACN,iBAAiB;GACP;GACV,QACE,oBAAC,OAAO;IACN,GAAI;IACJ,WAAW,GAAG,eAAe,UAAU;IACvC,SAAS;IACT,SAAS;IACT,WAAW;IACX,aAAa,aAAa,MAAM;IAChC,mBAAmB,aAAa,MAAM;IACtC,kBAAkB,aAAa,KAAK;IACpC,UAAS;KACT;GAEM;GAET;IACW;GACa;;AAIjC,eAAe,cAAc;AAE7B,MAAa,mBAAmB,EAC9B,WACA,kBACA,OAAO,WACP,aAAa;CAAE,SAAS;CAAI,WAAW;CAAK,MAAM;CAAU,EAC5D,UACA,GAAG,WACuB;CAC1B,MAAM,SAAS,oBAAoB;CACnC,MAAM,EAAE,cAAc,sBAAsB;CAC5C,MAAM,gBAAgB,cAAc,EAAE,MAAM,CAAC;CAE7C,MAAM,0BAA0B,EAC9B,OAAO,SAAS,UAAU,KAAK,IAChC;AAED,QACE,oBAAC,OAAO,SACN,QACE,oBAAC,OAAO;EACN,SAAS,YAAY,oBAAoB,0BAA0B;EACnE,WAAW,GAAG,eAAe,UAAU;EACvC;EACY;EACZ,GAAI;EAEH;GACW,GAEhB;;AAIN,gBAAgB,cAAc;AAE9B,MAAM,wBAAwB,UAAkC,SAA8B;AAC5F,KAAI,aAAa,QAAS,QAAO,OAAO;AACxC,KAAI,aAAa,OAAQ,QAAO,SAAS,UAAU,OAAO,gBAAgB,OAAO;AACjF,QAAO,SAAS,UAAU,OAAO,iBAAiB,OAAO;;AAG3D,MAAa,kBAAkB,EAC7B,UACA,WACA,UACA,aAAa;CAAE,QAAQ;CAAG,MAAM;CAAU,EAC1C,GAAG,WACmF;CACtF,MAAM,SAAS,oBAAoB;CACnC,MAAM,EAAE,cAAc,sBAAsB;CAC5C,MAAM,OAAQ,KAAa,QAAQ;CAEnC,MAAM,aAAa,cAAc;AAC/B,MAAI,aAAa,QAAS,QAAO,CAAC;AAClC,MAAI,aAAa,OAAQ,QAAO;AAChC,MAAI,aAAa,QAAS,QAAO;AACjC,SAAO;IACN,CAAC,UAAU,UAAU,CAAC;CAEzB,MAAM,gBAAgB,qBAAqB,UAAU,KAAK;AAE1D,QACE,oBAAC,OAAO;EACN,SAAS,aAAa;GAAE,SAAS;GAAG,OAAO;GAAG,GAAG;GAAE,SAAS;GAAG,OAAO;GAAG;EACzE,WAAW,GAAG,OAAO,MAAM,eAAe,UAAU;EACxC;EACZ,GAAI;EAEH;GACW;;AAIlB,eAAe,cAAc"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MarkdownProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react41 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Markdown/Markdown.d.ts
|
|
5
|
-
declare const Markdown:
|
|
5
|
+
declare const Markdown: react41.NamedExoticComponent<MarkdownProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Markdown };
|
|
8
8
|
//# sourceMappingURL=Markdown.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TypographyProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react43 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Markdown/Typography.d.ts
|
|
5
|
-
declare const Typography:
|
|
5
|
+
declare const Typography: react43.NamedExoticComponent<TypographyProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Typography };
|
|
8
8
|
//# sourceMappingURL=Typography.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlexboxProps } from "../../../Flex/type.mjs";
|
|
2
2
|
import "../../../Flex/index.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react39 from "react";
|
|
4
4
|
import { Ref } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/Markdown/components/SearchResultCards/index.d.ts
|
|
@@ -14,7 +14,7 @@ interface SearchResultCardsProps extends FlexboxProps {
|
|
|
14
14
|
dataSource: string[] | SearchResultItem[];
|
|
15
15
|
ref?: Ref<HTMLDivElement>;
|
|
16
16
|
}
|
|
17
|
-
declare const SearchResultCards:
|
|
17
|
+
declare const SearchResultCards: react39.NamedExoticComponent<SearchResultCardsProps>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { SearchResultCards, SearchResultCardsProps };
|
|
20
20
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MaskShadowProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react75 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/MaskShadow/MaskShadow.d.ts
|
|
5
|
-
declare const MaskShadow:
|
|
5
|
+
declare const MaskShadow: react75.NamedExoticComponent<MaskShadowProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { MaskShadow };
|
|
8
8
|
//# sourceMappingURL=MaskShadow.d.mts.map
|
package/es/Menu/Menu.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MenuProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react17 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Menu/Menu.d.ts
|
|
5
|
-
declare const Menu:
|
|
5
|
+
declare const Menu: react17.NamedExoticComponent<MenuProps<unknown>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Menu };
|
|
8
8
|
//# sourceMappingURL=Menu.d.mts.map
|
package/es/Menu/baseItem.d.mts
CHANGED
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
import { MenuCheckboxItemType } from "./checkboxItem.mjs";
|
|
2
2
|
import { MenuSwitchItemType } from "./switchItem.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { MenuDividerType, MenuItemType, SubMenuType } from "./type.mjs";
|
|
4
|
+
import { Key, ReactNode } from "react";
|
|
4
5
|
|
|
5
6
|
//#region src/Menu/baseItem.d.ts
|
|
6
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Group type for Base UI driven menus (DropdownMenu / ContextMenu).
|
|
10
|
+
* Unlike MenuItemGroupType, this supports checkbox/switch items in children.
|
|
11
|
+
*/
|
|
12
|
+
interface BaseMenuItemGroupType {
|
|
13
|
+
children?: BaseMenuItemType[];
|
|
14
|
+
key?: Key;
|
|
15
|
+
label?: ReactNode;
|
|
16
|
+
type: 'group';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Submenu type for Base UI driven menus (DropdownMenu / ContextMenu).
|
|
20
|
+
* Unlike SubMenuType, this supports checkbox/switch items in children.
|
|
21
|
+
*/
|
|
22
|
+
interface BaseSubMenuType extends Omit<SubMenuType, 'children'> {
|
|
23
|
+
children?: BaseMenuItemType[];
|
|
24
|
+
}
|
|
7
25
|
/**
|
|
8
26
|
* Base item union for Base UI driven menus (DropdownMenu / ContextMenu).
|
|
9
27
|
*
|
|
10
28
|
* Note: This intentionally does NOT change `GenericItemType` itself,
|
|
11
29
|
* because `GenericItemType` maps to rc-menu/antd Menu item types.
|
|
12
30
|
*/
|
|
13
|
-
type BaseMenuItemType
|
|
31
|
+
type BaseMenuItemType = MenuItemType | BaseSubMenuType | BaseMenuItemGroupType | MenuDividerType | MenuCheckboxItemType | MenuSwitchItemType | null;
|
|
14
32
|
//#endregion
|
|
15
|
-
export { BaseMenuItemType };
|
|
33
|
+
export { BaseMenuItemGroupType, BaseMenuItemType, BaseSubMenuType };
|
|
16
34
|
//# sourceMappingURL=baseItem.d.mts.map
|
package/es/Menu/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MenuCheckboxItemType } from "./checkboxItem.mjs";
|
|
2
2
|
import { MenuSwitchItemType } from "./switchItem.mjs";
|
|
3
3
|
import { GenericItemType, ItemType, MenuDividerType, MenuInfo, MenuItemGroupType, MenuItemType, MenuProps, SubMenuType } from "./type.mjs";
|
|
4
|
-
import { BaseMenuItemType } from "./baseItem.mjs";
|
|
4
|
+
import { BaseMenuItemGroupType, BaseMenuItemType, BaseSubMenuType } from "./baseItem.mjs";
|
|
5
5
|
import { Menu } from "./Menu.mjs";
|
|
6
|
+
import { IconSpaceMode, RenderItemContentOptions, RenderOptions, getItemKey, getItemLabel, hasAnyIcon, hasCheckboxAndIcon, renderIcon } from "./renderUtils.mjs";
|
|
6
7
|
import { mapItems } from "./utils.mjs";
|
|
7
|
-
export { type BaseMenuItemType, GenericItemType, ItemType, type MenuCheckboxItemType, MenuDividerType, MenuInfo, MenuItemGroupType, MenuItemType, MenuProps, type MenuSwitchItemType, SubMenuType, Menu as default, mapItems };
|
|
8
|
+
export { type BaseMenuItemGroupType, type BaseMenuItemType, type BaseSubMenuType, GenericItemType, type IconSpaceMode, ItemType, type MenuCheckboxItemType, MenuDividerType, MenuInfo, MenuItemGroupType, MenuItemType, MenuProps, type MenuSwitchItemType, type RenderItemContentOptions, type RenderOptions, SubMenuType, Menu as default, getItemKey, getItemLabel, hasAnyIcon, hasCheckboxAndIcon, mapItems, renderIcon };
|
package/es/Menu/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { mapItems } from "./utils.mjs";
|
|
2
2
|
import Menu_default from "./Menu.mjs";
|
|
3
|
+
import { getItemKey, getItemLabel, hasAnyIcon, hasCheckboxAndIcon, renderIcon } from "./renderUtils.mjs";
|
|
3
4
|
|
|
4
|
-
export { Menu_default as default, mapItems };
|
|
5
|
+
export { Menu_default as default, getItemKey, getItemLabel, hasAnyIcon, hasCheckboxAndIcon, mapItems, renderIcon };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IconSize } from "../Icon/type.mjs";
|
|
2
|
+
import "../Icon/index.mjs";
|
|
3
|
+
import { MenuCheckboxItemType } from "./checkboxItem.mjs";
|
|
4
|
+
import { MenuItemType, SubMenuType } from "./type.mjs";
|
|
5
|
+
import { BaseMenuItemType } from "./baseItem.mjs";
|
|
6
|
+
import { Key, ReactNode } from "react";
|
|
7
|
+
|
|
8
|
+
//#region src/Menu/renderUtils.d.ts
|
|
9
|
+
type IconSpaceMode = 'global' | 'group';
|
|
10
|
+
interface RenderOptions {
|
|
11
|
+
iconSpaceMode?: IconSpaceMode;
|
|
12
|
+
indicatorOnRight?: boolean;
|
|
13
|
+
reserveIconSpace?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface RenderItemContentOptions {
|
|
16
|
+
indicatorOnRight?: boolean;
|
|
17
|
+
reserveIconSpace?: boolean;
|
|
18
|
+
submenu?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type KeyableItem = {
|
|
21
|
+
key?: Key;
|
|
22
|
+
};
|
|
23
|
+
declare const getItemKey: (item: KeyableItem, fallback: string) => Key;
|
|
24
|
+
type LabelableItem = {
|
|
25
|
+
key?: Key;
|
|
26
|
+
label?: ReactNode;
|
|
27
|
+
title?: ReactNode;
|
|
28
|
+
};
|
|
29
|
+
declare const getItemLabel: (item: MenuItemType | SubMenuType | MenuCheckboxItemType | LabelableItem) => ReactNode;
|
|
30
|
+
declare const renderIcon: (icon: MenuItemType["icon"], size?: IconSize) => ReactNode;
|
|
31
|
+
declare const hasAnyIcon: (items: BaseMenuItemType[], recursive?: boolean) => boolean;
|
|
32
|
+
declare const hasCheckboxAndIcon: (items: BaseMenuItemType[]) => boolean;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { IconSpaceMode, RenderItemContentOptions, RenderOptions, getItemKey, getItemLabel, hasAnyIcon, hasCheckboxAndIcon, renderIcon };
|
|
35
|
+
//# sourceMappingURL=renderUtils.d.mts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import Icon_default from "../Icon/Icon.mjs";
|
|
2
|
+
import { isValidElement } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/Menu/renderUtils.tsx
|
|
6
|
+
const getItemKey = (item, fallback) => {
|
|
7
|
+
if (item && "key" in item && item.key !== void 0) return item.key;
|
|
8
|
+
return fallback;
|
|
9
|
+
};
|
|
10
|
+
const getItemLabel = (item) => {
|
|
11
|
+
if (item.label !== void 0) return item.label;
|
|
12
|
+
if ("title" in item && item.title !== void 0) return item.title;
|
|
13
|
+
return item.key;
|
|
14
|
+
};
|
|
15
|
+
const renderIcon = (icon, size) => {
|
|
16
|
+
if (!icon) return null;
|
|
17
|
+
if (isValidElement(icon)) return icon;
|
|
18
|
+
return /* @__PURE__ */ jsx(Icon_default, {
|
|
19
|
+
icon,
|
|
20
|
+
size
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const hasAnyIcon = (items, recursive = false) => {
|
|
24
|
+
return items.some((item) => {
|
|
25
|
+
if (!item) return false;
|
|
26
|
+
if (item.type === "checkbox") return true;
|
|
27
|
+
if ("icon" in item && item.icon) return true;
|
|
28
|
+
if (recursive && "children" in item && item.children) return hasAnyIcon(item.children, true);
|
|
29
|
+
return false;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const hasCheckboxAndIcon = (items) => {
|
|
33
|
+
let hasCheckbox = false;
|
|
34
|
+
let hasIcon = false;
|
|
35
|
+
for (const item of items) {
|
|
36
|
+
if (!item) continue;
|
|
37
|
+
if (item.type === "checkbox") hasCheckbox = true;
|
|
38
|
+
if ("icon" in item && item.icon) hasIcon = true;
|
|
39
|
+
if (hasCheckbox && hasIcon) return true;
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { getItemKey, getItemLabel, hasAnyIcon, hasCheckboxAndIcon, renderIcon };
|
|
46
|
+
//# sourceMappingURL=renderUtils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderUtils.mjs","names":["Icon"],"sources":["../../src/Menu/renderUtils.tsx"],"sourcesContent":["import type { Key, ReactNode } from 'react';\nimport { isValidElement } from 'react';\n\nimport Icon, { type IconSize } from '@/Icon';\n\nimport type { BaseMenuItemType } from './baseItem';\nimport type { MenuCheckboxItemType } from './checkboxItem';\nimport type { MenuItemType, SubMenuType } from './type';\n\nexport type IconSpaceMode = 'global' | 'group';\n\nexport interface RenderOptions {\n iconSpaceMode?: IconSpaceMode;\n indicatorOnRight?: boolean;\n reserveIconSpace?: boolean;\n}\n\nexport interface RenderItemContentOptions {\n indicatorOnRight?: boolean;\n reserveIconSpace?: boolean;\n submenu?: boolean;\n}\n\ntype KeyableItem = { key?: Key };\n\nexport const getItemKey = (item: KeyableItem, fallback: string): Key => {\n if (item && 'key' in item && item.key !== undefined) return item.key;\n return fallback;\n};\n\ntype LabelableItem = {\n key?: Key;\n label?: ReactNode;\n title?: ReactNode;\n};\n\nexport const getItemLabel = (\n item: MenuItemType | SubMenuType | MenuCheckboxItemType | LabelableItem,\n): ReactNode => {\n if (item.label !== undefined) return item.label;\n if ('title' in item && item.title !== undefined) return item.title;\n return item.key;\n};\n\nexport const renderIcon = (icon: MenuItemType['icon'], size?: IconSize): ReactNode => {\n if (!icon) return null;\n if (isValidElement(icon)) return icon;\n return <Icon icon={icon} size={size} />;\n};\n\nexport const hasAnyIcon = (items: BaseMenuItemType[], recursive = false): boolean => {\n return items.some((item) => {\n if (!item) return false;\n if ((item as MenuCheckboxItemType).type === 'checkbox') return true;\n if ('icon' in item && item.icon) return true;\n if (recursive && 'children' in item && item.children) {\n return hasAnyIcon(item.children as BaseMenuItemType[], true);\n }\n return false;\n });\n};\n\nexport const hasCheckboxAndIcon = (items: BaseMenuItemType[]): boolean => {\n let hasCheckbox = false;\n let hasIcon = false;\n for (const item of items) {\n if (!item) continue;\n if ((item as MenuCheckboxItemType).type === 'checkbox') {\n hasCheckbox = true;\n }\n if ('icon' in item && item.icon) {\n hasIcon = true;\n }\n if (hasCheckbox && hasIcon) return true;\n }\n return false;\n};\n"],"mappings":";;;;;AAyBA,MAAa,cAAc,MAAmB,aAA0B;AACtE,KAAI,QAAQ,SAAS,QAAQ,KAAK,QAAQ,OAAW,QAAO,KAAK;AACjE,QAAO;;AAST,MAAa,gBACX,SACc;AACd,KAAI,KAAK,UAAU,OAAW,QAAO,KAAK;AAC1C,KAAI,WAAW,QAAQ,KAAK,UAAU,OAAW,QAAO,KAAK;AAC7D,QAAO,KAAK;;AAGd,MAAa,cAAc,MAA4B,SAA+B;AACpF,KAAI,CAAC,KAAM,QAAO;AAClB,KAAI,eAAe,KAAK,CAAE,QAAO;AACjC,QAAO,oBAACA;EAAW;EAAY;GAAQ;;AAGzC,MAAa,cAAc,OAA2B,YAAY,UAAmB;AACnF,QAAO,MAAM,MAAM,SAAS;AAC1B,MAAI,CAAC,KAAM,QAAO;AAClB,MAAK,KAA8B,SAAS,WAAY,QAAO;AAC/D,MAAI,UAAU,QAAQ,KAAK,KAAM,QAAO;AACxC,MAAI,aAAa,cAAc,QAAQ,KAAK,SAC1C,QAAO,WAAW,KAAK,UAAgC,KAAK;AAE9D,SAAO;GACP;;AAGJ,MAAa,sBAAsB,UAAuC;CACxE,IAAI,cAAc;CAClB,IAAI,UAAU;AACd,MAAK,MAAM,QAAQ,OAAO;AACxB,MAAI,CAAC,KAAM;AACX,MAAK,KAA8B,SAAS,WAC1C,eAAc;AAEhB,MAAI,UAAU,QAAQ,KAAK,KACzB,WAAU;AAEZ,MAAI,eAAe,QAAS,QAAO;;AAErC,QAAO"}
|
package/es/Mermaid/Mermaid.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MermaidProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react15 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Mermaid/Mermaid.d.ts
|
|
5
|
-
declare const Mermaid:
|
|
5
|
+
declare const Mermaid: react15.NamedExoticComponent<MermaidProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Mermaid };
|
|
8
8
|
//# sourceMappingURL=Mermaid.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SyntaxMermaidProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react16 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Mermaid/SyntaxMermaid/index.d.ts
|
|
5
|
-
declare const SyntaxMermaid:
|
|
5
|
+
declare const SyntaxMermaid: react16.NamedExoticComponent<SyntaxMermaidProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SyntaxMermaid };
|
|
8
8
|
//# sourceMappingURL=index.d.mts.map
|
package/es/Modal/Modal.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModalProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react8 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Modal/Modal.d.ts
|
|
5
|
-
declare const Modal:
|
|
5
|
+
declare const Modal: react8.NamedExoticComponent<ModalProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Modal };
|
|
8
8
|
//# sourceMappingURL=Modal.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ModalContextValue } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react9 from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Modal/ModalProvider.d.ts
|
|
6
|
-
declare const ModalProvider:
|
|
6
|
+
declare const ModalProvider: react9.NamedExoticComponent<{
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
value: ModalContextValue;
|
|
9
9
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImperativeModalProps, ModalInstance, RawModalComponent, RawModalComponentProps, RawModalInstance, RawModalKeyOptions, RawModalOptions } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/Modal/imperative.d.ts
|
|
5
5
|
type ModalHostProps = {
|
|
@@ -7,7 +7,7 @@ type ModalHostProps = {
|
|
|
7
7
|
};
|
|
8
8
|
declare const ModalHost: ({
|
|
9
9
|
root
|
|
10
|
-
}: ModalHostProps) =>
|
|
10
|
+
}: ModalHostProps) => react_jsx_runtime0.JSX.Element | null;
|
|
11
11
|
declare const createModal: (props: ImperativeModalProps) => ModalInstance;
|
|
12
12
|
declare function createRawModal<P extends RawModalComponentProps>(component: RawModalComponent<P>, props: Omit<P, 'open' | 'onClose'>, options?: RawModalOptions): RawModalInstance<P>;
|
|
13
13
|
declare function createRawModal<P, OpenKey extends keyof P, CloseKey extends keyof P>(component: RawModalComponent<P>, props: Omit<P, OpenKey | CloseKey>, options: RawModalKeyOptions<OpenKey, CloseKey>): RawModalInstance<P, OpenKey, CloseKey>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react40 from "react";
|
|
2
2
|
import { Context, ReactNode } from "react";
|
|
3
3
|
import * as motion_react0 from "motion/react";
|
|
4
4
|
import * as m from "motion/react-m";
|
|
@@ -6,7 +6,7 @@ import * as m from "motion/react-m";
|
|
|
6
6
|
//#region src/MotionProvider/index.d.ts
|
|
7
7
|
type MotionComponentType = typeof motion_react0.motion | typeof m;
|
|
8
8
|
declare const MotionComponent: Context<MotionComponentType>;
|
|
9
|
-
declare const MotionProvider:
|
|
9
|
+
declare const MotionProvider: react40.NamedExoticComponent<{
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
motion: MotionComponentType;
|
|
12
12
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/Popover/ArrowIcon.d.ts
|
|
4
|
-
declare const PopoverArrowIcon:
|
|
4
|
+
declare const PopoverArrowIcon: react_jsx_runtime0.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { PopoverArrowIcon };
|
|
7
7
|
//# sourceMappingURL=ArrowIcon.d.mts.map
|
package/es/Popover/atoms.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PopoverPlacement } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react11 from "react";
|
|
3
3
|
import { ComponentProps, ComponentPropsWithRef } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
5
5
|
import * as _base_ui_react_popover0 from "@base-ui/react/popover";
|
|
6
6
|
import { Popover } from "@base-ui/react/popover";
|
|
7
7
|
|
|
8
8
|
//#region src/Popover/atoms.d.ts
|
|
9
9
|
declare const PopoverRoot: typeof Popover.Root;
|
|
10
|
-
declare const PopoverBackdrop:
|
|
10
|
+
declare const PopoverBackdrop: react11.ForwardRefExoticComponent<_base_ui_react_popover0.PopoverBackdropProps & react11.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
type PopoverTriggerElementProps = Omit<ComponentPropsWithRef<typeof Popover.Trigger>, 'children' | 'render'> & {
|
|
12
12
|
children: ComponentProps<typeof Popover.Trigger>['children'];
|
|
13
13
|
};
|
|
@@ -18,7 +18,7 @@ declare const PopoverTriggerElement: {
|
|
|
18
18
|
nativeButton,
|
|
19
19
|
ref: refProp,
|
|
20
20
|
...rest
|
|
21
|
-
}: PopoverTriggerElementProps):
|
|
21
|
+
}: PopoverTriggerElementProps): react_jsx_runtime1.JSX.Element;
|
|
22
22
|
displayName: string;
|
|
23
23
|
};
|
|
24
24
|
type PopoverPortalAtomProps = Omit<ComponentProps<typeof Popover.Portal>, 'container'> & {
|
|
@@ -37,7 +37,7 @@ declare const PopoverPortal: {
|
|
|
37
37
|
root,
|
|
38
38
|
children,
|
|
39
39
|
...rest
|
|
40
|
-
}: PopoverPortalAtomProps):
|
|
40
|
+
}: PopoverPortalAtomProps): react_jsx_runtime1.JSX.Element | null;
|
|
41
41
|
displayName: string;
|
|
42
42
|
};
|
|
43
43
|
type PopoverPositionerAtomProps = ComponentProps<typeof Popover.Positioner> & {
|
|
@@ -54,7 +54,7 @@ declare const PopoverPositioner: {
|
|
|
54
54
|
side,
|
|
55
55
|
sideOffset,
|
|
56
56
|
...rest
|
|
57
|
-
}: PopoverPositionerAtomProps):
|
|
57
|
+
}: PopoverPositionerAtomProps): react_jsx_runtime1.JSX.Element;
|
|
58
58
|
displayName: string;
|
|
59
59
|
};
|
|
60
60
|
type PopoverPopupAtomProps = ComponentProps<typeof Popover.Popup>;
|
|
@@ -62,7 +62,7 @@ declare const PopoverPopup: {
|
|
|
62
62
|
({
|
|
63
63
|
className,
|
|
64
64
|
...rest
|
|
65
|
-
}: PopoverPopupAtomProps):
|
|
65
|
+
}: PopoverPopupAtomProps): react_jsx_runtime1.JSX.Element;
|
|
66
66
|
displayName: string;
|
|
67
67
|
};
|
|
68
68
|
type PopoverArrowAtomProps = ComponentProps<typeof Popover.Arrow>;
|
|
@@ -71,7 +71,7 @@ declare const PopoverArrow: {
|
|
|
71
71
|
className,
|
|
72
72
|
children,
|
|
73
73
|
...rest
|
|
74
|
-
}: PopoverArrowAtomProps):
|
|
74
|
+
}: PopoverArrowAtomProps): react_jsx_runtime1.JSX.Element;
|
|
75
75
|
displayName: string;
|
|
76
76
|
};
|
|
77
77
|
type PopoverViewportAtomProps = ComponentProps<typeof Popover.Viewport>;
|
|
@@ -79,7 +79,7 @@ declare const PopoverViewport: {
|
|
|
79
79
|
({
|
|
80
80
|
className,
|
|
81
81
|
...rest
|
|
82
|
-
}: PopoverViewportAtomProps):
|
|
82
|
+
}: PopoverViewportAtomProps): react_jsx_runtime1.JSX.Element;
|
|
83
83
|
displayName: string;
|
|
84
84
|
};
|
|
85
85
|
//#endregion
|
package/es/Popover/context.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react13 from "react";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Popover/context.d.ts
|
|
5
5
|
type PopoverContextValue = {
|
|
6
6
|
close: () => void;
|
|
7
7
|
};
|
|
8
|
-
declare const PopoverProvider:
|
|
8
|
+
declare const PopoverProvider: react13.NamedExoticComponent<{
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
value: PopoverContextValue;
|
|
11
11
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SearchBarProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react6 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/SearchBar/SearchBar.d.ts
|
|
5
|
-
declare const SearchBar:
|
|
5
|
+
declare const SearchBar: react6.NamedExoticComponent<SearchBarProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SearchBar };
|
|
8
8
|
//# sourceMappingURL=SearchBar.d.mts.map
|
|
@@ -8,13 +8,13 @@ import { styles } from "./style.mjs";
|
|
|
8
8
|
import { memo, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { cx } from "antd-style";
|
|
11
|
-
import
|
|
11
|
+
import useMergeState from "use-merge-value";
|
|
12
12
|
import { LucideLoader2, Search } from "lucide-react";
|
|
13
13
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
14
14
|
|
|
15
15
|
//#region src/SearchBar/SearchBar.tsx
|
|
16
16
|
const SearchBar = memo(({ defaultValue = "", spotlight, className, value, onInputChange, placeholder, enableShortKey, shortKey = "mod+k", onSearch, loading, style, onChange, onBlur, onPressEnter, onFocus, styles: { input: inputStyle, shortKey: shortKeyStyle } = {}, classNames: { input: inputClassName, shortKey: shortKeyClassName } = {}, ...rest }) => {
|
|
17
|
-
const [inputValue, setInputValue] =
|
|
17
|
+
const [inputValue, setInputValue] = useMergeState(defaultValue, {
|
|
18
18
|
defaultValue,
|
|
19
19
|
onChange: onInputChange,
|
|
20
20
|
value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.mjs","names":["inputReference: any","Spotlight","Input","Icon","Hotkey"],"sources":["../../src/SearchBar/SearchBar.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { LucideLoader2, Search } from 'lucide-react';\nimport { memo, useMemo, useRef, useState } from 'react';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport useControlledState from 'use-merge-value';\n\nimport Hotkey from '@/Hotkey';\nimport Icon from '@/Icon';\nimport Input from '@/Input';\nimport Spotlight from '@/awesome/Spotlight';\n\nimport { styles } from './style';\nimport type { SearchBarProps } from './type';\n\nconst SearchBar = memo<SearchBarProps>(\n ({\n defaultValue = '',\n spotlight,\n className,\n value,\n onInputChange,\n placeholder,\n enableShortKey,\n shortKey = 'mod+k',\n onSearch,\n loading,\n style,\n onChange,\n onBlur,\n onPressEnter,\n onFocus,\n styles: { input: inputStyle, shortKey: shortKeyStyle } = {},\n classNames: { input: inputClassName, shortKey: shortKeyClassName } = {},\n ...rest\n }) => {\n const [inputValue, setInputValue] = useControlledState(defaultValue, {\n defaultValue,\n onChange: onInputChange,\n value,\n });\n\n const [showTag, setShowTag] = useState<boolean>(true);\n const inputReference: any = useRef<HTMLInputElement>(null);\n const hotkey = useMemo(\n () => (shortKey.includes('+') ? shortKey : `mod+${shortKey}`),\n [shortKey],\n );\n\n useHotkeys(\n hotkey,\n () => {\n if (!enableShortKey) return;\n inputReference.current?.focus();\n },\n {\n enableOnFormTags: true,\n enabled: !!enableShortKey && !!shortKey,\n preventDefault: true,\n },\n );\n\n return (\n <div className={cx(styles.search, className)} style={style}>\n {spotlight && <Spotlight />}\n <Input\n allowClear\n className={inputClassName}\n onBlur={(e) => {\n onBlur?.(e);\n setInputValue(e.target.value);\n setShowTag(true);\n }}\n onChange={(e) => {\n setInputValue(e.target.value);\n onChange?.(e);\n }}\n onFocus={(e) => {\n onFocus?.(e);\n setShowTag(false);\n }}\n onPressEnter={(e) => {\n onPressEnter?.(e);\n onSearch?.(inputValue);\n }}\n placeholder={placeholder ?? 'Type keywords...'}\n prefix={\n <Icon\n className={styles.icon}\n icon={loading ? LucideLoader2 : Search}\n size=\"small\"\n spin={loading}\n style={{ marginRight: 4 }}\n />\n }\n ref={inputReference}\n style={inputStyle}\n value={inputValue}\n {...rest}\n />\n {enableShortKey && showTag && !inputValue && (\n <Hotkey\n className={cx(styles.tag, shortKeyClassName)}\n compact\n keys={hotkey}\n style={shortKeyStyle}\n />\n )}\n </div>\n );\n },\n);\n\nSearchBar.displayName = 'SearchBar';\n\nexport default SearchBar;\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAM,YAAY,MACf,EACC,eAAe,IACf,WACA,WACA,OACA,eACA,aACA,gBACA,WAAW,SACX,UACA,SACA,OACA,UACA,QACA,cACA,SACA,QAAQ,EAAE,OAAO,YAAY,UAAU,kBAAkB,EAAE,EAC3D,YAAY,EAAE,OAAO,gBAAgB,UAAU,sBAAsB,EAAE,EACvE,GAAG,WACC;CACJ,MAAM,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"SearchBar.mjs","names":["useControlledState","inputReference: any","Spotlight","Input","Icon","Hotkey"],"sources":["../../src/SearchBar/SearchBar.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { LucideLoader2, Search } from 'lucide-react';\nimport { memo, useMemo, useRef, useState } from 'react';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport useControlledState from 'use-merge-value';\n\nimport Hotkey from '@/Hotkey';\nimport Icon from '@/Icon';\nimport Input from '@/Input';\nimport Spotlight from '@/awesome/Spotlight';\n\nimport { styles } from './style';\nimport type { SearchBarProps } from './type';\n\nconst SearchBar = memo<SearchBarProps>(\n ({\n defaultValue = '',\n spotlight,\n className,\n value,\n onInputChange,\n placeholder,\n enableShortKey,\n shortKey = 'mod+k',\n onSearch,\n loading,\n style,\n onChange,\n onBlur,\n onPressEnter,\n onFocus,\n styles: { input: inputStyle, shortKey: shortKeyStyle } = {},\n classNames: { input: inputClassName, shortKey: shortKeyClassName } = {},\n ...rest\n }) => {\n const [inputValue, setInputValue] = useControlledState(defaultValue, {\n defaultValue,\n onChange: onInputChange,\n value,\n });\n\n const [showTag, setShowTag] = useState<boolean>(true);\n const inputReference: any = useRef<HTMLInputElement>(null);\n const hotkey = useMemo(\n () => (shortKey.includes('+') ? shortKey : `mod+${shortKey}`),\n [shortKey],\n );\n\n useHotkeys(\n hotkey,\n () => {\n if (!enableShortKey) return;\n inputReference.current?.focus();\n },\n {\n enableOnFormTags: true,\n enabled: !!enableShortKey && !!shortKey,\n preventDefault: true,\n },\n );\n\n return (\n <div className={cx(styles.search, className)} style={style}>\n {spotlight && <Spotlight />}\n <Input\n allowClear\n className={inputClassName}\n onBlur={(e) => {\n onBlur?.(e);\n setInputValue(e.target.value);\n setShowTag(true);\n }}\n onChange={(e) => {\n setInputValue(e.target.value);\n onChange?.(e);\n }}\n onFocus={(e) => {\n onFocus?.(e);\n setShowTag(false);\n }}\n onPressEnter={(e) => {\n onPressEnter?.(e);\n onSearch?.(inputValue);\n }}\n placeholder={placeholder ?? 'Type keywords...'}\n prefix={\n <Icon\n className={styles.icon}\n icon={loading ? LucideLoader2 : Search}\n size=\"small\"\n spin={loading}\n style={{ marginRight: 4 }}\n />\n }\n ref={inputReference}\n style={inputStyle}\n value={inputValue}\n {...rest}\n />\n {enableShortKey && showTag && !inputValue && (\n <Hotkey\n className={cx(styles.tag, shortKeyClassName)}\n compact\n keys={hotkey}\n style={shortKeyStyle}\n />\n )}\n </div>\n );\n },\n);\n\nSearchBar.displayName = 'SearchBar';\n\nexport default SearchBar;\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAM,YAAY,MACf,EACC,eAAe,IACf,WACA,WACA,OACA,eACA,aACA,gBACA,WAAW,SACX,UACA,SACA,OACA,UACA,QACA,cACA,SACA,QAAQ,EAAE,OAAO,YAAY,UAAU,kBAAkB,EAAE,EAC3D,YAAY,EAAE,OAAO,gBAAgB,UAAU,sBAAsB,EAAE,EACvE,GAAG,WACC;CACJ,MAAM,CAAC,YAAY,iBAAiBA,cAAmB,cAAc;EACnE;EACA,UAAU;EACV;EACD,CAAC;CAEF,MAAM,CAAC,SAAS,cAAc,SAAkB,KAAK;CACrD,MAAMC,iBAAsB,OAAyB,KAAK;CAC1D,MAAM,SAAS,cACN,SAAS,SAAS,IAAI,GAAG,WAAW,OAAO,YAClD,CAAC,SAAS,CACX;AAED,YACE,cACM;AACJ,MAAI,CAAC,eAAgB;AACrB,iBAAe,SAAS,OAAO;IAEjC;EACE,kBAAkB;EAClB,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;EAC/B,gBAAgB;EACjB,CACF;AAED,QACE,qBAAC;EAAI,WAAW,GAAG,OAAO,QAAQ,UAAU;EAAS;;GAClD,aAAa,oBAACC,sBAAY;GAC3B,oBAACC;IACC;IACA,WAAW;IACX,SAAS,MAAM;AACb,cAAS,EAAE;AACX,mBAAc,EAAE,OAAO,MAAM;AAC7B,gBAAW,KAAK;;IAElB,WAAW,MAAM;AACf,mBAAc,EAAE,OAAO,MAAM;AAC7B,gBAAW,EAAE;;IAEf,UAAU,MAAM;AACd,eAAU,EAAE;AACZ,gBAAW,MAAM;;IAEnB,eAAe,MAAM;AACnB,oBAAe,EAAE;AACjB,gBAAW,WAAW;;IAExB,aAAa,eAAe;IAC5B,QACE,oBAACC;KACC,WAAW,OAAO;KAClB,MAAM,UAAU,gBAAgB;KAChC,MAAK;KACL,MAAM;KACN,OAAO,EAAE,aAAa,GAAG;MACzB;IAEJ,KAAK;IACL,OAAO;IACP,OAAO;IACP,GAAI;KACJ;GACD,kBAAkB,WAAW,CAAC,cAC7B,oBAACC;IACC,WAAW,GAAG,OAAO,KAAK,kBAAkB;IAC5C;IACA,MAAM;IACN,OAAO;KACP;;GAEA;EAGX;AAED,UAAU,cAAc;AAExB,wBAAe"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SegmentedProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react7 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Segmented/Segmented.d.ts
|
|
5
|
-
declare const Segmented:
|
|
5
|
+
declare const Segmented: react7.NamedExoticComponent<SegmentedProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Segmented };
|
|
8
8
|
//# sourceMappingURL=Segmented.d.mts.map
|
package/es/Select/Select.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SelectProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react5 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Select/Select.d.ts
|
|
5
|
-
declare const Input:
|
|
5
|
+
declare const Input: react5.NamedExoticComponent<SelectProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Input };
|
|
8
8
|
//# sourceMappingURL=Select.d.mts.map
|
package/es/SideNav/SideNav.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SideNavProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react4 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/SideNav/SideNav.d.ts
|
|
5
|
-
declare const SideNav:
|
|
5
|
+
declare const SideNav: react4.NamedExoticComponent<SideNavProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SideNav };
|
|
8
8
|
//# sourceMappingURL=SideNav.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SliderWithInputProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react3 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/SliderWithInput/SliderWithInput.d.ts
|
|
5
|
-
declare const SliderWithInput:
|
|
5
|
+
declare const SliderWithInput: react3.NamedExoticComponent<SliderWithInputProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SliderWithInput };
|
|
8
8
|
//# sourceMappingURL=SliderWithInput.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ActionIconProps } from "../../ActionIcon/type.mjs";
|
|
2
2
|
import "../../ActionIcon/index.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react90 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/SortableList/components/DragHandle.d.ts
|
|
6
|
-
declare const DragHandle:
|
|
6
|
+
declare const DragHandle: react90.NamedExoticComponent<ActionIconProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { DragHandle };
|
|
9
9
|
//# sourceMappingURL=DragHandle.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlexboxProps } from "../../Flex/type.mjs";
|
|
2
2
|
import "../../Flex/index.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react88 from "react";
|
|
4
4
|
import "@dnd-kit/core";
|
|
5
5
|
|
|
6
6
|
//#region src/SortableList/components/SortableItem.d.ts
|
|
@@ -9,7 +9,7 @@ interface SortableItemProps extends Omit<FlexboxProps, 'id'> {
|
|
|
9
9
|
id: string | number;
|
|
10
10
|
variant?: 'borderless' | 'filled' | 'outlined';
|
|
11
11
|
}
|
|
12
|
-
declare const SortableItem:
|
|
12
|
+
declare const SortableItem: react88.NamedExoticComponent<SortableItemProps>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { SortableItem };
|
|
15
15
|
//# sourceMappingURL=SortableItem.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ThemeProviderProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react2 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/ThemeProvider/ThemeProvider.d.ts
|
|
5
|
-
declare const ThemeProvider:
|
|
5
|
+
declare const ThemeProvider: react2.NamedExoticComponent<ThemeProviderProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ThemeProvider };
|
|
8
8
|
//# sourceMappingURL=ThemeProvider.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ToastAPI, ToastPosition } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react84 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Toast/imperative.d.ts
|
|
5
5
|
declare const toast: ToastAPI;
|
|
@@ -31,14 +31,14 @@ interface ToastHostProps {
|
|
|
31
31
|
*/
|
|
32
32
|
swipeDirection?: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[];
|
|
33
33
|
}
|
|
34
|
-
declare const ToastHost:
|
|
34
|
+
declare const ToastHost: react84.MemoExoticComponent<({
|
|
35
35
|
root,
|
|
36
36
|
className,
|
|
37
37
|
duration,
|
|
38
38
|
limit,
|
|
39
39
|
position,
|
|
40
40
|
swipeDirection
|
|
41
|
-
}: ToastHostProps) =>
|
|
41
|
+
}: ToastHostProps) => react84.ReactPortal | null>;
|
|
42
42
|
declare const useToast: () => ToastAPI;
|
|
43
43
|
//#endregion
|
|
44
44
|
export { TOAST_CONTAINER_ATTR, ToastHost, ToastHostProps, toast, useToast };
|