Files
ui-lib/lib/ui/css/common.scss
T
2026-11-24 08:27:04 +08:00

221 lines
4.2 KiB
SCSS

@use "functions/func.scss";
.ui-text,
.ui-input[type] {
font-size: var(--font-size);
font-family: var(--font-family);
@include func.outborder();
&.validation-error,
&:invalid {
border-color: var(--red-color);
&:focus,
&:hover {
border-color: var(--red-color);
}
}
}
.ui-input {
text-indent: var(--text-indent);
line-height: var(--line-height);
}
.ui-loading {
position: absolute;
@include func.inset(0, 0, 0, 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: 2;
>div {
width: 15px;
aspect-ratio: 1;
border-radius: 50%;
animation: loading-dot 1s infinite linear alternate;
/*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;
}*/
}
}
.ui-notify {
padding: 10px 10px 12px;
position: fixed;
top: 16px;
right: 16px;
min-width: 300px;
max-width: 600px;
box-shadow: 0 3.2px 7.2px 0 rgba(0, 0, 0, .13), 0 0.6px 1.8px 0 rgba(0, 0, 0, .11);
transition: transform .12s ease, opacity .12s ease;
transform-origin: right;
transform: translateX(100%);
opacity: 0;
&.active {
transform: translateX(0);
opacity: 1;
}
.ui-icon {
width: 30px;
height: 30px;
box-sizing: border-box;
}
>.ui-notify-single {
display: flex;
align-items: center;
>.ui-notify-message {
margin: 0 6px;
}
}
.ui-notify-header {
display: flex;
align-items: center;
}
.ui-notify-type {
padding: 3px;
fill: var(--green-color);
&.warning {
fill: var(--orange-color);
}
&.error {
fill: var(--red-color);
}
}
.ui-notify-title {
flex: 1 1 auto;
font-size: 1rem;
margin: 0 6px;
}
.ui-notify-close {
cursor: pointer;
padding: 6px;
transition: background-color .12s ease, fill .12s ease;
fill: var(--red-color);
&:hover {
background-color: var(--red-color);
fill: #fff;
}
}
.ui-notify-message {
flex: 1 1 auto;
}
}
.drag-box {
position: relative;
.drag-hover {
cursor: move;
touch-action: none;
}
.resizer {
position: absolute;
touch-action: none;
&[data-dir="n"],
&[data-dir="s"] {
width: 100%;
height: 7px;
left: 0;
cursor: ns-resize;
}
&[data-dir="w"],
&[data-dir="e"] {
width: 7px;
height: 100%;
top: 0;
cursor: ew-resize;
}
&[data-dir="nw"],
&[data-dir="se"],
&[data-dir="ne"],
&[data-dir="sw"] {
width: 8px;
height: 8px;
}
&[data-dir="nw"],
&[data-dir="se"] {
cursor: nwse-resize;
}
&[data-dir="ne"],
&[data-dir="sw"] {
cursor: nesw-resize;
}
&[data-dir="w"],
&[data-dir="nw"],
&[data-dir="sw"] {
left: -4px;
}
&[data-dir="e"],
&[data-dir="ne"],
&[data-dir="se"] {
right: -4px;
}
&[data-dir="n"],
&[data-dir="nw"],
&[data-dir="ne"] {
top: -4px;
}
&[data-dir="s"],
&[data-dir="sw"],
&[data-dir="se"] {
bottom: -4px;
}
}
}
.snap-line {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
z-index: 9999;
display: none;
&.line-x {
border-left: 1px dashed var(--red-color);
}
&.line-y {
border-top: 1px dashed var(--red-color);
}
}
html.is-interacting,
html.is-interacting * {
user-select: none !important;
}