@lobehub/ui 4.32.1 → 4.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) 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/Alert/Alert.d.mts +2 -2
  5. package/es/AutoComplete/Select.d.mts +2 -2
  6. package/es/Avatar/AvatarGroup/index.d.mts +2 -2
  7. package/es/Burger/Burger.d.mts +2 -2
  8. package/es/CodeDiff/CodeDiff.d.mts +2 -2
  9. package/es/CodeDiff/PatchDiff.d.mts +2 -2
  10. package/es/CodeEditor/CodeEditor.d.mts +2 -2
  11. package/es/Collapse/Collapse.d.mts +2 -2
  12. package/es/ConfigProvider/index.d.mts +2 -2
  13. package/es/ContextMenu/ContextMenuHost.d.mts +3 -3
  14. package/es/ContextMenu/renderItems.mjs +1 -0
  15. package/es/ContextMenu/renderItems.mjs.map +1 -1
  16. package/es/CopyButton/CopyButton.d.mts +2 -2
  17. package/es/DatePicker/DatePicker.d.mts +2 -2
  18. package/es/DraggablePanel/components/DraggablePanelBody.d.mts +2 -2
  19. package/es/DraggablePanel/components/DraggablePanelContainer.d.mts +2 -2
  20. package/es/DraggablePanel/components/DraggablePanelFooter.d.mts +2 -2
  21. package/es/DraggablePanel/components/DraggablePanelHeader.d.mts +2 -2
  22. package/es/DraggableSideNav/DraggableSideNav.d.mts +2 -2
  23. package/es/Drawer/Drawer.d.mts +2 -2
  24. package/es/Dropdown/Dropdown.d.mts +2 -2
  25. package/es/DropdownMenu/DropdownMenu.d.mts +2 -2
  26. package/es/DropdownMenu/atoms.d.mts +16 -16
  27. package/es/DropdownMenu/renderItems.mjs +1 -0
  28. package/es/DropdownMenu/renderItems.mjs.map +1 -1
  29. package/es/EditableText/EditableText.d.mts +2 -2
  30. package/es/EditorSlashMenu/atoms.d.mts +12 -12
  31. package/es/EmojiPicker/EmojiPicker.d.mts +2 -2
  32. package/es/Flex/FlexBasic.d.mts +2 -2
  33. package/es/FontLoader/index.d.mts +2 -2
  34. package/es/Footer/Footer.d.mts +2 -2
  35. package/es/Form/components/FormGroup.d.mts +2 -2
  36. package/es/Form/components/FormItem.d.mts +2 -2
  37. package/es/Form/components/FormSubmitFooter.d.mts +2 -2
  38. package/es/FormModal/FormModal.d.mts +2 -2
  39. package/es/Highlighter/FullFeatured.mjs +1 -1
  40. package/es/Highlighter/Highlighter.d.mts +2 -2
  41. package/es/Highlighter/SyntaxHighlighter/index.d.mts +2 -2
  42. package/es/Hotkey/Hotkey.d.mts +2 -2
  43. package/es/Hotkey/Hotkey.mjs +6 -1
  44. package/es/Hotkey/Hotkey.mjs.map +1 -1
  45. package/es/Hotkey/const.d.mts +1 -0
  46. package/es/Hotkey/const.mjs +1 -0
  47. package/es/Hotkey/const.mjs.map +1 -1
  48. package/es/Hotkey/utils.mjs +1 -0
  49. package/es/Hotkey/utils.mjs.map +1 -1
  50. package/es/HotkeyInput/HotkeyInput.d.mts +2 -2
  51. package/es/Icon/Icon.d.mts +2 -2
  52. package/es/Icon/components/IconProvider.d.mts +3 -3
  53. package/es/Image/PreviewGroup.d.mts +2 -2
  54. package/es/Layout/components/LayoutFooter.d.mts +2 -2
  55. package/es/Layout/components/LayoutHeader.d.mts +2 -2
  56. package/es/Layout/components/LayoutMain.d.mts +2 -2
  57. package/es/Layout/components/LayoutSidebar.d.mts +2 -2
  58. package/es/Layout/components/LayoutSidebarInner.d.mts +2 -2
  59. package/es/Layout/components/LayoutToc.d.mts +2 -2
  60. package/es/List/ListItem/index.d.mts +2 -2
  61. package/es/LobeSelect/LobeSelect.d.mts +2 -2
  62. package/es/LobeSelect/atoms.d.mts +19 -19
  63. package/es/LobeSwitch/LobeSwitch.d.mts +2 -2
  64. package/es/LobeSwitch/atoms.d.mts +4 -4
  65. package/es/Markdown/Markdown.d.mts +2 -2
  66. package/es/Markdown/Typography.d.mts +2 -2
  67. package/es/Markdown/components/SearchResultCards/index.d.mts +2 -2
  68. package/es/MaskShadow/MaskShadow.d.mts +2 -2
  69. package/es/Menu/Menu.d.mts +2 -2
  70. package/es/Menu/sharedStyle.mjs +5 -0
  71. package/es/Menu/sharedStyle.mjs.map +1 -1
  72. package/es/Mermaid/FullFeatured.mjs +1 -1
  73. package/es/Mermaid/Mermaid.d.mts +2 -2
  74. package/es/Mermaid/SyntaxMermaid/index.d.mts +2 -2
  75. package/es/Modal/Modal.d.mts +2 -2
  76. package/es/Modal/ModalProvider.d.mts +2 -2
  77. package/es/Modal/imperative.d.mts +2 -2
  78. package/es/MotionProvider/index.d.mts +2 -2
  79. package/es/Popover/ArrowIcon.d.mts +2 -2
  80. package/es/Popover/atoms.d.mts +9 -9
  81. package/es/Popover/context.d.mts +2 -2
  82. package/es/ScrollArea/ScrollArea.d.mts +8 -0
  83. package/es/ScrollArea/ScrollArea.mjs +32 -0
  84. package/es/ScrollArea/ScrollArea.mjs.map +1 -0
  85. package/es/ScrollArea/atoms.d.mts +63 -0
  86. package/es/ScrollArea/atoms.mjs +59 -0
  87. package/es/ScrollArea/atoms.mjs.map +1 -0
  88. package/es/ScrollArea/globalStyle.mjs +29 -0
  89. package/es/ScrollArea/globalStyle.mjs.map +1 -0
  90. package/es/ScrollArea/index.d.mts +4 -0
  91. package/es/ScrollArea/index.d.ts +1 -0
  92. package/es/ScrollArea/index.js +1 -0
  93. package/es/ScrollArea/index.mjs +4 -0
  94. package/es/ScrollArea/style.mjs +172 -0
  95. package/es/ScrollArea/style.mjs.map +1 -0
  96. package/es/ScrollArea/type.d.mts +17 -0
  97. package/es/SearchBar/SearchBar.d.mts +2 -2
  98. package/es/Segmented/Segmented.d.mts +2 -2
  99. package/es/Select/Select.d.mts +2 -2
  100. package/es/SideNav/SideNav.d.mts +2 -2
  101. package/es/SliderWithInput/SliderWithInput.d.mts +2 -2
  102. package/es/SortableList/components/DragHandle.d.mts +2 -2
  103. package/es/SortableList/components/SortableItem.d.mts +2 -2
  104. package/es/ThemeProvider/ThemeProvider.d.mts +2 -2
  105. package/es/Toast/imperative.d.mts +3 -3
  106. package/es/Toast/imperative.mjs +1 -4
  107. package/es/Toast/imperative.mjs.map +1 -1
  108. package/es/Toc/Toc.d.mts +2 -2
  109. package/es/Video/index.d.mts +2 -2
  110. package/es/awesome/Features/Features.d.mts +2 -2
  111. package/es/awesome/Giscus/Giscus.d.mts +2 -2
  112. package/es/awesome/GradientButton/GradientButton.d.mts +2 -2
  113. package/es/awesome/GridBackground/GridBackground.d.mts +2 -2
  114. package/es/awesome/GridBackground/GridShowcase.d.mts +2 -2
  115. package/es/awesome/Spline/Spine.d.mts +2 -2
  116. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +2 -2
  117. package/es/brand/LobeChat/index.d.mts +2 -2
  118. package/es/brand/LobeHub/index.d.mts +2 -2
  119. package/es/brand/LogoThree/LogoSpline.d.mts +2 -2
  120. package/es/brand/LogoThree/index.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/MessageModal/MessageModal.d.mts +2 -2
  126. package/es/color/ColorScales/index.d.mts +2 -2
  127. package/es/color/CssVar/index.d.mts +2 -2
  128. package/es/i18n/context.d.mts +2 -2
  129. package/es/icons/lucideExtra/BotPromptIcon.d.mts +2 -2
  130. package/es/icons/lucideExtra/CreateBotIcon.d.mts +3 -3
  131. package/es/icons/lucideExtra/DiscordIcon.d.mts +3 -3
  132. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +2 -2
  133. package/es/icons/lucideExtra/GroupBotIcon.d.mts +3 -3
  134. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +3 -3
  135. package/es/icons/lucideExtra/LeftClickIcon.d.mts +3 -3
  136. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +3 -3
  137. package/es/icons/lucideExtra/McpIcon.d.mts +3 -3
  138. package/es/icons/lucideExtra/ProviderIcon.d.mts +3 -3
  139. package/es/icons/lucideExtra/RightClickIcon.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 +2 -2
  143. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +3 -3
  144. package/es/index.d.mts +9 -1
  145. package/es/index.mjs +7 -3
  146. package/es/mdx/Mdx/index.d.mts +2 -2
  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/package.json +17 -17
