@gx-design-vue/pro-layout 0.1.0-alpha.2 → 0.1.0-alpha.21

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 (272) hide show
  1. package/dist/ProLayout.d.ts +4 -536
  2. package/dist/ProLayout.js +489 -358
  3. package/dist/components/AppPage/context.d.ts +4 -3
  4. package/dist/components/AppPage/context.js +3 -5
  5. package/dist/components/AppPage/index.d.ts +29 -52
  6. package/dist/components/AppPage/index.js +71 -54
  7. package/dist/components/AppPage/style.d.ts +8 -7
  8. package/dist/components/AppPage/style.js +16 -17
  9. package/dist/components/Breadcrumb/index.d.ts +19 -0
  10. package/dist/components/Breadcrumb/index.js +129 -0
  11. package/dist/components/Breadcrumb/interface.d.ts +33 -0
  12. package/dist/components/Breadcrumb/interface.js +1 -0
  13. package/dist/components/CollapseButton/Arrow.d.ts +4 -0
  14. package/dist/components/{SiderMenu → CollapseButton}/Arrow.js +2 -4
  15. package/dist/components/CollapseButton/index.d.ts +7 -0
  16. package/dist/components/CollapseButton/index.js +45 -0
  17. package/dist/components/CollapseButton/interface.d.ts +19 -0
  18. package/dist/components/CollapseButton/interface.js +1 -0
  19. package/dist/components/Footer/index.d.ts +10 -0
  20. package/dist/components/Footer/index.js +69 -0
  21. package/dist/components/Footer/interface.d.ts +22 -0
  22. package/dist/components/Footer/interface.js +1 -0
  23. package/dist/components/FooterToolbar/index.d.ts +5 -72
  24. package/dist/components/FooterToolbar/index.js +77 -90
  25. package/dist/components/FooterToolbar/style.d.ts +10 -0
  26. package/dist/components/FooterToolbar/style.js +34 -0
  27. package/dist/components/Header/index.d.ts +7 -0
  28. package/dist/components/Header/index.js +140 -0
  29. package/dist/components/Header/interface.d.ts +41 -0
  30. package/dist/components/Header/interface.js +1 -0
  31. package/dist/components/Logo/index.d.ts +9 -0
  32. package/dist/components/Logo/index.js +63 -0
  33. package/dist/components/Logo/interface.d.ts +13 -0
  34. package/dist/components/Logo/interface.js +1 -0
  35. package/dist/components/Menu/iconRender.d.ts +10 -0
  36. package/dist/components/Menu/iconRender.js +23 -0
  37. package/dist/components/Menu/index.d.ts +13 -0
  38. package/dist/components/Menu/index.js +778 -0
  39. package/dist/components/Menu/interface.d.ts +50 -0
  40. package/dist/components/Menu/interface.js +9 -0
  41. package/dist/components/Menu/overflow.d.ts +39 -0
  42. package/dist/components/Menu/overflow.js +81 -0
  43. package/dist/components/Menu/style/base.d.ts +12 -0
  44. package/dist/components/Menu/style/base.js +36 -0
  45. package/dist/components/Menu/style/horizontal.d.ts +19 -0
  46. package/dist/components/Menu/style/horizontal.js +303 -0
  47. package/dist/components/Menu/style/index.d.ts +356 -0
  48. package/dist/components/Menu/style/index.js +147 -0
  49. package/dist/components/Menu/style/inline.d.ts +13 -0
  50. package/dist/components/Menu/style/inline.js +292 -0
  51. package/dist/components/PageContainer/PageHeader.d.ts +30 -36
  52. package/dist/components/PageContainer/PageHeader.js +80 -46
  53. package/dist/components/PageContainer/index.d.ts +8 -194
  54. package/dist/components/PageContainer/index.js +297 -209
  55. package/dist/components/PageContainer/style.d.ts +5 -0
  56. package/dist/components/PageContainer/style.js +142 -0
  57. package/dist/components/PageTransition/animate.d.ts +41 -0
  58. package/dist/components/PageTransition/animate.js +106 -0
  59. package/dist/components/PageTransition/index.d.ts +57 -0
  60. package/dist/components/PageTransition/index.js +66 -0
  61. package/dist/components/{PageTranstion → PageTransition}/keyFrame/back.d.ts +4 -4
  62. package/dist/components/{PageTranstion → PageTransition}/keyFrame/back.js +2 -4
  63. package/dist/components/{PageTranstion → PageTransition}/keyFrame/bounce.d.ts +4 -4
  64. package/dist/components/{PageTranstion → PageTransition}/keyFrame/bounce.js +2 -4
  65. package/dist/components/{PageTranstion → PageTransition}/keyFrame/fade.d.ts +4 -4
  66. package/dist/components/{PageTranstion → PageTransition}/keyFrame/fade.js +2 -4
  67. package/dist/components/{PageTranstion → PageTransition}/keyFrame/flip.d.ts +4 -4
  68. package/dist/components/{PageTranstion → PageTransition}/keyFrame/flip.js +2 -4
  69. package/dist/components/{PageTranstion → PageTransition}/keyFrame/lightSpeed.d.ts +4 -4
  70. package/dist/components/{PageTranstion → PageTransition}/keyFrame/lightSpeed.js +2 -4
  71. package/dist/components/PageTransition/keyFrame/roll.d.ts +10 -0
  72. package/dist/components/{PageTranstion → PageTransition}/keyFrame/roll.js +2 -4
  73. package/dist/components/{PageTranstion → PageTransition}/keyFrame/rotate.d.ts +4 -4
  74. package/dist/components/{PageTranstion → PageTransition}/keyFrame/rotate.js +2 -4
  75. package/dist/components/{PageTranstion → PageTransition}/keyFrame/slide.d.ts +4 -4
  76. package/dist/components/{PageTranstion → PageTransition}/keyFrame/slide.js +2 -4
  77. package/dist/components/{PageTranstion → PageTransition}/keyFrame/zoom.d.ts +4 -4
  78. package/dist/components/{PageTranstion → PageTransition}/keyFrame/zoom.js +2 -4
  79. package/dist/components/PageTransition/style.d.ts +11 -0
  80. package/dist/components/{PageTranstion → PageTransition}/style.js +9 -13
  81. package/dist/components/Sider/index.d.ts +7 -0
  82. package/dist/components/Sider/index.js +206 -0
  83. package/dist/components/Sider/interface.d.ts +39 -0
  84. package/dist/components/Sider/interface.js +1 -0
  85. package/dist/components/Tabs/InnerTabs.d.ts +7 -0
  86. package/dist/components/Tabs/InnerTabs.js +117 -0
  87. package/dist/components/Tabs/contextMenu.d.ts +41 -0
  88. package/dist/components/Tabs/contextMenu.js +89 -0
  89. package/dist/components/Tabs/hooks/flipAnimate.d.ts +24 -0
  90. package/dist/components/Tabs/hooks/flipAnimate.js +40 -0
  91. package/dist/components/Tabs/hooks/useAutoScroll.d.ts +27 -0
  92. package/dist/components/Tabs/hooks/useAutoScroll.js +122 -0
  93. package/dist/components/Tabs/hooks/useTabDrag.d.ts +31 -0
  94. package/dist/components/Tabs/hooks/useTabDrag.js +252 -0
  95. package/dist/components/Tabs/index.d.ts +13 -0
  96. package/dist/components/Tabs/index.js +181 -0
  97. package/dist/components/Tabs/interface.d.ts +74 -0
  98. package/dist/components/Tabs/interface.js +1 -0
  99. package/dist/components/Tabs/style/index.d.ts +35 -0
  100. package/dist/components/Tabs/style/index.js +161 -0
  101. package/dist/components/WrapContent/index.d.ts +9 -0
  102. package/dist/components/WrapContent/index.js +26 -0
  103. package/dist/components/WrapContent/interface.d.ts +15 -0
  104. package/dist/components/WrapContent/interface.js +1 -0
  105. package/dist/context/index.d.ts +53 -0
  106. package/dist/context/index.js +5 -0
  107. package/dist/defaultConfig.d.ts +10 -0
  108. package/dist/defaultConfig.js +38 -0
  109. package/dist/hooks/useLayoutBase.d.ts +78 -0
  110. package/dist/hooks/useLayoutBase.js +86 -0
  111. package/dist/hooks/useMenu.d.ts +77 -0
  112. package/dist/hooks/useMenu.js +166 -0
  113. package/dist/hooks/useTabs.d.ts +54 -0
  114. package/dist/hooks/useTabs.js +388 -0
  115. package/dist/index.d.ts +22 -27
  116. package/dist/index.js +15 -24
  117. package/dist/interface.d.ts +516 -0
  118. package/dist/interface.js +34 -0
  119. package/dist/pro-layout.esm.js +5848 -5075
  120. package/dist/pro-layout.js +16 -37
  121. package/dist/style/breadcrumb.d.ts +8 -0
  122. package/dist/style/breadcrumb.js +77 -0
  123. package/dist/style/collapseButton.d.ts +8 -0
  124. package/dist/style/collapseButton.js +57 -0
  125. package/dist/style/content.d.ts +8 -0
  126. package/dist/style/content.js +29 -0
  127. package/dist/style/footer.d.ts +8 -0
  128. package/dist/style/footer.js +33 -0
  129. package/dist/style/header.d.ts +8 -0
  130. package/dist/style/header.js +76 -0
  131. package/dist/style/index.d.ts +3 -22
  132. package/dist/style/index.js +51 -55
  133. package/dist/style/logo.d.ts +8 -0
  134. package/dist/style/logo.js +76 -0
  135. package/dist/style/menu.d.ts +15 -0
  136. package/dist/style/menu.js +49 -0
  137. package/dist/style/rightContent.d.ts +12 -0
  138. package/dist/style/rightContent.js +74 -0
  139. package/dist/style/search.d.ts +12 -0
  140. package/dist/style/search.js +94 -0
  141. package/dist/style/sider.d.ts +8 -0
  142. package/dist/style/sider.js +92 -0
  143. package/dist/style/tabs.d.ts +14 -0
  144. package/dist/style/tabs.js +97 -0
  145. package/dist/theme/augment.d.ts +20 -0
  146. package/dist/theme/augment.js +1 -0
  147. package/dist/theme/interface/components.d.ts +20 -0
  148. package/dist/theme/interface/components.js +1 -0
  149. package/dist/utils/config.d.ts +12 -0
  150. package/dist/utils/config.js +18 -0
  151. package/dist/utils/menu.d.ts +111 -20
  152. package/dist/utils/menu.js +263 -118
  153. package/dist/utils/style.d.ts +4 -0
  154. package/dist/utils/style.js +21 -0
  155. package/dist/utils/themeComponents.d.ts +28 -0
  156. package/dist/utils/themeComponents.js +89 -0
  157. package/package.json +24 -15
  158. package/dist/Context/expose.d.ts +0 -6
  159. package/dist/Context/expose.js +0 -7
  160. package/dist/Context/index.d.ts +0 -43
  161. package/dist/Context/index.js +0 -18
  162. package/dist/WrapContent.d.ts +0 -100
  163. package/dist/WrapContent.js +0 -45
  164. package/dist/components/BaseMenu/index.d.ts +0 -255
  165. package/dist/components/BaseMenu/index.js +0 -381
  166. package/dist/components/BaseMenu/props.d.ts +0 -105
  167. package/dist/components/BaseMenu/props.js +0 -94
  168. package/dist/components/BaseMenu/style.d.ts +0 -6
  169. package/dist/components/BaseMenu/style.js +0 -155
  170. package/dist/components/BreadCrumb/Breadcrumb.d.ts +0 -33
  171. package/dist/components/BreadCrumb/Breadcrumb.js +0 -75
  172. package/dist/components/BreadCrumb/index.d.ts +0 -7
  173. package/dist/components/BreadCrumb/index.js +0 -44
  174. package/dist/components/BreadCrumb/style.d.ts +0 -8
  175. package/dist/components/BreadCrumb/style.js +0 -87
  176. package/dist/components/CollapsedIcon/index.d.ts +0 -33
  177. package/dist/components/CollapsedIcon/index.js +0 -51
  178. package/dist/components/CollapsedIcon/style.d.ts +0 -9
  179. package/dist/components/CollapsedIcon/style.js +0 -34
  180. package/dist/components/FooterToolbar/props.d.ts +0 -47
  181. package/dist/components/FooterToolbar/props.js +0 -33
  182. package/dist/components/FooterToolbar/style/index.d.ts +0 -14
  183. package/dist/components/FooterToolbar/style/index.js +0 -48
  184. package/dist/components/FooterToolbar/style/stylish.d.ts +0 -18
  185. package/dist/components/FooterToolbar/style/stylish.js +0 -16
  186. package/dist/components/GlobalFooter/index.d.ts +0 -73
  187. package/dist/components/GlobalFooter/index.js +0 -77
  188. package/dist/components/GlobalFooter/style.d.ts +0 -6
  189. package/dist/components/GlobalFooter/style.js +0 -29
  190. package/dist/components/GlobalHeader/DefaultHeader.d.ts +0 -164
  191. package/dist/components/GlobalHeader/DefaultHeader.js +0 -149
  192. package/dist/components/GlobalHeader/index.d.ts +0 -164
  193. package/dist/components/GlobalHeader/index.js +0 -78
  194. package/dist/components/GlobalHeader/props.d.ts +0 -70
  195. package/dist/components/GlobalHeader/props.js +0 -56
  196. package/dist/components/GlobalHeader/style/defaultHeader.d.ts +0 -6
  197. package/dist/components/GlobalHeader/style/defaultHeader.js +0 -108
  198. package/dist/components/GlobalHeader/style/header.d.ts +0 -6
  199. package/dist/components/GlobalHeader/style/header.js +0 -41
  200. package/dist/components/LogoContent/index.d.ts +0 -80
  201. package/dist/components/LogoContent/index.js +0 -90
  202. package/dist/components/LogoContent/props.d.ts +0 -57
  203. package/dist/components/LogoContent/props.js +0 -37
  204. package/dist/components/LogoContent/style.d.ts +0 -6
  205. package/dist/components/LogoContent/style.js +0 -63
  206. package/dist/components/PageContainer/props.d.ts +0 -138
  207. package/dist/components/PageContainer/props.js +0 -103
  208. package/dist/components/PageContainer/style/index.d.ts +0 -14
  209. package/dist/components/PageContainer/style/index.js +0 -52
  210. package/dist/components/PageContainer/style/pageHeader.d.ts +0 -6
  211. package/dist/components/PageContainer/style/pageHeader.js +0 -44
  212. package/dist/components/PageTranstion/index.d.ts +0 -40
  213. package/dist/components/PageTranstion/index.js +0 -71
  214. package/dist/components/PageTranstion/keyFrame/roll.d.ts +0 -10
  215. package/dist/components/PageTranstion/style.d.ts +0 -10
  216. package/dist/components/SiderMenu/Arrow.d.ts +0 -6
  217. package/dist/components/SiderMenu/SiderMenu.d.ts +0 -180
  218. package/dist/components/SiderMenu/SiderMenu.js +0 -265
  219. package/dist/components/SiderMenu/index.d.ts +0 -193
  220. package/dist/components/SiderMenu/index.js +0 -51
  221. package/dist/components/SiderMenu/props.d.ts +0 -77
  222. package/dist/components/SiderMenu/props.js +0 -67
  223. package/dist/components/SiderMenu/style/index.d.ts +0 -12
  224. package/dist/components/SiderMenu/style/index.js +0 -162
  225. package/dist/components/SiderMenu/typings.d.ts +0 -38
  226. package/dist/components/SiderMenu/typings.js +0 -1
  227. package/dist/components/TabsRoute/index.d.ts +0 -95
  228. package/dist/components/TabsRoute/index.js +0 -405
  229. package/dist/components/TabsRoute/props.d.ts +0 -78
  230. package/dist/components/TabsRoute/props.js +0 -47
  231. package/dist/components/TabsRoute/style.d.ts +0 -15
  232. package/dist/components/TabsRoute/style.js +0 -133
  233. package/dist/components/TabsRoute/utils/config.d.ts +0 -18
  234. package/dist/components/TabsRoute/utils/config.js +0 -64
  235. package/dist/config/animate.d.ts +0 -11
  236. package/dist/config/animate.js +0 -76
  237. package/dist/config/index.d.ts +0 -34
  238. package/dist/config/index.js +0 -30
  239. package/dist/hooks/collapsed/index.d.ts +0 -15
  240. package/dist/hooks/collapsed/index.js +0 -50
  241. package/dist/hooks/layout/useLayoutExpose.d.ts +0 -15
  242. package/dist/hooks/layout/useLayoutExpose.js +0 -22
  243. package/dist/hooks/layout/usePageContent.d.ts +0 -6
  244. package/dist/hooks/layout/usePageContent.js +0 -28
  245. package/dist/hooks/menu/context.d.ts +0 -21
  246. package/dist/hooks/menu/context.js +0 -7
  247. package/dist/hooks/menu/index.d.ts +0 -29
  248. package/dist/hooks/menu/index.js +0 -118
  249. package/dist/hooks/theme/index.d.ts +0 -11
  250. package/dist/hooks/theme/index.js +0 -13
  251. package/dist/props/collapsedProps.d.ts +0 -39
  252. package/dist/props/collapsedProps.js +0 -45
  253. package/dist/props/defaultSettings.d.ts +0 -62
  254. package/dist/props/defaultSettings.js +0 -56
  255. package/dist/props/index.d.ts +0 -226
  256. package/dist/props/index.js +0 -109
  257. package/dist/props/themeProps.d.ts +0 -14
  258. package/dist/props/themeProps.js +0 -10
  259. package/dist/types/Breadcrumb.d.ts +0 -22
  260. package/dist/types/Breadcrumb.js +0 -1
  261. package/dist/types/MenuTypings.d.ts +0 -46
  262. package/dist/types/MenuTypings.js +0 -1
  263. package/dist/types/RouteTypings.d.ts +0 -96
  264. package/dist/types/RouteTypings.js +0 -1
  265. package/dist/types/SlotsTypings.d.ts +0 -124
  266. package/dist/types/SlotsTypings.js +0 -32
  267. package/dist/types/typings.d.ts +0 -73
  268. package/dist/types/typings.js +0 -3
  269. package/dist/utils/index.d.ts +0 -7
  270. package/dist/utils/index.js +0 -17
  271. package/dist/utils/style/index.d.ts +0 -44
  272. package/dist/utils/style/index.js +0 -103
