amis/scss/components/_wizard.scss

271 lines
6.1 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}Wizard {
2019-12-06 09:58:08 +08:00
@include clearfix();
position: relative;
&,
&-tabs {
padding: 0;
2020-01-02 14:40:25 +08:00
.#{$ns}Badge {
2019-12-06 09:58:08 +08:00
display: inline-block;
width: var(--Wizard-badge-size);
height: var(--Wizard-badge-size);
font-size: var(--Wizard-badge-fontSize);
line-height: var(--Wizard-badge-size);
color: var(--Wizard-badge-color);
2019-12-06 09:58:08 +08:00
text-align: center;
white-space: nowrap;
vertical-align: middle;
background: var(--Wizard-badge-bg);
border-radius: var(--Wizard-badge-borderRadius); // font-weight: 700;
2019-12-06 09:58:08 +08:00
text-shadow: 0 px2rem(1px) 0 rgba(0, 0, 0, 0.2);
margin-right: var(--Wizard-badge-marginRight);
border: var(--Wizard-badge-border);
2019-12-06 09:58:08 +08:00
box-sizing: content-box;
// &--primary {
// background: var(--primary);
2019-12-06 09:58:08 +08:00
// }
// &--secondary {
// background: var(--secondary);
2019-12-06 09:58:08 +08:00
// }
// &--success {
// background: var(--success);
2019-12-06 09:58:08 +08:00
// }
// &--info {
// background: var(--info);
2019-12-06 09:58:08 +08:00
// }
// &--warning {
// background: var(--warning);
2019-12-06 09:58:08 +08:00
// }
// &--danger {
// background: var(--danger);
2019-12-06 09:58:08 +08:00
// }
// &--light {
// background: var(--light);
2019-12-06 09:58:08 +08:00
// }
// &--dark {
// background: var(--dark);
2019-12-06 09:58:08 +08:00
// }
&.is-active {
color: var(--white);
background: var(--Wizard-badge-onActive-backgroundColor);
2019-12-06 09:58:08 +08:00
}
&.is-complete {
color: var(--white);
background: var(--Wizard-badge-onComplete-backgroundColor);
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
ul li.active {
color: var(--info);
2019-12-06 09:58:08 +08:00
}
2019-12-06 09:58:08 +08:00
.#{$ns}Panel-footer > .#{$ns}Form-group,
.#{$ns}Panel-footer > .btn {
margin-left: var(--gap-xs);
2019-12-06 09:58:08 +08:00
}
> ul.nav {
padding: 0;
margin: 0;
border: var(--borderWidth) solid var(--borderColor);
2019-12-06 09:58:08 +08:00
li {
position: relative;
float: left;
padding: 0 var(--gap-md) 0 px2rem(25px);
2019-12-06 09:58:08 +08:00
margin: 0;
color: #999999;
cursor: pointer;
height: var(--Wizard-steps-height);
line-height: var(--Wizard-steps-height);
2019-12-06 09:58:08 +08:00
a {
border: 0 none !important;
background: transparent !important;
color: inherit;
display: inline;
padding: 0;
div {
display: inline;
}
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&:first-child {
padding-left: var(--gap-md);
2019-12-06 09:58:08 +08:00
border-radius: px2rem(4px) 0 0 0;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&:before,
&:after {
content: '';
position: absolute;
right: px2rem(-10px);
border: var(--gap-md) solid transparent;
2019-12-06 09:58:08 +08:00
border-right: 0;
border-left: px2rem(10px) solid var(--borderColor);
2019-12-06 09:58:08 +08:00
border-left-color: rgba(0, 0, 0, 0.05);
z-index: 1;
bottom: 0;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&:after {
right: px2rem(-9px);
border-left-color: var(--Wizard-steps-bg);
2019-12-06 09:58:08 +08:00
z-index: 2;
}
2019-12-06 09:58:08 +08:00
&.is-active {
color: var(--Wizard-steps-li-onActive-color);
2019-12-06 09:58:08 +08:00
background: #fff;
}
2019-12-06 09:58:08 +08:00
&.is-active:after {
border-left-color: #fff;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
// .Badge {
// margin-right: px2rem(4px);
// }
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
&-steps {
font-size: var(--fontSizeBase);
padding: var(--Wizard-steps-padding);
background: var(--Wizard-steps-bg);
border-bottom: var(--Wizard-steps-borderWidth) solid var(--borderColor);
text-align: var(--Wizard-steps-textAlign);
2019-12-06 09:58:08 +08:00
@include clearfix();
ul {
display: var(--Wizard-steps-ulDisplay);
2019-12-06 09:58:08 +08:00
padding: 0;
margin: 0;
list-style: none outside none;
2019-12-06 09:58:08 +08:00
li {
position: relative;
2019-04-30 11:11:25 +08:00
float: left;
padding: 0 var(--gap-md) 0 px2rem(25px);
2019-12-06 09:58:08 +08:00
margin: 0;
color: #999999;
cursor: default;
height: var(--Wizard-steps-height);
line-height: var(--Wizard-steps-height);
2019-12-06 09:58:08 +08:00
&:first-child {
padding-left: var(--gap-md);
2019-12-06 09:58:08 +08:00
border-radius: px2rem(4px) 0 0 0;
}
&:before,
&:after {
font-family: var(--Wizard-steps-liVender);
content: var(--Wizard-steps-liAfterContent);
2019-12-06 09:58:08 +08:00
position: absolute;
bottom: 0;
right: px2rem(-10px);
border: $Wizard-steps-liAfterBorder;
2019-12-06 09:58:08 +08:00
border-right: 0;
border-left: px2rem(10px) solid var(--borderColor);
2019-12-06 09:58:08 +08:00
border-left-color: rgba(0, 0, 0, 0.05);
z-index: 2;
}
2019-12-06 09:58:08 +08:00
&:after {
right: px2rem(-9px);
border-left-color: var(--Wizard-steps-bg);
2019-12-06 09:58:08 +08:00
z-index: 2;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&.is-active {
color: var(--Wizard-steps-li-onActive-color);
background: var(--Wizard-steps-li-onActive-bg);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&.is-active:after {
border-left-color: var(--Wizard-steps-li-onActive-arrow-bg);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&.is-complete,
&.is-complete:hover {
color: var(--Wizard-steps-li-onActive-color);
2019-12-06 09:58:08 +08:00
cursor: pointer;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
// .Badge {
// margin-right: px2rem(4px);
// }
}
}
&-stepContent {
padding: var(--Wizard-stepsContent-padding);
2019-12-06 09:58:08 +08:00
& .Step-pane {
display: none;
&.is-active {
display: inherit;
}
}
}
&--vertical {
2020-10-20 00:12:03 +08:00
> .#{$ns}Wizard-step {
display: flex;
flex-direction: row;
flex-wrap: wrap;
border-bottom: none;
> .#{$ns}Wizard-steps {
height: auto;
min-width: 40px;
margin-right: 30px;
margin-bottom: px2rem(30px); // padding: 0;
background: none;
border-bottom: none;
li {
background: var(--Wizard-steps-bg);
2020-10-20 00:12:03 +08:00
}
2019-12-06 09:58:08 +08:00
2020-10-20 00:12:03 +08:00
ul li {
height: px2rem(40px);
line-height: px2rem(40px);
position: relative;
float: none;
border-bottom: var(--borderWidth) solid var(--borderColor);
padding-left: var(--gap-md);
2020-10-20 00:12:03 +08:00
&.is-active {
background: #fff;
}
}
}
2019-12-06 09:58:08 +08:00
2020-10-20 00:12:03 +08:00
> .#{$ns}Wizard-stepContent {
flex-grow: 1;
width: 0;
}
2019-12-06 09:58:08 +08:00
2020-10-20 00:12:03 +08:00
> .#{$ns}Wizard-footer {
width: 100%;
}
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-09-09 00:53:39 +08:00
}