2019-04-30 11:11:25 +08:00
|
|
|
.#{$ns}Collapse {
|
2023-01-06 20:36:45 +08:00
|
|
|
border-width: var(--collapse-default-top-border-width)
|
|
|
|
var(--collapse-default-right-border-width)
|
|
|
|
var(--collapse-default-bottom-border-width)
|
|
|
|
var(--collapse-default-left-border-width);
|
|
|
|
border-style: var(--collapse-default-top-border-style)
|
|
|
|
var(--collapse-default-right-border-style)
|
|
|
|
var(--collapse-default-bottom-border-style)
|
|
|
|
var(--collapse-default-left-border-style);
|
|
|
|
border-color: var(--collapse-default-top-border-color)
|
|
|
|
var(--collapse-default-right-border-color)
|
|
|
|
var(--collapse-default-bottom-border-color)
|
|
|
|
var(--collapse-default-left-border-color);
|
|
|
|
border-radius: var(--collapse-default-top-left-border-radius)
|
|
|
|
var(--collapse-default-top-right-border-radius)
|
|
|
|
var(--collapse-default-bottom-right-border-radius)
|
|
|
|
var(--collapse-default-bottom-left-border-radius);
|
2019-12-06 09:58:08 +08:00
|
|
|
padding: 0;
|
2021-11-23 10:51:33 +08:00
|
|
|
line-height: px2rem(20px);
|
2022-07-27 19:42:59 +08:00
|
|
|
// overflow: hidden;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-header {
|
2021-11-03 16:31:49 +08:00
|
|
|
font-size: var(--Collapse-header-fontSize);
|
|
|
|
font-weight: var(--Collapse-header-fontWeight);
|
2023-01-06 20:36:45 +08:00
|
|
|
color: var(--collapse-default-header-color);
|
|
|
|
line-height: var(--collapse-default-header-lineHeight);
|
2021-11-03 16:31:49 +08:00
|
|
|
padding: var(--Collapse-header-padding);
|
|
|
|
margin: 0;
|
2021-11-23 10:51:33 +08:00
|
|
|
cursor: pointer;
|
2021-11-03 16:31:49 +08:00
|
|
|
background: var(--Collapse-header-bg);
|
|
|
|
|
2021-11-12 12:36:32 +08:00
|
|
|
&-wrapper {
|
|
|
|
display: inline-flex;
|
|
|
|
flex-direction: var(--Collapse-header-wrapper-direction);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-tpl {
|
|
|
|
margin-right: px2rem(8px);
|
|
|
|
}
|
|
|
|
|
2021-11-03 16:31:49 +08:00
|
|
|
&:hover {
|
|
|
|
background: var(--Collapse-header-onHover-bg);
|
2023-01-06 20:36:45 +08:00
|
|
|
color: var(--collapse-default-header-hover-color);
|
2021-11-03 16:31:49 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2023-01-06 20:36:45 +08:00
|
|
|
.Collapse-arrow {
|
|
|
|
content: var(--collapse-icon-icon);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-arrow-wrap {
|
2019-12-06 09:58:08 +08:00
|
|
|
width: px2rem(16px);
|
2022-07-26 21:05:36 +08:00
|
|
|
height: px2rem(16px);
|
2023-01-06 20:36:45 +08:00
|
|
|
display: inline-flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
margin-right: var(--collapse-icon-margin);
|
|
|
|
|
|
|
|
svg {
|
|
|
|
width: var(--collapse-icon-size);
|
|
|
|
height: var(--collapse-icon-size);
|
|
|
|
color: var(--collapse-icon-color);
|
|
|
|
top: 0;
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2021-11-23 10:51:33 +08:00
|
|
|
&-icon-tranform {
|
2021-11-04 18:06:12 +08:00
|
|
|
display: inline-block;
|
2021-11-23 10:51:33 +08:00
|
|
|
width: px2rem(16px);
|
|
|
|
text-align: center;
|
|
|
|
margin-right: var(--gap-xs);
|
2021-11-04 18:06:12 +08:00
|
|
|
}
|
|
|
|
|
2022-11-29 15:39:13 +08:00
|
|
|
// 干扰太多了,先注释
|
|
|
|
// .#{$ns}TplField {
|
|
|
|
// display: inline-block;
|
|
|
|
// }
|
2021-11-23 10:51:33 +08:00
|
|
|
|
2023-03-31 09:52:39 +08:00
|
|
|
&.is-active > &-header > &-arrow-wrap > &-arrow {
|
2023-01-06 20:36:45 +08:00
|
|
|
transform: rotate(var(--collapse-icon-rotate));
|
|
|
|
transform-origin: 50% 50%;
|
2021-11-23 10:51:33 +08:00
|
|
|
}
|
2022-09-30 09:44:07 +08:00
|
|
|
&.is-active > * > &-icon-tranform {
|
2023-01-06 20:36:45 +08:00
|
|
|
transform: rotate(var(--collapse-icon-rotate));
|
2021-11-03 16:31:49 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2022-09-30 09:44:07 +08:00
|
|
|
&--disabled > &-header {
|
2021-11-23 10:51:33 +08:00
|
|
|
cursor: not-allowed;
|
2019-12-06 09:58:08 +08:00
|
|
|
user-select: none;
|
2023-01-06 20:36:45 +08:00
|
|
|
color: var(--collapse-default-disabled-color);
|
|
|
|
background: var(--collapse-default-disabled-header-bg-color);
|
2021-11-23 10:51:33 +08:00
|
|
|
}
|
|
|
|
|
2023-01-06 20:36:45 +08:00
|
|
|
&--disabled &-arrow-wrap svg {
|
|
|
|
color: var(--collapse-default-disabled-color);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-08-13 18:50:53 +08:00
|
|
|
|
2020-11-18 21:52:50 +08:00
|
|
|
// title 显示在底部的模式
|
|
|
|
&--title-bottom &-header {
|
|
|
|
text-align: center;
|
2020-12-21 10:08:40 +08:00
|
|
|
font-size: var(--fontSizeBase);
|
2021-11-12 12:36:32 +08:00
|
|
|
border-top: var(--Collapse-header-collapsed-borderTop);
|
|
|
|
border-bottom: var(--Collapse-header-collapsed-borderBottom);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--title-bottom.is-collapsed &-header {
|
|
|
|
border-top: none;
|
2020-11-18 21:52:50 +08:00
|
|
|
}
|
|
|
|
|
2023-01-06 20:36:45 +08:00
|
|
|
&--title-bottom &-arrow {
|
2021-11-23 10:51:33 +08:00
|
|
|
top: px2rem(-4px);
|
2023-01-06 20:36:45 +08:00
|
|
|
transform: rotate(var(--collapse-icon-rotate));
|
2020-11-18 21:52:50 +08:00
|
|
|
}
|
|
|
|
|
2023-01-06 20:36:45 +08:00
|
|
|
&--title-bottom.is-active &-arrow {
|
2021-11-23 10:51:33 +08:00
|
|
|
top: 0;
|
2023-01-06 20:36:45 +08:00
|
|
|
transform: rotate(calc(-1 * var(--collapse-icon-rotate)));
|
2020-11-18 21:52:50 +08:00
|
|
|
}
|
|
|
|
|
2021-11-03 16:31:49 +08:00
|
|
|
&-contentWrapper {
|
2021-01-04 16:45:43 +08:00
|
|
|
transition: height var(--animation-duration) ease;
|
2019-12-06 09:58:08 +08:00
|
|
|
&.in,
|
|
|
|
&.out {
|
|
|
|
height: 0;
|
|
|
|
overflow: hidden;
|
2019-08-13 18:50:53 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2021-11-03 16:31:49 +08:00
|
|
|
&-content {
|
|
|
|
padding: var(--Collapse-content-padding);
|
2023-01-06 20:36:45 +08:00
|
|
|
color: var(--Collapse-content-color);
|
2021-11-03 16:31:49 +08:00
|
|
|
font-size: var(--Collapse-content-fontSize);
|
|
|
|
font-weight: var(--Collapse-content-fontWeight);
|
2023-01-06 20:36:45 +08:00
|
|
|
line-height: var(--collapse-default-content-lineHeight);
|
|
|
|
background: var(--collapse-default-bg-color);
|
2021-11-03 16:31:49 +08:00
|
|
|
}
|
2020-11-18 21:52:50 +08:00
|
|
|
}
|
2022-10-19 10:38:52 +08:00
|
|
|
|
|
|
|
//FieldSet Form + Collapse
|
|
|
|
.#{$ns}Form {
|
|
|
|
.#{$ns}Collapse {
|
|
|
|
border: none;
|
|
|
|
&-header {
|
|
|
|
background-color: var(--white);
|
|
|
|
display: inline-flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
&-content {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|