@@ -1,8 +1,8 @@
1
1
  import { AccordionProps } from "./type.mjs";
2
- import * as react31 from "react";
2
+ import * as react43 from "react";
3
3
 
4
4
  //#region src/Accordion/Accordion.d.ts
5
- declare const Accordion: react31.NamedExoticComponent<AccordionProps>;
5
+ declare const Accordion: react43.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 react32 from "react";
2
+ import * as react44 from "react";
3
3
 
4
4
  //#region src/Accordion/AccordionItem.d.ts
5
- declare const AccordionItem: react32.NamedExoticComponent<AccordionItemProps>;
5
+ declare const AccordionItem: react44.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 react72 from "react";
2
+ import * as react80 from "react";
3
3
 
4
4
  //#region src/ActionIcon/ActionIcon.d.ts
5
- declare const ActionIcon: react72.NamedExoticComponent<ActionIconProps>;
5
+ declare const ActionIcon: react80.NamedExoticComponent<ActionIconProps>;
6
6
  //#endregion
7
7
  export { ActionIcon };
8
8
  //# sourceMappingURL=ActionIcon.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { AlertProps } from "./type.mjs";
2
- import * as react73 from "react";
2
+ import * as react12 from "react";
3
3
 
4
4
  //#region src/Alert/Alert.d.ts
5
- declare const Alert: react73.NamedExoticComponent<AlertProps>;
5
+ declare const Alert: react12.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 react66 from "react";
2
+ import * as react13 from "react";
3
3
 
4
4
  //#region src/AutoComplete/Select.d.ts
5
- declare const AutoComplete: react66.NamedExoticComponent<AutoCompleteProps>;
5
+ declare const AutoComplete: react13.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 react86 from "react";
2
+ import * as react14 from "react";
3
3
 
4
4
  //#region src/Avatar/AvatarGroup/index.d.ts
5
- declare const AvatarGroup: react86.NamedExoticComponent<AvatarGroupProps>;
5
+ declare const AvatarGroup: react14.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 react26 from "react";
2
+ import * as react42 from "react";
3
3
 
4
4
  //#region src/Burger/Burger.d.ts
5
- declare const Burger: react26.NamedExoticComponent<BurgerProps>;
5
+ declare const Burger: react42.NamedExoticComponent<BurgerProps>;
6
6
  //#endregion
7
7
  export { Burger };
8
8
  //# sourceMappingURL=Burger.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { CodeDiffProps } from "./type.mjs";
2
- import * as react23 from "react";
2
+ import * as react9 from "react";
3
3
 
4
4
  //#region src/CodeDiff/CodeDiff.d.ts
5
- declare const CodeDiff: react23.NamedExoticComponent<CodeDiffProps>;
5
+ declare const CodeDiff: react9.NamedExoticComponent<CodeDiffProps>;
6
6
  //#endregion
7
7
  export { CodeDiff };
8
8
  //# sourceMappingURL=CodeDiff.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { PatchDiffProps } from "./type.mjs";
2
- import * as react24 from "react";
2
+ import * as react10 from "react";
3
3
 
4
4
  //#region src/CodeDiff/PatchDiff.d.ts
5
- declare const PatchDiff: react24.NamedExoticComponent<PatchDiffProps>;
5
+ declare const PatchDiff: react10.NamedExoticComponent<PatchDiffProps>;
6
6
  //#endregion
7
7
  export { PatchDiff };
8
8
  //# sourceMappingURL=PatchDiff.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { CodeEditorProps } from "./type.mjs";
2
- import * as react25 from "react";
2
+ import * as react79 from "react";
3
3
 
4
4
  //#region src/CodeEditor/CodeEditor.d.ts
5
- declare const CodeEditor: react25.NamedExoticComponent<CodeEditorProps>;
5
+ declare const CodeEditor: react79.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 react22 from "react";
2
+ import * as react8 from "react";
3
3
 
4
4
  //#region src/Collapse/Collapse.d.ts
