structure adjustment
This commit is contained in:
297
lib/ui/css/popup.scss
Normal file
297
lib/ui/css/popup.scss
Normal file
@ -0,0 +1,297 @@
|
||||
@import './functions/func.scss';
|
||||
|
||||
$headerLineHeight: 24px;
|
||||
$buttonHeight: 28px;
|
||||
|
||||
.popup-mask {
|
||||
position: fixed;
|
||||
@include inset(0, 0, 0, 0);
|
||||
background-color: rgba(0 0 0 /20%);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
opacity: 0;
|
||||
z-index: 200;
|
||||
transition: opacity .12s ease;
|
||||
|
||||
& {
|
||||
--corner-radius: 6px;
|
||||
--loading-size: 20px;
|
||||
--loading-border-radius: 10px;
|
||||
}
|
||||
|
||||
&.popup-active .popup-container {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
&.popup-transparent {
|
||||
right: unset;
|
||||
bottom: unset;
|
||||
}
|
||||
|
||||
.popup-container {
|
||||
min-width: 400px;
|
||||
max-width: 800px;
|
||||
background-color: var(--bg-color);
|
||||
border-radius: var(--corner-radius);
|
||||
box-shadow: 0 2px 8px rgba(0 0 0 /11%);
|
||||
transition: opacity .12s ease, transform .12s ease;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.popup-header {
|
||||
flex: 0 0 auto;
|
||||
padding: 10px 12px 6px;
|
||||
border-radius: var(--corner-radius) var(--corner-radius) 0 0;
|
||||
line-height: $headerLineHeight;
|
||||
user-select: none;
|
||||
background-color: var(--title-bg-color);
|
||||
color: var(--title-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
>div {
|
||||
flex: 1 1 auto;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
>.popup-header-title {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
>svg {
|
||||
flex: 0 0 auto;
|
||||
width: $headerLineHeight;
|
||||
height: $headerLineHeight;
|
||||
fill: var(--title-color);
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
transition: opacity .12s ease;
|
||||
|
||||
&:hover {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-body {
|
||||
margin: 6px 10px;
|
||||
flex: 1 1 auto;
|
||||
line-height: $headerLineHeight;
|
||||
position: relative;
|
||||
min-height: 100px;
|
||||
|
||||
>.popup-loading {
|
||||
position: absolute;
|
||||
@include inset(0, 0, -46px, 0);
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: visibility 0s linear .12s, opacity .12s ease;
|
||||
background-color: var(--loading-bg-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 1;
|
||||
|
||||
>div {
|
||||
background-color: var(--loading-fore-color);
|
||||
border-radius: var(--loading-border-radius);
|
||||
|
||||
>svg {
|
||||
width: var(--loading-size);
|
||||
height: var(--loading-size);
|
||||
padding: 20px;
|
||||
animation: loading-spinner 1.2s infinite linear;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
>.message-wrapper {
|
||||
display: flex;
|
||||
margin: 10px;
|
||||
|
||||
>svg {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
&+span {
|
||||
padding-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.setting-wrapper {
|
||||
--line-height: 28px;
|
||||
|
||||
>.setting-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: var(--line-height);
|
||||
margin: 4px 0;
|
||||
|
||||
>.setting-label {
|
||||
flex: 0 0 auto;
|
||||
width: 120px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding-right: 10px;
|
||||
|
||||
&.setting-required::after {
|
||||
content: '*';
|
||||
color: var(--red-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&+* {
|
||||
flex: 1 1 auto;
|
||||
margin-right: 10px;
|
||||
box-sizing: border-box;
|
||||
height: var(--line-height);
|
||||
line-height: var(--line-height);
|
||||
}
|
||||
|
||||
&+input[type="text"],
|
||||
&+input[type="email"],
|
||||
&+input[type="tel"],
|
||||
&+textarea {
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--border-radius);
|
||||
text-indent: var(--text-indent);
|
||||
transition: border-color .12s ease;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--focus-color);
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
&+.drop-wrapper>.drop-header>.drop-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&+.checkbox-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-footer {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 4px 10px 16px 2px;
|
||||
|
||||
.popup-button {
|
||||
margin-left: 12px;
|
||||
border: none;
|
||||
height: $buttonHeight;
|
||||
line-height: $buttonHeight;
|
||||
color: var(--title-color);
|
||||
border-radius: var(--corner-radius);
|
||||
padding: 0 16px;
|
||||
box-sizing: border-box;
|
||||
min-width: 70px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
background-color: var(--title-bg-color);
|
||||
transition: opacity .12s ease;
|
||||
|
||||
&:hover {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-border {
|
||||
position: absolute;
|
||||
|
||||
&.popup-border-left,
|
||||
&.popup-border-right {
|
||||
width: 6px;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
&.popup-border-top,
|
||||
&.popup-border-bottom {
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
left: 0;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
&.popup-border-top-left,
|
||||
&.popup-border-top-right,
|
||||
&.popup-border-bottom-right,
|
||||
&.popup-border-bottom-left {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
&.popup-border-top-left,
|
||||
&.popup-border-bottom-right {
|
||||
cursor: nwse-resize;
|
||||
}
|
||||
|
||||
&.popup-border-top-right,
|
||||
&.popup-border-bottom-left {
|
||||
cursor: nesw-resize;
|
||||
}
|
||||
|
||||
&.popup-border-left,
|
||||
&.popup-border-top-left,
|
||||
&.popup-border-bottom-left {
|
||||
left: -4px;
|
||||
}
|
||||
|
||||
&.popup-border-right,
|
||||
&.popup-border-top-right,
|
||||
&.popup-border-bottom-right {
|
||||
right: -4px;
|
||||
}
|
||||
|
||||
&.popup-border-top,
|
||||
&.popup-border-top-left,
|
||||
&.popup-border-top-right {
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
&.popup-border-bottom,
|
||||
&.popup-border-bottom-right,
|
||||
&.popup-border-bottom-left {
|
||||
bottom: -4px;
|
||||
}
|
||||
}
|
||||
|
||||
&.popup-collapse {
|
||||
min-height: 40px;
|
||||
min-width: 160px;
|
||||
|
||||
.popup-body,
|
||||
.popup-footer,
|
||||
.popup-border {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user