@lobehub/ui 4.1.1 → 4.1.3

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.
Files changed (155) hide show
  1. package/es/Accordion/Accordion.d.mts +2 -2
  2. package/es/Accordion/AccordionItem.d.mts +2 -2
  3. package/es/ActionIcon/ActionIcon.d.mts +2 -2
  4. package/es/ActionIcon/components/utils.mjs +1 -1
  5. package/es/ActionIcon/components/utils.mjs.map +1 -1
  6. package/es/Alert/Alert.d.mts +2 -2
  7. package/es/Alert/Alert.mjs +1 -1
  8. package/es/Alert/Alert.mjs.map +1 -1
  9. package/es/AutoComplete/Select.d.mts +2 -2
  10. package/es/Avatar/AvatarGroup/index.d.mts +2 -2
  11. package/es/Burger/Burger.d.mts +2 -2
  12. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  13. package/es/Collapse/Collapse.d.mts +2 -2
  14. package/es/ConfigProvider/index.d.mts +2 -2
  15. package/es/CopyButton/CopyButton.d.mts +2 -2
  16. package/es/DatePicker/DatePicker.d.mts +2 -2
  17. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  18. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  19. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  20. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  21. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  22. package/es/Drawer/Drawer.d.mts +2 -2
  23. package/es/Dropdown/Dropdown.d.mts +2 -2
  24. package/es/EditableText/EditableText.d.mts +2 -2
  25. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  26. package/es/Flex/FlexBasic.d.mts +2 -2
  27. package/es/FontLoader/index.d.mts +2 -2
  28. package/es/Footer/Footer.d.mts +2 -2
  29. package/es/Form/Form.mjs +1 -1
  30. package/es/Form/Form.mjs.map +1 -1
  31. package/es/Form/components/FormGroup.d.mts +2 -2
  32. package/es/Form/components/FormGroup.mjs +1 -1
  33. package/es/Form/components/FormGroup.mjs.map +1 -1
  34. package/es/Form/components/FormItem.d.mts +2 -2
  35. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  36. package/es/Form/components/merge.mjs +1 -1
  37. package/es/Form/components/merge.mjs.map +1 -1
  38. package/es/Form/style.mjs +6 -6
  39. package/es/Form/style.mjs.map +1 -1
  40. package/es/FormModal/FormModal.d.mts +2 -2
  41. package/es/Grid/style.mjs +1 -1
  42. package/es/Grid/style.mjs.map +1 -1
  43. package/es/GuideCard/GuideCard.d.mts +2 -2
  44. package/es/Header/Header.d.mts +2 -2
  45. package/es/Highlighter/Highlighter.d.mts +2 -2
  46. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  47. package/es/Hotkey/Hotkey.d.mts +2 -2
  48. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  49. package/es/HotkeyInput/HotkeyInput.mjs +1 -1
  50. package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
  51. package/es/Icon/Icon.d.mts +2 -2
  52. package/es/Icon/components/IconProvider.d.mts +3 -3
  53. package/es/Icon/components/utils.mjs +1 -1
  54. package/es/Icon/components/utils.mjs.map +1 -1
  55. package/es/Image/PreviewGroup.d.mts +2 -2
  56. package/es/ImageSelect/ImageSelect.d.mts +2 -2
  57. package/es/Input/Input.d.mts +2 -2
  58. package/es/Input/InputNumber.d.mts +2 -2
  59. package/es/Input/InputOPT.d.mts +2 -2
  60. package/es/Input/InputPassword.d.mts +2 -2
  61. package/es/Input/TextArea.d.mts +2 -2
  62. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  63. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  64. package/es/Layout/components/LayoutMain.d.mts +2 -2
  65. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  66. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  67. package/es/Layout/components/LayoutToc.d.mts +2 -2
  68. package/es/List/ListItem/index.d.mts +2 -2
  69. package/es/Markdown/Markdown.d.mts +2 -2
  70. package/es/Markdown/Typography.d.mts +2 -2
  71. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  72. package/es/Markdown/plugins/remarkVideo.mjs +0 -3
  73. package/es/Markdown/plugins/remarkVideo.mjs.map +1 -1
  74. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  75. package/es/Menu/Menu.d.mts +2 -2
  76. package/es/Mermaid/Mermaid.d.mts +2 -2
  77. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  78. package/es/Mermaid/SyntaxMermaid/index.mjs +1 -1
  79. package/es/Mermaid/SyntaxMermaid/index.mjs.map +1 -1
  80. package/es/Modal/Modal.d.mts +2 -2
  81. package/es/MotionProvider/index.d.mts +2 -2
  82. package/es/SearchBar/SearchBar.d.mts +2 -2
  83. package/es/Segmented/Segmented.d.mts +2 -2
  84. package/es/Select/Select.d.mts +2 -2
  85. package/es/SideNav/SideNav.d.mts +2 -2
  86. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  87. package/es/SliderWithInput/SliderWithInput.mjs +1 -1
  88. package/es/SliderWithInput/SliderWithInput.mjs.map +1 -1
  89. package/es/SortableList/components/DragHandle.d.mts +2 -2
  90. package/es/SortableList/components/SortableItem.d.mts +2 -2
  91. package/es/Tag/utils.mjs +1 -1
  92. package/es/Tag/utils.mjs.map +1 -1
  93. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  94. package/es/ThemeProvider/ThemeProvider.mjs +1 -1
  95. package/es/ThemeProvider/ThemeProvider.mjs.map +1 -1
  96. package/es/Toc/Toc.d.mts +2 -2
  97. package/es/Video/index.d.mts +2 -2
  98. package/es/_virtual/rolldown_runtime.mjs +2 -2
  99. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +2 -2
  100. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +2 -2
  101. package/es/awesome/Features/Features.d.mts +2 -2
  102. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  103. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  104. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  105. package/es/awesome/GridBackground/GridBackground.mjs +1 -1
  106. package/es/awesome/GridBackground/GridBackground.mjs.map +1 -1
  107. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  108. package/es/awesome/GridBackground/components/Grid.mjs +1 -1
  109. package/es/awesome/GridBackground/components/Grid.mjs.map +1 -1
  110. package/es/awesome/Hero/Hero.d.mts +2 -2
  111. package/es/awesome/Spline/ParentSize.mjs +1 -1
  112. package/es/awesome/Spline/ParentSize.mjs.map +1 -1
  113. package/es/awesome/Spotlight/Spotlight.d.mts +2 -2
  114. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +2 -2
  115. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  116. package/es/brand/LobeChat/index.d.mts +2 -2
  117. package/es/brand/LobeHub/index.d.mts +2 -2
  118. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  119. package/es/brand/LogoThree/index.d.mts +2 -2
  120. package/es/chat/BackBottom/BackBottom.d.mts +2 -2
  121. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +2 -2
  122. package/es/chat/ChatItem/ChatItem.d.mts +2 -2
  123. package/es/chat/ChatList/ChatList.d.mts +2 -2
  124. package/es/chat/EditableMessage/EditableMessage.d.mts +2 -2
  125. package/es/chat/EditableMessageList/EditableMessageList.d.mts +2 -2
  126. package/es/chat/MessageInput/MessageInput.d.mts +2 -2
  127. package/es/chat/MessageModal/MessageModal.d.mts +2 -2
  128. package/es/color/ColorScales/index.d.mts +2 -2
  129. package/es/hooks/useMarkdown/latex.mjs +1 -1
  130. package/es/hooks/useMarkdown/latex.mjs.map +1 -1
  131. package/es/i18n/context.d.mts +2 -2
  132. package/es/i18n/resources/en/index.mjs +2 -2
  133. package/es/i18n/resources/zhCn/index.mjs +2 -2
  134. package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
  135. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  136. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  137. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  138. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  139. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  140. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +3 -3
  141. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +3 -3
  142. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +3 -3
  143. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  144. package/es/mdx/Mdx/index.d.mts +2 -2
  145. package/es/mdx/mdxComponents/Citation/index.mjs +1 -1
  146. package/es/mdx/mdxComponents/Citation/index.mjs.map +1 -1
  147. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +2 -2
  148. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +2 -2
  149. package/es/mobile/TabBar/TabBar.d.mts +2 -2
  150. package/es/storybook/StoryBook/index.d.mts +2 -2
  151. package/es/styles/theme/customToken.mjs +1 -1
  152. package/es/styles/theme/customToken.mjs.map +1 -1
  153. package/es/styles/theme/generateColorPalette.mjs +1 -1
  154. package/es/styles/theme/generateColorPalette.mjs.map +1 -1
  155. package/package.json +5 -5
@@ -1,8 +1,8 @@
1
1
  import { AccordionProps } from "./type.mjs";
2
- import * as react63 from "react";
2
+ import * as react3 from "react";
3
3
 
4
4
  //#region src/Accordion/Accordion.d.ts
5
- declare const Accordion: react63.NamedExoticComponent<AccordionProps & react63.RefAttributes<HTMLDivElement>>;
5
+ declare const Accordion: react3.NamedExoticComponent<AccordionProps & react3.RefAttributes<HTMLDivElement>>;
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 react62 from "react";
2
+ import * as react5 from "react";
3
3
 