5
- declare const Collapse: react22.NamedExoticComponent<CollapseProps>;
5
+ declare const Collapse: react8.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 react79 from "react";
4
+ import * as react81 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: react79.NamedExoticComponent<ConfigProviderProps>;
22
+ declare const ConfigProvider: react81.NamedExoticComponent<ConfigProviderProps>;
23
23
  type CdnFn = ({
24
24
  pkg,
25
25
  version,
@@ -1,8 +1,8 @@
1
- import * as react124 from "react";
2
- import * as react_jsx_runtime51 from "react/jsx-runtime";
1
+ import * as react88 from "react";
2
+ import * as react_jsx_runtime57 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/ContextMenu/ContextMenuHost.d.ts
5
- declare const ContextMenuHost: react124.MemoExoticComponent<() => react_jsx_runtime51.JSX.Element | null>;
5
+ declare const ContextMenuHost: react88.MemoExoticComponent<() => react_jsx_runtime57.JSX.Element | null>;
6
6
  //#endregion
7
7
  export { ContextMenuHost };
8
8
  //# sourceMappingURL=ContextMenuHost.d.mts.map
@@ -173,6 +173,7 @@ const renderContextMenuItems = (items, keyPath = [], options) => {
173
173
  }), /* @__PURE__ */ jsx(ContextMenu.Portal, { children: /* @__PURE__ */ jsx(ContextMenu.Positioner, {
174
174
  alignOffset: -4,
175
175
  className: styles.positioner,
176
+ "data-submenu": "",
176
177
  onContextMenu: preventDefaultAndStopPropagation,
177
178
  sideOffset: -1,
178
179
  children: /* @__PURE__ */ jsx(ContextMenu.Popup, {
@@ -1 +1 @@
1
- {"version":3,"file":"renderItems.mjs","names":["common","info: MenuInfo","label","labelText","isDanger","Icon"],"sources":["../../src/ContextMenu/renderItems.tsx"],"sourcesContent":["import { ContextMenu } from '@base-ui/react/context-menu';\nimport { Switch } from 'antd';\nimport { cx } from 'antd-style';\nimport { Check, ChevronRight } from 'lucide-react';\nimport type { MenuInfo } from 'rc-menu/es/interface';\nimport type {\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n} from 'react';\nimport { memo, useCallback, useState } from 'react';\n\nimport Icon from '@/Icon';\nimport {\n type MenuDividerType,\n type MenuItemGroupType,\n type MenuItemType,\n type RenderItemContentOptions,\n type RenderOptions,\n type SubMenuType,\n getItemKey,\n getItemLabel,\n hasAnyIcon,\n hasCheckboxAndIcon,\n renderIcon,\n} from '@/Menu';\nimport common from '@/i18n/resources/en/common';\nimport { useTranslation } from '@/i18n/useTranslation';\nimport { preventDefaultAndStopPropagation } from '@/utils/dom';\n\nimport { styles } from './style';\nimport type { ContextMenuCheckboxItem, ContextMenuItem, ContextMenuSwitchItem } from './type';\n\nexport type { IconSpaceMode } from '@/Menu';\n\nconst EmptyMenuItem = memo(() => {\n const { t } = useTranslation(common);\n return (\n <ContextMenu.Item className={cx(styles.item, styles.empty)} disabled>\n <div className={styles.itemContent}>\n <span className={styles.label}>{t('common.empty')}</span>\n </div>\n </ContextMenu.Item>\n );\n});\n\nEmptyMenuItem.displayName = 'EmptyMenuItem';\n\ninterface ContextMenuSwitchItemInternalProps {\n checked?: boolean;\n children: ReactNode;\n closeOnClick?: boolean;\n danger?: boolean;\n defaultChecked?: boolean;\n disabled?: boolean;\n label?: string;\n onCheckedChange?: (checked: boolean) => void;\n}\n\nconst ContextMenuSwitchItemInternal = ({\n checked: checkedProp,\n children,\n closeOnClick = false,\n danger,\n defaultChecked,\n disabled,\n label,\n onCheckedChange,\n}: ContextMenuSwitchItemInternalProps) => {\n const [internalChecked, setInternalChecked] = useState(defaultChecked ?? false);\n const isControlled = checkedProp !== undefined;\n const checked = isControlled ? checkedProp : internalChecked;\n\n const handleCheckedChange = useCallback(\n (newChecked: boolean) => {\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n onCheckedChange?.(newChecked);\n },\n [isControlled, onCheckedChange],\n );\n\n return (\n <ContextMenu.Item\n className={cx(styles.item, danger && styles.danger)}\n closeOnClick={closeOnClick}\n disabled={disabled}\n label={label}\n onClick={(e) => {\n e.preventDefault();\n if (!disabled) {\n handleCheckedChange(!checked);\n }\n }}\n >\n {children}\n <Switch\n checked={checked}\n disabled={disabled}\n onChange={handleCheckedChange}\n onClick={(_, e) => e.stopPropagation()}\n size=\"small\"\n style={{ marginInlineStart: 16 }}\n />\n </ContextMenu.Item>\n );\n};\n\nconst renderItemContent = (\n item: MenuItemType | SubMenuType | ContextMenuCheckboxItem | ContextMenuSwitchItem,\n options?: RenderItemContentOptions,\n iconNode?: ReactNode,\n) => {\n const label = getItemLabel(item);\n const extra = 'extra' in item ? item.extra : undefined;\n const indicatorOnRight = options?.indicatorOnRight;\n const hasCustomIcon = iconNode !== undefined && !indicatorOnRight;\n const hasIcon = hasCustomIcon ? Boolean(iconNode) : Boolean(item.icon);\n const shouldRenderIcon = hasCustomIcon\n ? Boolean(options?.reserveIconSpace || iconNode)\n : Boolean(hasIcon || options?.reserveIconSpace);\n\n return (\n <div className={styles.itemContent}>\n {shouldRenderIcon ? (\n <span aria-hidden={!hasIcon} className={styles.icon}>\n {hasCustomIcon ? iconNode : hasIcon ? renderIcon(item.icon, 'small') : null}\n </span>\n ) : null}\n <span className={styles.label}>{label}</span>\n {extra ? <span className={styles.extra}>{extra}</span> : null}\n {indicatorOnRight && iconNode ? iconNode : null}\n {options?.submenu ? (\n <span className={styles.submenuArrow}>\n <ChevronRight size={16} />\n </span>\n ) : null}\n </div>\n );\n};\n\nconst invokeItemClick = (\n item: MenuItemType,\n keyPath: string[],\n event: ReactMouseEvent<HTMLElement> | ReactKeyboardEvent<HTMLElement>,\n) => {\n if (!item.onClick) return;\n const key = item.key ?? keyPath.at(-1) ?? '';\n const info: MenuInfo = {\n domEvent: event,\n item: event.currentTarget as MenuInfo['item'],\n key: String(key),\n keyPath,\n };\n item.onClick(info);\n};\n\nexport const renderContextMenuItems = (\n items: ContextMenuItem[],\n keyPath: string[] = [],\n options?: RenderOptions,\n): ReactNode[] => {\n const iconSpaceMode = options?.iconSpaceMode ?? 'global';\n const reserveIconSpace =\n options?.reserveIconSpace ?? hasAnyIcon(items, iconSpaceMode === 'global');\n const indicatorOnRight = options?.indicatorOnRight ?? hasCheckboxAndIcon(items);\n\n return items.map((item, index) => {\n if (!item) return null;\n\n const fallbackKey = `${keyPath.join('-') || 'root'}-${index}`;\n const itemKey = getItemKey(item, fallbackKey);\n const nextKeyPath = [...keyPath, String(itemKey)];\n\n if ((item as ContextMenuCheckboxItem).type === 'checkbox') {\n const checkboxItem = item as ContextMenuCheckboxItem;\n const label = getItemLabel(checkboxItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(checkboxItem.danger);\n const indicator = (\n <ContextMenu.CheckboxItemIndicator>\n <Icon icon={Check} size={'small'} />\n </ContextMenu.CheckboxItemIndicator>\n );\n\n return (\n <ContextMenu.CheckboxItem\n checked={checkboxItem.checked}\n className={cx(styles.item, isDanger && styles.danger)}\n closeOnClick={checkboxItem.closeOnClick}\n defaultChecked={checkboxItem.defaultChecked}\n disabled={checkboxItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={(checked) => checkboxItem.onCheckedChange?.(checked)}\n >\n {renderItemContent(checkboxItem, { indicatorOnRight, reserveIconSpace }, indicator)}\n </ContextMenu.CheckboxItem>\n );\n }\n\n if ((item as ContextMenuSwitchItem).type === 'switch') {\n const switchItem = item as ContextMenuSwitchItem;\n const label = getItemLabel(switchItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(switchItem.danger);\n\n return (\n <ContextMenuSwitchItemInternal\n checked={switchItem.checked}\n closeOnClick={switchItem.closeOnClick}\n danger={isDanger}\n defaultChecked={switchItem.defaultChecked}\n disabled={switchItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={switchItem.onCheckedChange}\n >\n {renderItemContent(switchItem, { reserveIconSpace })}\n </ContextMenuSwitchItemInternal>\n );\n }\n\n if ((item as MenuDividerType).type === 'divider') {\n return <ContextMenu.Separator className={styles.separator} key={itemKey} />;\n }\n\n if ((item as MenuItemGroupType).type === 'group') {\n const group = item as MenuItemGroupType;\n const groupReserveIconSpace =\n iconSpaceMode === 'group'\n ? group.children\n ? hasAnyIcon(group.children)\n : false\n : reserveIconSpace;\n const groupIndicatorOnRight = group.children ? hasCheckboxAndIcon(group.children) : false;\n return (\n <ContextMenu.Group key={itemKey}>\n {group.label ? (\n <ContextMenu.GroupLabel className={styles.groupLabel}>\n {group.label}\n </ContextMenu.GroupLabel>\n ) : null}\n {group.children\n ? renderContextMenuItems(group.children, nextKeyPath, {\n iconSpaceMode,\n indicatorOnRight: groupIndicatorOnRight,\n reserveIconSpace: groupReserveIconSpace,\n })\n : null}\n </ContextMenu.Group>\n );\n }\n\n if (\n (item as SubMenuType).type === 'submenu' ||\n ('children' in item && (item as SubMenuType).children)\n ) {\n const submenu = item as SubMenuType;\n const label = getItemLabel(submenu);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in submenu && Boolean(submenu.danger);\n\n return (\n <ContextMenu.SubmenuRoot key={itemKey}>\n <ContextMenu.SubmenuTrigger\n className={cx(styles.item, isDanger && styles.danger)}\n disabled={submenu.disabled}\n label={labelText}\n >\n {renderItemContent(submenu, {\n reserveIconSpace,\n submenu: true,\n })}\n </ContextMenu.SubmenuTrigger>\n <ContextMenu.Portal>\n <ContextMenu.Positioner\n alignOffset={-4}\n className={styles.positioner}\n onContextMenu={preventDefaultAndStopPropagation}\n sideOffset={-1}\n >\n <ContextMenu.Popup className={styles.popup}>\n {submenu.children && submenu.children.length > 0 ? (\n renderContextMenuItems(submenu.children, nextKeyPath, { iconSpaceMode })\n ) : (\n <EmptyMenuItem />\n )}\n </ContextMenu.Popup>\n </ContextMenu.Positioner>\n </ContextMenu.Portal>\n </ContextMenu.SubmenuRoot>\n );\n }\n\n const menuItem = item as MenuItemType;\n const label = getItemLabel(menuItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in menuItem && Boolean(menuItem.danger);\n\n return (\n <ContextMenu.Item\n className={cx(styles.item, isDanger && styles.danger)}\n closeOnClick={menuItem.closeOnClick}\n disabled={menuItem.disabled}\n key={itemKey}\n label={labelText}\n onClick={(event) => invokeItemClick(menuItem, nextKeyPath, event)}\n >\n {renderItemContent(menuItem, { reserveIconSpace })}\n </ContextMenu.Item>\n );\n });\n};\n"],"mappings":";;;;;;;;;;;;;;AAmCA,MAAM,gBAAgB,WAAW;CAC/B,MAAM,EAAE,MAAM,eAAeA,eAAO;AACpC,QACE,oBAAC,YAAY;EAAK,WAAW,GAAG,OAAO,MAAM,OAAO,MAAM;EAAE;YAC1D,oBAAC;GAAI,WAAW,OAAO;aACrB,oBAAC;IAAK,WAAW,OAAO;cAAQ,EAAE,eAAe;KAAQ;IACrD;GACW;EAErB;AAEF,cAAc,cAAc;AAa5B,MAAM,iCAAiC,EACrC,SAAS,aACT,UACA,eAAe,OACf,QACA,gBACA,UACA,OACA,sBACwC;CACxC,MAAM,CAAC,iBAAiB,sBAAsB,SAAS,kBAAkB,MAAM;CAC/E,MAAM,eAAe,gBAAgB;CACrC,MAAM,UAAU,eAAe,cAAc;CAE7C,MAAM,sBAAsB,aACzB,eAAwB;AACvB,MAAI,CAAC,aACH,oBAAmB,WAAW;AAEhC,oBAAkB,WAAW;IAE/B,CAAC,cAAc,gBAAgB,CAChC;AAED,QACE,qBAAC,YAAY;EACX,WAAW,GAAG,OAAO,MAAM,UAAU,OAAO,OAAO;EACrC;EACJ;EACH;EACP,UAAU,MAAM;AACd,KAAE,gBAAgB;AAClB,OAAI,CAAC,SACH,qBAAoB,CAAC,QAAQ;;aAIhC,UACD,oBAAC;GACU;GACC;GACV,UAAU;GACV,UAAU,GAAG,MAAM,EAAE,iBAAiB;GACtC,MAAK;GACL,OAAO,EAAE,mBAAmB,IAAI;IAChC;GACe;;AAIvB,MAAM,qBACJ,MACA,SACA,aACG;CACH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}
1
+ {"version":3,"file":"renderItems.mjs","names":["common","info: MenuInfo","label","labelText","isDanger","Icon"],"sources":["../../src/ContextMenu/renderItems.tsx"],"sourcesContent":["import { ContextMenu } from '@base-ui/react/context-menu';\nimport { Switch } from 'antd';\nimport { cx } from 'antd-style';\nimport { Check, ChevronRight } from 'lucide-react';\nimport type { MenuInfo } from 'rc-menu/es/interface';\nimport type {\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n} from 'react';\nimport { memo, useCallback, useState } from 'react';\n\nimport Icon from '@/Icon';\nimport {\n type MenuDividerType,\n type MenuItemGroupType,\n type MenuItemType,\n type RenderItemContentOptions,\n type RenderOptions,\n type SubMenuType,\n getItemKey,\n getItemLabel,\n hasAnyIcon,\n hasCheckboxAndIcon,\n renderIcon,\n} from '@/Menu';\nimport common from '@/i18n/resources/en/common';\nimport { useTranslation } from '@/i18n/useTranslation';\nimport { preventDefaultAndStopPropagation } from '@/utils/dom';\n\nimport { styles } from './style';\nimport type { ContextMenuCheckboxItem, ContextMenuItem, ContextMenuSwitchItem } from './type';\n\nexport type { IconSpaceMode } from '@/Menu';\n\nconst EmptyMenuItem = memo(() => {\n const { t } = useTranslation(common);\n return (\n <ContextMenu.Item className={cx(styles.item, styles.empty)} disabled>\n <div className={styles.itemContent}>\n <span className={styles.label}>{t('common.empty')}</span>\n </div>\n </ContextMenu.Item>\n );\n});\n\nEmptyMenuItem.displayName = 'EmptyMenuItem';\n\ninterface ContextMenuSwitchItemInternalProps {\n checked?: boolean;\n children: ReactNode;\n closeOnClick?: boolean;\n danger?: boolean;\n defaultChecked?: boolean;\n disabled?: boolean;\n label?: string;\n onCheckedChange?: (checked: boolean) => void;\n}\n\nconst ContextMenuSwitchItemInternal = ({\n checked: checkedProp,\n children,\n closeOnClick = false,\n danger,\n defaultChecked,\n disabled,\n label,\n onCheckedChange,\n}: ContextMenuSwitchItemInternalProps) => {\n const [internalChecked, setInternalChecked] = useState(defaultChecked ?? false);\n const isControlled = checkedProp !== undefined;\n const checked = isControlled ? checkedProp : internalChecked;\n\n const handleCheckedChange = useCallback(\n (newChecked: boolean) => {\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n onCheckedChange?.(newChecked);\n },\n [isControlled, onCheckedChange],\n );\n\n return (\n <ContextMenu.Item\n className={cx(styles.item, danger && styles.danger)}\n closeOnClick={closeOnClick}\n disabled={disabled}\n label={label}\n onClick={(e) => {\n e.preventDefault();\n if (!disabled) {\n handleCheckedChange(!checked);\n }\n }}\n >\n {children}\n <Switch\n checked={checked}\n disabled={disabled}\n onChange={handleCheckedChange}\n onClick={(_, e) => e.stopPropagation()}\n size=\"small\"\n style={{ marginInlineStart: 16 }}\n />\n </ContextMenu.Item>\n );\n};\n\nconst renderItemContent = (\n item: MenuItemType | SubMenuType | ContextMenuCheckboxItem | ContextMenuSwitchItem,\n options?: RenderItemContentOptions,\n iconNode?: ReactNode,\n) => {\n const label = getItemLabel(item);\n const extra = 'extra' in item ? item.extra : undefined;\n const indicatorOnRight = options?.indicatorOnRight;\n const hasCustomIcon = iconNode !== undefined && !indicatorOnRight;\n const hasIcon = hasCustomIcon ? Boolean(iconNode) : Boolean(item.icon);\n const shouldRenderIcon = hasCustomIcon\n ? Boolean(options?.reserveIconSpace || iconNode)\n : Boolean(hasIcon || options?.reserveIconSpace);\n\n return (\n <div className={styles.itemContent}>\n {shouldRenderIcon ? (\n <span aria-hidden={!hasIcon} className={styles.icon}>\n {hasCustomIcon ? iconNode : hasIcon ? renderIcon(item.icon, 'small') : null}\n </span>\n ) : null}\n <span className={styles.label}>{label}</span>\n {extra ? <span className={styles.extra}>{extra}</span> : null}\n {indicatorOnRight && iconNode ? iconNode : null}\n {options?.submenu ? (\n <span className={styles.submenuArrow}>\n <ChevronRight size={16} />\n </span>\n ) : null}\n </div>\n );\n};\n\nconst invokeItemClick = (\n item: MenuItemType,\n keyPath: string[],\n event: ReactMouseEvent<HTMLElement> | ReactKeyboardEvent<HTMLElement>,\n) => {\n if (!item.onClick) return;\n const key = item.key ?? keyPath.at(-1) ?? '';\n const info: MenuInfo = {\n domEvent: event,\n item: event.currentTarget as MenuInfo['item'],\n key: String(key),\n keyPath,\n };\n item.onClick(info);\n};\n\nexport const renderContextMenuItems = (\n items: ContextMenuItem[],\n keyPath: string[] = [],\n options?: RenderOptions,\n): ReactNode[] => {\n const iconSpaceMode = options?.iconSpaceMode ?? 'global';\n const reserveIconSpace =\n options?.reserveIconSpace ?? hasAnyIcon(items, iconSpaceMode === 'global');\n const indicatorOnRight = options?.indicatorOnRight ?? hasCheckboxAndIcon(items);\n\n return items.map((item, index) => {\n if (!item) return null;\n\n const fallbackKey = `${keyPath.join('-') || 'root'}-${index}`;\n const itemKey = getItemKey(item, fallbackKey);\n const nextKeyPath = [...keyPath, String(itemKey)];\n\n if ((item as ContextMenuCheckboxItem).type === 'checkbox') {\n const checkboxItem = item as ContextMenuCheckboxItem;\n const label = getItemLabel(checkboxItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(checkboxItem.danger);\n const indicator = (\n <ContextMenu.CheckboxItemIndicator>\n <Icon icon={Check} size={'small'} />\n </ContextMenu.CheckboxItemIndicator>\n );\n\n return (\n <ContextMenu.CheckboxItem\n checked={checkboxItem.checked}\n className={cx(styles.item, isDanger && styles.danger)}\n closeOnClick={checkboxItem.closeOnClick}\n defaultChecked={checkboxItem.defaultChecked}\n disabled={checkboxItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={(checked) => checkboxItem.onCheckedChange?.(checked)}\n >\n {renderItemContent(checkboxItem, { indicatorOnRight, reserveIconSpace }, indicator)}\n </ContextMenu.CheckboxItem>\n );\n }\n\n if ((item as ContextMenuSwitchItem).type === 'switch') {\n const switchItem = item as ContextMenuSwitchItem;\n const label = getItemLabel(switchItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(switchItem.danger);\n\n return (\n <ContextMenuSwitchItemInternal\n checked={switchItem.checked}\n closeOnClick={switchItem.closeOnClick}\n danger={isDanger}\n defaultChecked={switchItem.defaultChecked}\n disabled={switchItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={switchItem.onCheckedChange}\n >\n {renderItemContent(switchItem, { reserveIconSpace })}\n </ContextMenuSwitchItemInternal>\n );\n }\n\n if ((item as MenuDividerType).type === 'divider') {\n return <ContextMenu.Separator className={styles.separator} key={itemKey} />;\n }\n\n if ((item as MenuItemGroupType).type === 'group') {\n const group = item as MenuItemGroupType;\n const groupReserveIconSpace =\n iconSpaceMode === 'group'\n ? group.children\n ? hasAnyIcon(group.children)\n : false\n : reserveIconSpace;\n const groupIndicatorOnRight = group.children ? hasCheckboxAndIcon(group.children) : false;\n return (\n <ContextMenu.Group key={itemKey}>\n {group.label ? (\n <ContextMenu.GroupLabel className={styles.groupLabel}>\n {group.label}\n </ContextMenu.GroupLabel>\n ) : null}\n {group.children\n ? renderContextMenuItems(group.children, nextKeyPath, {\n iconSpaceMode,\n indicatorOnRight: groupIndicatorOnRight,\n reserveIconSpace: groupReserveIconSpace,\n })\n : null}\n </ContextMenu.Group>\n );\n }\n\n if (\n (item as SubMenuType).type === 'submenu' ||\n ('children' in item && (item as SubMenuType).children)\n ) {\n const submenu = item as SubMenuType;\n const label = getItemLabel(submenu);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in submenu && Boolean(submenu.danger);\n\n return (\n <ContextMenu.SubmenuRoot key={itemKey}>\n <ContextMenu.SubmenuTrigger\n className={cx(styles.item, isDanger && styles.danger)}\n disabled={submenu.disabled}\n label={labelText}\n >\n {renderItemContent(submenu, {\n reserveIconSpace,\n submenu: true,\n })}\n </ContextMenu.SubmenuTrigger>\n <ContextMenu.Portal>\n <ContextMenu.Positioner\n alignOffset={-4}\n className={styles.positioner}\n data-submenu=\"\"\n onContextMenu={preventDefaultAndStopPropagation}\n sideOffset={-1}\n >\n <ContextMenu.Popup className={styles.popup}>\n {submenu.children && submenu.children.length > 0 ? (\n renderContextMenuItems(submenu.children, nextKeyPath, { iconSpaceMode })\n ) : (\n <EmptyMenuItem />\n )}\n </ContextMenu.Popup>\n </ContextMenu.Positioner>\n </ContextMenu.Portal>\n </ContextMenu.SubmenuRoot>\n );\n }\n\n const menuItem = item as MenuItemType;\n const label = getItemLabel(menuItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in menuItem && Boolean(menuItem.danger);\n\n return (\n <ContextMenu.Item\n className={cx(styles.item, isDanger && styles.danger)}\n closeOnClick={menuItem.closeOnClick}\n disabled={menuItem.disabled}\n key={itemKey}\n label={labelText}\n onClick={(event) => invokeItemClick(menuItem, nextKeyPath, event)}\n >\n {renderItemContent(menuItem, { reserveIconSpace })}\n </ContextMenu.Item>\n );\n });\n};\n"],"mappings":";;;;;;;;;;;;;;AAmCA,MAAM,gBAAgB,WAAW;CAC/B,MAAM,EAAE,MAAM,eAAeA,eAAO;AACpC,QACE,oBAAC,YAAY;EAAK,WAAW,GAAG,OAAO,MAAM,OAAO,MAAM;EAAE;YAC1D,oBAAC;GAAI,WAAW,OAAO;aACrB,oBAAC;IAAK,WAAW,OAAO;cAAQ,EAAE,eAAe;KAAQ;IACrD;GACW;EAErB;AAEF,cAAc,cAAc;AAa5B,MAAM,iCAAiC,EACrC,SAAS,aACT,UACA,eAAe,OACf,QACA,gBACA,UACA,OACA,sBACwC;CACxC,MAAM,CAAC,iBAAiB,sBAAsB,SAAS,kBAAkB,MAAM;CAC/E,MAAM,eAAe,gBAAgB;CACrC,MAAM,UAAU,eAAe,cAAc;CAE7C,MAAM,sBAAsB,aACzB,eAAwB;AACvB,MAAI,CAAC,aACH,oBAAmB,WAAW;AAEhC,oBAAkB,WAAW;IAE/B,CAAC,cAAc,gBAAgB,CAChC;AAED,QACE,qBAAC,YAAY;EACX,WAAW,GAAG,OAAO,MAAM,UAAU,OAAO,OAAO;EACrC;EACJ;EACH;EACP,UAAU,MAAM;AACd,KAAE,gBAAgB;AAClB,OAAI,CAAC,SACH,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AY;GACX,WAAW,GAAG,OAAO,MAAM,YAAY,OAAO,OAAO;GACrD,cAAc,SAAS;GACvB,UAAU,SAAS;GAEnB,OAAO;GACP,UAAU,UAAU,gBAAgB,UAAU,aAAa,MAAM;aAEhE,kBAAkB,UAAU,EAAE,kBAAkB,CAAC;KAJ7C,QAKY;GAErB"}
@@ -1,8 +1,8 @@
1
1
  import { CopyButtonProps } from "./type.mjs";
2
- import * as react21 from "react";
2
+ import * as react7 from "react";
3
3
 
4
4
  //#region src/CopyButton/CopyButton.d.ts
5
- declare const CopyButton: react21.NamedExoticComponent<CopyButtonProps>;
5
+ declare const CopyButton: react7.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 react20 from "react";
2
+ import * as react78 from "react";
3
3
 
4
4
  //#region src/DatePicker/DatePicker.d.ts
5
- declare const DatePicker: react20.NamedExoticComponent<DatePickerProps>;
5
+ declare const DatePicker: react78.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 react27 from "react";
2
+ import * as react75 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelBody.d.ts
5
5
  type DraggablePanelBodyProps = DivProps;
6
- declare const DraggablePanelBody: react27.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelBody: react75.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 react28 from "react";
2
+ import * as react74 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelContainer.d.ts
5
5
  type DraggablePanelContainerProps = DivProps;
6
- declare const DraggablePanelContainer: react28.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelContainer: react74.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 react29 from "react";
2
+ import * as react77 from "react";
3
3
 
4
4
  //#region src/DraggablePanel/components/DraggablePanelFooter.d.ts
5
5
  type DraggablePanelFooterProps = DivProps;
6
- declare const DraggablePanelFooter: react29.NamedExoticComponent<DivProps>;
6
+ declare const DraggablePanelFooter: react77.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 react30 from "react";
2
+ import * as react76 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: react30.NamedExoticComponent<DraggablePanelHeaderProps>;
12
+ declare const DraggablePanelHeader: react76.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 react16 from "react";
2
+ import * as react6 from "react";
3
3
 
4
4
  //#region src/DraggableSideNav/DraggableSideNav.d.ts
5
- declare const DraggableSideNav: react16.NamedExoticComponent<DraggableSideNavProps>;
5
+ declare const DraggableSideNav: react6.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 react69 from "react";
2
+ import * as react73 from "react";
3
3
 
4
4
  //#region src/Drawer/Drawer.d.ts
5
- declare const Drawer: react69.NamedExoticComponent<DrawerProps>;
5
+ declare const Drawer: react73.NamedExoticComponent<DrawerProps>;
6
6
  //#endregion
7
7
  export { Drawer };
8
8
  //# sourceMappingURL=Drawer.d.mts.map
@@ -1,5 +1,5 @@
1
1
  import { DropdownProps } from "./type.mjs";
2
- import * as react68 from "react";
2
+ import * as react72 from "react";
3
3
 
4
4
  //#region src/Dropdown/Dropdown.d.ts
5
5
 
@@ -9,7 +9,7 @@ import * as react68 from "react";
9
9
  * @see https://ui.lobehub.com/components/context-menu
10
10
  * @see https://ui.lobehub.com/components/dropdown-menu
11
11
  */
12
- declare const Dropdown: react68.NamedExoticComponent<DropdownProps>;
12
+ declare const Dropdown: react72.NamedExoticComponent<DropdownProps>;
13
13
  //#endregion
14
14
  export { Dropdown };
15
15
  //# sourceMappingURL=Dropdown.d.mts.map
@@ -1,8 +1,8 @@
1
1
  import { DropdownMenuProps } from "./type.mjs";
2
- import * as react67 from "react";
2
+ import * as react70 from "react";
3
3
 
4
4
  //#region src/DropdownMenu/DropdownMenu.d.ts
5
- declare const DropdownMenu: react67.NamedExoticComponent<DropdownMenuProps<unknown>>;
5
+ declare const DropdownMenu: react70.NamedExoticComponent<DropdownMenuProps<unknown>>;
6
6
  //#endregion
7
7
  export { DropdownMenu };
8
8
  //# sourceMappingURL=DropdownMenu.d.mts.map
@@ -1,6 +1,6 @@
1
1
  import { DropdownMenuPlacement } from "./type.mjs";
2
2
  import React from "react";
3
- import * as react_jsx_runtime36 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime42 from "react/jsx-runtime";
4
4
  import * as _base_ui_react_menu0 from "@base-ui/react/menu";
5
5
  import { Menu } from "@base-ui/react/menu";
6
6
 
@@ -19,7 +19,7 @@ declare const DropdownMenuTrigger: {
19
19
  nativeButton,
20
20
  ref: refProp,
21
21
  ...rest
22
- }: DropdownMenuTriggerProps): react_jsx_runtime36.JSX.Element;
22
+ }: DropdownMenuTriggerProps): react_jsx_runtime42.JSX.Element;
23
23
  displayName: string;
24
24
  };
25
25
  type DropdownMenuPortalProps = React.ComponentProps<typeof Menu.Portal> & {
@@ -32,7 +32,7 @@ declare const DropdownMenuPortal: {
32
32
  ({
33
33
  container,
34
34
  ...rest
35
- }: DropdownMenuPortalProps): react_jsx_runtime36.JSX.Element;
35
+ }: DropdownMenuPortalProps): react_jsx_runtime42.JSX.Element;
36
36
  displayName: string;
37
37
  };
38
38
  type DropdownMenuPositionerProps = React.ComponentProps<typeof Menu.Positioner> & {
@@ -49,7 +49,7 @@ declare const DropdownMenuPositioner: {
49
49
  sideOffset,
50
50
  children,
51
51
  ...rest
52
- }: DropdownMenuPositionerProps): react_jsx_runtime36.JSX.Element;
52
+ }: DropdownMenuPositionerProps): react_jsx_runtime42.JSX.Element;
53
53
  displayName: string;
54
54
  };