@@ -0,0 +1,74 @@
1
+ import { setAlpha } from "@gx-design-vue/pro-provider";
2
+ //#region src/style/rightContent.ts
3
+ /**
4
+ * RightContent 操作区样式
5
+ * - 注册在 ProLayout 下,使用 ProLayout 扁平 token
6
+ */
7
+ const genRightContentStyle = (token) => {
8
+ return { [`${token.componentCls}-right-content`]: {
9
+ height: "100%",
10
+ "&-header-actions": {
11
+ display: "flex",
12
+ alignItems: "center",
13
+ justifyContent: "flex-end",
14
+ height: "100%",
15
+ gap: token.paddingXS,
16
+ "&-item": {
17
+ display: "inline-flex",
18
+ alignItems: "center",
19
+ justifyContent: "center",
20
+ paddingBlock: 0,
21
+ paddingInline: 2,
22
+ color: token.headerColorTextRightActionsItem,
23
+ fontSize: 14,
24
+ cursor: "pointer",
25
+ borderRadius: token.borderRadius,
26
+ [`.anticon`]: {
27
+ color: token.headerColorTextRightActionsItem,
28
+ transition: `color ${token.motionDurationMid}, background-color ${token.motionDurationMid}`,
29
+ "&:hover": { color: token.headerColorTextRightActionsItemHover }
30
+ },
31
+ [`&${token.componentCls}-right-content-header-actions-theme`]: { [`${token.componentCls}-right-content-header-actions-icon`]: {
32
+ paddingInline: 4,
33
+ paddingBlock: 4,
34
+ fontSize: 18
35
+ } },
36
+ "> *": {
37
+ paddingInline: 6,
38
+ paddingBlock: 6,
39
+ borderRadius: token.borderRadius,
40
+ transition: `color ${token.motionDurationMid}, background-color ${token.motionDurationMid}`,
41
+ "&:hover": {
42
+ color: token.headerColorTextRightActionsItemHover,
43
+ backgroundColor: token.headerColorBgRightActionsItemHover
44
+ }
45
+ }
46
+ },
47
+ [`&>${token.antCls}-dropdown-trigger`]: {
48
+ color: token.colorTextTertiary,
49
+ paddingInline: 8,
50
+ paddingBlock: 8,
51
+ cursor: "pointer",
52
+ display: "flex",
53
+ alignItems: "center",
54
+ height: 44,
55
+ lineHeight: "44px",
56
+ borderRadius: token.borderRadius,
57
+ "&:hover": { backgroundColor: setAlpha(token.colorTextBase, .03) }
58
+ },
59
+ "&-avatar": {
60
+ display: "inline-flex",
61
+ alignItems: "center",
62
+ justifyContent: "center",
63
+ gap: token.paddingXS,
64
+ paddingInlineStart: token.padding,
65
+ paddingInlineEnd: token.padding,
66
+ cursor: "pointer",
67
+ color: token.headerColorTextRightActionsItem
68
+ },
69
+ "&-name": { color: token.headerColorTextRightActionsItem }
70
+ }
71
+ } };
72
+ };
73
+ //#endregion
74
+ export { genRightContentStyle as default };
@@ -0,0 +1,12 @@
1
+ import { ProFullToken } from "@gx-design-vue/pro-provider";
2
+ import { CSSObject } from "@antdv-next/cssinjs";
3
+ import { GenerateStyle } from "antdv-next/dist/theme/internal";
4
+
5
+ //#region src/style/search.d.ts
6
+ /**
7
+ * Search 搜索框样式(RightContent 子组件)
8
+ * - 注册在 ProLayout 下,使用 ProLayout 扁平 token
9
+ */
10
+ declare const genSearchStyle: GenerateStyle<ProFullToken<'ProLayout'>, CSSObject>;
11
+ //#endregion
12
+ export { genSearchStyle as default };
@@ -0,0 +1,94 @@
1
+ //#region src/style/search.ts
2
+ /**
3
+ * Search 搜索框样式(RightContent 子组件)
4
+ * - 注册在 ProLayout 下,使用 ProLayout 扁平 token
5
+ */
6
+ const genSearchStyle = (token) => {
7
+ const fontSize = token.menuItemIconSize || token.fontSize;
8
+ return { [`${token.componentCls}-page-search`]: {
9
+ display: "flex",
10
+ alignItems: "center",
11
+ justifyContent: "center",
12
+ height: 36,
13
+ gap: 12,
14
+ cursor: "pointer",
15
+ fontSize: token.fontSizeSM,
16
+ color: token.colorTextTertiary,
17
+ paddingBlock: token.paddingXXS / 2,
18
+ paddingInline: token.paddingXS,
19
+ borderRadius: token.borderRadiusLG * 2,
20
+ backgroundColor: token.headerColorBgRightActionsItemHover,
21
+ transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,
22
+ ">.anticon": {
23
+ fontSize: token.fontSize,
24
+ color: token.colorTextTertiary
25
+ },
26
+ "&-word-icon": {
27
+ padding: "4px 6px",
28
+ lineHeight: `${token.fontSizeSM}px`,
29
+ borderTopLeftRadius: token.borderRadiusSM,
30
+ borderBottomLeftRadius: token.borderRadiusSM,
31
+ borderTopRightRadius: token.borderRadiusLG * 2,
32
+ borderBottomRightRadius: token.borderRadiusLG * 2,
33
+ backgroundColor: token.colorBgContainer
34
+ },
35
+ "&:hover": { color: token.colorTextSecondary },
36
+ "&-modal": {
37
+ "&-footer": {
38
+ display: "flex",
39
+ alignItems: "center",
40
+ gap: token.marginXS,
41
+ fontSize: 12,
42
+ color: token.colorTextSecondary
43
+ },
44
+ "&-footer-icon": {
45
+ display: "flex",
46
+ alignItems: "center",
47
+ gap: 4
48
+ }
49
+ },
50
+ "&-panel": {
51
+ "&-title": {
52
+ color: token.colorTextQuaternary,
53
+ lineHeight: token.lineHeight,
54
+ marginBlockEnd: token.marginXS
55
+ },
56
+ "&-list": {
57
+ display: "flex",
58
+ flexDirection: "column",
59
+ gap: 12
60
+ },
61
+ "&-item": {
62
+ display: "flex",
63
+ alignItems: "center",
64
+ justifyContent: "space-between",
65
+ cursor: "pointer",
66
+ fontSize: token.fontSize,
67
+ lineHeight: token.lineHeight,
68
+ padding: token.paddingXS,
69
+ borderRadius: token.borderRadiusLG,
70
+ backgroundColor: token.colorBgContainer,
71
+ transition: `all ${token.motionDurationFast} ${token.motionEaseInOut}`,
72
+ "&-left": {
73
+ display: "flex",
74
+ alignItems: "center",
75
+ gap: token.sizeStep,
76
+ ">.anticon": { fontSize: `${fontSize}px` }
77
+ },
78
+ "&.active": {
79
+ backgroundColor: token.colorPrimary,
80
+ color: token.colorTextLightSolid
81
+ }
82
+ }
83
+ },
84
+ "&-result": {
85
+ display: "flex",
86
+ alignItems: "center",
87
+ justifyContent: "center",
88
+ paddingBlockStart: 60,
89
+ color: token.colorTextQuaternary
90
+ }
91
+ } };
92
+ };
93
+ //#endregion
94
+ export { genSearchStyle as default };
@@ -0,0 +1,8 @@
1
+ import { ProFullToken } from "@gx-design-vue/pro-provider";
2
+ import { CSSObject } from "@antdv-next/cssinjs";
3
+ import { GenerateStyle } from "antdv-next/dist/theme/internal";
4
+
5
+ //#region src/style/sider.d.ts
6
+ declare const genSiderStyle: GenerateStyle<ProFullToken<'ProLayout'>, CSSObject>;
7
+ //#endregion
8
+ export { genSiderStyle as default };
@@ -0,0 +1,92 @@
1
+ //#region src/style/sider.ts
2
+ const genSiderStyle = (token) => {
3
+ const { componentCls, antCls } = token;
4
+ return { [componentCls]: {
5
+ [`${componentCls}-sider`]: {
6
+ position: "relative",
7
+ borderRight: 0,
8
+ zIndex: 105,
9
+ background: token.siderColorMenuBackground || "transparent",
10
+ [`${antCls}-layout-sider-children`]: {
11
+ position: "relative",
12
+ display: "flex",
13
+ flexDirection: "column",
14
+ borderInlineEnd: `1px solid ${token.colorSplit}`,
15
+ background: "transparent"
16
+ },
17
+ "&-children": {
18
+ position: "relative",
19
+ display: "flex",
20
+ flex: 1,
21
+ minHeight: 0,
22
+ height: "100%",
23
+ flexDirection: "column"
24
+ },
25
+ "&-header": {
26
+ paddingBlock: 0,
27
+ paddingInline: 0
28
+ },
29
+ "&-content": {
30
+ position: "relative",
31
+ display: "flex",
32
+ flex: "1 1 0%",
33
+ minHeight: 0,
34
+ flexDirection: "column",
35
+ overflow: "hidden"
36
+ },
37
+ [`${componentCls}-sider-content [data-top-shadow]`]: { flex: "1 1 0%" },
38
+ "&-menu-view": {
39
+ paddingInline: token.siderPaddingInlineLayoutMenu || 0,
40
+ paddingBlock: token.siderPaddingBlockLayoutMenu || 0
41
+ },
42
+ [`${componentCls}-sider-content [data-top-shadow="true"] ${componentCls}-sider-menu-container`]: {
43
+ WebkitMaskImage: `linear-gradient(0deg, ${token.colorBgContainer} calc(100% - var(--scroll-shadow-size, 5%)), transparent)`,
44
+ maskImage: `linear-gradient(0deg, ${token.colorBgContainer} calc(100% - var(--scroll-shadow-size, 5%)), transparent)`
45
+ },
46
+ [`${componentCls}-sider-content [data-bottom-shadow="true"] ${componentCls}-sider-menu-container`]: {
47
+ WebkitMaskImage: `linear-gradient(180deg, ${token.colorBgContainer} calc(100% - var(--scroll-shadow-size, 5%)), transparent)`,
48
+ maskImage: `linear-gradient(180deg, ${token.colorBgContainer} calc(100% - var(--scroll-shadow-size, 5%)), transparent)`
49
+ },
50
+ [`${componentCls}-sider-content [data-top-shadow="true"][data-bottom-shadow="true"] ${componentCls}-sider-menu-container`]: {
51
+ WebkitMaskImage: `linear-gradient(
52
+ ${token.colorBgContainer},
53
+ ${token.colorBgContainer},
54
+ transparent 0,
55
+ ${token.colorBgContainer} var(--scroll-shadow-size, 5%),
56
+ ${token.colorBgContainer} calc(100% - var(--scroll-shadow-size, 5%)),
57
+ transparent
58
+ )`,
59
+ maskImage: `linear-gradient(
60
+ ${token.colorBgContainer},
61
+ ${token.colorBgContainer},
62
+ transparent 0,
63
+ ${token.colorBgContainer} var(--scroll-shadow-size, 5%),
64
+ ${token.colorBgContainer} calc(100% - var(--scroll-shadow-size, 5%)),
65
+ transparent
66
+ )`
67
+ },
68
+ "&-fixed-menu": {
69
+ flexShrink: 0,
70
+ borderTop: `1px solid ${token.colorSplit}`
71
+ },
72
+ "&-footer": {
73
+ paddingBlock: token.paddingXS,
74
+ paddingInline: token.paddingSM,
75
+ flexShrink: 0
76
+ }
77
+ },
78
+ [`${componentCls}-sider-fixed`]: {
79
+ position: "fixed",
80
+ insetBlockStart: 0,
81
+ insetInlineStart: 0,
82
+ height: "100%"
83
+ },
84
+ [`${componentCls}-mix`]: { [`${componentCls}-sider`]: { borderBlockEnd: "none" } },
85
+ [`${componentCls}-wide`]: { [`${componentCls}-sider`]: {
86
+ position: "sticky",
87
+ borderRadius: token.pageContainerBorderRadius
88
+ } }
89
+ } };
90
+ };
91
+ //#endregion
92
+ export { genSiderStyle as default };
@@ -0,0 +1,14 @@
1
+ import { ProFullToken } from "@gx-design-vue/pro-provider";
2
+ import { CSSObject } from "@antdv-next/cssinjs";
3
+ import { GenerateStyle } from "antdv-next/dist/theme/internal";
4
+
5
+ //#region src/style/tabs.d.ts
6
+ /**
7
+ * LayoutTabs 上层容器样式(标签栏容器 / 标题 / 右侧操作区 / fixed 占位)。
8
+ *
9
+ * 卡片页签本身的样式由 `components/Tabs/style`(InnerTabs)承担;
10
+ * 本文件不再覆盖任何 antdv-next Tabs DOM。
11
+ */
12
+ declare const genTabsStyle: GenerateStyle<ProFullToken<'ProLayout'>, CSSObject>;
13
+ //#endregion
14
+ export { genTabsStyle as default };
@@ -0,0 +1,97 @@
1
+ //#region src/style/tabs.ts
2
+ /**
3
+ * LayoutTabs 上层容器样式(标签栏容器 / 标题 / 右侧操作区 / fixed 占位)。
4
+ *
5
+ * 卡片页签本身的样式由 `components/Tabs/style`(InnerTabs)承担;
6
+ * 本文件不再覆盖任何 antdv-next Tabs DOM。
7
+ */
8
+ const genTabsStyle = (token) => {
9
+ const { componentCls, calc } = token;
10
+ const iconBtnSize = token.controlHeightSM;
11
+ const closeIconBoxSize = token.controlHeightXS;
12
+ const tabsCls = `${componentCls}-tabs`;
13
+ return { [tabsCls]: {
14
+ [`${tabsCls}-content`]: {
15
+ paddingBlock: token.paddingXXS,
16
+ paddingInline: token.paddingSM,
17
+ backgroundColor: token.colorBgContainer,
18
+ borderBlockEnd: `${token.lineWidth} solid ${token.colorBorderSecondary}`,
19
+ position: "relative",
20
+ zIndex: 99,
21
+ transition: `width ${token.motionDurationMid} ${token.motionEaseInOut}`
22
+ },
23
+ "&-title": {
24
+ display: "inline-flex",
25
+ alignItems: "center",
26
+ gap: token.marginXXS,
27
+ "&-text": {
28
+ maxWidth: 120,
29
+ overflow: "hidden",
30
+ textOverflow: "ellipsis",
31
+ whiteSpace: "nowrap",
32
+ fontSize: token.fontSizeSM
33
+ },
34
+ "&-pin": {
35
+ display: "inline-flex",
36
+ alignItems: "center",
37
+ justifyContent: "center",
38
+ width: 12,
39
+ height: 12,
40
+ fontSize: 10,
41
+ color: token.colorPrimary
42
+ },
43
+ "&-close": {
44
+ display: "inline-flex",
45
+ alignItems: "center",
46
+ justifyContent: "center",
47
+ flex: "0 0 auto",
48
+ width: closeIconBoxSize,
49
+ height: closeIconBoxSize,
50
+ padding: 0,
51
+ fontSize: calc(token.fontSizeSM).sub(2).equal(),
52
+ lineHeight: 1,
53
+ color: token.tabsColorCloseIcon,
54
+ borderRadius: token.borderRadiusSM,
55
+ transition: `all ${token.motionDurationMid}`,
56
+ "&:hover": {
57
+ color: token.tabsColorCloseIconHover,
58
+ backgroundColor: token.tabsColorCloseBgHover
59
+ }
60
+ },
61
+ [`.ant-pro-inner-tabs-tab-active &-close:hover`]: {
62
+ color: token.tabsColorCloseIconActive,
63
+ backgroundColor: token.tabsColorCloseBgActiveHover
64
+ }
65
+ },
66
+ "&-extra": {
67
+ display: "inline-flex",
68
+ alignItems: "center",
69
+ gap: token.marginXS,
70
+ marginInlineStart: token.marginSM,
71
+ "&-btn": {
72
+ display: "inline-flex",
73
+ alignItems: "center",
74
+ justifyContent: "center",
75
+ width: iconBtnSize,
76
+ height: iconBtnSize,
77
+ fontSize: token.fontSize,
78
+ color: token.colorIcon,
79
+ cursor: "pointer",
80
+ borderRadius: token.borderRadiusSM,
81
+ transition: `all ${token.motionDurationMid}`,
82
+ "&:hover": {
83
+ color: token.colorIconHover,
84
+ backgroundColor: token.colorBgTextHover
85
+ }
86
+ }
87
+ },
88
+ "&-fixed": { [`${tabsCls}-content`]: {
89
+ position: "fixed",
90
+ right: 0,
91
+ zIndex: 99,
92
+ transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`
93
+ } }
94
+ } };
95
+ };
96
+ //#endregion
97
+ export { genTabsStyle as default };
@@ -0,0 +1,20 @@
1
+ import { ComponentToken } from "../components/AppPage/style.js";
2
+ import { ComponentToken as ComponentToken$1 } from "../components/FooterToolbar/style.js";
3
+ import { ComponentToken as ComponentToken$2 } from "../components/Menu/style/index.js";
4
+ import { ComponentToken as ComponentToken$3 } from "../components/PageContainer/style.js";
5
+ import { ComponentToken as ComponentToken$4 } from "../components/PageTransition/style.js";
6
+ import { ComponentToken as ComponentToken$5 } from "../components/Tabs/style/index.js";
7
+ import { ComponentToken as ComponentToken$6 } from "../style/index.js";
8
+
9
+ //#region src/theme/augment.d.ts
10
+ declare module 'antdv-next/dist/theme/interface/components' {
11
+ interface ComponentTokenMap {
12
+ ProLayout?: ComponentToken$6;
13
+ InnerTabs?: ComponentToken$5;
14
+ ProAppPage?: ComponentToken;
15
+ ProMenu?: ComponentToken$2;
16
+ ProFooterToolbar?: ComponentToken$1;
17
+ ProPageContainer?: ComponentToken$3;
18
+ ProPageTransition?: ComponentToken$4;
19
+ }
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ import { ComponentToken } from "../../components/AppPage/style.js";
2
+ import { ComponentToken as ComponentToken$1 } from "../../components/FooterToolbar/style.js";
3
+ import { ComponentToken as ComponentToken$2 } from "../../components/Menu/style/index.js";
4
+ import { ComponentToken as ComponentToken$3 } from "../../components/PageContainer/style.js";
5
+ import { ComponentToken as ComponentToken$4 } from "../../components/PageTransition/style.js";
6
+ import { ComponentToken as ComponentToken$5 } from "../../components/Tabs/style/index.js";
7
+ import { ComponentToken as ComponentToken$6 } from "../../style/index.js";
8
+
9
+ //#region src/theme/interface/components.d.ts
10
+ interface ComponentTokenMap {
11
+ ProLayout?: ComponentToken$6;
12
+ InnerTabs?: ComponentToken$5;
13
+ ProAppPage?: ComponentToken;
14
+ ProMenu?: ComponentToken$2;
15
+ ProFooterToolbar?: ComponentToken$1;
16
+ ProPageContainer?: ComponentToken$3;
17
+ ProPageTransition?: ComponentToken$4;
18
+ }
19
+ //#endregion
20
+ export { ComponentTokenMap };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ //#region src/utils/config.d.ts
2
+ /**
3
+ * Normalize layout section config:
4
+ * - `false` disables the section and returns `null`.
5
+ * - `undefined` uses defaults.
6
+ * - objects are shallow-merged over defaults.
7
+ *
8
+ * This is layout-domain behavior, not a shared pro-utils primitive.
9
+ */
10
+ declare function normalizeSectionConfig<T extends object>(config: Partial<T> | false | undefined, defaults: Partial<T>): T | null;
11
+ //#endregion
12
+ export { normalizeSectionConfig };
@@ -0,0 +1,18 @@
1
+ //#region src/utils/config.ts
2
+ /**
3
+ * Normalize layout section config:
4
+ * - `false` disables the section and returns `null`.
5
+ * - `undefined` uses defaults.
6
+ * - objects are shallow-merged over defaults.
7
+ *
8
+ * This is layout-domain behavior, not a shared pro-utils primitive.
9
+ */
10
+ function normalizeSectionConfig(config, defaults) {
11
+ if (config === false) return null;
12
+ return {
13
+ ...defaults,
14
+ ...config ?? {}
15
+ };
16
+ }
17
+ //#endregion
18
+ export { normalizeSectionConfig };
@@ -1,24 +1,115 @@
1
- import { AppRouteModule } from "../types/RouteTypings.js";
2
- import { RecordType } from "@gx-design-vue/pro-utils";
1
+ import { BreadcrumbItemType, LayoutMenuRoute, Meta } from "../interface.js";
3
2
 
4
3
  //#region src/utils/menu.d.ts
5
- interface MenuData {
6
- menuData: AppRouteModule[];
7
- flatMenus: AppRouteModule[];
8
- breadcrumb: RecordType;
9
- menuMap: Map<AppRouteModule['name'], AppRouteModule>;
4
+ /**
5
+ * 菜单数据层(纯函数)。
6
+ *
7
+ * 设计原则:
8
+ * - **不可变**:所有变换都返回新对象,绝不修改入参(源路由可被外部冻结)。
9
+ * - **零响应式**:`buildMenuLookup` 产出的路由用 `markRaw` 标记,避免大菜单树被 Vue 深度代理,
10
+ * 这是旧实现内存增长 / 卡顿的根因。
11
+ * - **查询 O(1)/O(depth)**:用 `Map<name, entry>` + `parentNames` 替代旧的 `key="0-1-2"` 字符串切割。
12
+ * - **只产路由分支**:数据层只输出清洗 / 排序 / 切分后的 `LayoutMenuRoute[]`;
13
+ * route → antdv-next `MenuItemType` 的转换交给 `ProMenu` 组件自洽完成。
14
+ */
15
+ /** 扁平查找项:route 为 markRaw 的源路由,parentNames 为根→直接父(含序、不含自身)。 */
16
+ interface MenuLookupEntry {
17
+ route: LayoutMenuRoute;
18
+ parentNames: string[];
19
+ path: number[];
10
20
  }
11
- declare function handlePathKey(record: AppRouteModule): string;
12
- declare function getMenuData(routes: AppRouteModule[]): MenuData;
13
- declare function clearMenuItem(menusData: AppRouteModule[]): AppRouteModule[];
14
- declare function flatMap(menusData: AppRouteModule[]): AppRouteModule[];
15
- declare function getMenuFirstChildren(menus: AppRouteModule[], key?: string): AppRouteModule[];
16
- declare function getLastPath(data: AppRouteModule[]): string;
17
- declare function getParentKeys(key: string): string[];
18
- declare function getMatchedList(menuProps: {
19
- flatMenus: AppRouteModule[];
20
- menuMap: MenuData['menuMap'];
21
- }, name: AppRouteModule['name']): AppRouteModule[];
22
- declare function filterTree(tree: AppRouteModule[], filterFn: (node: AppRouteModule) => boolean): AppRouteModule[];
21
+ /** 一次构建产出的菜单模型。 */
22
+ interface MenuModel {
23
+ /** 清洗 + 排序后的不可变菜单树 */
24
+ menus: LayoutMenuRoute[];
25
+ /** 深度优先、按 name 去重的扁平列表(markRaw) */
26
+ flatMenus: LayoutMenuRoute[];
27
+ /** name 查找项 */
28
+ lookup: Map<string, MenuLookupEntry>;
29
+ }
30
+ /** `resolveRouteTarget` 的解析结果。 */
31
+ interface ResolveRouteResult {
32
+ type: 'internal' | 'external';
33
+ /** 内部跳转目标路径 */
34
+ path?: string;
35
+ /** 外链地址(linkStatus===1 且为合法 url) */
36
+ link?: string;
37
+ route?: LayoutMenuRoute;
38
+ }
39
+ type MenuRoutePatch = Partial<LayoutMenuRoute>;
40
+ type MenuMetaPatch = Partial<Meta>;
41
+ interface MenuTreeMutationOptions {
42
+ normalize?: boolean;
43
+ }
44
+ /**
45
+ * 从 vue-router 的扁平路由表中提取菜单数据源:取根路由(`name==='root'` 或 `path==='/'`)的子级。
46
+ * 替代旧 `getMenuData` 内的 `childrenRoute` 提取逻辑。
47
+ */
48
+ declare function routesToMenus(routerRoutes: readonly LayoutMenuRoute[]): LayoutMenuRoute[];
49
+ /**
50
+ * 清洗菜单树(不可变)。替代旧 `clearMenuItem` + `handleMenuData` 的隐藏继承块。
51
+ * - 丢弃无 `name` 的项;
52
+ * - 丢弃重复 `name`(保留首个,重复项汇总 `console.warn` 一次);
53
+ * - `meta.hideChildrenInMenu` 的节点剥掉 `children`;
54
+ * - `hideInMenu` 继承:父 `hideInMenu` / `hideChildrenInMenu` → 子项 `meta.hideInMenu = true`。
55
+ */
56
+ declare function cleanMenus(menus: LayoutMenuRoute[]): LayoutMenuRoute[];
57
+ /**
58
+ * 按 `meta.order` 升序排序(不可变、稳定)。替代旧 `handleMenuData` 的 order 兜底 + `.sort`。
59
+ * 缺省 order 使用原始索引,保证未配置 order 时维持原顺序。
60
+ */
61
+ declare function sortMenusByOrder(menus: LayoutMenuRoute[]): LayoutMenuRoute[];
62
+ declare function normalizeMenus(menus: LayoutMenuRoute[]): LayoutMenuRoute[];
63
+ /**
64
+ * 构建扁平列表 + name 查找表。替代旧 `getMenuData` 的 `flatMenus`/`menuMap`
65
+ * (去掉 `key="0-1-2"`、`omit`、`path.replace` 等副作用)。
66
+ * 每个 route 用 `markRaw` 标记,避免进入 Vue 响应式系统。
67
+ */
68
+ declare function buildMenuLookup(menus: LayoutMenuRoute[]): {
69
+ flatMenus: LayoutMenuRoute[];
70
+ lookup: Map<string, MenuLookupEntry>;
71
+ };
72
+ declare function updateMenuAtPath(menus: LayoutMenuRoute[], path: number[], updater: MenuRoutePatch | ((route: LayoutMenuRoute) => LayoutMenuRoute)): LayoutMenuRoute[];
73
+ declare function updateMenuMetaAtPath(menus: LayoutMenuRoute[], path: number[], updater: MenuMetaPatch | ((meta: Meta) => Meta)): LayoutMenuRoute[];
74
+ declare function insertMenuAtPath(menus: LayoutMenuRoute[], parentPath: number[] | undefined, menu: LayoutMenuRoute, index?: number): LayoutMenuRoute[];
75
+ declare function removeMenuAtPath(menus: LayoutMenuRoute[], path: number[]): LayoutMenuRoute[];
76
+ declare function collectMenuNames(route: LayoutMenuRoute | undefined): string[];
77
+ /**
78
+ * 解析当前路由的匹配链(根→自身)。替代 `getMatchedList` + `getParentKeys` + `handlePathKey`,
79
+ * 用 `parentNames` 直接取链,无字符串切割。
80
+ * - `meta.menuSelectKey` 会把匹配目标重定向到指定菜单;
81
+ * - 过滤 `hideInMenu` 的祖先;
82
+ * - 未知 name 或目标自身 `hideInMenu` 返回 `[]`。
83
+ */
84
+ declare function resolveMatchedChain(lookup: Map<string, MenuLookupEntry>, name: string | undefined): LayoutMenuRoute[];
85
+ /**
86
+ * 取第一个可见叶子的跳转路径(不可变、仅依据 `hideInMenu`)。
87
+ * 用于父级菜单 / 面包屑的默认跳转目标。
88
+ */
89
+ declare function getLastPath(menus: LayoutMenuRoute[]): string;
90
+ /**
91
+ * 基于匹配链构建面包屑路由数组(仅保留有标题的项)。
92
+ * `menuSelectKey` 场景下把当前真实路由追加到链尾(对齐旧行为)。
93
+ */
94
+ declare function buildBreadcrumbRoutes(chain: LayoutMenuRoute[], options?: {
95
+ current?: LayoutMenuRoute;
96
+ }): LayoutMenuRoute[];
97
+ /** 将面包屑路由数组转为 antdv-next 面包屑项(纯数据,`onClick` 由组件接)。 */
98
+ declare function toBreadcrumbItems(routes: LayoutMenuRoute[]): BreadcrumbItemType[];
99
+ /**
100
+ * 解析点击菜单后的跳转目标。替代旧 `BaseMenu` 的 `onClick` 取数逻辑。
101
+ * 外链(`linkStatus===1` 且 link 合法)走 `window.open`,否则内部 `router.push`。
102
+ */
103
+ declare function resolveRouteTarget(lookup: Map<string, MenuLookupEntry>, name: string): ResolveRouteResult;
104
+ /**
105
+ * 取顶层菜单中 `name` 命中项的子级(mix 布局的侧边分支)。
106
+ * 替代旧 `menuData.find(name===selectedKeys[0])?.children` 与 `getMenuFirstChildren`。
107
+ */
108
+ declare function selectMenuBranch(menus: LayoutMenuRoute[], name: string | undefined): LayoutMenuRoute[];
109
+ /** 按 `meta.fixed` 拆分菜单(fixed 项钉到侧边栏底部)。替代旧 ProMenu 的 `baseMenus`/`footerMenus`。 */
110
+ declare function partitionFixedMenus(menus: LayoutMenuRoute[]): {
111
+ baseMenus: LayoutMenuRoute[];
112
+ fixedMenus: LayoutMenuRoute[];
113
+ };
23
114
  //#endregion
24
- export { MenuData, clearMenuItem, filterTree, flatMap, getLastPath, getMatchedList, getMenuData, getMenuFirstChildren, getParentKeys, handlePathKey };
115
+ export { MenuLookupEntry, MenuMetaPatch, MenuModel, MenuRoutePatch, MenuTreeMutationOptions, ResolveRouteResult, buildBreadcrumbRoutes, buildMenuLookup, cleanMenus, collectMenuNames, getLastPath, insertMenuAtPath, normalizeMenus, partitionFixedMenus, removeMenuAtPath, resolveMatchedChain, resolveRouteTarget, routesToMenus, selectMenuBranch, sortMenusByOrder, toBreadcrumbItems, updateMenuAtPath, updateMenuMetaAtPath };