@gx-design-vue/pro-layout 0.1.0-alpha.10 → 0.1.0-alpha.12
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.
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { proGenStyleHooks, setAlpha } from "@gx-design-vue/pro-provider";
|
|
2
2
|
import { unit as unit$1 } from "@antdv-next/cssinjs";
|
|
3
3
|
//#region src/components/Menu/style/siderMenu.ts
|
|
4
|
+
function hasActiveBarWidth(activeBarWidth) {
|
|
5
|
+
if (activeBarWidth == null) return false;
|
|
6
|
+
if (typeof activeBarWidth === "number") return activeBarWidth !== 0;
|
|
7
|
+
const width = activeBarWidth.trim();
|
|
8
|
+
if (!width) return false;
|
|
9
|
+
const numericWidth = Number.parseFloat(width);
|
|
10
|
+
return Number.isNaN(numericWidth) || numericWidth !== 0;
|
|
11
|
+
}
|
|
4
12
|
const prepareComponentToken = (token) => {
|
|
5
13
|
const { colorPrimary, colorError, colorTextDisabled, colorErrorBg, colorText, colorTextDescription, colorBgContainer, colorFillAlter, colorFillContent, lineWidth, lineWidthBold, controlItemBgActive, colorBgTextHover, controlHeightLG, lineHeight, colorBgElevated, marginXXS, padding, fontSize, controlHeightSM, fontSizeLG, colorTextLightSolid, colorErrorHover } = token;
|
|
6
14
|
const activeBarWidth = token.activeBarWidth ?? 0;
|
|
@@ -77,7 +85,7 @@ const prepareComponentToken = (token) => {
|
|
|
77
85
|
darkDangerItemHoverColor: colorErrorHover,
|
|
78
86
|
darkDangerItemSelectedColor: colorTextLightSolid,
|
|
79
87
|
darkDangerItemActiveBg: colorError,
|
|
80
|
-
itemWidth: activeBarWidth ? `calc(100% + ${activeBarBorderWidth}
|
|
88
|
+
itemWidth: hasActiveBarWidth(activeBarWidth) ? `calc(100% + ${unit$1(activeBarBorderWidth)})` : `calc(100% - ${itemMarginInline * 2}px)`
|
|
81
89
|
};
|
|
82
90
|
};
|
|
83
91
|
/**
|
|
@@ -152,7 +160,7 @@ const genSiderMenuStyle = (token) => {
|
|
|
152
160
|
marginBlock: siderMenuItemMarginBlock,
|
|
153
161
|
marginInline: siderMenuItemMarginInline,
|
|
154
162
|
paddingInlineStart: `calc(${unit$1(siderMenuBasePadding)} + var(--pro-layout-sider-menu-level, 0) * var(--pro-layout-sider-menu-indent, 24px))`,
|
|
155
|
-
paddingInlineEnd:
|
|
163
|
+
paddingInlineEnd: siderMenuBasePadding,
|
|
156
164
|
overflow: "hidden",
|
|
157
165
|
color: token.siderColorTextMenu || token.itemColor,
|
|
158
166
|
lineHeight: unit$1(siderMenuItemHeight),
|
|
@@ -205,9 +213,11 @@ const genSiderMenuStyle = (token) => {
|
|
|
205
213
|
justifyContent: "center",
|
|
206
214
|
paddingInline: `calc(50% - ${iconSize} / 2 - ${unit$1(siderMenuItemMarginInline)})`,
|
|
207
215
|
textOverflow: "clip"
|
|
208
|
-
}
|
|
216
|
+
},
|
|
217
|
+
"> *": { flex: "none" }
|
|
209
218
|
},
|
|
210
219
|
[`${componentCls}-submenu-title`]: {
|
|
220
|
+
paddingInlineEnd: siderMenuPaddingWithArrow,
|
|
211
221
|
[`&:not(${componentCls}-item-selected):not(${componentCls}-item-active):not(${componentCls}-item-disabled):hover`]: {
|
|
212
222
|
color: token.siderColorTextMenuItemHover || token.itemHoverColor,
|
|
213
223
|
backgroundColor: token.siderColorBgMenuItemHover || token.itemHoverBg
|
|
@@ -242,7 +252,7 @@ const genSiderMenuStyle = (token) => {
|
|
|
242
252
|
fontSize: collapsedIconSize
|
|
243
253
|
},
|
|
244
254
|
[`${componentCls}-title`]: {
|
|
245
|
-
flex: "
|
|
255
|
+
flex: "auto",
|
|
246
256
|
minWidth: 0,
|
|
247
257
|
overflow: "hidden",
|
|
248
258
|
textOverflow: "ellipsis",
|
|
@@ -49,10 +49,10 @@ declare const GPageTransition: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
49
49
|
default: string;
|
|
50
50
|
};
|
|
51
51
|
}>> & Readonly<{}>, {
|
|
52
|
-
reverse: boolean;
|
|
53
52
|
name: string;
|
|
54
|
-
|
|
53
|
+
reverse: boolean;
|
|
55
54
|
disabled: boolean;
|
|
55
|
+
direction: string;
|
|
56
56
|
}, SlotsType<GPageTransitionSlots>, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { GPageTransition as default };
|
|
@@ -16,7 +16,7 @@ declare function useLayoutBase(props?: {
|
|
|
16
16
|
collapsed?: boolean;
|
|
17
17
|
}): {
|
|
18
18
|
layoutContext: LayoutContextProps;
|
|
19
|
-
layout: _$vue.ComputedRef<"
|
|
19
|
+
layout: _$vue.ComputedRef<"side" | "top" | "mix" | "wide" | "simple">;
|
|
20
20
|
sider: _$vue.ComputedRef<Required<LayoutSiderConfig>>;
|
|
21
21
|
header: _$vue.ComputedRef<Required<LayoutHeaderConfig>>;
|
|
22
22
|
zIndex: _$vue.Ref<number, number>;
|
|
@@ -39,34 +39,34 @@ declare function useLayoutBase(props?: {
|
|
|
39
39
|
selectedKeys: _$vue.ComputedRef<string[]>;
|
|
40
40
|
openKeys: _$vue.ComputedRef<string[]>;
|
|
41
41
|
proClasses: _$vue.ComputedRef<{
|
|
42
|
+
root?: string;
|
|
42
43
|
header?: string;
|
|
43
44
|
sider?: string;
|
|
44
|
-
breadcrumb?: string;
|
|
45
|
-
logo?: string;
|
|
46
|
-
content?: string;
|
|
47
|
-
root?: string;
|
|
48
45
|
siderChildren?: string;
|
|
49
46
|
siderHeader?: string;
|
|
50
47
|
siderFooter?: string;
|
|
48
|
+
logo?: string;
|
|
51
49
|
logoImage?: string;
|
|
50
|
+
content?: string;
|
|
52
51
|
footer?: string;
|
|
53
52
|
menu?: string;
|
|
54
53
|
tabs?: string;
|
|
54
|
+
breadcrumb?: string;
|
|
55
55
|
}>;
|
|
56
56
|
proStyles: _$vue.ComputedRef<{
|
|
57
|
+
root?: _$vue.CSSProperties;
|
|
57
58
|
header?: _$vue.CSSProperties;
|
|
58
59
|
sider?: _$vue.CSSProperties;
|
|
59
|
-
breadcrumb?: _$vue.CSSProperties;
|
|
60
|
-
logo?: _$vue.CSSProperties;
|
|
61
|
-
content?: _$vue.CSSProperties;
|
|
62
|
-
root?: _$vue.CSSProperties;
|
|
63
60
|
siderChildren?: _$vue.CSSProperties;
|
|
64
61
|
siderHeader?: _$vue.CSSProperties;
|
|
65
62
|
siderFooter?: _$vue.CSSProperties;
|
|
63
|
+
logo?: _$vue.CSSProperties;
|
|
66
64
|
logoImage?: _$vue.CSSProperties;
|
|
65
|
+
content?: _$vue.CSSProperties;
|
|
67
66
|
footer?: _$vue.CSSProperties;
|
|
68
67
|
menu?: _$vue.CSSProperties;
|
|
69
68
|
tabs?: _$vue.CSSProperties;
|
|
69
|
+
breadcrumb?: _$vue.CSSProperties;
|
|
70
70
|
}>;
|
|
71
71
|
breadcrumbRender: _$vue.Ref<(props: LayoutBreadcrumbSlotProps) => any, (props: LayoutBreadcrumbSlotProps) => any>;
|
|
72
72
|
breadcrumbConfig: _$vue.ComputedRef<LayoutBreadcrumbConfig>;
|