55
55
  type DropdownMenuPopupProps = React.ComponentProps<typeof Menu.Popup>;
@@ -57,7 +57,7 @@ declare const DropdownMenuPopup: {
57
57
  ({
58
58
  className,
59
59
  ...rest
60
- }: DropdownMenuPopupProps): react_jsx_runtime36.JSX.Element;
60
+ }: DropdownMenuPopupProps): react_jsx_runtime42.JSX.Element;
61
61
  displayName: string;
62
62
  };
63
63
  type DropdownMenuItemProps = React.ComponentProps<typeof Menu.Item> & {
@@ -68,7 +68,7 @@ declare const DropdownMenuItem: {
68
68
  className,
69
69
  danger,
70
70
  ...rest
71
- }: DropdownMenuItemProps): react_jsx_runtime36.JSX.Element;
71
+ }: DropdownMenuItemProps): react_jsx_runtime42.JSX.Element;
72
72
  displayName: string;
73
73
  };
74
74
  type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof Menu.CheckboxItem> & {
@@ -79,7 +79,7 @@ declare const DropdownMenuCheckboxItemPrimitive: {
79
79
  className,
80
80
  danger,
81
81
  ...rest
82
- }: DropdownMenuCheckboxItemProps): react_jsx_runtime36.JSX.Element;
82
+ }: DropdownMenuCheckboxItemProps): react_jsx_runtime42.JSX.Element;
83
83
  displayName: string;
