@lobehub/ui 4.2.1 → 4.2.2
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/AccordionItem.d.mts +2 -2
- 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/Avatar.mjs +1 -0
- package/es/Avatar/Avatar.mjs.map +1 -1
- package/es/Avatar/AvatarGroup/index.d.mts +2 -2
- package/es/Burger/Burger.d.mts +2 -2
- package/es/CodeEditor/CodeEditor.d.mts +2 -2
- package/es/Collapse/Collapse.d.mts +2 -2
- package/es/ConfigProvider/index.d.mts +2 -2
- package/es/CopyButton/CopyButton.d.mts +2 -2
- package/es/DatePicker/DatePicker.d.mts +2 -2
- 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/DraggableSideNav/DraggableSideNav.d.mts +2 -2
- package/es/Drawer/Drawer.d.mts +2 -2
- package/es/Dropdown/Dropdown.d.mts +2 -2
- package/es/EditableText/EditableText.d.mts +2 -2
- package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
- 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/GroupAvatar/GroupAvatar.mjs +15 -13
- package/es/GroupAvatar/GroupAvatar.mjs.map +1 -1
- package/es/GuideCard/GuideCard.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/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/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/List/ListItem/index.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/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/MotionProvider/index.d.mts +2 -2
- package/es/SearchBar/SearchBar.d.mts +2 -2
- 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/Toc/Toc.d.mts +2 -2
- 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/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/color/ColorScales/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 +2 -2
- package/es/icons/lucideExtra/GlobeOffIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
- package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
- package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
- 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 +2 -2
- 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 +2 -2
- 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/storybook/StoryBook/index.d.mts +2 -2
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AccordionProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react28 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Accordion/Accordion.d.ts
|
|
5
|
-
declare const Accordion:
|
|
5
|
+
declare const Accordion: react28.NamedExoticComponent<AccordionProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Accordion };
|
|
8
8
|
//# sourceMappingURL=Accordion.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AccordionItemProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react27 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Accordion/AccordionItem.d.ts
|
|
5
|
-
declare const AccordionItem:
|
|
5
|
+
declare const AccordionItem: react27.NamedExoticComponent<AccordionItemProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AccordionItem };
|
|
8
8
|
//# sourceMappingURL=AccordionItem.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActionIconProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react30 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/ActionIcon/ActionIcon.d.ts
|
|
5
|
-
declare const ActionIcon:
|
|
5
|
+
declare const ActionIcon: react30.NamedExoticComponent<ActionIconProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ActionIcon };
|
|
8
8
|
//# sourceMappingURL=ActionIcon.d.mts.map
|
package/es/Alert/Alert.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AlertProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react25 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Alert/Alert.d.ts
|
|
5
|
-
declare const Alert:
|
|
5
|
+
declare const Alert: react25.NamedExoticComponent<AlertProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Alert };
|
|
8
8
|
//# sourceMappingURL=Alert.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AutoCompleteProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react24 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/AutoComplete/Select.d.ts
|
|
5
|
-
declare const AutoComplete:
|
|
5
|
+
declare const AutoComplete: react24.NamedExoticComponent<AutoCompleteProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AutoComplete };
|
|
8
8
|
//# sourceMappingURL=Select.d.mts.map
|
package/es/Avatar/Avatar.mjs
CHANGED
|
@@ -84,6 +84,7 @@ const Avatar$1 = memo(({ bordered, className, avatar, title, animation, bordered
|
|
|
84
84
|
src: isDefaultAntAvatar ? defualtAvatar : void 0,
|
|
85
85
|
style: {
|
|
86
86
|
background: isDefaultAntAvatar || !!emoji ? background : background || theme.colorBorder,
|
|
87
|
+
borderRadius: shape === "square" && size && size < 24 ? "33%" : void 0,
|
|
87
88
|
boxShadow: bordered ? `${theme.colorBgLayout} 0 0 0 2px, ${borderedColor || theme.colorTextTertiary} 0 0 0 4px` : void 0,
|
|
88
89
|
color: readableColor(background || theme.colorBorder),
|
|
89
90
|
cursor: rest?.onClick ? "pointer" : void 0,
|
package/es/Avatar/Avatar.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.mjs","names":["Avatar","Img","FluentEmoji","AntAvatar","Center","Icon"],"sources":["../../src/Avatar/Avatar.tsx"],"sourcesContent":["'use client';\n\nimport { getEmoji } from '@lobehub/fluent-emoji';\nimport { Avatar as AntAvatar } from 'antd';\nimport { cva } from 'class-variance-authority';\nimport { Loader2 } from 'lucide-react';\nimport { readableColor } from 'polished';\nimport { isValidElement, memo, useMemo } from 'react';\n\nimport { Center } from '@/Flex';\nimport FluentEmoji from '@/FluentEmoji';\nimport Icon from '@/Icon';\nimport Img from '@/Img';\n\nimport { useStyles } from './style';\nimport type { AvatarProps } from './type';\n\nconst Avatar = memo<AvatarProps>(\n ({\n bordered,\n className,\n avatar,\n title,\n animation,\n borderedColor,\n size = 48,\n shape = 'square',\n background,\n style,\n unoptimized,\n alt,\n variant = 'borderless',\n shadow,\n loading,\n sliceText = true,\n emojiScaleWithBackground = true,\n ref,\n ...rest\n }) => {\n const isStringAvatar = typeof avatar === 'string';\n\n const isDefaultAntAvatar = useMemo(\n () =>\n Boolean(\n avatar &&\n (['/', 'http', 'data:'].some((index) => isStringAvatar && avatar.startsWith(index)) ||\n isValidElement(avatar)),\n ),\n [avatar, isStringAvatar],\n );\n\n const emoji = useMemo(\n () => avatar && !isDefaultAntAvatar && isStringAvatar && getEmoji(avatar),\n [avatar, isStringAvatar, isDefaultAntAvatar],\n );\n\n const { styles, cx, theme } = useStyles();\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n shadow: false,\n variant: 'borderless',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: styles.filled,\n outlined: styles.outlined,\n borderless: styles.borderless,\n },\n shadow: {\n false: null,\n true: styles.shadow,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const text = String(isDefaultAntAvatar ? title : avatar);\n\n const imgAlt = alt || title || 'avatar';\n\n const defualtAvatar =\n typeof avatar === 'string' ? (\n <Img\n alt={imgAlt}\n height={size}\n loading={'lazy'}\n src={avatar}\n unoptimized={unoptimized}\n width={size}\n />\n ) : (\n avatar\n );\n\n const hasBackground =\n background &&\n background !== 'transparent' &&\n background !== 'rgba(0,0,0,0)' &&\n background !== null;\n\n const customAvatar = useMemo(\n () =>\n emoji ? (\n <FluentEmoji\n emoji={emoji}\n size={emojiScaleWithBackground ? (hasBackground ? size * 0.85 : size) : size * 0.85}\n type={animation ? 'anim' : '3d'}\n unoptimized={unoptimized}\n />\n ) : sliceText ? (\n (text || title)?.toUpperCase().slice(0, 2)\n ) : (\n (text || title)?.toUpperCase()\n ),\n [\n animation,\n emoji,\n hasBackground,\n size,\n sliceText,\n text,\n title,\n unoptimized,\n emojiScaleWithBackground,\n ],\n );\n\n return (\n <AntAvatar\n alt={imgAlt}\n className={cx(variants({ shadow, variant }), className)}\n draggable={false}\n ref={ref}\n shape={shape}\n size={size}\n src={isDefaultAntAvatar ? defualtAvatar : undefined}\n style={{\n background: isDefaultAntAvatar || !!emoji ? background : background || theme.colorBorder,\n boxShadow: bordered\n ? `${theme.colorBgLayout} 0 0 0 2px, ${borderedColor || theme.colorTextTertiary} 0 0 0 4px`\n : undefined,\n color: readableColor(background || theme.colorBorder),\n cursor: rest?.onClick ? 'pointer' : undefined,\n fontSize: size * (emoji ? 0.7 : 0.5),\n ...style,\n }}\n {...rest}\n >\n {loading && (\n <Center className={styles.loading} height={'100%'} width={'100%'}>\n <Icon icon={Loader2} spin />\n </Center>\n )}\n {!isDefaultAntAvatar && customAvatar}\n </AntAvatar>\n );\n },\n);\n\nAvatar.displayName = 'Avatar';\n\nexport default Avatar;\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAMA,WAAS,MACZ,EACC,UACA,WACA,QACA,OACA,WACA,eACA,OAAO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AACC;EACC,KAAK;EACL,WAAW,GAAG,SAAS;GAAE;GAAQ;GAAS,CAAC,EAAE,UAAU;EACvD,WAAW;EACN;EACE;EACD;EACN,KAAK,qBAAqB,gBAAgB;EAC1C,OAAO;GACL,YAAY,sBAAsB,CAAC,CAAC,QAAQ,aAAa,cAAc,MAAM;GAC7E,WAAW,WACP,GAAG,MAAM,cAAc,cAAc,iBAAiB,MAAM,kBAAkB,cAC9E;GACJ,OAAO,cAAc,cAAc,MAAM,YAAY;GACrD,QAAQ,MAAM,UAAU,YAAY;GACpC,UAAU,QAAQ,QAAQ,KAAM;GAChC,GAAG;GACJ;EACD,GAAI;aAEH,WACC,oBAACC;GAAO,WAAW,OAAO;GAAS,QAAQ;GAAQ,OAAO;aACxD,oBAACC;IAAK,MAAM;IAAS;KAAO;IACrB,EAEV,CAAC,sBAAsB;GACd;EAGjB;AAED,SAAO,cAAc;AAErB,qBAAeL"}
|
|
1
|
+
{"version":3,"file":"Avatar.mjs","names":["Avatar","Img","FluentEmoji","AntAvatar","Center","Icon"],"sources":["../../src/Avatar/Avatar.tsx"],"sourcesContent":["'use client';\n\nimport { getEmoji } from '@lobehub/fluent-emoji';\nimport { Avatar as AntAvatar } from 'antd';\nimport { cva } from 'class-variance-authority';\nimport { Loader2 } from 'lucide-react';\nimport { readableColor } from 'polished';\nimport { isValidElement, memo, useMemo } from 'react';\n\nimport { Center } from '@/Flex';\nimport FluentEmoji from '@/FluentEmoji';\nimport Icon from '@/Icon';\nimport Img from '@/Img';\n\nimport { useStyles } from './style';\nimport type { AvatarProps } from './type';\n\nconst Avatar = memo<AvatarProps>(\n ({\n bordered,\n className,\n avatar,\n title,\n animation,\n borderedColor,\n size = 48,\n shape = 'square',\n background,\n style,\n unoptimized,\n alt,\n variant = 'borderless',\n shadow,\n loading,\n sliceText = true,\n emojiScaleWithBackground = true,\n ref,\n ...rest\n }) => {\n const isStringAvatar = typeof avatar === 'string';\n\n const isDefaultAntAvatar = useMemo(\n () =>\n Boolean(\n avatar &&\n (['/', 'http', 'data:'].some((index) => isStringAvatar && avatar.startsWith(index)) ||\n isValidElement(avatar)),\n ),\n [avatar, isStringAvatar],\n );\n\n const emoji = useMemo(\n () => avatar && !isDefaultAntAvatar && isStringAvatar && getEmoji(avatar),\n [avatar, isStringAvatar, isDefaultAntAvatar],\n );\n\n const { styles, cx, theme } = useStyles();\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n shadow: false,\n variant: 'borderless',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: styles.filled,\n outlined: styles.outlined,\n borderless: styles.borderless,\n },\n shadow: {\n false: null,\n true: styles.shadow,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const text = String(isDefaultAntAvatar ? title : avatar);\n\n const imgAlt = alt || title || 'avatar';\n\n const defualtAvatar =\n typeof avatar === 'string' ? (\n <Img\n alt={imgAlt}\n height={size}\n loading={'lazy'}\n src={avatar}\n unoptimized={unoptimized}\n width={size}\n />\n ) : (\n avatar\n );\n\n const hasBackground =\n background &&\n background !== 'transparent' &&\n background !== 'rgba(0,0,0,0)' &&\n background !== null;\n\n const customAvatar = useMemo(\n () =>\n emoji ? (\n <FluentEmoji\n emoji={emoji}\n size={emojiScaleWithBackground ? (hasBackground ? size * 0.85 : size) : size * 0.85}\n type={animation ? 'anim' : '3d'}\n unoptimized={unoptimized}\n />\n ) : sliceText ? (\n (text || title)?.toUpperCase().slice(0, 2)\n ) : (\n (text || title)?.toUpperCase()\n ),\n [\n animation,\n emoji,\n hasBackground,\n size,\n sliceText,\n text,\n title,\n unoptimized,\n emojiScaleWithBackground,\n ],\n );\n\n return (\n <AntAvatar\n alt={imgAlt}\n className={cx(variants({ shadow, variant }), className)}\n draggable={false}\n ref={ref}\n shape={shape}\n size={size}\n src={isDefaultAntAvatar ? defualtAvatar : undefined}\n style={{\n background: isDefaultAntAvatar || !!emoji ? background : background || theme.colorBorder,\n borderRadius: shape === 'square' && size && size < 24 ? '33%' : undefined,\n boxShadow: bordered\n ? `${theme.colorBgLayout} 0 0 0 2px, ${borderedColor || theme.colorTextTertiary} 0 0 0 4px`\n : undefined,\n color: readableColor(background || theme.colorBorder),\n cursor: rest?.onClick ? 'pointer' : undefined,\n fontSize: size * (emoji ? 0.7 : 0.5),\n ...style,\n }}\n {...rest}\n >\n {loading && (\n <Center className={styles.loading} height={'100%'} width={'100%'}>\n <Icon icon={Loader2} spin />\n </Center>\n )}\n {!isDefaultAntAvatar && customAvatar}\n </AntAvatar>\n );\n },\n);\n\nAvatar.displayName = 'Avatar';\n\nexport default Avatar;\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAMA,WAAS,MACZ,EACC,UACA,WACA,QACA,OACA,WACA,eACA,OAAO,IACP,QAAQ,UACR,YACA,OACA,aACA,KACA,UAAU,cACV,QACA,SACA,YAAY,MACZ,2BAA2B,MAC3B,KACA,GAAG,WACC;CACJ,MAAM,iBAAiB,OAAO,WAAW;CAEzC,MAAM,qBAAqB,cAEvB,QACE,WACC;EAAC;EAAK;EAAQ;EAAQ,CAAC,MAAM,UAAU,kBAAkB,OAAO,WAAW,MAAM,CAAC,IACjF,eAAe,OAAO,EACzB,EACH,CAAC,QAAQ,eAAe,CACzB;CAED,MAAM,QAAQ,cACN,UAAU,CAAC,sBAAsB,kBAAkB,SAAS,OAAO,EACzE;EAAC;EAAQ;EAAgB;EAAmB,CAC7C;CAED,MAAM,EAAE,QAAQ,IAAI,UAAU,WAAW;CAEzC,MAAM,WAAW,cAEb,IAAI,OAAO,MAAM;EACf,iBAAiB;GACf,QAAQ;GACR,SAAS;GACV;EAED,UAAU;GACR,SAAS;IACP,QAAQ,OAAO;IACf,UAAU,OAAO;IACjB,YAAY,OAAO;IACpB;GACD,QAAQ;IACN,OAAO;IACP,MAAM,OAAO;IACd;GACF;EAEF,CAAC,EACJ,CAAC,OAAO,CACT;CAED,MAAM,OAAO,OAAO,qBAAqB,Q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
|
3
3
|
|
|
4
4
|
//#region src/Avatar/AvatarGroup/index.d.ts
|
|
5
|
-
declare const AvatarGroup:
|
|
5
|
+
declare const AvatarGroup: react23.NamedExoticComponent<AvatarGroupProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AvatarGroup };
|
|
8
8
|
//# sourceMappingURL=index.d.mts.map
|
package/es/Burger/Burger.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BurgerProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react22 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Burger/Burger.d.ts
|
|
5
|
-
declare const Burger:
|
|
5
|
+
declare const Burger: react22.NamedExoticComponent<BurgerProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Burger };
|
|
8
8
|
//# sourceMappingURL=Burger.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CodeEditorProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react59 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/CodeEditor/CodeEditor.d.ts
|
|
5
|
-
declare const CodeEditor:
|
|
5
|
+
declare const CodeEditor: react59.NamedExoticComponent<CodeEditorProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { CodeEditor };
|
|
8
8
|
//# sourceMappingURL=CodeEditor.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CollapseProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react20 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Collapse/Collapse.d.ts
|
|
5
|
-
declare const Collapse:
|
|
5
|
+
declare const Collapse: react20.NamedExoticComponent<CollapseProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Collapse };
|
|
8
8
|
//# sourceMappingURL=Collapse.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MotionComponentType } from "../MotionProvider/index.mjs";
|
|
2
2
|
import { TranslationResourcesInput } from "../i18n/types.mjs";
|
|
3
3
|
import { CDN, CdnApi } from "../utils/genCdnUrl.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react60 from "react";
|
|
5
5
|
import { ElementType, ReactNode } from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/ConfigProvider/index.d.ts
|
|
@@ -19,7 +19,7 @@ interface ConfigProviderProps {
|
|
|
19
19
|
motion: MotionComponentType;
|
|
20
20
|
resources?: TranslationResourcesInput;
|
|
21
21
|
}
|
|
22
|
-
declare const ConfigProvider:
|
|
22
|
+
declare const ConfigProvider: react60.NamedExoticComponent<ConfigProviderProps>;
|
|
23
23
|
type CdnFn = ({
|
|
24
24
|
pkg,
|
|
25
25
|
version,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CopyButtonProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react21 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/CopyButton/CopyButton.d.ts
|
|
5
|
-
declare const CopyButton:
|
|
5
|
+
declare const CopyButton: react21.NamedExoticComponent<CopyButtonProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { CopyButton };
|
|
8
8
|
//# sourceMappingURL=CopyButton.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DatePickerProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react58 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DatePicker/DatePicker.d.ts
|
|
5
|
-
declare const DatePicker:
|
|
5
|
+
declare const DatePicker: react58.NamedExoticComponent<DatePickerProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DatePicker };
|
|
8
8
|
//# sourceMappingURL=DatePicker.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react17 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggablePanel/components/DraggablePanelBody.d.ts
|
|
5
5
|
type DraggablePanelBodyProps = DivProps;
|
|
6
|
-
declare const DraggablePanelBody:
|
|
6
|
+
declare const DraggablePanelBody: react17.NamedExoticComponent<DivProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { DraggablePanelBody, DraggablePanelBodyProps };
|
|
9
9
|
//# sourceMappingURL=DraggablePanelBody.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react16 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggablePanel/components/DraggablePanelContainer.d.ts
|
|
5
5
|
type DraggablePanelContainerProps = DivProps;
|
|
6
|
-
declare const DraggablePanelContainer:
|
|
6
|
+
declare const DraggablePanelContainer: react16.NamedExoticComponent<DivProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { DraggablePanelContainer, DraggablePanelContainerProps };
|
|
9
9
|
//# sourceMappingURL=DraggablePanelContainer.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react18 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggablePanel/components/DraggablePanelFooter.d.ts
|
|
5
5
|
type DraggablePanelFooterProps = DivProps;
|
|
6
|
-
declare const DraggablePanelFooter:
|
|
6
|
+
declare const DraggablePanelFooter: react18.NamedExoticComponent<DivProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { DraggablePanelFooter, DraggablePanelFooterProps };
|
|
9
9
|
//# sourceMappingURL=DraggablePanelFooter.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DivProps } from "../../types/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react19 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggablePanel/components/DraggablePanelHeader.d.ts
|
|
5
5
|
interface DraggablePanelHeaderProps extends Omit<DivProps, 'children'> {
|
|
@@ -9,7 +9,7 @@ interface DraggablePanelHeaderProps extends Omit<DivProps, 'children'> {
|
|
|
9
9
|
setPin?: (pin: boolean) => void;
|
|
10
10
|
title?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const DraggablePanelHeader:
|
|
12
|
+
declare const DraggablePanelHeader: react19.NamedExoticComponent<DraggablePanelHeaderProps>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { DraggablePanelHeader, DraggablePanelHeaderProps };
|
|
15
15
|
//# sourceMappingURL=DraggablePanelHeader.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DraggableSideNavProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react57 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/DraggableSideNav/DraggableSideNav.d.ts
|
|
5
|
-
declare const DraggableSideNav:
|
|
5
|
+
declare const DraggableSideNav: react57.NamedExoticComponent<DraggableSideNavProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DraggableSideNav };
|
|
8
8
|
//# sourceMappingURL=DraggableSideNav.d.mts.map
|
package/es/Drawer/Drawer.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DrawerProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react14 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Drawer/Drawer.d.ts
|
|
5
|
-
declare const Drawer:
|
|
5
|
+
declare const Drawer: react14.NamedExoticComponent<DrawerProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Drawer };
|
|
8
8
|
//# sourceMappingURL=Drawer.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DropdownProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react15 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Dropdown/Dropdown.d.ts
|
|
5
|
-
declare const Dropdown:
|
|
5
|
+
declare const Dropdown: react15.NamedExoticComponent<DropdownProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Dropdown };
|
|
8
8
|
//# sourceMappingURL=Dropdown.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EditableTextProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react13 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/EditableText/EditableText.d.ts
|
|
5
|
-
declare const EditableText:
|
|
5
|
+
declare const EditableText: react13.NamedExoticComponent<EditableTextProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { EditableText };
|
|
8
8
|
//# sourceMappingURL=EditableText.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EmojiPickerProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react12 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/EmojiPicker/EmojiPicker.d.ts
|
|
5
|
-
declare const EmojiPicker:
|
|
5
|
+
declare const EmojiPicker: react12.NamedExoticComponent<EmojiPickerProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { EmojiPicker };
|
|
8
8
|
//# sourceMappingURL=EmojiPicker.d.mts.map
|
package/es/Flex/FlexBasic.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FlexBasicProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react11 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Flex/FlexBasic.d.ts
|
|
5
|
-
declare const _default:
|
|
5
|
+
declare const _default: react11.NamedExoticComponent<FlexBasicProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default };
|
|
8
8
|
//# sourceMappingURL=FlexBasic.d.mts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react63 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/FontLoader/index.d.ts
|
|
4
4
|
interface FontLoaderProps {
|
|
5
5
|
url: string;
|
|
6
6
|
}
|
|
7
|
-
declare const FontLoader:
|
|
7
|
+
declare const FontLoader: react63.NamedExoticComponent<FontLoaderProps>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { FontLoader, FontLoaderProps };
|
|
10
10
|
//# sourceMappingURL=index.d.mts.map
|
package/es/Footer/Footer.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FooterProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react10 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Footer/Footer.d.ts
|
|
5
|
-
declare const Footer:
|
|
5
|
+
declare const Footer: react10.NamedExoticComponent<FooterProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Footer };
|
|
8
8
|
//# sourceMappingURL=Footer.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormGroupProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react6 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Form/components/FormGroup.d.ts
|
|
5
|
-
declare const FormGroup:
|
|
5
|
+
declare const FormGroup: react6.NamedExoticComponent<FormGroupProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FormGroup };
|
|
8
8
|
//# sourceMappingURL=FormGroup.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormItemProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react8 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Form/components/FormItem.d.ts
|
|
5
|
-
declare const FormItem:
|
|
5
|
+
declare const FormItem: react8.NamedExoticComponent<FormItemProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FormItem };
|
|
8
8
|
//# sourceMappingURL=FormItem.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormSubmitFooterProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react7 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Form/components/FormSubmitFooter.d.ts
|
|
5
|
-
declare const FormSubmitFooter:
|
|
5
|
+
declare const FormSubmitFooter: react7.NamedExoticComponent<FormSubmitFooterProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FormSubmitFooter };
|
|
8
8
|
//# sourceMappingURL=FormSubmitFooter.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormModalProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react9 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/FormModal/FormModal.d.ts
|
|
5
|
-
declare const FormModal:
|
|
5
|
+
declare const FormModal: react9.NamedExoticComponent<FormModalProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { FormModal };
|
|
8
8
|
//# sourceMappingURL=FormModal.d.mts.map
|
|
@@ -31,19 +31,21 @@ const GroupAvatar = ({ className, style, avatars = [], size = 32, grid = 2, corn
|
|
|
31
31
|
cornerShape
|
|
32
32
|
]);
|
|
33
33
|
const calcAvatars = useMemo(() => avatars?.slice(0, calcSize.gridSize * calcSize.gridSize), [avatars, calcSize.gridSize]);
|
|
34
|
+
const variants = useMemo(() => cva(styles.root, {
|
|
35
|
+
defaultVariants: { cornerShape: "squircle" },
|
|
36
|
+
variants: { cornerShape: {
|
|
37
|
+
circle: styles.circle,
|
|
38
|
+
ios: styles.ios,
|
|
39
|
+
sharp: styles.sharp,
|
|
40
|
+
smooth: styles.smooth,
|
|
41
|
+
square: styles.square,
|
|
42
|
+
squircle: styles.squircle
|
|
43
|
+
} }
|
|
44
|
+
}), [styles]);
|
|
45
|
+
const isSingle = calcAvatars?.length === 1;
|
|
34
46
|
return /* @__PURE__ */ jsx(Block_default, {
|
|
35
47
|
align: "center",
|
|
36
|
-
className: cx(
|
|
37
|
-
defaultVariants: { cornerShape: "squircle" },
|
|
38
|
-
variants: { cornerShape: {
|
|
39
|
-
circle: styles.circle,
|
|
40
|
-
ios: styles.ios,
|
|
41
|
-
sharp: styles.sharp,
|
|
42
|
-
smooth: styles.smooth,
|
|
43
|
-
square: styles.square,
|
|
44
|
-
squircle: styles.squircle
|
|
45
|
-
} }
|
|
46
|
-
}), [styles])({ cornerShape }), className),
|
|
48
|
+
className: cx(variants({ cornerShape }), className),
|
|
47
49
|
height: size,
|
|
48
50
|
justify: "center",
|
|
49
51
|
style,
|
|
@@ -58,12 +60,12 @@ const GroupAvatar = ({ className, style, avatars = [], size = 32, grid = 2, corn
|
|
|
58
60
|
if (typeof item === "string") return /* @__PURE__ */ jsx(Avatar_default, {
|
|
59
61
|
avatar: item,
|
|
60
62
|
shape: avatarShape,
|
|
61
|
-
size: calcSize.avatarSize
|
|
63
|
+
size: isSingle ? size * .8 : calcSize.avatarSize
|
|
62
64
|
}, index);
|
|
63
65
|
return /* @__PURE__ */ jsx(Avatar_default, {
|
|
64
66
|
...item,
|
|
65
67
|
shape: avatarShape,
|
|
66
|
-
size: calcSize.avatarSize
|
|
68
|
+
size: isSingle ? size * .8 : calcSize.avatarSize
|
|
67
69
|
}, index);
|
|
68
70
|
})
|
|
69
71
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupAvatar.mjs","names":["GroupAvatar: FC<GroupAvatarProps>","Block","Grid","Avatar"],"sources":["../../src/GroupAvatar/GroupAvatar.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { type FC, useMemo } from 'react';\n\nimport Avatar from '@/Avatar';\nimport Block from '@/Block';\nimport Grid from '@/Grid';\n\nimport { useStyles } from './style';\nimport type { GroupAvatarProps } from './type';\n\nconst GroupAvatar: FC<GroupAvatarProps> = ({\n className,\n style,\n avatars = [],\n size = 32,\n grid = 2,\n cornerShape = 'square',\n avatarShape = 'square',\n ...rest\n}) => {\n const { cx, styles } = useStyles();\n\n const calcSize = useMemo(() => {\n const length = avatars.length;\n const isAutoGrid = grid === 'auto';\n const gridSize = isAutoGrid ? (length > 4 ? 3 : 2) : grid;\n const isCircle = cornerShape === 'circle';\n const avatarSize = Math.floor((size / gridSize) * (isCircle ? 0.65 : 0.75));\n const gapSize = Math.floor((size - avatarSize * gridSize) / (isCircle ? 6 : 4));\n\n return {\n avatarSize,\n gapSize,\n gridSize,\n gridWidth: avatarSize * gridSize + gapSize,\n maxItemWidth: avatarSize - 1,\n };\n }, [avatars, grid, size, cornerShape]);\n\n const calcAvatars = useMemo(\n () => avatars?.slice(0, calcSize.gridSize * calcSize.gridSize),\n [avatars, calcSize.gridSize],\n );\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n cornerShape: 'squircle',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n cornerShape: {\n circle: styles.circle,\n ios: styles.ios,\n sharp: styles.sharp,\n smooth: styles.smooth,\n square: styles.square,\n squircle: styles.squircle,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n return (\n <Block\n align={'center'}\n className={cx(variants({ cornerShape }), className)}\n height={size}\n justify={'center'}\n style={style}\n width={size}\n {...rest}\n >\n <Grid\n gap={calcSize.gapSize}\n maxItemWidth={0}\n rows={calcSize.gridSize}\n width={calcSize.gridWidth}\n >\n {calcAvatars.map((item, index) => {\n if (typeof item === 'string')\n return (\n <Avatar
|
|
1
|
+
{"version":3,"file":"GroupAvatar.mjs","names":["GroupAvatar: FC<GroupAvatarProps>","Block","Grid","Avatar"],"sources":["../../src/GroupAvatar/GroupAvatar.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { type FC, useMemo } from 'react';\n\nimport Avatar from '@/Avatar';\nimport Block from '@/Block';\nimport Grid from '@/Grid';\n\nimport { useStyles } from './style';\nimport type { GroupAvatarProps } from './type';\n\nconst GroupAvatar: FC<GroupAvatarProps> = ({\n className,\n style,\n avatars = [],\n size = 32,\n grid = 2,\n cornerShape = 'square',\n avatarShape = 'square',\n ...rest\n}) => {\n const { cx, styles } = useStyles();\n\n const calcSize = useMemo(() => {\n const length = avatars.length;\n const isAutoGrid = grid === 'auto';\n const gridSize = isAutoGrid ? (length > 4 ? 3 : 2) : grid;\n const isCircle = cornerShape === 'circle';\n const avatarSize = Math.floor((size / gridSize) * (isCircle ? 0.65 : 0.75));\n const gapSize = Math.floor((size - avatarSize * gridSize) / (isCircle ? 6 : 4));\n\n return {\n avatarSize,\n gapSize,\n gridSize,\n gridWidth: avatarSize * gridSize + gapSize,\n maxItemWidth: avatarSize - 1,\n };\n }, [avatars, grid, size, cornerShape]);\n\n const calcAvatars = useMemo(\n () => avatars?.slice(0, calcSize.gridSize * calcSize.gridSize),\n [avatars, calcSize.gridSize],\n );\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n cornerShape: 'squircle',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n cornerShape: {\n circle: styles.circle,\n ios: styles.ios,\n sharp: styles.sharp,\n smooth: styles.smooth,\n square: styles.square,\n squircle: styles.squircle,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const isSingle = calcAvatars?.length === 1;\n\n return (\n <Block\n align={'center'}\n className={cx(variants({ cornerShape }), className)}\n height={size}\n justify={'center'}\n style={style}\n width={size}\n {...rest}\n >\n <Grid\n gap={calcSize.gapSize}\n maxItemWidth={0}\n rows={calcSize.gridSize}\n width={calcSize.gridWidth}\n >\n {calcAvatars.map((item, index) => {\n if (typeof item === 'string')\n return (\n <Avatar\n avatar={item}\n key={index}\n shape={avatarShape}\n size={isSingle ? size * 0.8 : calcSize.avatarSize}\n />\n );\n return (\n <Avatar\n key={index}\n {...item}\n shape={avatarShape}\n size={isSingle ? size * 0.8 : calcSize.avatarSize}\n />\n );\n })}\n </Grid>\n </Block>\n );\n};\n\nexport default GroupAvatar;\n"],"mappings":";;;;;;;;;;;AAYA,MAAMA,eAAqC,EACzC,WACA,OACA,UAAU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GAAI;KACJ,OAAO;KACP,MAAM,WAAW,OAAO,KAAM,SAAS;OAHlC,MAIL;KAEJ;IACG;GACD;;AAIZ,0BAAe"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GuideCardProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react114 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/GuideCard/GuideCard.d.ts
|
|
5
|
-
declare const GuideCard:
|
|
5
|
+
declare const GuideCard: react114.NamedExoticComponent<GuideCardProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { GuideCard };
|
|
8
8
|
//# sourceMappingURL=GuideCard.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HighlighterProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react3 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Highlighter/Highlighter.d.ts
|
|
5
|
-
declare const Highlighter:
|
|
5
|
+
declare const Highlighter: react3.NamedExoticComponent<HighlighterProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Highlighter };
|
|
8
8
|
//# sourceMappingURL=Highlighter.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SyntaxHighlighterProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react4 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Highlighter/SyntaxHighlighter/index.d.ts
|
|
5
|
-
declare const SyntaxHighlighter:
|
|
5
|
+
declare const SyntaxHighlighter: react4.NamedExoticComponent<SyntaxHighlighterProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SyntaxHighlighter };
|
|
8
8
|
//# sourceMappingURL=index.d.mts.map
|
package/es/Hotkey/Hotkey.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HotkeyProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react26 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Hotkey/Hotkey.d.ts
|
|
5
|
-
declare const Hotkey:
|
|
5
|
+
declare const Hotkey: react26.NamedExoticComponent<HotkeyProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Hotkey };
|
|
8
8
|
//# sourceMappingURL=Hotkey.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HotkeyInputProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react66 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/HotkeyInput/HotkeyInput.d.ts
|
|
5
|
-
declare const HotkeyInput:
|
|
5
|
+
declare const HotkeyInput: react66.NamedExoticComponent<HotkeyInputProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { HotkeyInput };
|
|
8
8
|
//# sourceMappingURL=HotkeyInput.d.mts.map
|
package/es/Icon/Icon.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IconProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react1 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Icon/Icon.d.ts
|
|
5
|
-
declare const Icon:
|
|
5
|
+
declare const Icon: react1.NamedExoticComponent<IconProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Icon };
|
|
8
8
|
//# sourceMappingURL=Icon.d.mts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IconProps } from "../type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react0 from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/Icon/components/IconProvider.d.ts
|
|
6
6
|
type IconContentConfig = Omit<IconProps, 'icon' | 'ref'>;
|
|
7
|
-
declare const IconContext:
|
|
8
|
-
declare const IconProvider:
|
|
7
|
+
declare const IconContext: react0.Context<IconContentConfig>;
|
|
8
|
+
declare const IconProvider: react0.NamedExoticComponent<{
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
config?: IconContentConfig;
|
|
11
11
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PreviewGroupProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react2 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Image/PreviewGroup.d.ts
|
|
5
|
-
declare const PreviewGroup:
|
|
5
|
+
declare const PreviewGroup: react2.NamedExoticComponent<PreviewGroupProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { PreviewGroup };
|
|
8
8
|
//# sourceMappingURL=PreviewGroup.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ImageSelectProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react104 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/ImageSelect/ImageSelect.d.ts
|
|
5
|
-
declare const ImageSelect:
|
|
5
|
+
declare const ImageSelect: react104.NamedExoticComponent<ImageSelectProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ImageSelect };
|
|
8
8
|
//# sourceMappingURL=ImageSelect.d.mts.map
|
package/es/Input/Input.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react115 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/Input.d.ts
|
|
5
|
-
declare const Input:
|
|
5
|
+
declare const Input: react115.NamedExoticComponent<InputProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Input };
|
|
8
8
|
//# sourceMappingURL=Input.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputNumberProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react116 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/InputNumber.d.ts
|
|
5
|
-
declare const InputNumber:
|
|
5
|
+
declare const InputNumber: react116.NamedExoticComponent<InputNumberProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { InputNumber };
|
|
8
8
|
//# sourceMappingURL=InputNumber.d.mts.map
|
package/es/Input/InputOPT.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputOPTProps } from "./type.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react117 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/Input/InputOPT.d.ts
|
|
5
|
-
declare const InputOPT:
|
|
5
|
+
declare const InputOPT: react117.NamedExoticComponent<InputOPTProps>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { InputOPT };
|
|
8
8
|
//# sourceMappingURL=InputOPT.d.mts.map
|