4
4
  //#region src/Accordion/AccordionItem.d.ts
5
- declare const AccordionItem: react62.NamedExoticComponent<AccordionItemProps>;
5
+ declare const AccordionItem: react5.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 react38 from "react";
2
+ import * as react33 from "react";
3
3
 
4
4
  //#region src/ActionIcon/ActionIcon.d.ts
5
- declare const ActionIcon: react38.NamedExoticComponent<ActionIconProps>;
5
+ declare const ActionIcon: react33.NamedExoticComponent<ActionIconProps>;
6
6
  //#endregion
7
7
  export { ActionIcon };
8
8
  //# sourceMappingURL=ActionIcon.d.mts.map
@@ -1,4 +1,4 @@
1
- import { isNumber } from "lodash-es";
1
+ import { isNumber } from "es-toolkit/compat";
2
2
 
3
3
  //#region src/ActionIcon/components/utils.ts
4
4
  const calcSize = (iconSize) => {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","names":["blockSize: number | string","borderRadius: number | string","blockSize"],"sources":["../../../src/ActionIcon/components/utils.ts"],"sourcesContent":["import { isNumber } from 'lodash-es';\n\nimport type { ActionIconSize } from '@/ActionIcon';\n\nexport const calcSize = (iconSize?: ActionIconSize) => {\n let blockSize: number | string;\n let borderRadius: number | string;\n\n if (isNumber(iconSize)) {\n const blockSize = iconSize * 1.8;\n return {\n blockSize,\n borderRadius: Math.floor(blockSize / 6),\n };\n }\n\n switch (iconSize) {\n case 'large': {\n blockSize = 44;\n borderRadius = 8;\n break;\n }\n case 'middle': {\n blockSize = 36;\n borderRadius = 6;\n break;\n }\n case 'small': {\n blockSize = 24;\n borderRadius = 4;\n break;\n }\n default: {\n if (iconSize) {\n blockSize = iconSize?.blockSize || 36;\n borderRadius = iconSize?.borderRadius || 6;\n } else {\n blockSize = '1.8em';\n borderRadius = '0.3em';\n }\n\n break;\n }\n }\n\n return {\n blockSize,\n borderRadius,\n };\n};\n"],"mappings":";;;AAIA,MAAa,YAAY,aAA8B;CACrD,IAAIA;CACJ,IAAIC;AAEJ,KAAI,SAAS,SAAS,EAAE;EACtB,MAAMC,cAAY,WAAW;AAC7B,SAAO;GACL;GACA,cAAc,KAAK,MAAMA,cAAY,EAAE;GACxC;;AAGH,SAAQ,UAAR;EACE,KAAK;AACH,eAAY;AACZ,kBAAe;AACf;EAEF,KAAK;AACH,eAAY;AACZ,kBAAe;AACf;EAEF,KAAK;AACH,eAAY;AACZ,kBAAe;AACf;EAEF;AACE,OAAI,UAAU;AACZ,gBAAY,UAAU,aAAa;AACnC,mBAAe,UAAU,gBAAgB;UACpC;AACL,gBAAY;AACZ,mBAAe;;AAGjB;;AAIJ,QAAO;EACL;EACA;EACD"}
1
+ {"version":3,"file":"utils.mjs","names":["blockSize: number | string","borderRadius: number | string","blockSize"],"sources":["../../../src/ActionIcon/components/utils.ts"],"sourcesContent":["import { isNumber } from 'es-toolkit/compat';\n\nimport type { ActionIconSize } from '@/ActionIcon';\n\nexport const calcSize = (iconSize?: ActionIconSize) => {\n let blockSize: number | string;\n let borderRadius: number | string;\n\n if (isNumber(iconSize)) {\n const blockSize = iconSize * 1.8;\n return {\n blockSize,\n borderRadius: Math.floor(blockSize / 6),\n };\n }\n\n switch (iconSize) {\n case 'large': {\n blockSize = 44;\n borderRadius = 8;\n break;\n }\n case 'middle': {\n blockSize = 36;\n borderRadius = 6;\n break;\n }\n case 'small': {\n blockSize = 24;\n borderRadius = 4;\n break;\n }\n default: {\n if (iconSize) {\n blockSize = iconSize?.blockSize || 36;\n borderRadius = iconSize?.borderRadius || 6;\n } else {\n blockSize = '1.8em';\n borderRadius = '0.3em';\n }\n\n break;\n }\n }\n\n return {\n blockSize,\n borderRadius,\n };\n};\n"],"mappings":";;;AAIA,MAAa,YAAY,aAA8B;CACrD,IAAIA;CACJ,IAAIC;AAEJ,KAAI,SAAS,SAAS,EAAE;EACtB,MAAMC,cAAY,WAAW;AAC7B,SAAO;GACL;GACA,cAAc,KAAK,MAAMA,cAAY,EAAE;GACxC;;AAGH,SAAQ,UAAR;EACE,KAAK;AACH,eAAY;AACZ,kBAAe;AACf;EAEF,KAAK;AACH,eAAY;AACZ,kBAAe;AACf;EAEF,KAAK;AACH,eAAY;AACZ,kBAAe;AACf;EAEF;AACE,OAAI,UAAU;AACZ,gBAAY,UAAU,aAAa;AACnC,mBAAe,UAAU,gBAAgB;UACpC;AACL,gBAAY;AACZ,mBAAe;;AAGjB;;AAIJ,QAAO;EACL;EACA;EACD"}
@@ -1,8 +1,8 @@
1
1
  import { AlertProps } from "./type.mjs";
2
- import * as react67 from "react";
2
+ import * as react2 from "react";
3
3
 
4
4
  //#region src/Alert/Alert.d.ts
5
- declare const Alert: react67.NamedExoticComponent<AlertProps>;
5
+ declare const Alert: react2.NamedExoticComponent<AlertProps>;
6
6
  //#endregion
7
7
  export { Alert };
8
8
  //# sourceMappingURL=Alert.d.mts.map
@@ -11,7 +11,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import { Alert } from "antd";
12
12
  import { cva } from "class-variance-authority";
13
13
  import { AlertTriangle, CheckCircle, Info, X, XCircle } from "lucide-react";
14
- import { camelCase } from "lodash-es";
14
+ import { camelCase } from "es-toolkit/compat";
15
15
 
16
16
  //#region src/Alert/Alert.tsx
17
17
  const typeIcons = {
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.mjs","names":["Alert","AntdAlert","ActionIcon","Icon","Flexbox","Accordion","AccordionItem"],"sources":["../../src/Alert/Alert.tsx"],"sourcesContent":["'use client';\n\nimport { Alert as AntdAlert } from 'antd';\nimport { cva } from 'class-variance-authority';\nimport { camelCase } from 'lodash-es';\nimport { AlertTriangle, CheckCircle, Info, X, XCircle } from 'lucide-react';\nimport { memo, useMemo } from 'react';\n\nimport { Accordion, AccordionItem } from '@/Accordion';\nimport ActionIcon from '@/ActionIcon';\nimport { Flexbox } from '@/Flex';\nimport Icon from '@/Icon';\n\nimport { useStyles } from './style';\nimport type { AlertProps } from './type';\n\nconst typeIcons = {\n error: XCircle,\n info: Info,\n secondary: AlertTriangle,\n success: CheckCircle,\n warning: AlertTriangle,\n};\n\nconst colors = (theme: any, type: string = 'info', ...keys: string[]) => {\n if (type === 'secondary') return theme[camelCase(['color', ...keys].join('-'))] as string;\n return theme[camelCase(['color', type, ...keys].join('-'))] as string;\n};\n\nconst Alert = memo<AlertProps>(\n ({\n closable = false,\n description,\n showIcon = true,\n type = 'info',\n glass,\n icon,\n colorfulText = true,\n iconProps,\n style,\n extra,\n classNames,\n styles: customStyles,\n text,\n extraDefaultExpand = false,\n extraIsolate,\n banner,\n variant = 'filled',\n ref,\n ...rest\n }) => {\n const { theme, styles, cx } = useStyles({\n closable: !!closable,\n hasTitle: !!description,\n showIcon: !!showIcon,\n });\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n colorfulText: true,\n glass: false,\n variant: 'filled',\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 glass: {\n false: null,\n true: styles.glass,\n },\n colorfulText: {\n false: null,\n true: styles.colorfulText,\n },\n hasExtra: {\n false: null,\n true: styles.hasExtra,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const extraVariants = useMemo(\n () =>\n cva(styles.extra, {\n defaultVariants: {\n variant: 'filled',\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 banner: {\n false: null,\n true: styles.banner,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const extraHeaderVariants = useMemo(\n () =>\n cva(styles.extraHeader, {\n defaultVariants: {\n variant: 'filled',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: null,\n outlined: null,\n borderless: styles.borderlessExtraHeader,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const isInsideExtra = Boolean(!extraIsolate && !!extra);\n\n const alert = (\n <AntdAlert\n banner={banner}\n className={cx(\n variants({\n colorfulText,\n glass,\n hasExtra: isInsideExtra,\n variant,\n }),\n classNames?.alert,\n )}\n closable={\n typeof closable === 'boolean'\n ? closable\n : {\n closeIcon: <ActionIcon color={colors(theme, type)} icon={X} size={'small'} />,\n ...closable,\n }\n }\n description={description}\n icon={\n <Icon\n color={type === 'secondary' ? theme.colorTextSecondary : undefined}\n icon={typeIcons[type] || icon}\n size={description ? 24 : 18}\n {...iconProps}\n />\n }\n ref={ref}\n showIcon={showIcon}\n style={{\n background: colors(theme, type, 'fillTertiary'),\n borderColor: colors(theme, type, 'fillSecondary'),\n color: colorfulText ? colors(theme, type) : undefined,\n ...style,\n ...customStyles?.alert,\n }}\n type={type === 'secondary' ? 'info' : type}\n {...rest}\n />\n );\n\n if (!extra) return alert;\n\n if (extraIsolate)\n return (\n <Flexbox className={classNames?.container} gap={8}>\n {alert}\n {extra}\n </Flexbox>\n );\n\n return (\n <Flexbox className={classNames?.container} style={customStyles?.container}>\n {alert}\n <Flexbox\n className={extraVariants({ banner, variant })}\n style={{\n background: colors(theme, type, 'fillTertiary'),\n borderColor: colors(theme, type, 'fillSecondary'),\n color: colors(theme, type),\n fontSize: description ? 14 : 12,\n }}\n >\n <Accordion defaultExpandedKeys={extraDefaultExpand ? ['extra'] : []}>\n <AccordionItem\n classNames={{\n content: classNames?.extraContent,\n header: extraHeaderVariants({ variant }),\n }}\n itemKey={'extra'}\n styles={{\n content: {\n fontSize: 12,\n ...customStyles?.extraContent,\n },\n header: {\n borderColor: colors(theme, type, 'fillSecondary'),\n },\n indicator: {\n color: colors(theme, type),\n },\n title: {\n color: colors(theme, type),\n fontSize: 12,\n },\n }}\n title={text?.detail || 'Show Details'}\n >\n {extra}\n </AccordionItem>\n </Accordion>\n </Flexbox>\n </Flexbox>\n );\n },\n);\n\nAlert.displayName = 'Alert';\n\nexport default Alert;\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,YAAY;CAChB,OAAO;CACP,MAAM;CACN,WAAW;CACX,SAAS;CACT,SAAS;CACV;AAED,MAAM,UAAU,OAAY,OAAe,QAAQ,GAAG,SAAmB;AACvE,KAAI,SAAS,YAAa,QAAO,MAAM,UAAU,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK,IAAI,CAAC;AAC9E,QAAO,MAAM,UAAU;EAAC;EAAS;EAAM,GAAG;EAAK,CAAC,KAAK,IAAI,CAAC;;AAG5D,MAAMA,UAAQ,MACX,EACC,WAAW,OACX,aACA,WAAW,MACX,OAAO,QACP,OACA,MACA,eAAe,MACf,WACA,OACA,OACA,YACA,QAAQ,cACR,MACA,qBAAqB,OACrB,cACA,QACA,UAAU,UACV,KACA,GAAG,WACC;CACJ,MAAM,EAAE,OAAO,QAAQ,OAAO,UAAU;EACtC,UAAU,CAAC,CAAC;EACZ,UAAU,CAAC,CAAC;EACZ,UAAU,CAAC,CAAC;EACb,CAAC;CAEF,MAAM,WAAW,cAEb,IAAI,OAAO,MAAM;EACf,iBAAiB;GACf,cAAc;GACd,OAAO;GACP,SAAS;GACV;EAED,UAAU;GACR,SAAS;IACP,QAAQ,OAAO;IACf,UAAU,OAAO;IACjB,YAAY,OAAO;IACpB;GACD,OAAO;IACL,OAAO;IACP,MAAM,OAAO;IACd;GACD,cAAc;IACZ,OAAO;IACP,MAAM,OAAO;IACd;GACD,UAAU;IACR,OAAO;IACP,MAAM,OAAO;IACd;GACF;EAEF,CAAC,EACJ,CAAC,OAAO,CACT;CAED,MAAM,gBAAgB,cAElB,IAAI,OAAO,OAAO;EAChB,iBAAiB,EACf,SAAS,UACV;EAED,UAAU;GACR,SAAS;IACP,QAAQ,OAAO;IACf,UAAU,OAAO;IACjB,YAAY,OAAO;IACpB;GACD,QAAQ;IACN,OAAO;IACP,MAAM,OAAO;IACd;GACF;EAEF,CAA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AAqB,CAAC,QAAQ,GAAG,EAAE;cACjE,oBAACC;KACC,YAAY;MACV,SAAS,YAAY;MACrB,QAAQ,oBAAoB,EAAE,SAAS,CAAC;MACzC;KACD,SAAS;KACT,QAAQ;MACN,SAAS;OACP,UAAU;OACV,GAAG,cAAc;OAClB;MACD,QAAQ,EACN,aAAa,OAAO,OAAO,MAAM,gBAAgB,EAClD;MACD,WAAW,EACT,OAAO,OAAO,OAAO,KAAK,EAC3B;MACD,OAAO;OACL,OAAO,OAAO,OAAO,KAAK;OAC1B,UAAU;OACX;MACF;KACD,OAAO,MAAM,UAAU;eAEtB;MACa;KACN;IACJ;GACF;EAGf;AAED,QAAM,cAAc;AAEpB,oBAAeN"}
1
+ {"version":3,"file":"Alert.mjs","names":["Alert","AntdAlert","ActionIcon","Icon","Flexbox","Accordion","AccordionItem"],"sources":["../../src/Alert/Alert.tsx"],"sourcesContent":["'use client';\n\nimport { Alert as AntdAlert } from 'antd';\nimport { cva } from 'class-variance-authority';\nimport { camelCase } from 'es-toolkit/compat';\nimport { AlertTriangle, CheckCircle, Info, X, XCircle } from 'lucide-react';\nimport { memo, useMemo } from 'react';\n\nimport { Accordion, AccordionItem } from '@/Accordion';\nimport ActionIcon from '@/ActionIcon';\nimport { Flexbox } from '@/Flex';\nimport Icon from '@/Icon';\n\nimport { useStyles } from './style';\nimport type { AlertProps } from './type';\n\nconst typeIcons = {\n error: XCircle,\n info: Info,\n secondary: AlertTriangle,\n success: CheckCircle,\n warning: AlertTriangle,\n};\n\nconst colors = (theme: any, type: string = 'info', ...keys: string[]) => {\n if (type === 'secondary') return theme[camelCase(['color', ...keys].join('-'))] as string;\n return theme[camelCase(['color', type, ...keys].join('-'))] as string;\n};\n\nconst Alert = memo<AlertProps>(\n ({\n closable = false,\n description,\n showIcon = true,\n type = 'info',\n glass,\n icon,\n colorfulText = true,\n iconProps,\n style,\n extra,\n classNames,\n styles: customStyles,\n text,\n extraDefaultExpand = false,\n extraIsolate,\n banner,\n variant = 'filled',\n ref,\n ...rest\n }) => {\n const { theme, styles, cx } = useStyles({\n closable: !!closable,\n hasTitle: !!description,\n showIcon: !!showIcon,\n });\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n colorfulText: true,\n glass: false,\n variant: 'filled',\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 glass: {\n false: null,\n true: styles.glass,\n },\n colorfulText: {\n false: null,\n true: styles.colorfulText,\n },\n hasExtra: {\n false: null,\n true: styles.hasExtra,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const extraVariants = useMemo(\n () =>\n cva(styles.extra, {\n defaultVariants: {\n variant: 'filled',\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 banner: {\n false: null,\n true: styles.banner,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const extraHeaderVariants = useMemo(\n () =>\n cva(styles.extraHeader, {\n defaultVariants: {\n variant: 'filled',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: null,\n outlined: null,\n borderless: styles.borderlessExtraHeader,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const isInsideExtra = Boolean(!extraIsolate && !!extra);\n\n const alert = (\n <AntdAlert\n banner={banner}\n className={cx(\n variants({\n colorfulText,\n glass,\n hasExtra: isInsideExtra,\n variant,\n }),\n classNames?.alert,\n )}\n closable={\n typeof closable === 'boolean'\n ? closable\n : {\n closeIcon: <ActionIcon color={colors(theme, type)} icon={X} size={'small'} />,\n ...closable,\n }\n }\n description={description}\n icon={\n <Icon\n color={type === 'secondary' ? theme.colorTextSecondary : undefined}\n icon={typeIcons[type] || icon}\n size={description ? 24 : 18}\n {...iconProps}\n />\n }\n ref={ref}\n showIcon={showIcon}\n style={{\n background: colors(theme, type, 'fillTertiary'),\n borderColor: colors(theme, type, 'fillSecondary'),\n color: colorfulText ? colors(theme, type) : undefined,\n ...style,\n ...customStyles?.alert,\n }}\n type={type === 'secondary' ? 'info' : type}\n {...rest}\n />\n );\n\n if (!extra) return alert;\n\n if (extraIsolate)\n return (\n <Flexbox className={classNames?.container} gap={8}>\n {alert}\n {extra}\n </Flexbox>\n );\n\n return (\n <Flexbox className={classNames?.container} style={customStyles?.container}>\n {alert}\n <Flexbox\n className={extraVariants({ banner, variant })}\n style={{\n background: colors(theme, type, 'fillTertiary'),\n borderColor: colors(theme, type, 'fillSecondary'),\n color: colors(theme, type),\n fontSize: description ? 14 : 12,\n }}\n >\n <Accordion defaultExpandedKeys={extraDefaultExpand ? ['extra'] : []}>\n <AccordionItem\n classNames={{\n content: classNames?.extraContent,\n header: extraHeaderVariants({ variant }),\n }}\n itemKey={'extra'}\n styles={{\n content: {\n fontSize: 12,\n ...customStyles?.extraContent,\n },\n header: {\n borderColor: colors(theme, type, 'fillSecondary'),\n },\n indicator: {\n color: colors(theme, type),\n },\n title: {\n color: colors(theme, type),\n fontSize: 12,\n },\n }}\n title={text?.detail || 'Show Details'}\n >\n {extra}\n </AccordionItem>\n </Accordion>\n </Flexbox>\n </Flexbox>\n );\n },\n);\n\nAlert.displayName = 'Alert';\n\nexport default Alert;\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,YAAY;CAChB,OAAO;CACP,MAAM;CACN,WAAW;CACX,SAAS;CACT,SAAS;CACV;AAED,MAAM,UAAU,OAAY,OAAe,QAAQ,GAAG,SAAmB;AACvE,KAAI,SAAS,YAAa,QAAO,MAAM,UAAU,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK,IAAI,CAAC;AAC9E,QAAO,MAAM,UAAU;EAAC;EAAS;EAAM,GAAG;EAAK,CAAC,KAAK,IAAI,CAAC;;AAG5D,MAAMA,U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;IACJ;GACF;EAGf;AAED,QAAM,cAAc;AAEpB,oBAAeN"}
@@ -1,8 +1,8 @@
1
1
  import { AutoCompleteProps } from "./type.mjs";
2
- import * as react53 from "react";
2
+ import * as react0 from "react";
3
3
 
4
4
  //#region src/AutoComplete/Select.d.ts
5
- declare const AutoComplete: react53.NamedExoticComponent<AutoCompleteProps>;
5
+ declare const AutoComplete: react0.NamedExoticComponent<AutoCompleteProps>;
6
6
  //#endregion
7
7
  export { AutoComplete };
8
8
  //# sourceMappingURL=Select.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { AvatarGroupProps } from "../type.mjs";
2
- import * as react52 from "react";
2
+ import * as react0 from "react";
3
3
 
4
4
  //#region src/Avatar/AvatarGroup/index.d.ts
5
- declare const AvatarGroup: react52.NamedExoticComponent<AvatarGroupProps>;
5
+ declare const AvatarGroup: react0.NamedExoticComponent<AvatarGroupProps>;
6
6
  //#endregion
7
7
  export { AvatarGroup };
8
8
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { BurgerProps } from "./type.mjs";
2
- import * as react51 from "react";
2
+ import * as react1 from "react";
3
3
 
4
4
  //#region src/Burger/Burger.d.ts
5
- declare const Burger: react51.NamedExoticComponent<BurgerProps>;
5
+ declare const Burger: react1.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 react50 from "react";
2
+ import * as react62 from "react";
3
3
 
4
4
  //#region src/CodeEditor/CodeEditor.d.ts
5
- declare const CodeEditor: react50.NamedExoticComponent<CodeEditorProps>;
5
+ declare const CodeEditor: react62.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 react49 from "react";
2
+ import * as react63 from "react";
3
3
 
4
4
  //#region src/Collapse/Collapse.d.ts
5
- declare const Collapse: react49.NamedExoticComponent<CollapseProps>;
5
+ declare const Collapse: react63.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 react55 from "react";
4
+ import * as react64 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: react55.NamedExoticComponent<ConfigProviderProps>;
22
+ declare const ConfigProvider: react64.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 react48 from "react";
2
+ import * as react59 from "react";
3
3
 
4
4
  //#region src/CopyButton/CopyButton.d.ts
5
- declare const CopyButton: react48.NamedExoticComponent<CopyButtonProps>;
5
+ declare const CopyButton: react59.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 react47 from "react";
2
+ import * as react61 from "react";
3
3
 
4
4
  //#region src/DatePicker/DatePicker.d.ts
5
- declare const DatePicker: react47.NamedExoticComponent<DatePickerProps>;
5
+ declare const DatePicker: react61.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 react43 from "react";
2
+ import * as react55 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelBody.d.ts
5
5
  type DraggablePanelBodyProps = DivProps;
6
- declare const DraggablePanelBody: react43.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelBody: react55.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 react44 from "react";
2
+ import * as react56 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelContainer.d.ts
5
5
  type DraggablePanelContainerProps = DivProps;
6
- declare const DraggablePanelContainer: react44.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelContainer: react56.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 react45 from "react";
2
+ import * as react57 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelFooter.d.ts
5
5
  type DraggablePanelFooterProps = DivProps;
6
- declare const DraggablePanelFooter: react45.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelFooter: react57.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 react46 from "react";
2
+ import * as react58 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: react46.NamedExoticComponent<DraggablePanelHeaderProps>;
12
+ declare const DraggablePanelHeader: react58.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 react42 from "react";
2
+ import * as react60 from "react";
3
3
 
4
4
  //#region src/DraggableSideNav/DraggableSideNav.d.ts
5
- declare const DraggableSideNav: react42.NamedExoticComponent<DraggableSideNavProps>;
5
+ declare const DraggableSideNav: react60.NamedExoticComponent<DraggableSideNavProps>;
6
6
  //#endregion
7
7
  export { DraggableSideNav };
8
8
  //# sourceMappingURL=DraggableSideNav.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { DrawerProps } from "./type.mjs";
2
- import * as react54 from "react";
2
+ import * as react52 from "react";
3
3
 
4
4
  //#region src/Drawer/Drawer.d.ts
5
- declare const Drawer: react54.NamedExoticComponent<DrawerProps>;
5
+ declare const Drawer: react52.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 react65 from "react";
2
+ import * as react53 from "react";
3
3
 
4
4
  //#region src/Dropdown/Dropdown.d.ts
5
- declare const Dropdown: react65.NamedExoticComponent<DropdownProps>;
5
+ declare const Dropdown: react53.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 react41 from "react";
2
+ import * as react54 from "react";
3
3
 
4
4
  //#region src/EditableText/EditableText.d.ts
5
- declare const EditableText: react41.NamedExoticComponent<EditableTextProps>;
5
+ declare const EditableText: react54.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 react40 from "react";
2
+ import * as react51 from "react";
3
3
 
4
4
  //#region src/EmojiPicker/EmojiPicker.d.ts
5
- declare const EmojiPicker: react40.NamedExoticComponent<EmojiPickerProps>;
5
+ declare const EmojiPicker: react51.NamedExoticComponent<EmojiPickerProps>;
6
6
  //#endregion
7
7
  export { EmojiPicker };
8
8
  //# sourceMappingURL=EmojiPicker.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FlexBasicProps } from "./type.mjs";
2
- import * as react39 from "react";
2
+ import * as react50 from "react";
3
3
 
4
4
  //#region src/Flex/FlexBasic.d.ts
5
- declare const _default: react39.NamedExoticComponent<FlexBasicProps>;
5
+ declare const _default: react50.NamedExoticComponent<FlexBasicProps>;
6
6
  //#endregion
7
7
  export { _default };
8
8
  //# sourceMappingURL=FlexBasic.d.mts.map
@@ -1,10 +1,10 @@
1
- import * as react58 from "react";
1
+ import * as react67 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: react58.NamedExoticComponent<FontLoaderProps>;
7
+ declare const FontLoader: react67.NamedExoticComponent<FontLoaderProps>;
8
8
  //#endregion
9
9
  export { FontLoader, FontLoaderProps };
10
10
  //# sourceMappingURL=index.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { FooterProps } from "./type.mjs";
2
- import * as react37 from "react";
2
+ import * as react49 from "react";
3
3
 
4
4
  //#region src/Footer/Footer.d.ts
5
- declare const Footer: react37.NamedExoticComponent<FooterProps>;
5
+ declare const Footer: react49.NamedExoticComponent<FooterProps>;
6
6
  //#endregion
7
7
  export { Footer };
8
8
  //# sourceMappingURL=Footer.d.mts.map
package/es/Form/Form.mjs CHANGED
@@ -10,7 +10,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { Form } from "antd";
11
11
  import { useResponsive } from "antd-style";
12
12
  import { cva } from "class-variance-authority";
13
- import { isUndefined } from "lodash-es";
13
+ import { isUndefined } from "es-toolkit/compat";
14
14
 
15
15
  //#region src/Form/Form.tsx
16
16
  const Form$1 = memo(({ className, itemMinWidth, footer, form, items = [], children, itemsType = "group", itemVariant, variant = "borderless", classNames, styles: customStyles, gap, style, collapsible, defaultActiveKey, initialValues, activeKey, onCollapse, onFinish, ref, layout, ...rest }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Form.mjs","names":["Form","FormItem","FormGroup","keys: (string | number)[]","AntForm","cx","FormFlatGroup"],"sources":["../../src/Form/Form.tsx"],"sourcesContent":["'use client';\n\nimport { Form as AntForm } from 'antd';\nimport { useResponsive } from 'antd-style';\nimport { cva } from 'class-variance-authority';\nimport { isUndefined } from 'lodash-es';\nimport { memo, useCallback, useMemo, useState } from 'react';\n\nimport FormFlatGroup from './components/FormFlatGroup';\nimport FormGroup from './components/FormGroup';\nimport FormItem from './components/FormItem';\nimport { FormProvider } from './components/FormProvider';\nimport { useStyles } from './style';\nimport type { FormGroupItemType, FormItemProps, FormProps } from './type';\n\nconst Form = memo<FormProps>(\n ({\n className,\n itemMinWidth,\n footer,\n form,\n items = [],\n children,\n itemsType = 'group',\n itemVariant,\n variant = 'borderless',\n classNames,\n styles: customStyles,\n gap,\n style,\n collapsible,\n defaultActiveKey,\n initialValues,\n activeKey,\n onCollapse,\n onFinish,\n ref,\n layout,\n ...rest\n }) => {\n const { mobile } = useResponsive();\n const { cx, styles } = useStyles();\n const [submitLoading, setSubmitLoading] = useState(false);\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n variant: 'borderless',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: null,\n outlined: null,\n borderless: styles.borderless,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const mapFlat = useCallback(\n (item: FormItemProps, itemIndex: number) => (\n <FormItem\n className={classNames?.item}\n divider={itemIndex !== 0}\n key={itemIndex}\n minWidth={itemMinWidth}\n style={customStyles?.item}\n variant={variant}\n {...item}\n />\n ),\n [itemMinWidth, variant, classNames, customStyles],\n );\n\n const mapTree = useCallback(\n (group: FormGroupItemType, groupIndex: number) => {\n const key = group?.key || groupIndex;\n return (\n <FormGroup\n active={activeKey && group?.key ? activeKey.includes(key) : undefined}\n className={classNames?.group}\n classNames={classNames}\n collapsible={isUndefined(group.collapsible) ? collapsible : group.collapsible}\n defaultActive={\n defaultActiveKey && group?.key ? defaultActiveKey.includes(key) : group?.defaultActive\n }\n extra={group?.extra}\n icon={group?.icon}\n key={key}\n keyValue={key}\n onCollapse={(active) => {\n let keys: (string | number)[] = activeKey || defaultActiveKey || [];\n keys = keys.filter((k) => k !== key);\n onCollapse?.(active ? [...keys, key] : keys);\n }}\n style={customStyles?.group}\n styles={customStyles}\n title={group.title}\n variant={group?.variant || variant}\n >\n {Array.isArray(group.children)\n ? group.children.filter((item) => !item.hidden).map((item, i) => mapFlat(item, i))\n : group.children}\n </FormGroup>\n );\n },\n [activeKey, collapsible, defaultActiveKey, onCollapse, variant, classNames, customStyles],\n );\n\n return (\n <FormProvider\n config={{\n form,\n initialValues,\n submitLoading,\n }}\n >\n <AntForm\n className={cx(variants({ variant }), className)}\n colon={false}\n form={form}\n initialValues={initialValues}\n layout={layout || (mobile ? 'vertical' : 'horizontal')}\n onFinish={async (...finishProps) => {\n if (!onFinish) return;\n setSubmitLoading(true);\n await onFinish(...finishProps);\n setSubmitLoading(false);\n }}\n ref={ref}\n style={{\n gap,\n ...style,\n }}\n variant={itemVariant}\n {...rest}\n >\n {items && items?.length > 0 ? (\n itemsType === 'group' ? (\n (items as FormGroupItemType[])?.map((item, i) => mapTree(item, i))\n ) : (\n <FormFlatGroup\n className={classNames?.group}\n style={customStyles?.group}\n variant={variant}\n >\n {(items as FormItemProps[])\n ?.filter((item) => !item.hidden)\n .map((item, i) => mapFlat(item, i))}\n </FormFlatGroup>\n )\n ) : undefined}\n {children}\n {footer}\n </AntForm>\n </FormProvider>\n );\n },\n);\n\nForm.displayName = 'Form';\n\nexport default Form;\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAMA,SAAO,MACV,EACC,WACA,cACA,QACA,MACA,QAAQ,EAAE,EACV,UACA,YAAY,SACZ,aACA,UAAU,cACV,YACA,QAAQ,cACR,KACA,OACA,aACA,kBACA,eACA,WACA,YACA,UACA,KACA,QACA,GAAG,WACC;CACJ,MAAM,EAAE,WAAW,eAAe;CAClC,MAAM,EAAE,UAAI,WAAW,WAAW;CAClC,MAAM,CAAC,eAAe,oBAAoB,SAAS,MAAM;CAEzD,MAAM,WAAW,cAEb,IAAI,OAAO,MAAM;EACf,iBAAiB,EACf,SAAS,cACV;EAED,UAAU,EACR,SAAS;GACP,QAAQ;GACR,UAAU;GACV,YAAY,OAAO;GACpB,EACF;EAEF,CAAC,EACJ,CAAC,OAAO,CACT;CAED,MAAM,UAAU,aACb,MAAqB,cACpB,oBAACC;EACC,WAAW,YAAY;EACvB,SAAS,cAAc;EAEvB,UAAU;EACV,OAAO,cAAc;EACZ;EACT,GAAI;IAJC,UAKL,EAEJ;EAAC;EAAc;EAAS;EAAY;EAAa,CAClD;CAED,MAAM,UAAU,aACb,OAA0B,eAAuB;EAChD,MAAM,MAAM,OAAO,OAAO;AAC1B,SACE,oBAACC;GACC,QAAQ,aAAa,OAAO,MAAM,UAAU,SAAS,IAAI,GAAG;GAC5D,WAAW,YAAY;GACX;GACZ,aAAa,YAAY,MAAM,YAAY,GAAG,cAAc,MAAM;GAClE,eACE,oBAAoB,OAAO,MAAM,iBAAiB,SAAS,IAAI,GAAG,OAAO;GAE3E,OAAO,OAAO;GACd,MAAM,OAAO;GAEb,UAAU;GACV,aAAa,WAAW;IACtB,IAAIC,OAA4B,aAAa,oBAAoB,EAAE;AACnE,WAAO,KAAK,QAAQ,MAAM,MAAM,IAAI;AACpC,iBAAa,SAAS,CAAC,GAAG,MAAM,IAAI,GAAG,KAAK;;GAE9C,OAAO,cAAc;GACrB,QAAQ;GACR,OAAO,MAAM;GACb,SAAS,OAAO,WAAW;aAE1B,MAAM,QAAQ,MAAM,SAAS,GAC1B,MAAM,SAAS,QAAQ,SAAS,CAAC,KAAK,OAAO,CAAC,KAAK,MAAM,MAAM,QAAQ,MAAM,EAAE,CAAC,GAChF,MAAM;KAdL,IAeK;IAGhB;EAAC;EAAW;EAAa;EAAkB;EAAY;EAAS;EAAY;EAAa,CAC1F;AAED,QACE,oBAAC;EACC,QAAQ;GACN;GACA;GACA;GACD;YAED,qBAACC;GACC,WAAWC,KAAG,SAAS,EAAE,SAAS,CAAC,EAAE,UAAU;GAC/C,OAAO;GACD;GACS;GACf,QAAQ,WAAW,SAAS,aAAa;GACzC,UAAU,OAAO,GAAG,gBAAgB;AAClC,QAAI,CAAC,SAAU;AACf,qBAAiB,KAAK;AACtB,UAAM,SAAS,GAAG,YAAY;AAC9B,qBAAiB,MAAM;;GAEpB;GACL,OAAO;IACL;IACA,GAAG;IACJ;GACD,SAAS;GACT,GAAI;;IAEH,SAAS,OAAO,SAAS,IACxB,cAAc,UACX,OAA+B,KAAK,MAAM,MAAM,QAAQ,MAAM,EAAE,CAAC,GAElE,oBAACC;KACC,WAAW,YAAY;KACvB,OAAO,cAAc;KACZ;eAEP,OACE,QAAQ,SAAS,CAAC,KAAK,OAAO,CAC/B,KAAK,MAAM,MAAM,QAAQ,MAAM,EAAE,CAAC;MACvB,GAEhB;IACH;IACA;;IACO;GACG;EAGpB;AAED,OAAK,cAAc;AAEnB,mBAAeN"}
1
+ {"version":3,"file":"Form.mjs","names":["Form","FormItem","FormGroup","keys: (string | number)[]","AntForm","cx","FormFlatGroup"],"sources":["../../src/Form/Form.tsx"],"sourcesContent":["'use client';\n\nimport { Form as AntForm } from 'antd';\nimport { useResponsive } from 'antd-style';\nimport { cva } from 'class-variance-authority';\nimport { isUndefined } from 'es-toolkit/compat';\nimport { memo, useCallback, useMemo, useState } from 'react';\n\nimport FormFlatGroup from './components/FormFlatGroup';\nimport FormGroup from './components/FormGroup';\nimport FormItem from './components/FormItem';\nimport { FormProvider } from './components/FormProvider';\nimport { useStyles } from './style';\nimport type { FormGroupItemType, FormItemProps, FormProps } from './type';\n\nconst Form = memo<FormProps>(\n ({\n className,\n itemMinWidth,\n footer,\n form,\n items = [],\n children,\n itemsType = 'group',\n itemVariant,\n variant = 'borderless',\n classNames,\n styles: customStyles,\n gap,\n style,\n collapsible,\n defaultActiveKey,\n initialValues,\n activeKey,\n onCollapse,\n onFinish,\n ref,\n layout,\n ...rest\n }) => {\n const { mobile } = useResponsive();\n const { cx, styles } = useStyles();\n const [submitLoading, setSubmitLoading] = useState(false);\n\n const variants = useMemo(\n () =>\n cva(styles.root, {\n defaultVariants: {\n variant: 'borderless',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: null,\n outlined: null,\n borderless: styles.borderless,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const mapFlat = useCallback(\n (item: FormItemProps, itemIndex: number) => (\n <FormItem\n className={classNames?.item}\n divider={itemIndex !== 0}\n key={itemIndex}\n minWidth={itemMinWidth}\n style={customStyles?.item}\n variant={variant}\n {...item}\n />\n ),\n [itemMinWidth, variant, classNames, customStyles],\n );\n\n const mapTree = useCallback(\n (group: FormGroupItemType, groupIndex: number) => {\n const key = group?.key || groupIndex;\n return (\n <FormGroup\n active={activeKey && group?.key ? activeKey.includes(key) : undefined}\n className={classNames?.group}\n classNames={classNames}\n collapsible={isUndefined(group.collapsible) ? collapsible : group.collapsible}\n defaultActive={\n defaultActiveKey && group?.key ? defaultActiveKey.includes(key) : group?.defaultActive\n }\n extra={group?.extra}\n icon={group?.icon}\n key={key}\n keyValue={key}\n onCollapse={(active) => {\n let keys: (string | number)[] = activeKey || defaultActiveKey || [];\n keys = keys.filter((k) => k !== key);\n onCollapse?.(active ? [...keys, key] : keys);\n }}\n style={customStyles?.group}\n styles={customStyles}\n title={group.title}\n variant={group?.variant || variant}\n >\n {Array.isArray(group.children)\n ? group.children.filter((item) => !item.hidden).map((item, i) => mapFlat(item, i))\n : group.children}\n </FormGroup>\n );\n },\n [activeKey, collapsible, defaultActiveKey, onCollapse, variant, classNames, customStyles],\n );\n\n return (\n <FormProvider\n config={{\n form,\n initialValues,\n submitLoading,\n }}\n >\n <AntForm\n className={cx(variants({ variant }), className)}\n colon={false}\n form={form}\n initialValues={initialValues}\n layout={layout || (mobile ? 'vertical' : 'horizontal')}\n onFinish={async (...finishProps) => {\n if (!onFinish) return;\n setSubmitLoading(true);\n await onFinish(...finishProps);\n setSubmitLoading(false);\n }}\n ref={ref}\n style={{\n gap,\n ...style,\n }}\n variant={itemVariant}\n {...rest}\n >\n {items && items?.length > 0 ? (\n itemsType === 'group' ? (\n (items as FormGroupItemType[])?.map((item, i) => mapTree(item, i))\n ) : (\n <FormFlatGroup\n className={classNames?.group}\n style={customStyles?.group}\n variant={variant}\n >\n {(items as FormItemProps[])\n ?.filter((item) => !item.hidden)\n .map((item, i) => mapFlat(item, i))}\n </FormFlatGroup>\n )\n ) : undefined}\n {children}\n {footer}\n </AntForm>\n </FormProvider>\n );\n },\n);\n\nForm.displayName = 'Form';\n\nexport default Form;\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAMA,SAAO,MACV,EACC,WACA,cACA,QACA,MACA,QAAQ,EAAE,EACV,UACA,YAAY,SACZ,aACA,UAAU,cACV,YACA,QAAQ,cACR,KACA,OACA,aACA,kBACA,eACA,WACA,YACA,UACA,KACA,QACA,GAAG,WACC;CACJ,MAAM,EAAE,WAAW,eAAe;CAClC,MAAM,EAAE,UAAI,WAAW,WAAW;CAClC,MAAM,CAAC,eAAe,oBAAoB,SAAS,MAAM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AC,EAAE,UAAU;GAC/C,OAAO;GACD;GACS;GACf,QAAQ,WAAW,SAAS,aAAa;GACzC,UAAU,OAAO,GAAG,gBAAgB;AAClC,QAAI,CAAC,SAAU;AACf,qBAAiB,KAAK;AACtB,UAAM,SAAS,GAAG,YAAY;AAC9B,qBAAiB,MAAM;;GAEpB;GACL,OAAO;IACL;IACA,GAAG;IACJ;GACD,SAAS;GACT,GAAI;;IAEH,SAAS,OAAO,SAAS,IACxB,cAAc,UACX,OAA+B,KAAK,MAAM,MAAM,QAAQ,MAAM,EAAE,CAAC,GAElE,oBAACC;KACC,WAAW,YAAY;KACvB,OAAO,cAAc;KACZ;eAEP,OACE,QAAQ,SAAS,CAAC,KAAK,OAAO,CAC/B,KAAK,MAAM,MAAM,QAAQ,MAAM,EAAE,CAAC;MACvB,GAEhB;IACH;IACA;;IACO;GACG;EAGpB;AAED,OAAK,cAAc;AAEnB,mBAAeN"}
@@ -1,8 +1,8 @@
1
1
  import { FormGroupProps } from "../type.mjs";
2
- import * as react33 from "react";
2
+ import * as react46 from "react";
3
3
 
4
4
  //#region src/Form/components/FormGroup.d.ts
5
- declare const FormGroup: react33.NamedExoticComponent<FormGroupProps>;
5
+ declare const FormGroup: react46.NamedExoticComponent<FormGroupProps>;
6
6
  //#endregion
7
7
  export { FormGroup };
8
8
  //# sourceMappingURL=FormGroup.d.mts.map
@@ -8,7 +8,7 @@ import { memo, useMemo } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { useResponsive } from "antd-style";
10
10
  import { cva } from "class-variance-authority";
11
- import { isUndefined } from "lodash-es";
11
+ import { isUndefined } from "es-toolkit/compat";
12
12
 
13
13
  //#region src/Form/components/FormGroup.tsx
14
14
  const FormGroup = memo(({ className, icon, title, children, extra, variant = "borderless", defaultActive = true, collapsible, active, keyValue = "group", onCollapse, desc, ...rest }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"FormGroup.mjs","names":["useStyles","Flexbox","cx","Icon","Collapse"],"sources":["../../../src/Form/components/FormGroup.tsx"],"sourcesContent":["'use client';\n\nimport { useResponsive } from 'antd-style';\nimport { cva } from 'class-variance-authority';\nimport { isUndefined } from 'lodash-es';\nimport { memo, useMemo } from 'react';\n\nimport Collapse from '@/Collapse';\nimport { Flexbox } from '@/Flex';\nimport Icon from '@/Icon';\n\nimport { useGroupStyles as useStyles } from '../style';\nimport type { FormGroupProps } from '../type';\n\nconst FormGroup = memo<FormGroupProps>(\n ({\n className,\n icon,\n title,\n children,\n extra,\n variant = 'borderless',\n defaultActive = true,\n collapsible,\n active,\n keyValue = 'group',\n onCollapse,\n desc,\n ...rest\n }) => {\n const { mobile } = useResponsive();\n const { cx, styles } = useStyles(variant);\n const isBorderless = variant === 'borderless';\n\n const defaultCollapsible = isUndefined(collapsible) ? !isBorderless : collapsible;\n\n const titleVariants = useMemo(\n () =>\n cva(styles.title, {\n defaultVariants: {\n variant: 'borderless',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: null,\n outlined: null,\n borderless: styles.titleBorderless,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const titleContent = (\n <Flexbox className={cx(titleVariants({ variant }), styles.titleMobile)} gap={8} horizontal>\n {icon && <Icon icon={icon} />}\n {title}\n </Flexbox>\n );\n\n if (mobile)\n return (\n <Flexbox className={className}>\n <Flexbox className={styles.mobileGroupHeader} horizontal justify={'space-between'}>\n {titleContent}\n {extra}\n </Flexbox>\n <div className={styles.mobileGroupBody}>{children}</div>\n </Flexbox>\n );\n\n return (\n <Collapse\n activeKey={isUndefined(active) ? undefined : active ? [keyValue] : []}\n className={className}\n classNames={{\n header: variant === 'borderless' ? styles.titleBorderless : undefined,\n title: variant === 'borderless' ? styles.titleBorderless : undefined,\n }}\n collapsible={defaultCollapsible}\n defaultActiveKey={defaultActive ? [keyValue] : undefined}\n items={[\n {\n children,\n desc,\n extra,\n icon,\n key: keyValue,\n label: title,\n },\n ]}\n onChange={(v) => onCollapse?.(v.length > 0)}\n variant={variant}\n {...rest}\n />\n );\n },\n);\n\nFormGroup.displayName = 'FormGroup';\n\nexport default FormGroup;\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,YAAY,MACf,EACC,WACA,MACA,OACA,UACA,OACA,UAAU,cACV,gBAAgB,MAChB,aACA,QACA,WAAW,SACX,YACA,MACA,GAAG,WACC;CACJ,MAAM,EAAE,WAAW,eAAe;CAClC,MAAM,EAAE,UAAI,WAAWA,eAAU,QAAQ;CACzC,MAAM,eAAe,YAAY;CAEjC,MAAM,qBAAqB,YAAY,YAAY,GAAG,CAAC,eAAe;CAqBtE,MAAM,eACJ,qBAACC;EAAQ,WAAWC,KApBA,cAElB,IAAI,OAAO,OAAO;GAChB,iBAAiB,EACf,SAAS,cACV;GAED,UAAU,EACR,SAAS;IACP,QAAQ;IACR,UAAU;IACV,YAAY,OAAO;IACpB,EACF;GAEF,CAAC,EACJ,CAAC,OAAO,CACT,CAGsC,EAAE,SAAS,CAAC,EAAE,OAAO,YAAY;EAAE,KAAK;EAAG;aAC7E,QAAQ,oBAACC,gBAAW,OAAQ,EAC5B;GACO;AAGZ,KAAI,OACF,QACE,qBAACF;EAAmB;aAClB,qBAACA;GAAQ,WAAW,OAAO;GAAmB;GAAW,SAAS;cAC/D,cACA;IACO,EACV,oBAAC;GAAI,WAAW,OAAO;GAAkB;IAAe;GAChD;AAGd,QACE,oBAACG;EACC,WAAW,YAAY,OAAO,GAAG,SAAY,SAAS,CAAC,SAAS,GAAG,EAAE;EAC1D;EACX,YAAY;GACV,QAAQ,YAAY,eAAe,OAAO,kBAAkB;GAC5D,OAAO,YAAY,eAAe,OAAO,kBAAkB;GAC5D;EACD,aAAa;EACb,kBAAkB,gBAAgB,CAAC,SAAS,GAAG;EAC/C,OAAO,CACL;GACE;GACA;GACA;GACA;GACA,KAAK;GACL,OAAO;GACR,CACF;EACD,WAAW,MAAM,aAAa,EAAE,SAAS,EAAE;EAClC;EACT,GAAI;GACJ;EAGP;AAED,UAAU,cAAc;AAExB,wBAAe"}
1
+ {"version":3,"file":"FormGroup.mjs","names":["useStyles","Flexbox","cx","Icon","Collapse"],"sources":["../../../src/Form/components/FormGroup.tsx"],"sourcesContent":["'use client';\n\nimport { useResponsive } from 'antd-style';\nimport { cva } from 'class-variance-authority';\nimport { isUndefined } from 'es-toolkit/compat';\nimport { memo, useMemo } from 'react';\n\nimport Collapse from '@/Collapse';\nimport { Flexbox } from '@/Flex';\nimport Icon from '@/Icon';\n\nimport { useGroupStyles as useStyles } from '../style';\nimport type { FormGroupProps } from '../type';\n\nconst FormGroup = memo<FormGroupProps>(\n ({\n className,\n icon,\n title,\n children,\n extra,\n variant = 'borderless',\n defaultActive = true,\n collapsible,\n active,\n keyValue = 'group',\n onCollapse,\n desc,\n ...rest\n }) => {\n const { mobile } = useResponsive();\n const { cx, styles } = useStyles(variant);\n const isBorderless = variant === 'borderless';\n\n const defaultCollapsible = isUndefined(collapsible) ? !isBorderless : collapsible;\n\n const titleVariants = useMemo(\n () =>\n cva(styles.title, {\n defaultVariants: {\n variant: 'borderless',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: null,\n outlined: null,\n borderless: styles.titleBorderless,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n }),\n [styles],\n );\n\n const titleContent = (\n <Flexbox className={cx(titleVariants({ variant }), styles.titleMobile)} gap={8} horizontal>\n {icon && <Icon icon={icon} />}\n {title}\n </Flexbox>\n );\n\n if (mobile)\n return (\n <Flexbox className={className}>\n <Flexbox className={styles.mobileGroupHeader} horizontal justify={'space-between'}>\n {titleContent}\n {extra}\n </Flexbox>\n <div className={styles.mobileGroupBody}>{children}</div>\n </Flexbox>\n );\n\n return (\n <Collapse\n activeKey={isUndefined(active) ? undefined : active ? [keyValue] : []}\n className={className}\n classNames={{\n header: variant === 'borderless' ? styles.titleBorderless : undefined,\n title: variant === 'borderless' ? styles.titleBorderless : undefined,\n }}\n collapsible={defaultCollapsible}\n defaultActiveKey={defaultActive ? [keyValue] : undefined}\n items={[\n {\n children,\n desc,\n extra,\n icon,\n key: keyValue,\n label: title,\n },\n ]}\n onChange={(v) => onCollapse?.(v.length > 0)}\n variant={variant}\n {...rest}\n />\n );\n },\n);\n\nFormGroup.displayName = 'FormGroup';\n\nexport default FormGroup;\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,YAAY,MACf,EACC,WACA,MACA,OACA,UACA,OACA,UAAU,cACV,gBAAgB,MAChB,aACA,QACA,WAAW,SACX,YACA,MACA,GAAG,WACC;CACJ,MAAM,EAAE,WAAW,eAAe;CAClC,MAAM,EAAE,UAAI,WAAWA,eAAU,QAAQ;CACzC,MAAM,eAAe,YAAY;CAEjC,MAAM,qBAAqB,YAAY,YAAY,GAAG,CAAC,eAAe;CAqBtE,MAAM,eACJ,qBAACC;EAAQ,WAAWC,KApBA,cAElB,IAAI,OAAO,OAAO;GAChB,iBAAiB,EACf,SAAS,cACV;GAED,UAAU,EACR,SAAS;IACP,QAAQ;IACR,UAAU;IACV,YAAY,OAAO;IACpB,EACF;GAEF,CAAC,EACJ,CAAC,OAAO,CACT,CAGsC,EAAE,SAAS,CAAC,EAAE,OAAO,YAAY;EAAE,KAAK;EAAG;aAC7E,QAAQ,oBAACC,gBAAW,OAAQ,EAC5B;GACO;AAGZ,KAAI,OACF,QACE,qBAACF;EAAmB;aAClB,qBAACA;GAAQ,WAAW,OAAO;GAAmB;GAAW,SAAS;cAC/D,cACA;IACO,EACV,oBAAC;GAAI,WAAW,OAAO;GAAkB;IAAe;GAChD;AAGd,QACE,oBAACG;EACC,WAAW,YAAY,OAAO,GAAG,SAAY,SAAS,CAAC,SAAS,GAAG,EAAE;EAC1D;EACX,YAAY;GACV,QAAQ,YAAY,eAAe,OAAO,kBAAkB;GAC5D,OAAO,YAAY,eAAe,OAAO,kBAAkB;GAC5D;EACD,aAAa;EACb,kBAAkB,gBAAgB,CAAC,SAAS,GAAG;EAC/C,OAAO,CACL;GACE;GACA;GACA;GACA;GACA,KAAK;GACL,OAAO;GACR,CACF;EACD,WAAW,MAAM,aAAa,EAAE,SAAS,EAAE;EAClC;EACT,GAAI;GACJ;EAGP;AAED,UAAU,cAAc;AAExB,wBAAe"}
@@ -1,8 +1,8 @@
1
1
  import { FormItemProps } from "../type.mjs";
2
- import * as react32 from "react";
2
+ import * as react47 from "react";
3
3
 
4
4
  //#region src/Form/components/FormItem.d.ts
5
- declare const FormItem: react32.NamedExoticComponent<FormItemProps>;
5
+ declare const FormItem: react47.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 react31 from "react";
2
+ import * as react48 from "react";
3
3
 
4
4
  //#region src/Form/components/FormSubmitFooter.d.ts
5
- declare const FormSubmitFooter: react31.NamedExoticComponent<FormSubmitFooterProps>;
5
+ declare const FormSubmitFooter: react48.NamedExoticComponent<FormSubmitFooterProps>;
6
6
  //#endregion
7
7
  export { FormSubmitFooter };
8
8
  //# sourceMappingURL=FormSubmitFooter.d.mts.map
@@ -1,4 +1,4 @@
1
- import { isEmpty, isObject, mergeWith, pickBy } from "lodash-es";
1
+ import { isEmpty, isObject, mergeWith, pickBy } from "es-toolkit/compat";
2
2
 
3
3
  //#region src/Form/components/merge.ts
4
4
  const removeUndefined = (obj) => {
@@ -1 +1 @@
1
- {"version":3,"file":"merge.mjs","names":["merge: typeof _merge"],"sources":["../../../src/Form/components/merge.ts"],"sourcesContent":["import { merge as _merge, isEmpty, isObject, mergeWith, pickBy } from 'lodash-es';\n\nexport const removeUndefined = (obj: any): any => {\n if (!isObject(obj)) return obj;\n\n if (Array.isArray(obj)) {\n return obj.map((item) => removeUndefined(item)).filter((item) => item !== undefined);\n }\n\n return pickBy(\n Object.entries(obj).reduce((acc: any, [key, value]) => {\n acc[key] = removeUndefined(value);\n return acc;\n }, {}),\n (value) => value !== undefined,\n );\n};\n\n/**\n * 用于合并对象,如果是数组则直接替换\n * @param target\n * @param source\n */\nexport const merge: typeof _merge = <T = object>(target: T, source: T) =>\n mergeWith({}, target, source, (obj, src) => {\n if (Array.isArray(obj)) return src;\n });\n\ntype MergeableItem = {\n [key: string]: any;\n id: string;\n};\n\n/**\n * Merge two arrays based on id, preserving metadata from default items\n * @param defaultItems Items with default configuration and metadata\n * @param userItems User-defined items with higher priority\n */\nexport const mergeArrayById = <T extends MergeableItem>(defaultItems: T[], userItems: T[]): T[] => {\n // Create a map of default items for faster lookup\n const defaultItemsMap = new Map(defaultItems.map((item) => [item.id, item]));\n\n // 使用 Map 存储合并结果,这样重复 ID 的后项会自然覆盖前项\n const mergedItemsMap = new Map<string, T>();\n\n // Process user items with default metadata\n for (const userItem of userItems) {\n const defaultItem = defaultItemsMap.get(userItem.id);\n if (!defaultItem) {\n mergedItemsMap.set(userItem.id, userItem);\n continue;\n }\n\n const mergedItem: T = { ...defaultItem };\n for (const [key, value] of Object.entries(userItem)) {\n if (value !== null && value !== undefined && !(typeof value === 'object' && isEmpty(value))) {\n // @ts-expect-error\n mergedItem[key] = value;\n }\n\n if (typeof value === 'object' && !isEmpty(value)) {\n // @ts-expect-error\n mergedItem[key] = merge(defaultItem[key], value);\n }\n }\n\n mergedItemsMap.set(userItem.id, mergedItem);\n }\n\n // 添加只在默认配置中存在的项\n for (const item of defaultItems) {\n if (!mergedItemsMap.has(item.id)) {\n mergedItemsMap.set(item.id, item);\n }\n }\n\n return [...mergedItemsMap.values()];\n};\n"],"mappings":";;;AAEA,MAAa,mBAAmB,QAAkB;AAChD,KAAI,CAAC,SAAS,IAAI,CAAE,QAAO;AAE3B,KAAI,MAAM,QAAQ,IAAI,CACpB,QAAO,IAAI,KAAK,SAAS,gBAAgB,KAAK,CAAC,CAAC,QAAQ,SAAS,SAAS,OAAU;AAGtF,QAAO,OACL,OAAO,QAAQ,IAAI,CAAC,QAAQ,KAAU,CAAC,KAAK,WAAW;AACrD,MAAI,OAAO,gBAAgB,MAAM;AACjC,SAAO;IACN,EAAE,CAAC,GACL,UAAU,UAAU,OACtB;;;;;;;AAQH,MAAaA,WAAoC,QAAW,WAC1D,UAAU,EAAE,EAAE,QAAQ,SAAS,KAAK,QAAQ;AAC1C,KAAI,MAAM,QAAQ,IAAI,CAAE,QAAO;EAC/B"}
1
+ {"version":3,"file":"merge.mjs","names":["merge: typeof _merge"],"sources":["../../../src/Form/components/merge.ts"],"sourcesContent":["import { merge as _merge, isEmpty, isObject, mergeWith, pickBy } from 'es-toolkit/compat';\n\nexport const removeUndefined = (obj: any): any => {\n if (!isObject(obj)) return obj;\n\n if (Array.isArray(obj)) {\n return obj.map((item) => removeUndefined(item)).filter((item) => item !== undefined);\n }\n\n return pickBy(\n Object.entries(obj).reduce((acc: any, [key, value]) => {\n acc[key] = removeUndefined(value);\n return acc;\n }, {}),\n (value) => value !== undefined,\n );\n};\n\n/**\n * 用于合并对象,如果是数组则直接替换\n * @param target\n * @param source\n */\nexport const merge: typeof _merge = <T = object>(target: T, source: T) =>\n mergeWith({}, target, source, (obj, src) => {\n if (Array.isArray(obj)) return src;\n });\n\ntype MergeableItem = {\n [key: string]: any;\n id: string;\n};\n\n/**\n * Merge two arrays based on id, preserving metadata from default items\n * @param defaultItems Items with default configuration and metadata\n * @param userItems User-defined items with higher priority\n */\nexport const mergeArrayById = <T extends MergeableItem>(defaultItems: T[], userItems: T[]): T[] => {\n // Create a map of default items for faster lookup\n const defaultItemsMap = new Map(defaultItems.map((item) => [item.id, item]));\n\n // 使用 Map 存储合并结果,这样重复 ID 的后项会自然覆盖前项\n const mergedItemsMap = new Map<string, T>();\n\n // Process user items with default metadata\n for (const userItem of userItems) {\n const defaultItem = defaultItemsMap.get(userItem.id);\n if (!defaultItem) {\n mergedItemsMap.set(userItem.id, userItem);\n continue;\n }\n\n const mergedItem: T = { ...defaultItem };\n for (const [key, value] of Object.entries(userItem)) {\n if (value !== null && value !== undefined && !(typeof value === 'object' && isEmpty(value))) {\n // @ts-expect-error\n mergedItem[key] = value;\n }\n\n if (typeof value === 'object' && !isEmpty(value)) {\n // @ts-expect-error\n mergedItem[key] = merge(defaultItem[key], value);\n }\n }\n\n mergedItemsMap.set(userItem.id, mergedItem);\n }\n\n // 添加只在默认配置中存在的项\n for (const item of defaultItems) {\n if (!mergedItemsMap.has(item.id)) {\n mergedItemsMap.set(item.id, item);\n }\n }\n\n return [...mergedItemsMap.values()];\n};\n"],"mappings":";;;AAEA,MAAa,mBAAmB,QAAkB;AAChD,KAAI,CAAC,SAAS,IAAI,CAAE,QAAO;AAE3B,KAAI,MAAM,QAAQ,IAAI,CACpB,QAAO,IAAI,KAAK,SAAS,gBAAgB,KAAK,CAAC,CAAC,QAAQ,SAAS,SAAS,OAAU;AAGtF,QAAO,OACL,OAAO,QAAQ,IAAI,CAAC,QAAQ,KAAU,CAAC,KAAK,WAAW;AACrD,MAAI,OAAO,gBAAgB,MAAM;AACjC,SAAO;IACN,EAAE,CAAC,GACL,UAAU,UAAU,OACtB;;;;;;;AAQH,MAAaA,WAAoC,QAAW,WAC1D,UAAU,EAAE,EAAE,QAAQ,SAAS,KAAK,QAAQ;AAC1C,KAAI,MAAM,QAAQ,IAAI,CAAE,QAAO;EAC/B"}
package/es/Form/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createStyles } from "antd-style";
2
- import { isNumber } from "lodash-es";
2
+ import { isNumber } from "es-toolkit/compat";
3
3
 
4
4
  //#region src/Form/style.ts
5
5
  const useStyles = createStyles(({ css: css$1, token, prefixCls, responsive }) => ({
@@ -66,8 +66,8 @@ const useFlatGroupStyles = createStyles(({ cx: cx$1, css: css$1, token, stylish
66
66
  mobile: css$1`
67
67
  padding-block: 0;
68
68
  padding-inline: 16px;
69
- background: ${token.colorBgContainer};
70
69
  border-radius: 0;
70
+ background: ${token.colorBgContainer};
71
71
  `,
72
72
  outlined: stylish.variantOutlinedWithoutHover,
73
73
  root: css$1`
@@ -80,8 +80,8 @@ const useFooterStyles = createStyles(({ css: css$1, token, responsive }) => {
80
80
  return { root: css$1`
81
81
  ${responsive.mobile} {
82
82
  padding: 16px;
83
- background: ${token.colorBgContainer};
84
83
  border-block-start: 1px solid ${token.colorBorderSecondary};
84
+ background: ${token.colorBgContainer};
85
85
  }
86
86
  ` };
87
87
  });
@@ -178,18 +178,18 @@ const useSubmitFooterStyles = createStyles(({ responsive, css: css$1, token }) =
178
178
 
179
179
  width: max-content;
180
180
  padding: 8px;
181
-
182
- background: ${token.colorBgContainer};
183
181
  border: 1px solid ${token.colorBorderSecondary};
184
182
  border-radius: 48px;
183
+
184
+ background: ${token.colorBgContainer};
185
185
  box-shadow: ${token.boxShadowSecondary};
186
186
  `,
187
187
  footer: css$1`
188
188
  ${responsive.mobile} {
189
189
  margin-block-start: -${token.borderRadius}px;
190
190
  padding: 16px;
191
- background: ${token.colorBgContainer};
192
191
  border-block-start: 1px solid ${token.colorBorderSecondary};
192
+ background: ${token.colorBgContainer};
193
193
  }
194
194
  `
195
195
  }));