84
84
  };
85
85
  type DropdownMenuSeparatorProps = React.ComponentProps<typeof Menu.Separator>;
@@ -87,7 +87,7 @@ declare const DropdownMenuSeparator: {
87
87
  ({
88
88
  className,
89
89
  ...rest
90
- }: DropdownMenuSeparatorProps): react_jsx_runtime36.JSX.Element;
90
+ }: DropdownMenuSeparatorProps): react_jsx_runtime42.JSX.Element;
91
91
  displayName: string;
92
92
  };
93
93
  declare const DropdownMenuGroup: React.ForwardRefExoticComponent<_base_ui_react_menu0.MenuGroupProps & React.RefAttributes<Element>>;
@@ -96,7 +96,7 @@ declare const DropdownMenuGroupLabel: {
96
96
  ({
97
97
  className,
98
98
  ...rest
99
- }: DropdownMenuGroupLabelProps): react_jsx_runtime36.JSX.Element;
99
+ }: DropdownMenuGroupLabelProps): react_jsx_runtime42.JSX.Element;
100
100
  displayName: string;
101
101
  };
102
102
  type DropdownMenuSubmenuTriggerProps = React.ComponentProps<typeof Menu.SubmenuTrigger> & {
@@ -107,7 +107,7 @@ declare const DropdownMenuSubmenuTrigger: {
107
107
  className,
108
108
  danger,
109
109
  ...rest
110
- }: DropdownMenuSubmenuTriggerProps): react_jsx_runtime36.JSX.Element;
110
+ }: DropdownMenuSubmenuTriggerProps): react_jsx_runtime42.JSX.Element;
111
111
  displayName: string;
