2019-04-30 11:11:25 +08:00
|
|
|
.#{$ns}Nav {
|
2021-04-21 00:08:16 +08:00
|
|
|
position: relative;
|
2021-11-05 11:57:28 +08:00
|
|
|
.#{$ns}Nav-list {
|
|
|
|
list-style: none;
|
|
|
|
user-select: none;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.#{$ns}Nav-itemIcon {
|
|
|
|
margin-right: var(--gap-sm);
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
img.#{$ns}Nav-itemIcon {
|
|
|
|
height: var(--Tabs-linkFontSize);
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
2020-06-08 15:49:45 +08:00
|
|
|
|
2022-03-17 16:26:51 +08:00
|
|
|
&-overflow {
|
|
|
|
min-height: var(--Nav-Item-height) !important;
|
|
|
|
max-height: calc(var(--Nav-Item-height) * 5);
|
|
|
|
max-width: var(--Nav-Item-maxWidth--tabs);
|
|
|
|
font-size: var(--Nav-subItem-fontSize);
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
|
|
.#{$ns}Nav-subItems {
|
|
|
|
margin-block-start: 0;
|
|
|
|
margin-block-end: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Nav-item {
|
|
|
|
max-width: var(--Nav-Item-maxWidth--tabs);
|
|
|
|
height: var(--Nav-Item-height);
|
|
|
|
|
|
|
|
> a {
|
|
|
|
border: none !important;
|
|
|
|
display: block !important;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
&--tabs {
|
|
|
|
border-bottom: var(--Tabs-borderWidth) solid var(--Tabs-borderColor);
|
2021-01-28 16:30:38 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
.#{$ns}Nav-item {
|
|
|
|
margin-bottom: calc(var(--Tabs-borderWidth) * -1);
|
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
2022-03-17 16:26:51 +08:00
|
|
|
max-width: var(--Nav-Item-maxWidth--tabs);
|
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
> a {
|
|
|
|
font-size: var(--Tabs-linkFontSize);
|
|
|
|
display: block;
|
|
|
|
outline: none;
|
|
|
|
border: var(--Tabs-borderWidth) solid transparent;
|
|
|
|
border-top-left-radius: var(--Tabs-borderRadius);
|
|
|
|
border-top-right-radius: var(--Tabs-borderRadius);
|
|
|
|
color: var(--Tabs-color);
|
|
|
|
text-decoration: none;
|
|
|
|
margin-right: px2rem(2px);
|
|
|
|
padding: var(--gap-sm) var(--gap-xl);
|
|
|
|
cursor: pointer;
|
2022-03-17 16:26:51 +08:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
2021-11-05 11:57:28 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
&:hover > a,
|
|
|
|
> a:focus {
|
|
|
|
border-color: var(--Tabs-onHover-borderColor);
|
2022-03-17 16:26:51 +08:00
|
|
|
border-bottom: none; // 外层已经有border-bottom了
|
2021-11-05 11:57:28 +08:00
|
|
|
text-decoration: none;
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
&.disabled > a,
|
|
|
|
&.is-disabled > a {
|
|
|
|
color: var(--Tabs-onDisabled-color);
|
|
|
|
background: transparent;
|
|
|
|
border-color: transparent;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
&.active > a,
|
|
|
|
&.is-active > a {
|
|
|
|
color: var(--Tabs-onActive-color);
|
|
|
|
background: var(--Tabs-onActive-bg);
|
|
|
|
border-color: var(--Tabs-onActive-borderColor);
|
|
|
|
border-bottom-color: var(--Tabs-content-bg);
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2022-03-17 16:26:51 +08:00
|
|
|
|
|
|
|
.#{$ns}Nav-item-overflow {
|
|
|
|
&:hover > a,
|
|
|
|
> a:focus,
|
|
|
|
&.is-overflow-opened > a {
|
|
|
|
color: var(--primary);
|
|
|
|
border-color: transparent;
|
|
|
|
}
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
&--stacked {
|
|
|
|
min-height: px2rem(50px);
|
|
|
|
|
2022-03-17 16:26:51 +08:00
|
|
|
.#{$ns}Nav-item,
|
|
|
|
.#{$ns}Badge {
|
2021-11-05 11:57:28 +08:00
|
|
|
position: relative;
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
align-items: stretch;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
.#{$ns}Nav-itemDrager {
|
|
|
|
cursor: move;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
display: none;
|
2021-11-23 12:21:19 +08:00
|
|
|
line-height: 0;
|
2022-03-17 16:26:51 +08:00
|
|
|
> .icon,
|
|
|
|
> .#{$ns}Badge > .icon {
|
2021-11-05 11:57:28 +08:00
|
|
|
color: var(--icon-color);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--icon-onHover-color);
|
|
|
|
}
|
2021-11-01 10:14:25 +08:00
|
|
|
}
|
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
svg {
|
|
|
|
width: px2rem(16px);
|
|
|
|
height: px2rem(16px);
|
|
|
|
}
|
2021-11-01 10:14:25 +08:00
|
|
|
}
|
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
> .#{$ns}Nav-item-badgeText {
|
2021-11-01 10:14:25 +08:00
|
|
|
position: absolute;
|
2021-11-05 11:57:28 +08:00
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
width: px2rem(35px);
|
|
|
|
overflow: hidden;
|
|
|
|
> span {
|
|
|
|
position: absolute;
|
|
|
|
top: px2rem(2px);
|
|
|
|
left: px2rem(-13px);
|
|
|
|
transform: rotate(-45deg);
|
|
|
|
width: px2rem(50px);
|
|
|
|
font-size: 12px;
|
|
|
|
text-align: center;
|
|
|
|
color: var(--white);
|
2022-03-17 16:26:51 +08:00
|
|
|
background: var(--success);
|
2021-11-05 11:57:28 +08:00
|
|
|
}
|
2021-11-01 10:14:25 +08:00
|
|
|
}
|
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
> .#{$ns}Nav-item-atcions {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2021-11-01 10:14:25 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
> a,
|
|
|
|
> .#{$ns}Badge > a {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
outline: none;
|
|
|
|
color: var(--Nav-item-color);
|
|
|
|
text-decoration: none;
|
|
|
|
padding: var(--gap-sm) var(--gap-sm);
|
|
|
|
cursor: pointer;
|
|
|
|
background: var(--Nav-item-bg);
|
|
|
|
border-radius: var(--Nav-item-borderRadius);
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
flex: 1;
|
|
|
|
|
|
|
|
// &::after {
|
|
|
|
// border-left: var(--Nav-item-onActive-borderLeft);
|
|
|
|
// position: absolute;
|
|
|
|
// left: 0;
|
|
|
|
// top: 0;
|
|
|
|
// content: '';
|
|
|
|
// width: 1px;
|
|
|
|
// height: 100%;
|
|
|
|
// transform: scaleY(0.0001);
|
|
|
|
// transition: transform 0.15s cubic-bezier(0.215, 0.61, 0.355, 1),
|
|
|
|
// opacity 0.15s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
|
|
// }
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
> a:hover,
|
|
|
|
> a:focus,
|
|
|
|
> a:hover + .#{$ns}Nav-item-atcions,
|
|
|
|
> a:focus + .#{$ns}Nav-item-atcions,
|
|
|
|
> .#{$ns}Badge > a:hover,
|
|
|
|
> .#{$ns}Badge > a:focus,
|
|
|
|
> .#{$ns}Badge > a:hover + .#{$ns}Nav-item-atcions,
|
2022-03-17 16:26:51 +08:00
|
|
|
> .#{$ns}Badge > a:focus + .#{$ns}Nav-item-atcions {
|
2021-11-05 11:57:28 +08:00
|
|
|
border-color: var(--Nav-item-onHover-color);
|
|
|
|
text-decoration: none;
|
|
|
|
background: var(--Nav-item-onHover-bg);
|
2021-11-09 20:58:18 +08:00
|
|
|
z-index: 1;
|
2021-11-05 11:57:28 +08:00
|
|
|
}
|
2021-11-01 10:14:25 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
> a:hover > .#{$ns}Nav-itemDrager,
|
|
|
|
> a:focus > .#{$ns}Nav-itemDrager,
|
|
|
|
> .#{$ns}Badge > a:hover > .#{$ns}Nav-itemDrager,
|
|
|
|
> .#{$ns}Badge > a:focus > .#{$ns}Nav-itemDrager {
|
|
|
|
display: block;
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
&.disabled > a,
|
|
|
|
&.is-disabled > a,
|
|
|
|
&.disabled > .#{$ns}Badge > a,
|
|
|
|
&.is-disabled > .#{$ns}Badge > a {
|
|
|
|
color: var(--Nav-item-onDisabled-color);
|
|
|
|
background: transparent;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
&.active > a,
|
|
|
|
&.is-active > .#{$ns}Nav-item-atcions,
|
|
|
|
&.is-active > a,
|
|
|
|
&.active > .#{$ns}Badge > a,
|
|
|
|
&.is-active > .#{$ns}Badge > .#{$ns}Nav-item-atcions,
|
|
|
|
&.is-active > .#{$ns}Badge > a {
|
|
|
|
color: var(--Nav-item-onActive-color);
|
|
|
|
position: relative;
|
2021-12-08 15:04:21 +08:00
|
|
|
background: var(--Nav-item-onActive-bg) !important;
|
2021-04-21 00:08:16 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
&::after {
|
|
|
|
transform: scaleY(1);
|
|
|
|
}
|
2021-04-21 00:08:16 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2022-03-17 16:26:51 +08:00
|
|
|
&.is-unfolded >,
|
|
|
|
&.is-unfolded > .#{$ns}Badge > {
|
2021-11-05 11:57:28 +08:00
|
|
|
a .#{$ns}Nav-itemToggler {
|
|
|
|
transform: rotate(180deg) scale(0.8);
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
.#{$ns}Nav-subItems {
|
|
|
|
display: block;
|
|
|
|
// margin-left: var(--gap-sm);
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
.#{$ns}Nav-spinner {
|
|
|
|
position: absolute;
|
|
|
|
right: px2rem(10px);
|
|
|
|
top: px2rem(8px);
|
|
|
|
}
|
2021-04-21 00:08:16 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
.#{$ns}Nav-itemToggler {
|
|
|
|
// position: absolute;
|
|
|
|
// left: 0;
|
|
|
|
// top: px2rem(3px);
|
|
|
|
float: left;
|
|
|
|
margin-right: px2rem(10px);
|
|
|
|
height: px2rem(24px);
|
|
|
|
text-align: center;
|
|
|
|
line-height: px2rem(24px);
|
|
|
|
vertical-align: middle;
|
|
|
|
cursor: pointer;
|
|
|
|
transform: scale(0.8);
|
|
|
|
transition: transform var(--animation-duration);
|
|
|
|
|
|
|
|
> svg {
|
|
|
|
width: 10px;
|
|
|
|
height: 10px;
|
|
|
|
top: 0;
|
|
|
|
}
|
2020-06-08 15:49:45 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
.#{$ns}Nav-subItems {
|
|
|
|
// background: var(--Nav-subNav-bg);
|
|
|
|
display: none;
|
|
|
|
padding-left: 0;
|
|
|
|
list-style: none;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2021-11-05 11:57:28 +08:00
|
|
|
.#{$ns}Nav-item {
|
|
|
|
font-size: var(--Nav-subItem-fontSize);
|
|
|
|
|
|
|
|
// a:before {
|
|
|
|
// content: '';
|
|
|
|
// display: inline-block;
|
|
|
|
// width: px2rem(4px);
|
|
|
|
// height: px2rem(4px);
|
|
|
|
// background: #ccc;
|
|
|
|
// border-radius: px2rem(500px);
|
|
|
|
// margin-right: px2rem(8px);
|
|
|
|
// vertical-align: middle;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// &.active > a:before,
|
|
|
|
// &.is-active > a:before {
|
|
|
|
// background: var(--Nav-subItem-onActiveBeforeBg);
|
|
|
|
// }
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2021-11-05 11:57:28 +08:00
|
|
|
.#{$ns}Nav-dropIndicator {
|
|
|
|
position: absolute;
|
|
|
|
background: var(--Nav-item-onActive-color);
|
|
|
|
height: 2px;
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
}
|