@qsxy/element-plus-react 1.0.0-next.21 → 1.0.0-next.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Breadcrumb/Breadcrumb.js +9 -0
- package/dist/Breadcrumb/BreadcrumbItem.js +7 -4
- package/dist/Button/Button.js +3 -3
- package/dist/ColorPicker/ColorPicker.js +12 -2
- package/dist/ConfigProvider/ConfigProvider.d.ts +6 -22
- package/dist/ConfigProvider/ConfigProvider.js +22 -13
- package/dist/ConfigProvider/ConfigProviderContext.d.ts +5 -0
- package/dist/ConfigProvider/ConfigProviderContext.js +13 -0
- package/dist/ConfigProvider/index.d.ts +2 -2
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/ConfigProvider/typings.d.ts +22 -0
- package/dist/ConfigProvider/typings.js +1 -0
- package/dist/Container/Aside.d.ts +5 -0
- package/dist/Container/Aside.js +26 -0
- package/dist/Container/Container.d.ts +5 -0
- package/dist/Container/Container.js +37 -0
- package/dist/Container/Footer.d.ts +5 -0
- package/dist/Container/Footer.js +26 -0
- package/dist/Container/Header.d.ts +5 -0
- package/dist/Container/Header.js +26 -0
- package/dist/Container/Main.d.ts +3 -0
- package/dist/Container/Main.js +14 -0
- package/dist/Container/index.d.ts +6 -0
- package/dist/Container/index.js +5 -0
- package/dist/Container/typings.d.ts +30 -0
- package/dist/Container/typings.js +1 -0
- package/dist/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/dist/InputNumber/InputNumber.js +4 -4
- package/dist/Menu/Menu.d.ts +4 -0
- package/dist/Menu/Menu.js +281 -0
- package/dist/Menu/MenuCollapseTransition.d.ts +6 -0
- package/dist/Menu/MenuCollapseTransition.js +40 -0
- package/dist/Menu/MenuContext.d.ts +18 -0
- package/dist/Menu/MenuContext.js +20 -0
- package/dist/Menu/MenuItem.d.ts +7 -0
- package/dist/Menu/MenuItem.js +77 -0
- package/dist/Menu/MenuItemGroup.d.ts +7 -0
- package/dist/Menu/MenuItemGroup.js +45 -0
- package/dist/Menu/SubMenu.d.ts +7 -0
- package/dist/Menu/SubMenu.js +287 -0
- package/dist/Menu/SubMenuCollapseTransition.d.ts +6 -0
- package/dist/Menu/SubMenuCollapseTransition.js +52 -0
- package/dist/Menu/index.d.ts +5 -0
- package/dist/Menu/index.js +4 -0
- package/dist/Menu/typings.d.ts +121 -0
- package/dist/Menu/typings.js +1 -0
- package/dist/Menu/useEllipsis.d.ts +6 -0
- package/dist/Menu/useEllipsis.js +82 -0
- package/dist/Message/Message.js +1 -1
- package/dist/Pagination/Options.js +1 -1
- package/dist/Pagination/Pagination.js +1 -1
- package/dist/Popper/Popper.js +10 -5
- package/dist/Popper/popperOptions.d.ts +7 -6
- package/dist/Popper/popperOptions.js +56 -8
- package/dist/Popper/typings.d.ts +1 -0
- package/dist/Radio/Radio.js +4 -3
- package/dist/Radio/RadioButton.d.ts +1 -1
- package/dist/Radio/RadioButton.js +3 -2
- package/dist/Radio/typings.d.ts +1 -1
- package/dist/Table/Table.js +9 -1
- package/dist/Tooltip/Tooltip.js +4 -3
- package/dist/Transition/CssTransiton.d.ts +15 -0
- package/dist/Transition/CssTransiton.js +29 -0
- package/dist/Transition/Transition.d.ts +2 -0
- package/dist/Transition/Transition.js +7 -2
- package/dist/hooks/popperPropsUtils.js +1 -1
- package/dist/hooks/useCssTransiton.d.ts +27 -0
- package/dist/hooks/useCssTransiton.js +87 -0
- package/dist/hooks/useResizeObserver.d.ts +42 -0
- package/dist/hooks/useResizeObserver.js +42 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/types/common.d.ts +2 -2
- package/package.json +4 -3
- package/theme-chalk/aside.scss +8 -0
- package/theme-chalk/common/transition.scss +142 -0
- package/theme-chalk/container.scss +14 -0
- package/theme-chalk/footer.scss +12 -0
- package/theme-chalk/header.scss +12 -0
- package/theme-chalk/index.scss +8 -0
- package/theme-chalk/main.scss +14 -0
- package/theme-chalk/menu-item-group.scss +0 -0
- package/theme-chalk/menu-item.scss +0 -0
- package/theme-chalk/menu.scss +353 -0
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ export { Badge as ElBadge } from './Badge';
|
|
|
54
54
|
export type { BadgeProps } from './Badge';
|
|
55
55
|
export { Card as ElCard } from './Card';
|
|
56
56
|
export type { CardProps } from './Card';
|
|
57
|
+
export { Aside as ElAside, Container as ElContainer, Footer as ElFooter, Header as ElHeader, Main as ElMain } from './Container';
|
|
58
|
+
export type { AsideProps, ContainerProps, FooterProps, HeaderProps, MainProps } from './Container';
|
|
57
59
|
export { Carousel as ElCarousel, CarouselItem as ElCarouselItem } from './Carousel';
|
|
58
60
|
export type { CarouselItemProps, CarouselProps, CarouselRef } from './Carousel';
|
|
59
61
|
export { Collapse as ElCollapse, CollapseItem as ElCollapseItem } from './Collapse';
|
|
@@ -78,6 +80,8 @@ export { Breadcrumb as ElBreadcrumb, BreadcrumbItem as ElBreadcrumbItem } from '
|
|
|
78
80
|
export type { BreadcrumbItemProps, BreadcrumbProps } from './Breadcrumb';
|
|
79
81
|
export { Dropdown as ElDropdown, DropdownItem as ElDropdownItem, DropdownMenu as ElDropdownMenu } from './Dropdown';
|
|
80
82
|
export type { DropdownItemProps, DropdownMenuProps, DropdownProps } from './Dropdown';
|
|
83
|
+
export { Menu as ElMenu, MenuItem as ElMenuItem, MenuItemGroup as ElMenuItemGroup, SubMenu as ElSubMenu } from './Menu';
|
|
84
|
+
export type { MenuCloseEvent, MenuItemClicked, MenuItemGroupProps, MenuItemProps, MenuItemRegistered, MenuOpenEvent, MenuProps, MenuRef, SubMenuProps } from './Menu';
|
|
81
85
|
export { TabPane as ElTabPane, Tabs as ElTabs } from './Tabs';
|
|
82
86
|
export type { TabPaneProps, TabsPaneContext, TabsProps } from './Tabs';
|
|
83
87
|
export { Empty as ElEmpty } from './Empty';
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ export { Upload as ElUpload } from "./Upload";
|
|
|
31
31
|
export { Avatar as ElAvatar } from "./Avatar";
|
|
32
32
|
export { Badge as ElBadge } from "./Badge";
|
|
33
33
|
export { Card as ElCard } from "./Card";
|
|
34
|
+
export { Aside as ElAside, Container as ElContainer, Footer as ElFooter, Header as ElHeader, Main as ElMain } from "./Container";
|
|
34
35
|
export { Carousel as ElCarousel, CarouselItem as ElCarouselItem } from "./Carousel";
|
|
35
36
|
export { Collapse as ElCollapse, CollapseItem as ElCollapseItem } from "./Collapse";
|
|
36
37
|
export { Descriptions as ElDescriptions, DescriptionsItem as ElDescriptionsItem } from "./Descriptions";
|
|
@@ -47,6 +48,7 @@ export { TreeSelect as ElTreeSelect } from "./TreeSelect";
|
|
|
47
48
|
/* Navigation 导航 */
|
|
48
49
|
export { Breadcrumb as ElBreadcrumb, BreadcrumbItem as ElBreadcrumbItem } from "./Breadcrumb";
|
|
49
50
|
export { Dropdown as ElDropdown, DropdownItem as ElDropdownItem, DropdownMenu as ElDropdownMenu } from "./Dropdown";
|
|
51
|
+
export { Menu as ElMenu, MenuItem as ElMenuItem, MenuItemGroup as ElMenuItemGroup, SubMenu as ElSubMenu } from "./Menu";
|
|
50
52
|
export { TabPane as ElTabPane, Tabs as ElTabs } from "./Tabs";
|
|
51
53
|
export { Empty as ElEmpty } from "./Empty";
|
|
52
54
|
export { Skeleton as ElSkeleton, SkeletonItem as ElSkeletonItem } from "./Skeleton";
|
package/dist/types/common.d.ts
CHANGED
|
@@ -10,14 +10,14 @@ export declare namespace TypeAttributes {
|
|
|
10
10
|
type CheckTrigger = 'change' | 'blur' | 'none';
|
|
11
11
|
}
|
|
12
12
|
export type ComponentChildren = React.ReactNode | React.ReactNode[];
|
|
13
|
-
export interface FormControlBaseProps<ValueType =
|
|
13
|
+
export interface FormControlBaseProps<ValueType = string | number | boolean> {
|
|
14
14
|
name?: string;
|
|
15
15
|
/** 初始值 */
|
|
16
16
|
defaultValue?: ValueType;
|
|
17
17
|
/** 值(可控) */
|
|
18
18
|
value?: ValueType;
|
|
19
19
|
/** 选中值发生变化时触发 */
|
|
20
|
-
onChange?: (value: ValueType
|
|
20
|
+
onChange?: (value: ValueType, event?: React.ChangeEvent<any>) => void;
|
|
21
21
|
/** 禁用 */
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
/** 尺寸 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qsxy/element-plus-react",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.23",
|
|
4
4
|
"description": "element-plus-react",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
"theme-chalk"
|
|
18
18
|
],
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"react": ">=
|
|
21
|
-
"react-dom": ">=
|
|
20
|
+
"react": ">=18.0.0",
|
|
21
|
+
"react-router-dom": ">=6.22.1",
|
|
22
|
+
"react-dom": ">=18.0.0"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"@ctrl/tinycolor": "^4.1.0",
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
@use '../mixins/config' as *;
|
|
2
|
+
@use '../mixins/mixins' as *;
|
|
3
|
+
|
|
4
|
+
.fade-in-linear-enter-active,
|
|
5
|
+
.fade-in-linear-leave-active {
|
|
6
|
+
transition: getCssVar('transition-fade', 'linear');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.fade-in-linear-enter-from,
|
|
10
|
+
.fade-in-linear-leave-to {
|
|
11
|
+
opacity: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.#{$namespace}-fade-in-linear-enter-active,
|
|
15
|
+
.#{$namespace}-fade-in-linear-leave-active {
|
|
16
|
+
transition: getCssVar('transition-fade', 'linear');
|
|
17
|
+
}
|
|
18
|
+
.#{$namespace}-fade-in-linear-enter-from,
|
|
19
|
+
.#{$namespace}-fade-in-linear-leave-to {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.#{$namespace}-fade-in-enter-active,
|
|
24
|
+
.#{$namespace}-fade-in-leave-active {
|
|
25
|
+
transition: all getCssVar('transition-duration') cubic-bezier(0.55, 0, 0.1, 1);
|
|
26
|
+
}
|
|
27
|
+
.#{$namespace}-fade-in-enter-from,
|
|
28
|
+
.#{$namespace}-fade-in-leave-active {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.#{$namespace}-zoom-in-center-enter-active,
|
|
33
|
+
.#{$namespace}-zoom-in-center-leave-active {
|
|
34
|
+
transition: all getCssVar('transition-duration') cubic-bezier(0.55, 0, 0.1, 1);
|
|
35
|
+
}
|
|
36
|
+
.#{$namespace}-zoom-in-center-enter-from,
|
|
37
|
+
.#{$namespace}-zoom-in-center-leave-active {
|
|
38
|
+
opacity: 0;
|
|
39
|
+
transform: scaleX(0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.#{$namespace}-zoom-in-top-enter-active,
|
|
43
|
+
.#{$namespace}-zoom-in-top-leave-active {
|
|
44
|
+
opacity: 1;
|
|
45
|
+
transform: scaleY(1);
|
|
46
|
+
transition: getCssVar('transition-md-fade');
|
|
47
|
+
transform-origin: center top;
|
|
48
|
+
|
|
49
|
+
&[data-popper-placement^='top'] {
|
|
50
|
+
transform-origin: center bottom;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
.#{$namespace}-zoom-in-top-enter-from,
|
|
54
|
+
.#{$namespace}-zoom-in-top-leave-active {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
transform: scaleY(0);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.#{$namespace}-zoom-in-bottom-enter-active,
|
|
60
|
+
.#{$namespace}-zoom-in-bottom-leave-active {
|
|
61
|
+
opacity: 1;
|
|
62
|
+
transform: scaleY(1);
|
|
63
|
+
transition: getCssVar('transition-md-fade');
|
|
64
|
+
transform-origin: center bottom;
|
|
65
|
+
}
|
|
66
|
+
.#{$namespace}-zoom-in-bottom-enter-from,
|
|
67
|
+
.#{$namespace}-zoom-in-bottom-leave-active {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
transform: scaleY(0);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.#{$namespace}-zoom-in-left-enter-active,
|
|
73
|
+
.#{$namespace}-zoom-in-left-leave-active {
|
|
74
|
+
opacity: 1;
|
|
75
|
+
transform: scale(1, 1);
|
|
76
|
+
transition: getCssVar('transition-md-fade');
|
|
77
|
+
transform-origin: top left;
|
|
78
|
+
}
|
|
79
|
+
.#{$namespace}-zoom-in-left-enter-from,
|
|
80
|
+
.#{$namespace}-zoom-in-left-leave-active {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
transform: scale(0.45, 0.45);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.collapse-transition {
|
|
86
|
+
transition: getCssVar('transition-duration') height ease-in-out, getCssVar('transition-duration') padding-top ease-in-out,
|
|
87
|
+
getCssVar('transition-duration') padding-bottom ease-in-out;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.#{$namespace}-collapse-transition-leave-active,
|
|
91
|
+
.#{$namespace}-collapse-transition-enter-active {
|
|
92
|
+
transition: getCssVar('transition-duration') max-height ease-in-out, getCssVar('transition-duration') padding-top ease-in-out,
|
|
93
|
+
getCssVar('transition-duration') padding-bottom ease-in-out;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.#{$namespace}-menu-collapse-enter-active,
|
|
97
|
+
.#{$namespace}-menu-collapse-leave-active {
|
|
98
|
+
animation-duration: 0.3s;
|
|
99
|
+
animation-fill-mode: both;
|
|
100
|
+
animation-play-state: paused;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.#{$namespace}-menu-collapse-enter-from {
|
|
104
|
+
// opacity: 0;
|
|
105
|
+
animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
|
|
106
|
+
animation-name: rSlideUpIn;
|
|
107
|
+
animation-play-state: running;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.#{$namespace}-menu-collapse-leave-active {
|
|
111
|
+
animation-name: treeNodeLeave;
|
|
112
|
+
animation-play-state: running;
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.#{$namespace}-menu-collapse-leave-to {
|
|
117
|
+
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.horizontal-collapse-transition {
|
|
121
|
+
transition: getCssVar('transition-duration') width ease-in-out, getCssVar('transition-duration') padding-left ease-in-out,
|
|
122
|
+
getCssVar('transition-duration') padding-right ease-in-out;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.#{$namespace}-list-enter-active,
|
|
126
|
+
.#{$namespace}-list-leave-active {
|
|
127
|
+
transition: all 1s;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.#{$namespace}-list-enter-from,
|
|
131
|
+
.#{$namespace}-list-leave-to {
|
|
132
|
+
opacity: 0;
|
|
133
|
+
transform: translateY(-30px);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.#{$namespace}-list-leave-active {
|
|
137
|
+
position: absolute !important;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.#{$namespace}-opacity-transition {
|
|
141
|
+
transition: opacity getCssVar('transition-duration') cubic-bezier(0.55, 0, 0.1, 1);
|
|
142
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@use 'mixins/mixins' as *;
|
|
2
|
+
@use 'mixins/var' as *;
|
|
3
|
+
@use 'common/var' as *;
|
|
4
|
+
|
|
5
|
+
@include b(footer) {
|
|
6
|
+
@include set-component-css-var('footer', $footer);
|
|
7
|
+
|
|
8
|
+
padding: getCssVar('footer-padding');
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
flex-shrink: 0;
|
|
11
|
+
height: getCssVar('footer-height');
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@use 'mixins/mixins' as *;
|
|
2
|
+
@use 'mixins/var' as *;
|
|
3
|
+
@use 'common/var' as *;
|
|
4
|
+
|
|
5
|
+
@include b(header) {
|
|
6
|
+
@include set-component-css-var('header', $header);
|
|
7
|
+
|
|
8
|
+
padding: getCssVar('header-padding');
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
flex-shrink: 0;
|
|
11
|
+
height: getCssVar('header-height');
|
|
12
|
+
}
|
package/theme-chalk/index.scss
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
@use './link';
|
|
4
4
|
@use './button';
|
|
5
5
|
@use './button-group';
|
|
6
|
+
@use './aside';
|
|
7
|
+
@use './container';
|
|
8
|
+
@use './footer';
|
|
9
|
+
@use './header';
|
|
10
|
+
@use './main';
|
|
6
11
|
@use './icon/fonts';
|
|
7
12
|
@use './icon';
|
|
8
13
|
@use './row';
|
|
@@ -54,6 +59,9 @@
|
|
|
54
59
|
// /* Navigation 导航 */
|
|
55
60
|
@use './breadcrumb';
|
|
56
61
|
@use './dropdown';
|
|
62
|
+
@use './menu';
|
|
63
|
+
@use './menu-item';
|
|
64
|
+
@use './menu-item-group';
|
|
57
65
|
@use './tabs';
|
|
58
66
|
@use './empty';
|
|
59
67
|
@use './skeleton';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use 'mixins/mixins' as *;
|
|
2
|
+
@use 'mixins/var' as *;
|
|
3
|
+
@use 'common/var' as *;
|
|
4
|
+
|
|
5
|
+
@include b(main) {
|
|
6
|
+
@include set-component-css-var('main', $main);
|
|
7
|
+
|
|
8
|
+
display: block;
|
|
9
|
+
flex: 1;
|
|
10
|
+
flex-basis: auto;
|
|
11
|
+
overflow: auto;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
padding: getCssVar('main-padding');
|
|
14
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
@use 'mixins/mixins' as *;
|
|
2
|
+
@use 'mixins/var' as *;
|
|
3
|
+
@use 'mixins/utils' as *;
|
|
4
|
+
@use 'common/var' as *;
|
|
5
|
+
@use 'common/transition';
|
|
6
|
+
|
|
7
|
+
@mixin menu-item {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
height: getCssVar('menu-item-height');
|
|
11
|
+
line-height: getCssVar('menu-item-height');
|
|
12
|
+
font-size: getCssVar('menu-item-font-size');
|
|
13
|
+
color: getCssVar('menu-text-color');
|
|
14
|
+
padding: 0 getCssVar('menu-base-level-padding');
|
|
15
|
+
list-style: none;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
position: relative;
|
|
18
|
+
transition: border-color getCssVar('transition-duration'), background-color getCssVar('transition-duration'), color getCssVar('transition-duration');
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
|
|
22
|
+
* {
|
|
23
|
+
vertical-align: bottom;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
i {
|
|
27
|
+
color: inherit;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:hover,
|
|
31
|
+
&:focus {
|
|
32
|
+
outline: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: getCssVar('menu-hover-bg-color');
|
|
37
|
+
color: getCssVar('menu-hover-text-color');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@include when(disabled) {
|
|
41
|
+
opacity: 0.25;
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
background: none !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:root {
|
|
48
|
+
// They are defined on :root so they can be inherited by sub-menu instead of overwritten
|
|
49
|
+
@include set-component-css-var('menu', $menu);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@include b(menu) {
|
|
53
|
+
border-right: solid 1px getCssVar('menu-border-color');
|
|
54
|
+
list-style: none;
|
|
55
|
+
position: relative;
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding-left: 0;
|
|
58
|
+
background-color: getCssVar('menu-bg-color');
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
|
|
61
|
+
@include m(vertical) {
|
|
62
|
+
&:not(.#{$namespace}-menu--collapse):not(.#{$namespace}-menu--popup-container) {
|
|
63
|
+
& .#{$namespace}-menu-item,
|
|
64
|
+
& .#{$namespace}-sub-menu__title,
|
|
65
|
+
& .#{$namespace}-menu-item-group__title {
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
padding-left: calc(#{getCssVar('menu-base-level-padding')} + #{getCssVar('menu-level')} * #{getCssVar('menu-level-padding')});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:not(.#{$namespace}-menu--collapse) .#{$namespace}-sub-menu__title {
|
|
73
|
+
padding-right: calc(#{getCssVar('menu-base-level-padding')} + #{getCssVar('menu-icon-width')});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include m(horizontal) {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-wrap: nowrap;
|
|
79
|
+
border-right: none;
|
|
80
|
+
|
|
81
|
+
height: getCssVar('menu-horizontal-height');
|
|
82
|
+
|
|
83
|
+
// reset menu-item popup height
|
|
84
|
+
&.#{$namespace}-menu--popup-container {
|
|
85
|
+
height: unset;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.#{$namespace}-menu {
|
|
89
|
+
border-bottom: solid 1px getCssVar('menu-border-color');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
& > .#{$namespace}-menu-item {
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
align-items: center;
|
|
96
|
+
|
|
97
|
+
height: 100%;
|
|
98
|
+
margin: 0;
|
|
99
|
+
border-bottom: 2px solid transparent;
|
|
100
|
+
color: getCssVar('menu-text-color');
|
|
101
|
+
|
|
102
|
+
a,
|
|
103
|
+
a:hover {
|
|
104
|
+
color: inherit;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
& > .#{$namespace}-sub-menu {
|
|
109
|
+
&:focus,
|
|
110
|
+
&:hover {
|
|
111
|
+
outline: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:hover {
|
|
115
|
+
.#{$namespace}-sub-menu__title {
|
|
116
|
+
color: getCssVar('menu-hover-text-color');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&.is-active {
|
|
121
|
+
.#{$namespace}-sub-menu__title {
|
|
122
|
+
border-bottom: 2px solid getCssVar('menu-active-color');
|
|
123
|
+
color: getCssVar('menu-active-color');
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
& .#{$namespace}-sub-menu__title {
|
|
128
|
+
height: 100%;
|
|
129
|
+
border-bottom: 2px solid transparent;
|
|
130
|
+
color: getCssVar('menu-text-color');
|
|
131
|
+
|
|
132
|
+
&:hover {
|
|
133
|
+
background-color: getCssVar('menu-bg-color');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
& .#{$namespace}-menu {
|
|
139
|
+
& .#{$namespace}-menu-item,
|
|
140
|
+
& .#{$namespace}-sub-menu__title {
|
|
141
|
+
background-color: getCssVar('menu-bg-color');
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
height: getCssVar('menu-horizontal-sub-item-height');
|
|
145
|
+
line-height: getCssVar('menu-horizontal-sub-item-height');
|
|
146
|
+
padding: 0 10px;
|
|
147
|
+
color: getCssVar('menu-text-color');
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
& .#{$namespace}-sub-menu__title {
|
|
151
|
+
padding-right: 40px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
& .#{$namespace}-menu-item.is-active,
|
|
155
|
+
& .#{$namespace}-menu-item.is-active:hover,
|
|
156
|
+
& .#{$namespace}-sub-menu.is-active > .#{$namespace}-sub-menu__title,
|
|
157
|
+
& .#{$namespace}-sub-menu.is-active > .#{$namespace}-sub-menu__title:hover {
|
|
158
|
+
color: getCssVar('menu-active-color');
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
& .#{$namespace}-menu-item:not(.is-disabled):hover,
|
|
163
|
+
& .#{$namespace}-menu-item:not(.is-disabled):focus {
|
|
164
|
+
outline: none;
|
|
165
|
+
color: getCssVarWithDefault('menu-active-color', getCssVar('menu-hover-text-color'));
|
|
166
|
+
background-color: getCssVar('menu-hover-bg-color');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
& > .#{$namespace}-menu-item.is-active {
|
|
170
|
+
border-bottom: 2px solid getCssVar('menu-active-color');
|
|
171
|
+
color: getCssVar('menu-active-color') !important;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@include m(collapse) {
|
|
176
|
+
width: calc(#{getCssVar('menu-icon-width')} + #{getCssVar('menu-base-level-padding')} * 2);
|
|
177
|
+
|
|
178
|
+
> .#{$namespace}-menu-item,
|
|
179
|
+
> .#{$namespace}-sub-menu > .#{$namespace}-sub-menu__title,
|
|
180
|
+
> .#{$namespace}-menu-item-group > ul > .#{$namespace}-sub-menu > .#{$namespace}-sub-menu__title {
|
|
181
|
+
[class^='#{$namespace}-icon'] {
|
|
182
|
+
margin: 0;
|
|
183
|
+
vertical-align: middle;
|
|
184
|
+
width: getCssVar('menu-icon-width');
|
|
185
|
+
text-align: center;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.#{$namespace}-sub-menu__icon-arrow {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
> span {
|
|
193
|
+
height: 0;
|
|
194
|
+
width: 0;
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
visibility: hidden;
|
|
197
|
+
display: inline-block;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
> .#{$namespace}-menu-item.is-active i {
|
|
202
|
+
color: inherit;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.#{$namespace}-menu .#{$namespace}-sub-menu {
|
|
206
|
+
min-width: 200px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.#{$namespace}-sub-menu {
|
|
210
|
+
&.is-active .#{$namespace}-sub-menu__title {
|
|
211
|
+
color: getCssVar('menu-active-color');
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@include m(popup) {
|
|
217
|
+
z-index: 100;
|
|
218
|
+
min-width: 200px;
|
|
219
|
+
border: none;
|
|
220
|
+
padding: 5px 0;
|
|
221
|
+
border-radius: getCssVar('border-radius-small');
|
|
222
|
+
box-shadow: getCssVar('box-shadow-light');
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@include m(inline) {
|
|
226
|
+
display: none;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.#{$namespace}-icon {
|
|
230
|
+
flex-shrink: 0;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@include b(menu-item) {
|
|
235
|
+
@include menu-item;
|
|
236
|
+
|
|
237
|
+
& [class^='#{$namespace}-icon'] {
|
|
238
|
+
margin-right: 5px;
|
|
239
|
+
width: getCssVar('menu-icon-width');
|
|
240
|
+
text-align: center;
|
|
241
|
+
font-size: 18px;
|
|
242
|
+
vertical-align: middle;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@include when(active) {
|
|
246
|
+
color: getCssVar('menu-active-color');
|
|
247
|
+
|
|
248
|
+
i {
|
|
249
|
+
color: inherit;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.#{$namespace}-menu-tooltip__trigger {
|
|
254
|
+
position: absolute;
|
|
255
|
+
left: 0;
|
|
256
|
+
top: 0;
|
|
257
|
+
height: 100%;
|
|
258
|
+
width: 100%;
|
|
259
|
+
display: inline-flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
box-sizing: border-box;
|
|
262
|
+
padding: 0 getCssVar('menu-base-level-padding');
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
@include b(sub-menu) {
|
|
267
|
+
list-style: none;
|
|
268
|
+
margin: 0;
|
|
269
|
+
padding-left: 0;
|
|
270
|
+
|
|
271
|
+
@include e(title) {
|
|
272
|
+
@include menu-item;
|
|
273
|
+
|
|
274
|
+
&:hover {
|
|
275
|
+
background-color: getCssVar('menu-hover-bg-color');
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&.#{$namespace}-sub-menu__hide-arrow .el-sub-menu__title {
|
|
280
|
+
padding-right: var(--el-menu-base-level-padding);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
& .#{$namespace}-menu {
|
|
284
|
+
border: none;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
& .#{$namespace}-menu-item {
|
|
288
|
+
height: getCssVar('menu-sub-item-height');
|
|
289
|
+
line-height: getCssVar('menu-sub-item-height');
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@include e(hide-arrow) {
|
|
293
|
+
.#{$namespace}-sub-menu__icon-arrow {
|
|
294
|
+
display: none !important;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@include when(active) {
|
|
299
|
+
.#{$namespace}-sub-menu__title {
|
|
300
|
+
border-bottom-color: getCssVar('menu-active-color');
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
@include when(disabled) {
|
|
305
|
+
.#{$namespace}-sub-menu__title,
|
|
306
|
+
.#{$namespace}-menu-item {
|
|
307
|
+
opacity: 0.25;
|
|
308
|
+
cursor: not-allowed;
|
|
309
|
+
background: none !important;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.#{$namespace}-icon {
|
|
314
|
+
vertical-align: middle;
|
|
315
|
+
margin-right: 5px;
|
|
316
|
+
width: getCssVar('menu-icon-width');
|
|
317
|
+
text-align: center;
|
|
318
|
+
font-size: 18px;
|
|
319
|
+
|
|
320
|
+
&.#{$namespace}-sub-menu__icon-more {
|
|
321
|
+
margin-right: 0 !important;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.#{$namespace}-sub-menu__icon-arrow {
|
|
326
|
+
position: absolute;
|
|
327
|
+
top: 50%;
|
|
328
|
+
right: getCssVar('menu-base-level-padding');
|
|
329
|
+
margin-top: -6px;
|
|
330
|
+
transition: transform getCssVar('transition-duration');
|
|
331
|
+
font-size: 12px;
|
|
332
|
+
margin-right: 0;
|
|
333
|
+
width: inherit;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
@include b(menu-item-group) {
|
|
338
|
+
> ul {
|
|
339
|
+
padding: 0;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
@include e(title) {
|
|
343
|
+
padding: 7px 0 7px getCssVar('menu-base-level-padding');
|
|
344
|
+
line-height: normal;
|
|
345
|
+
font-size: 12px;
|
|
346
|
+
color: getCssVar('text-color', 'secondary');
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.horizontal-collapse-transition .#{$namespace}-sub-menu__title .#{$namespace}-sub-menu__icon-arrow {
|
|
351
|
+
transition: getCssVar('transition-duration-fast');
|
|
352
|
+
opacity: 0;
|
|
353
|
+
}
|