112
112
  };
113
113
  type DropdownMenuItemContentProps = React.HTMLAttributes<HTMLDivElement>;
@@ -115,7 +115,7 @@ declare const DropdownMenuItemContent: {
115
115
  ({
116
116
  className,
117
117
  ...rest
118
- }: DropdownMenuItemContentProps): react_jsx_runtime36.JSX.Element;
118
+ }: DropdownMenuItemContentProps): react_jsx_runtime42.JSX.Element;
119
119
  displayName: string;
120
120
  };
121
121
  type DropdownMenuItemIconProps = React.HTMLAttributes<HTMLSpanElement>;
@@ -123,7 +123,7 @@ declare const DropdownMenuItemIcon: {
123
123
  ({
124
124
  className,
125
125
  ...rest
126
- }: DropdownMenuItemIconProps): react_jsx_runtime36.JSX.Element;
126
+ }: DropdownMenuItemIconProps): react_jsx_runtime42.JSX.Element;
127
127
  displayName: string;
128
128
  };
129
129
  type DropdownMenuItemLabelProps = React.HTMLAttributes<HTMLSpanElement>;
@@ -131,7 +131,7 @@ declare const DropdownMenuItemLabel: {
131
131
  ({
132
132
  className,
133
133
  ...rest
134
- }: DropdownMenuItemLabelProps): react_jsx_runtime36.JSX.Element;
134
+ }: DropdownMenuItemLabelProps): react_jsx_runtime42.JSX.Element;
135
135
  displayName: string;
136
136
  };
137
137
  type DropdownMenuItemExtraProps = React.HTMLAttributes<HTMLSpanElement>;
@@ -139,7 +139,7 @@ declare const DropdownMenuItemExtra: {
139
139
  ({
140
140
  className,
141
141
  ...rest
142
- }: DropdownMenuItemExtraProps): react_jsx_runtime36.JSX.Element;
142
+ }: DropdownMenuItemExtraProps): react_jsx_runtime42.JSX.Element;
143
143
  displayName: string;
144
144
  };
145
145
  type DropdownMenuSubmenuArrowProps = React.HTMLAttributes<HTMLSpanElement>;
@@ -147,7 +147,7 @@ declare const DropdownMenuSubmenuArrow: {
147
147
  ({
148
148
  className,
149
149
  ...rest
150
- }: DropdownMenuSubmenuArrowProps): react_jsx_runtime36.JSX.Element;
150
+ }: DropdownMenuSubmenuArrowProps): react_jsx_runtime42.JSX.Element;
151
151
  displayName: string;
152
152
  };
153
153
  type DropdownMenuSwitchItemProps = Omit<React.ComponentProps<typeof Menu.Item>, 'onClick'> & {
@@ -168,7 +168,7 @@ declare const DropdownMenuSwitchItem: {
168
168
  onCheckedChange,
169
169
  children,
170
170
  ...rest
171
- }: DropdownMenuSwitchItemProps): react_jsx_runtime36.JSX.Element;
171
+ }: DropdownMenuSwitchItemProps): react_jsx_runtime42.JSX.Element;
172
172
  displayName: string;
173
173
  };
174
174
  //#endregion
@@ -101,6 +101,7 @@ const renderDropdownMenuItems = (items, keyPath = [], options) => {
101
101
  })
102
102
  }), /* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(DropdownMenuPositioner, {
103
103
  alignOffset: -4,
104
+ "data-submenu": "",
104
105
  sideOffset: -1,
105
106
  children: /* @__PURE__ */ jsx(DropdownMenuPopup, { children: submenu.children ? renderDropdownMenuItems(submenu.children, nextKeyPath, { iconSpaceMode }) : null })
106
107
  }) })] }, itemKey);
@@ -1 +1 @@
1
- {"version":3,"file":"renderItems.mjs","names":["info: MenuInfo","label","labelText","isDanger"],"sources":["../../src/DropdownMenu/renderItems.tsx"],"sourcesContent":["import { Check, ChevronRight } from 'lucide-react';\nimport type { MenuInfo } from 'rc-menu/es/interface';\nimport type {\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n} from 'react';\n\nimport {\n type MenuDividerType,\n type MenuItemGroupType,\n type MenuItemType,\n type RenderItemContentOptions,\n type RenderOptions,\n type SubMenuType,\n getItemKey,\n getItemLabel,\n hasAnyIcon,\n hasCheckboxAndIcon,\n renderIcon,\n} from '@/Menu';\n\nimport {\n DropdownMenuCheckboxItemIndicator,\n DropdownMenuCheckboxItemPrimitive,\n DropdownMenuGroup,\n DropdownMenuGroupLabel,\n DropdownMenuItem,\n DropdownMenuItemContent,\n DropdownMenuItemExtra,\n DropdownMenuItemIcon,\n DropdownMenuItemLabel,\n DropdownMenuPopup,\n DropdownMenuPortal,\n DropdownMenuPositioner,\n DropdownMenuSeparator,\n DropdownMenuSubmenuArrow,\n DropdownMenuSubmenuRoot,\n DropdownMenuSubmenuTrigger,\n DropdownMenuSwitchItem,\n} from './atoms';\nimport type {\n DropdownItem,\n DropdownMenuCheckboxItem as DropdownMenuCheckboxItemType,\n DropdownMenuSwitchItem as DropdownMenuSwitchItemType,\n} from './type';\n\nexport type { IconSpaceMode } from '@/Menu';\n\nconst renderItemContent = (\n item: MenuItemType | SubMenuType | DropdownMenuCheckboxItemType | DropdownMenuSwitchItemType,\n options?: RenderItemContentOptions,\n iconNode?: ReactNode,\n) => {\n const label = getItemLabel(item);\n const extra = 'extra' in item ? item.extra : undefined;\n const indicatorOnRight = options?.indicatorOnRight;\n const hasCustomIcon = iconNode !== undefined && !indicatorOnRight;\n const hasIcon = hasCustomIcon ? Boolean(iconNode) : Boolean(item.icon);\n const shouldRenderIcon = hasCustomIcon\n ? Boolean(options?.reserveIconSpace || iconNode)\n : Boolean(hasIcon || options?.reserveIconSpace);\n\n return (\n <DropdownMenuItemContent>\n {shouldRenderIcon ? (\n <DropdownMenuItemIcon aria-hidden={!hasIcon}>\n {hasCustomIcon ? iconNode : hasIcon ? renderIcon(item.icon) : null}\n </DropdownMenuItemIcon>\n ) : null}\n <DropdownMenuItemLabel>{label}</DropdownMenuItemLabel>\n {extra ? <DropdownMenuItemExtra>{extra}</DropdownMenuItemExtra> : null}\n {indicatorOnRight && iconNode ? iconNode : null}\n {options?.submenu ? (\n <DropdownMenuSubmenuArrow>\n <ChevronRight size={16} />\n </DropdownMenuSubmenuArrow>\n ) : null}\n </DropdownMenuItemContent>\n );\n};\n\nconst invokeItemClick = (\n item: MenuItemType,\n keyPath: string[],\n event: ReactMouseEvent<HTMLElement> | ReactKeyboardEvent<HTMLElement>,\n) => {\n if (!item.onClick) return;\n const key = item.key ?? keyPath.at(-1) ?? '';\n const info: MenuInfo = {\n domEvent: event,\n item: event.currentTarget as MenuInfo['item'],\n key: String(key),\n keyPath,\n };\n item.onClick(info);\n};\n\nexport const renderDropdownMenuItems = (\n items: DropdownItem[],\n keyPath: string[] = [],\n options?: RenderOptions,\n): ReactNode[] => {\n const iconSpaceMode = options?.iconSpaceMode ?? 'global';\n const reserveIconSpace =\n options?.reserveIconSpace ?? hasAnyIcon(items, iconSpaceMode === 'global');\n const indicatorOnRight = options?.indicatorOnRight ?? hasCheckboxAndIcon(items);\n\n return items.map((item, index) => {\n if (!item) return null;\n\n const fallbackKey = `${keyPath.join('-') || 'root'}-${index}`;\n const itemKey = getItemKey(item, fallbackKey);\n const nextKeyPath = [...keyPath, String(itemKey)];\n\n if ((item as DropdownMenuCheckboxItemType).type === 'checkbox') {\n const checkboxItem = item as DropdownMenuCheckboxItemType;\n const label = getItemLabel(checkboxItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(checkboxItem.danger);\n const indicator = (\n <DropdownMenuCheckboxItemIndicator>{renderIcon(Check)}</DropdownMenuCheckboxItemIndicator>\n );\n\n return (\n <DropdownMenuCheckboxItemPrimitive\n checked={checkboxItem.checked}\n closeOnClick={checkboxItem.closeOnClick}\n danger={isDanger}\n defaultChecked={checkboxItem.defaultChecked}\n disabled={checkboxItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={(checked) => checkboxItem.onCheckedChange?.(checked)}\n >\n {renderItemContent(checkboxItem, { indicatorOnRight, reserveIconSpace }, indicator)}\n </DropdownMenuCheckboxItemPrimitive>\n );\n }\n\n if ((item as DropdownMenuSwitchItemType).type === 'switch') {\n const switchItem = item as DropdownMenuSwitchItemType;\n const label = getItemLabel(switchItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(switchItem.danger);\n\n return (\n <DropdownMenuSwitchItem\n checked={switchItem.checked}\n closeOnClick={switchItem.closeOnClick}\n danger={isDanger}\n defaultChecked={switchItem.defaultChecked}\n disabled={switchItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={(checked) => switchItem.onCheckedChange?.(checked)}\n >\n {renderItemContent(switchItem, { reserveIconSpace })}\n </DropdownMenuSwitchItem>\n );\n }\n\n if ((item as MenuDividerType).type === 'divider') {\n return <DropdownMenuSeparator key={itemKey} />;\n }\n\n if ((item as MenuItemGroupType).type === 'group') {\n const group = item as MenuItemGroupType;\n const groupReserveIconSpace =\n iconSpaceMode === 'group'\n ? group.children\n ? hasAnyIcon(group.children)\n : false\n : reserveIconSpace;\n const groupIndicatorOnRight = group.children ? hasCheckboxAndIcon(group.children) : false;\n return (\n <DropdownMenuGroup key={itemKey}>\n {group.label ? <DropdownMenuGroupLabel>{group.label}</DropdownMenuGroupLabel> : null}\n {group.children\n ? renderDropdownMenuItems(group.children, nextKeyPath, {\n iconSpaceMode,\n indicatorOnRight: groupIndicatorOnRight,\n reserveIconSpace: groupReserveIconSpace,\n })\n : null}\n </DropdownMenuGroup>\n );\n }\n\n if ((item as SubMenuType).type === 'submenu' || 'children' in item) {\n const submenu = item as SubMenuType;\n const label = getItemLabel(submenu);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in submenu && Boolean(submenu.danger);\n\n return (\n <DropdownMenuSubmenuRoot key={itemKey}>\n <DropdownMenuSubmenuTrigger\n danger={isDanger}\n disabled={submenu.disabled}\n label={labelText}\n >\n {renderItemContent(submenu, {\n reserveIconSpace,\n submenu: true,\n })}\n </DropdownMenuSubmenuTrigger>\n <DropdownMenuPortal>\n <DropdownMenuPositioner alignOffset={-4} sideOffset={-1}>\n <DropdownMenuPopup>\n {submenu.children\n ? renderDropdownMenuItems(submenu.children, nextKeyPath, { iconSpaceMode })\n : null}\n </DropdownMenuPopup>\n </DropdownMenuPositioner>\n </DropdownMenuPortal>\n </DropdownMenuSubmenuRoot>\n );\n }\n\n const menuItem = item as MenuItemType;\n const label = getItemLabel(menuItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in menuItem && Boolean(menuItem.danger);\n\n return (\n <DropdownMenuItem\n closeOnClick={menuItem.closeOnClick}\n danger={isDanger}\n disabled={menuItem.disabled}\n key={itemKey}\n label={labelText}\n onClick={(event) => invokeItemClick(menuItem, nextKeyPath, event)}\n >\n {renderItemContent(menuItem, { reserveIconSpace })}\n </DropdownMenuItem>\n );\n });\n};\n"],"mappings":";;;;;;AAiDA,MAAM,qBACJ,MACA,SACA,aACG;CACH,MAAM,Q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KAAqB,SAAS,aAAa,cAAc,MAAM;GAClE,MAAM,UAAU;GAChB,MAAMD,UAAQ,aAAa,QAAQ;GACnC,MAAMC,cAAY,OAAOD,YAAU,WAAWA,UAAQ;AAGtD,UACE,qBAAC,sCACC,oBAAC;IACC,QALW,YAAY,WAAW,QAAQ,QAAQ,OAAO;IAMzD,UAAU,QAAQ;IAClB,OAAOC;cAEN,kBAAkB,SAAS;KAC1B;KACA,SAAS;KACV,CAAC;KACyB,EAC7B,oBAAC,gCACC,oBAAC;IAAuB,aAAa;IAAI,YAAY;cACnD,oBAAC,+BACE,QAAQ,WACL,wBAAwB,QAAQ,UAAU,aAAa,EAAE,eAAe,CAAC,GACzE,OACc;KACG,GACN,KAnBO,QAoBJ;;EAI9B,MAAM,WAAW;EACjB,MAAM,QAAQ,aAAa,SAAS;EACpC,MAAM,YAAY,OAAO,UAAU,WAAW,QAAQ;EACtD,MAAM,WAAW,YAAY,YAAY,QAAQ,SAAS,OAAO;AAEjE,SACE,oBAAC;GACC,cAAc,SAAS;GACvB,QAAQ;GACR,UAAU,SAAS;GAEnB,OAAO;GACP,UAAU,UAAU,gBAAgB,UAAU,aAAa,MAAM;aAEhE,kBAAkB,UAAU,EAAE,kBAAkB,CAAC;KAJ7C,QAKY;GAErB"}
1
+ {"version":3,"file":"renderItems.mjs","names":["info: MenuInfo","label","labelText","isDanger"],"sources":["../../src/DropdownMenu/renderItems.tsx"],"sourcesContent":["import { Check, ChevronRight } from 'lucide-react';\nimport type { MenuInfo } from 'rc-menu/es/interface';\nimport type {\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n} from 'react';\n\nimport {\n type MenuDividerType,\n type MenuItemGroupType,\n type MenuItemType,\n type RenderItemContentOptions,\n type RenderOptions,\n type SubMenuType,\n getItemKey,\n getItemLabel,\n hasAnyIcon,\n hasCheckboxAndIcon,\n renderIcon,\n} from '@/Menu';\n\nimport {\n DropdownMenuCheckboxItemIndicator,\n DropdownMenuCheckboxItemPrimitive,\n DropdownMenuGroup,\n DropdownMenuGroupLabel,\n DropdownMenuItem,\n DropdownMenuItemContent,\n DropdownMenuItemExtra,\n DropdownMenuItemIcon,\n DropdownMenuItemLabel,\n DropdownMenuPopup,\n DropdownMenuPortal,\n DropdownMenuPositioner,\n DropdownMenuSeparator,\n DropdownMenuSubmenuArrow,\n DropdownMenuSubmenuRoot,\n DropdownMenuSubmenuTrigger,\n DropdownMenuSwitchItem,\n} from './atoms';\nimport type {\n DropdownItem,\n DropdownMenuCheckboxItem as DropdownMenuCheckboxItemType,\n DropdownMenuSwitchItem as DropdownMenuSwitchItemType,\n} from './type';\n\nexport type { IconSpaceMode } from '@/Menu';\n\nconst renderItemContent = (\n item: MenuItemType | SubMenuType | DropdownMenuCheckboxItemType | DropdownMenuSwitchItemType,\n options?: RenderItemContentOptions,\n iconNode?: ReactNode,\n) => {\n const label = getItemLabel(item);\n const extra = 'extra' in item ? item.extra : undefined;\n const indicatorOnRight = options?.indicatorOnRight;\n const hasCustomIcon = iconNode !== undefined && !indicatorOnRight;\n const hasIcon = hasCustomIcon ? Boolean(iconNode) : Boolean(item.icon);\n const shouldRenderIcon = hasCustomIcon\n ? Boolean(options?.reserveIconSpace || iconNode)\n : Boolean(hasIcon || options?.reserveIconSpace);\n\n return (\n <DropdownMenuItemContent>\n {shouldRenderIcon ? (\n <DropdownMenuItemIcon aria-hidden={!hasIcon}>\n {hasCustomIcon ? iconNode : hasIcon ? renderIcon(item.icon) : null}\n </DropdownMenuItemIcon>\n ) : null}\n <DropdownMenuItemLabel>{label}</DropdownMenuItemLabel>\n {extra ? <DropdownMenuItemExtra>{extra}</DropdownMenuItemExtra> : null}\n {indicatorOnRight && iconNode ? iconNode : null}\n {options?.submenu ? (\n <DropdownMenuSubmenuArrow>\n <ChevronRight size={16} />\n </DropdownMenuSubmenuArrow>\n ) : null}\n </DropdownMenuItemContent>\n );\n};\n\nconst invokeItemClick = (\n item: MenuItemType,\n keyPath: string[],\n event: ReactMouseEvent<HTMLElement> | ReactKeyboardEvent<HTMLElement>,\n) => {\n if (!item.onClick) return;\n const key = item.key ?? keyPath.at(-1) ?? '';\n const info: MenuInfo = {\n domEvent: event,\n item: event.currentTarget as MenuInfo['item'],\n key: String(key),\n keyPath,\n };\n item.onClick(info);\n};\n\nexport const renderDropdownMenuItems = (\n items: DropdownItem[],\n keyPath: string[] = [],\n options?: RenderOptions,\n): ReactNode[] => {\n const iconSpaceMode = options?.iconSpaceMode ?? 'global';\n const reserveIconSpace =\n options?.reserveIconSpace ?? hasAnyIcon(items, iconSpaceMode === 'global');\n const indicatorOnRight = options?.indicatorOnRight ?? hasCheckboxAndIcon(items);\n\n return items.map((item, index) => {\n if (!item) return null;\n\n const fallbackKey = `${keyPath.join('-') || 'root'}-${index}`;\n const itemKey = getItemKey(item, fallbackKey);\n const nextKeyPath = [...keyPath, String(itemKey)];\n\n if ((item as DropdownMenuCheckboxItemType).type === 'checkbox') {\n const checkboxItem = item as DropdownMenuCheckboxItemType;\n const label = getItemLabel(checkboxItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(checkboxItem.danger);\n const indicator = (\n <DropdownMenuCheckboxItemIndicator>{renderIcon(Check)}</DropdownMenuCheckboxItemIndicator>\n );\n\n return (\n <DropdownMenuCheckboxItemPrimitive\n checked={checkboxItem.checked}\n closeOnClick={checkboxItem.closeOnClick}\n danger={isDanger}\n defaultChecked={checkboxItem.defaultChecked}\n disabled={checkboxItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={(checked) => checkboxItem.onCheckedChange?.(checked)}\n >\n {renderItemContent(checkboxItem, { indicatorOnRight, reserveIconSpace }, indicator)}\n </DropdownMenuCheckboxItemPrimitive>\n );\n }\n\n if ((item as DropdownMenuSwitchItemType).type === 'switch') {\n const switchItem = item as DropdownMenuSwitchItemType;\n const label = getItemLabel(switchItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = Boolean(switchItem.danger);\n\n return (\n <DropdownMenuSwitchItem\n checked={switchItem.checked}\n closeOnClick={switchItem.closeOnClick}\n danger={isDanger}\n defaultChecked={switchItem.defaultChecked}\n disabled={switchItem.disabled}\n key={itemKey}\n label={labelText}\n onCheckedChange={(checked) => switchItem.onCheckedChange?.(checked)}\n >\n {renderItemContent(switchItem, { reserveIconSpace })}\n </DropdownMenuSwitchItem>\n );\n }\n\n if ((item as MenuDividerType).type === 'divider') {\n return <DropdownMenuSeparator key={itemKey} />;\n }\n\n if ((item as MenuItemGroupType).type === 'group') {\n const group = item as MenuItemGroupType;\n const groupReserveIconSpace =\n iconSpaceMode === 'group'\n ? group.children\n ? hasAnyIcon(group.children)\n : false\n : reserveIconSpace;\n const groupIndicatorOnRight = group.children ? hasCheckboxAndIcon(group.children) : false;\n return (\n <DropdownMenuGroup key={itemKey}>\n {group.label ? <DropdownMenuGroupLabel>{group.label}</DropdownMenuGroupLabel> : null}\n {group.children\n ? renderDropdownMenuItems(group.children, nextKeyPath, {\n iconSpaceMode,\n indicatorOnRight: groupIndicatorOnRight,\n reserveIconSpace: groupReserveIconSpace,\n })\n : null}\n </DropdownMenuGroup>\n );\n }\n\n if ((item as SubMenuType).type === 'submenu' || 'children' in item) {\n const submenu = item as SubMenuType;\n const label = getItemLabel(submenu);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in submenu && Boolean(submenu.danger);\n\n return (\n <DropdownMenuSubmenuRoot key={itemKey}>\n <DropdownMenuSubmenuTrigger\n danger={isDanger}\n disabled={submenu.disabled}\n label={labelText}\n >\n {renderItemContent(submenu, {\n reserveIconSpace,\n submenu: true,\n })}\n </DropdownMenuSubmenuTrigger>\n <DropdownMenuPortal>\n <DropdownMenuPositioner alignOffset={-4} data-submenu=\"\" sideOffset={-1}>\n <DropdownMenuPopup>\n {submenu.children\n ? renderDropdownMenuItems(submenu.children, nextKeyPath, { iconSpaceMode })\n : null}\n </DropdownMenuPopup>\n </DropdownMenuPositioner>\n </DropdownMenuPortal>\n </DropdownMenuSubmenuRoot>\n );\n }\n\n const menuItem = item as MenuItemType;\n const label = getItemLabel(menuItem);\n const labelText = typeof label === 'string' ? label : undefined;\n const isDanger = 'danger' in menuItem && Boolean(menuItem.danger);\n\n return (\n <DropdownMenuItem\n closeOnClick={menuItem.closeOnClick}\n danger={isDanger}\n disabled={menuItem.disabled}\n key={itemKey}\n label={labelText}\n onClick={(event) => invokeItemClick(menuItem, nextKeyPath, event)}\n >\n {renderItemContent(menuItem, { reserveIconSpace })}\n </DropdownMenuItem>\n );\n });\n};\n"],"mappings":";;;;;;AAiDA,MAAM,qBACJ,MACA,SACA,aACG;CACH,MAAM,QAAQ,aAAa,KAAK;CAChC,MAAM,QAAQ,WAAW,OAAO,KAAK,QAAQ;CAC7C,MAAM,mBAAmB,SAAS;CAClC,MAAM,gBAAgB,aAAa,UAAa,CAAC;CACjD,MAAM,UAAU,gBAAgB,QAAQ,SAAS,GAAG,QAAQ,KAAK,KAAK;AAKtE,QACE,qBAAC;GALsB,gBACrB,QAAQ,SAAS,oBAAoB,SAAS,GAC9C,QAAQ,WAAW,SAAS,iBAAiB,IAK3C,oBAAC;GAAqB,eAAa,CAAC;aACjC,gBAAgB,WAAW,UAAU,WAAW,KAAK,KAAK,GAAG;IACzC,GACrB;EACJ,oBAAC,mCAAuB,QAA8B;EACrD,QAAQ,oBAAC,mCAAuB,QAA8B,GAAG;EACjE,oBAAoB,WAAW,WAAW;EAC1C,SAAS,UACR,oBAAC,sCACC,oBAAC,gBAAa,MAAM,KAAM,GACD,GACzB;KACoB;;AAI9B,MAAM,mBACJ,MACA,SACA,UACG;AACH,KAAI,CAAC,KAAK,QAAS;CACnB,MAAM,MAAM,KAAK,OAAO,QAAQ,GAAG,GAAG,IAAI;CAC1C,MAAMA,OAAiB;EACrB,UAAU;EACV,MAAM,MAAM;EACZ,KAAK,OAAO,IAAI;EAChB;EACD;AACD,MAAK,QAAQ,KAAK;;AAGpB,MAAa,2BACX,OACA,UAAoB,EAAE,EACtB,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{ EditableTextProps } from "./type.mjs";
2
- import * as react65 from "react";
2
+ import * as react71 from "react";
3
3
 
4
4
  //#region src/EditableText/EditableText.d.ts
5
- declare const EditableText: react65.NamedExoticComponent<EditableTextProps>;
5
+ declare const EditableText: react71.NamedExoticComponent<EditableTextProps>;
6
6
  //#endregion
7
7
  export { EditableText };
8
8
  //# sourceMappingURL=EditableText.d.mts.map