vendor: amis 6.13.0 base (fork root)
This commit is contained in:
9
packages/amis-ui/scss/README.md
Normal file
9
packages/amis-ui/scss/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
## 开发注意事项
|
||||
|
||||
目前 scss 里大量使用了 css 自定义变量,它和之前的 scss 变量明显不同,需要注意一下几点:
|
||||
|
||||
- 目前依然有使用 scss 变量,因为有大量颜色计算,这些计算没法在自定义变量中使用,是所以目前是用两者结合的方式,想修改颜色最好的方式还是 scss 变量,但其他都能方便使用自定义变量修改,后续有可能基于 hsl 的方式来使得颜色也动态计算。
|
||||
- components 内的组件不要使用 @if、lighten、darken 等函数,这些功能无法支持自定义变量,解决办法是新增变量,放 `_properties.scss` 里,这样也能支持用户自定义。
|
||||
- 负数需要使用 `calc(var(--xxx) * -1)`。
|
||||
- 在变量中使用 sass 功能需要用 `#{}` 包裹,比如 `--borderColorLight: #{lighten($borderColor, 5%)}`;
|
||||
- 在 Chrome 开发工具中点变量会没反应,是因为我们的变量太多了,得先在开发工具里点一下显示全部变量。
|
||||
4346
packages/amis-ui/scss/_components.scss
Normal file
4346
packages/amis-ui/scss/_components.scss
Normal file
File diff suppressed because one or more lines are too long
137
packages/amis-ui/scss/_functions.scss
Normal file
137
packages/amis-ui/scss/_functions.scss
Normal file
@@ -0,0 +1,137 @@
|
||||
@use 'sass:math';
|
||||
|
||||
//下一个断点
|
||||
@function breakpoint-next(
|
||||
$name,
|
||||
$breakpoints: breakpoints,
|
||||
$breakpoint-names: map-keys($breakpoints)
|
||||
) {
|
||||
$n: index($breakpoint-names, $name);
|
||||
@return if(
|
||||
$n < length($breakpoint-names),
|
||||
nth($breakpoint-names, $n + 1),
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
//断点最小值
|
||||
@function breakpoint-min($name, $breakpoints: $breakpoints) {
|
||||
$min: map-get($breakpoints, $name); // @return if($min != 0, $min, null);
|
||||
@return $min;
|
||||
}
|
||||
|
||||
//断点最大值
|
||||
@function breakpoint-max($name, $breakpoints: $breakpoints) {
|
||||
$next: breakpoint-next($name, $breakpoints);
|
||||
@return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
|
||||
}
|
||||
|
||||
//生成类名“-sm、-md、-lg、-cl” -xs?
|
||||
@function breakpoint-infix($name, $breakpoints: $breakpoints) {
|
||||
@return if(breakpoint-min($name, $breakpoints) ==null, '', '-#{$name}');
|
||||
}
|
||||
|
||||
@function px2rem($pixels, $context: $remFactor) {
|
||||
@if (unitless($pixels)) {
|
||||
$pixels: $pixels * 1px;
|
||||
}
|
||||
|
||||
@if (unitless($context)) {
|
||||
$context: $context * 1px;
|
||||
}
|
||||
|
||||
@return math.div($pixels, $context) * 1rem;
|
||||
}
|
||||
|
||||
@function tint($color, $intensity) {
|
||||
$r: red($color);
|
||||
$g: green($color);
|
||||
$b: blue($color);
|
||||
|
||||
@return rgb(
|
||||
$r + (255 - $r) * $intensity,
|
||||
$g + (255 - $g) * $intensity,
|
||||
$b + (255 - $b) * $intensity
|
||||
);
|
||||
}
|
||||
|
||||
@function shade($color, $intensity) {
|
||||
$r: red($color);
|
||||
$g: green($color);
|
||||
$b: blue($color);
|
||||
|
||||
@return rgb($r * $intensity, $g * $intensity, $b * $intensity);
|
||||
}
|
||||
|
||||
// 判断对象是否是 map
|
||||
@function is-map($var) {
|
||||
@return type-of($var) == 'map';
|
||||
}
|
||||
|
||||
@function str-replace($string, $search, $replace: '') {
|
||||
$str: #{'' + $string};
|
||||
$index: str-index($str, $search);
|
||||
|
||||
@if $index {
|
||||
@return str-slice($str, 1, $index - 1) + $replace +
|
||||
str-replace(
|
||||
str-slice($str, $index + str-length($search)),
|
||||
$search,
|
||||
$replace
|
||||
);
|
||||
}
|
||||
|
||||
@return $str;
|
||||
}
|
||||
|
||||
@function selector-escape($str) {
|
||||
@return str-replace(
|
||||
str-replace(str-replace($str, '.', '\\.'), ':', '\\:'),
|
||||
'/',
|
||||
'\\/'
|
||||
);
|
||||
}
|
||||
|
||||
@function suffixName($str) {
|
||||
@if $str == default {
|
||||
@return '';
|
||||
} @else {
|
||||
@return '-' + $str;
|
||||
}
|
||||
}
|
||||
|
||||
@function padding($type) {
|
||||
@return (
|
||||
var(#{$type}-paddingTop) var(#{$type}-paddingRight)
|
||||
var(#{$type}-paddingBottom) var(#{$type}-paddingLeft)
|
||||
);
|
||||
}
|
||||
|
||||
@function radius($type) {
|
||||
@return (
|
||||
var(#{$type}-top-left-border-radius) var(#{$type}-top-right-border-radius)
|
||||
var(#{$type}-bottom-right-border-radius)
|
||||
var(#{$type}-bottom-left-border-radius)
|
||||
);
|
||||
}
|
||||
|
||||
@function borderColor($type) {
|
||||
@return (
|
||||
var(#{$type}-top-border-color) var(#{$type}-right-border-color)
|
||||
var(#{$type}-bottom-border-color) var(#{$type}-left-border-color)
|
||||
);
|
||||
}
|
||||
|
||||
@function borderWidth($type) {
|
||||
@return (
|
||||
var(#{$type}-top-border-width) var(#{$type}-right-border-width)
|
||||
var(#{$type}-bottom-border-width) var(#{$type}-left-border-width)
|
||||
);
|
||||
}
|
||||
|
||||
@function borderStyle($type) {
|
||||
@return (
|
||||
var(#{$type}-top-border-style) var(#{$type}-right-border-style)
|
||||
var(#{$type}-bottom-border-style) var(#{$type}-left-border-style)
|
||||
);
|
||||
}
|
||||
805
packages/amis-ui/scss/_mixins.scss
Normal file
805
packages/amis-ui/scss/_mixins.scss
Normal file
@@ -0,0 +1,805 @@
|
||||
@use 'sass:color';
|
||||
// 媒体查询最小阈值
|
||||
@mixin media-breakpoint-up($name, $breakpoints: $breakpoints) {
|
||||
$min: breakpoint-min($name, $breakpoints);
|
||||
|
||||
@if $min {
|
||||
@media (min-width: $min) {
|
||||
@content;
|
||||
}
|
||||
} @else {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
//媒体查询最大阈值
|
||||
@mixin media-breakpoint-down($name, $breakpoints: $breakpoints) {
|
||||
$max: breakpoint-max($name, $breakpoints);
|
||||
|
||||
@if $max {
|
||||
@media (max-width: $max) {
|
||||
@content;
|
||||
}
|
||||
} @else {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
//媒体查询中间阈值
|
||||
@mixin media-breakpoint-between($min, $max, $breakpoints: $breakpoints) {
|
||||
$min: breakpoint-min($min, $breakpoints);
|
||||
$max: breakpoint-max($max, $breakpoints);
|
||||
|
||||
@media (min-width: $min) and (max-width: $max) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin media-device($name, $devices: $devices) {
|
||||
$n: map-get($devices, $name);
|
||||
|
||||
@media #{$n} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin clearfix() {
|
||||
&::before,
|
||||
&::after {
|
||||
display: table;
|
||||
content: '';
|
||||
}
|
||||
&::after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin color-schema($bg-color: #555, $percent: 15%, $sat-percent: 100%) {
|
||||
background: color.adjust(
|
||||
color.adjust($bg-color, $lightness: -$percent),
|
||||
$saturation: $sat-percent
|
||||
);
|
||||
}
|
||||
|
||||
@mixin color-schema-lt($bg-color: #555, $percent: 15%, $sat-percent: 100%) {
|
||||
$lightened-color: color.adjust($bg-color, $lightness: $percent);
|
||||
background: color.adjust($lightened-color, $saturation: $sat-percent);
|
||||
}
|
||||
|
||||
// @deprecated 不建议用了
|
||||
@mixin color-variant(
|
||||
$bg-color: #555,
|
||||
$lt-percent: 10%,
|
||||
$lter-percent: 15%,
|
||||
$dk-percent: 10%,
|
||||
$dker-percent: 15%
|
||||
) {
|
||||
background-color: $bg-color;
|
||||
|
||||
&.lt,
|
||||
& .lt {
|
||||
@include color-schema-lt($bg-color, $lt-percent, 2.5%);
|
||||
}
|
||||
|
||||
&.lter,
|
||||
& .lter {
|
||||
@include color-schema-lt($bg-color, $lter-percent, 5%);
|
||||
}
|
||||
|
||||
&.dk,
|
||||
& .dk {
|
||||
@include color-schema($bg-color, $dk-percent, 2.5%);
|
||||
}
|
||||
|
||||
&.dker,
|
||||
& .dker {
|
||||
@include color-schema($bg-color, $dker-percent, 5%);
|
||||
}
|
||||
|
||||
&.bg,
|
||||
& .bg {
|
||||
background-color: $bg-color;
|
||||
}
|
||||
}
|
||||
|
||||
// @deprecated 不建议用了
|
||||
@mixin font-variant($bg-color) {
|
||||
$font-color: color.adjust(
|
||||
color.adjust($bg-color, $lightness: 40%),
|
||||
$saturation: -10%
|
||||
);
|
||||
$link-color: color.adjust(
|
||||
color.adjust($bg-color, $lightness: 50%),
|
||||
$saturation: -10%
|
||||
);
|
||||
$hover-color: #fff;
|
||||
color: $font-color;
|
||||
|
||||
& a,
|
||||
& .#{$ns}Button--link {
|
||||
color: $link-color;
|
||||
|
||||
&:hover {
|
||||
color: $hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
& .open > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
& .text-muted {
|
||||
color: color.adjust($text-color, $lightness: -10%) !important;
|
||||
}
|
||||
|
||||
& .text-lt {
|
||||
color: color.adjust($text-color, $lightness: 25%) !important;
|
||||
}
|
||||
|
||||
// &.auto,
|
||||
// & .auto {
|
||||
// & .list-group-item {
|
||||
// border-color: darken($bg-color, 5%) !important;
|
||||
// background: transparent;
|
||||
|
||||
// &:hover,
|
||||
// &:focus,
|
||||
// &:active,
|
||||
// &.active {
|
||||
// @include color-schema($bg-color, 5%, 2.5% !important);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
// @deprecated 不建议用了
|
||||
@mixin text-wariant($bg-color, $name) {
|
||||
a.bg-#{'' + $name}:hover {
|
||||
background: color.adjust($bg-color, $lightness: -5%);
|
||||
}
|
||||
|
||||
a.text-#{'' + $name}:hover {
|
||||
color: color.adjust($bg-color, $lightness: -5%);
|
||||
}
|
||||
|
||||
.text-#{'' + $name} {
|
||||
color: $bg-color;
|
||||
}
|
||||
|
||||
.text-#{'' + $name}-lt {
|
||||
color: color.adjust($bg-color, $lightness: -5%);
|
||||
}
|
||||
|
||||
.text-#{'' + $name}-lter {
|
||||
color: color.adjust($bg-color, $lightness: -10%);
|
||||
}
|
||||
|
||||
.text-#{'' + $name}-dk {
|
||||
color: color.adjust($bg-color, $lightness: -5%);
|
||||
}
|
||||
|
||||
.text-#{'' + $name}-dker {
|
||||
color: color.adjust($bg-color, $lightness: -10%);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin hover {
|
||||
&:hover {
|
||||
@content;
|
||||
}
|
||||
&.hover {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin focus {
|
||||
&:focus {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin hover-focus {
|
||||
&:hover:focus {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin hover-active {
|
||||
&:hover:active {
|
||||
@content;
|
||||
}
|
||||
&.active,
|
||||
&.is-active {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin button-size(
|
||||
$font-size: var(--button-size-default-fontSize),
|
||||
$font-weight: var(--button-size-default-fontWeight),
|
||||
$line-height: var(--button-size-default-lineHeight),
|
||||
$border-radius-top-right: var(--button-size-default-top-right-border-radius),
|
||||
$border-radius-top-left: var(--button-size-default-top-left-border-radius),
|
||||
$border-radius-bottom-right:
|
||||
var(--button-size-default-bottom-right-border-radius),
|
||||
$border-radius-bottom-left:
|
||||
var(--button-size-default-bottom-left-border-radius),
|
||||
$height: var(--button-size-default-height),
|
||||
$paddingTop: var(--button-size-default-paddingTop),
|
||||
$paddingBottom: var(--button-size-default-paddingBottom),
|
||||
$paddingLeft: var(--button-size-default-paddingLeft),
|
||||
$paddingRight: var(--button-size-default-paddingRight),
|
||||
$marginTop: var(--button-size-default-marginTop),
|
||||
$marginBottom: var(--button-size-default-marginBottom),
|
||||
$marginLeft: var(--button-size-default-marginLeft),
|
||||
$marginRight: var(--button-size-default-marginRight),
|
||||
$minWidth: var(--button-size-default-minWidth),
|
||||
$iconSize: var(--button-size-default-icon-size),
|
||||
$iconMargin: var(--button-size-default-icon-margin)
|
||||
) {
|
||||
font-size: $font-size;
|
||||
font-weight: $font-weight;
|
||||
line-height: $line-height;
|
||||
border-radius: $border-radius-top-left $border-radius-top-right
|
||||
$border-radius-bottom-right $border-radius-bottom-left;
|
||||
height: $height;
|
||||
padding: $paddingTop $paddingRight $paddingBottom $paddingLeft;
|
||||
margin: $marginTop $marginRight $marginBottom $marginLeft;
|
||||
|
||||
.#{$ns}Button-icon:first-child:not(:last-child):not(.pull-right),
|
||||
> svg.icon:not(:last-child):not(.pull-right),
|
||||
> .pull-left {
|
||||
margin-right: $iconMargin;
|
||||
font-size: $iconSize;
|
||||
width: $iconSize;
|
||||
height: $iconSize;
|
||||
line-height: $iconSize;
|
||||
}
|
||||
|
||||
.#{$ns}Button-icon:last-child:not(:first-child):not(.pull-left),
|
||||
> .pull-right {
|
||||
font-size: $iconSize;
|
||||
margin-left: $iconMargin;
|
||||
width: $iconSize;
|
||||
height: $iconSize;
|
||||
line-height: $iconSize;
|
||||
}
|
||||
|
||||
.#{$ns}Button--loading:first-child:not(:last-child):not(.pull-right),
|
||||
> svg.icon:not(:last-child):not(.pull-right),
|
||||
> .pull-left {
|
||||
font-size: $iconSize;
|
||||
margin-right: $iconMargin;
|
||||
width: $iconSize;
|
||||
height: $iconSize;
|
||||
line-height: $iconSize;
|
||||
}
|
||||
|
||||
.#{$ns}Button--loading:last-child:not(:first-child):not(.pull-left),
|
||||
> .pull-right {
|
||||
font-size: $iconSize;
|
||||
margin-left: $iconMargin;
|
||||
width: $iconSize;
|
||||
height: $iconSize;
|
||||
line-height: $iconSize;
|
||||
}
|
||||
|
||||
&.#{$ns}Button--iconOnly {
|
||||
min-width: $height;
|
||||
padding: 0;
|
||||
&:not(.#{$ns}Button--link) {
|
||||
> svg.icon {
|
||||
width: $iconSize;
|
||||
height: $iconSize;
|
||||
}
|
||||
|
||||
> .fa,
|
||||
> .iconfont {
|
||||
font-size: $iconSize;
|
||||
}
|
||||
|
||||
> .iconfont {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// img 需要加一下高度限制
|
||||
img.#{$ns}Button-icon {
|
||||
height: $iconSize;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin button-loading-icon() {
|
||||
transition: --Button-transition;
|
||||
svg {
|
||||
@include animation-svg(var(--Button-animation-spin));
|
||||
}
|
||||
}
|
||||
|
||||
@mixin animation-svg($animation) {
|
||||
animation: $animation;
|
||||
}
|
||||
|
||||
@mixin button-variant(
|
||||
// 常规
|
||||
$bg-color: var(--button-default-default-bg-color),
|
||||
$font-color: var(--button-default-default-font-color),
|
||||
$border-color-top: var(--button-default-default-top-border-color),
|
||||
$border-color-right: var(--button-default-default-right-border-color),
|
||||
$border-color-bottom: var(--button-default-default-bottom-border-color),
|
||||
$border-color-left: var(--button-default-default-left-border-color),
|
||||
$border-width-top: var(--button-default-default-top-border-width),
|
||||
$border-width-right: var(--button-default-default-right-border-width),
|
||||
$border-width-bottom: var(--button-default-default-bottom-border-width),
|
||||
$border-width-left: var(--button-default-default-left-border-width),
|
||||
$border-style-top: var(--button-default-default-top-border-style),
|
||||
$border-style-right: var(--button-default-default-right-border-style),
|
||||
$border-style-bottom: var(--button-default-default-bottom-border-style),
|
||||
$border-style-left: var(--button-default-default-left-border-style),
|
||||
$shadow: var(--button-default-default-shadow),
|
||||
// 悬浮
|
||||
$hover-bg-color: var(--button-default-hover-bg-color),
|
||||
$hover-font-color: var(--button-default-hover-font-color),
|
||||
$hover-border-color-top: var(--button-default-hover-top-border-color),
|
||||
$hover-border-color-right: var(--button-default-hover-right-border-color),
|
||||
$hover-border-color-bottom: var(--button-default-hover-bottom-border-color),
|
||||
$hover-border-color-left: var(--button-default-hover-left-border-color),
|
||||
$hover-border-width-top: var(--button-default-hover-top-border-width),
|
||||
$hover-border-width-right: var(--button-default-hover-right-border-width),
|
||||
$hover-border-width-bottom: var(--button-default-hover-bottom-border-width),
|
||||
$hover-border-width-left: var(--button-default-hover-left-border-width),
|
||||
$hover-border-style-top: var(--button-default-hover-top-border-style),
|
||||
$hover-border-style-right: var(--button-default-hover-right-border-style),
|
||||
$hover-border-style-bottom: var(--button-default-hover-bottom-border-style),
|
||||
$hover-border-style-left: var(--button-default-hover-left-border-style),
|
||||
$hover-shadow: var(--button-default-hover-shadow),
|
||||
// 点击
|
||||
$active-bg-color: var(--button-default-active-bg-color),
|
||||
$active-font-color: var(--button-default-active-font-color),
|
||||
$active-border-color-top: var(--button-default-active-top-border-color),
|
||||
$active-border-color-right: var(--button-default-active-right-border-color),
|
||||
$active-border-color-bottom: var(--button-default-active-bottom-border-color),
|
||||
$active-border-color-left: var(--button-default-active-left-border-color),
|
||||
$active-border-width-top: var(--button-default-active-top-border-width),
|
||||
$active-border-width-right: var(--button-default-active-right-border-width),
|
||||
$active-border-width-bottom: var(--button-default-active-bottom-border-width),
|
||||
$active-border-width-left: var(--button-default-active-left-border-width),
|
||||
$active-border-style-top: var(--button-default-active-top-border-style),
|
||||
$active-border-style-right: var(--button-default-active-right-border-style),
|
||||
$active-border-style-bottom: var(--button-default-active-bottom-border-style),
|
||||
$active-border-style-left: var(--button-default-active-left-border-style),
|
||||
$active-shadow: var(--button-default-active-shadow),
|
||||
// 禁用
|
||||
$disabled-bg-color: var(--button-default-disabled-bg-color),
|
||||
$disabled-font-color: var(--button-default-disabled-font-color),
|
||||
$disabled-border-color-top: var(--button-default-disabled-top-border-color),
|
||||
$disabled-border-color-right:
|
||||
var(--button-default-disabled-right-border-color),
|
||||
$disabled-border-color-bottom:
|
||||
var(--button-default-disabled-bottom-border-color),
|
||||
$disabled-border-color-left: var(--button-default-disabled-left-border-color),
|
||||
$disabled-border-width-top: var(--button-default-disabled-top-border-width),
|
||||
$disabled-border-width-right:
|
||||
var(--button-default-disabled-right-border-width),
|
||||
$disabled-border-width-bottom:
|
||||
var(--button-default-disabled-bottom-border-width),
|
||||
$disabled-border-width-left: var(--button-default-disabled-left-border-width),
|
||||
$disabled-border-style-top: var(--button-default-disabled-top-border-style),
|
||||
$disabled-border-style-right:
|
||||
var(--button-default-disabled-right-border-style),
|
||||
$disabled-border-style-bottom:
|
||||
var(--button-default-disabled-bottom-border-style),
|
||||
$disabled-border-style-left: var(--button-default-disabled-left-border-style),
|
||||
$disabled-shadow: var(--button-default-disabled-shadow)
|
||||
) {
|
||||
color: $font-color;
|
||||
background: $bg-color;
|
||||
border-color: $border-color-top $border-color-right $border-color-bottom
|
||||
$border-color-left;
|
||||
border-width: $border-width-top $border-width-right $border-width-bottom
|
||||
$border-width-left;
|
||||
border-style: $border-style-top $border-style-right $border-style-bottom
|
||||
$border-style-left;
|
||||
box-shadow: $shadow;
|
||||
|
||||
// text-shadow: var(--Button-textShadow);
|
||||
|
||||
&:not(:disabled):not(.is-disabled) {
|
||||
@include hover {
|
||||
color: $hover-font-color;
|
||||
background: $hover-bg-color;
|
||||
border-color: $hover-border-color-top $hover-border-color-right
|
||||
$hover-border-color-bottom $hover-border-color-left;
|
||||
border-width: $hover-border-width-top $hover-border-width-right
|
||||
$hover-border-width-bottom $hover-border-width-left;
|
||||
border-style: $hover-border-style-top $hover-border-style-right
|
||||
$hover-border-style-bottom $hover-border-style-left;
|
||||
box-shadow: $hover-shadow;
|
||||
}
|
||||
@include hover-active {
|
||||
color: $active-font-color;
|
||||
background: $active-bg-color;
|
||||
border-color: $active-border-color-top $active-border-color-right
|
||||
$active-border-color-bottom $active-border-color-left;
|
||||
border-width: $active-border-width-top $active-border-width-right
|
||||
$active-border-width-bottom $active-border-width-left;
|
||||
border-style: $active-border-style-top $active-border-style-right
|
||||
$active-border-style-bottom $active-border-style-left;
|
||||
box-shadow: $active-shadow;
|
||||
}
|
||||
}
|
||||
&:disabled,
|
||||
&.is-disabled {
|
||||
color: $disabled-font-color;
|
||||
background: $disabled-bg-color;
|
||||
border-color: $disabled-border-color-top $disabled-border-color-right
|
||||
$disabled-border-color-bottom $disabled-border-color-left;
|
||||
border-width: $disabled-border-width-top $disabled-border-width-right
|
||||
$disabled-border-width-bottom $disabled-border-width-left;
|
||||
border-style: $disabled-border-style-top $disabled-border-style-right
|
||||
$disabled-border-style-bottom $disabled-border-style-left;
|
||||
box-shadow: $disabled-shadow;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin input-clear {
|
||||
padding: var(--Form-input-clearBtn-padding);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: auto;
|
||||
text-decoration: none;
|
||||
|
||||
svg {
|
||||
fill: var(--Form-input-clearBtn-color);
|
||||
width: var(--Form-input-clearBtn-size);
|
||||
height: var(--Form-input-clearBtn-size);
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&:hover svg {
|
||||
fill: var(--Form-input-clearBtn-color-onHover);
|
||||
}
|
||||
|
||||
&:active svg {
|
||||
fill: var(--Form-input-clearBtn-color-onActive);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin input-input {
|
||||
display: flex;
|
||||
background: var(--Form-input-bg);
|
||||
border: var(--Form-input-borderWidth) solid var(--Form-input-borderColor);
|
||||
border-radius: var(--Form-input-borderRadius);
|
||||
// height: var(--Form-input-height);
|
||||
line-height: var(--Form-input-lineHeight);
|
||||
padding: var(--Form-input-paddingY) var(--Form-input-paddingX);
|
||||
font-size: var(--Form-input-fontSize);
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
input {
|
||||
flex-basis: px2rem(30px);
|
||||
flex-grow: 1;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--Form-input-color);
|
||||
width: 100%;
|
||||
|
||||
&::placeholder {
|
||||
color: var(--Form-input-placeholderColor);
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-color: var(--Form-input-onFocused-borderColor);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin input-border {
|
||||
&--borderHalf {
|
||||
border-left-color: transparent !important;
|
||||
border-right-color: transparent !important;
|
||||
border-top-color: transparent !important;
|
||||
}
|
||||
|
||||
&--borderNone {
|
||||
border-color: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin input-text {
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
|
||||
&.is-inline {
|
||||
display: inline-block;
|
||||
width: var(--Form-control-widthBase);
|
||||
}
|
||||
|
||||
&-input {
|
||||
@include input-input();
|
||||
@include input-border();
|
||||
}
|
||||
|
||||
&.is-error > &-input {
|
||||
border-color: var(--Form-item-onError-borderColor);
|
||||
background: var(--Form-item-onError-bg);
|
||||
transition: all var(--animation-duration);
|
||||
}
|
||||
|
||||
&.is-focused > &-input {
|
||||
border-color: var(--Form-input-onFocused-borderColor);
|
||||
box-shadow: var(--Form-input-boxShadow);
|
||||
background: var(--Form-input-onFocused-bg);
|
||||
transition: all var(--animation-duration);
|
||||
}
|
||||
|
||||
&.is-error.is-focused > &-input {
|
||||
border-color: var(--Form-item-onError-borderColor);
|
||||
background: var(--Form-item-onError-bg);
|
||||
}
|
||||
|
||||
&.is-disabled > &-input {
|
||||
color: var(--text--muted-color);
|
||||
background: var(--Form-input-onDisabled-bg);
|
||||
border-color: var(--Form-input-onDisabled-borderColor);
|
||||
transition: all var(--animation-duration);
|
||||
|
||||
& > input {
|
||||
color: var(--text--muted-color);
|
||||
}
|
||||
}
|
||||
|
||||
&-spinner {
|
||||
line-height: calc(
|
||||
var(--Form-input-lineHeight) * var(--Form-input-fontSize)
|
||||
);
|
||||
}
|
||||
|
||||
&-clear {
|
||||
@include input-clear();
|
||||
}
|
||||
|
||||
&-revealPassword {
|
||||
cursor: pointer;
|
||||
color: var(--text--muted-color);
|
||||
}
|
||||
|
||||
// 需要能撑开
|
||||
@include media-breakpoint-up(sm) {
|
||||
&.#{$ns}Form-control--sizeXs > &-input,
|
||||
&.#{$ns}Form-control--sizeSm > &-input,
|
||||
&.#{$ns}Form-control--sizeMd > &-input,
|
||||
&.#{$ns}Form-control--sizeLg > &-input {
|
||||
min-width: 100%;
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin checkboxes-placeholder {
|
||||
height: var(--Form-input-height);
|
||||
line-height: var(--Form-input-lineHeight);
|
||||
font-size: var(--Form-input-fontSize);
|
||||
padding: calc(
|
||||
(
|
||||
var(--Form-input-height) - var(--Form-input-lineHeight) *
|
||||
var(--Form-input-fontSize)
|
||||
) / 2
|
||||
)
|
||||
var(--gap-sm);
|
||||
color: var(--text--muted-color);
|
||||
}
|
||||
|
||||
@mixin label-variant($color) {
|
||||
background: $color;
|
||||
|
||||
// todo:不支持了
|
||||
// &[href] {
|
||||
// &:hover,
|
||||
// &:focus {
|
||||
// background: darken($color, 10%);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@mixin icon-color {
|
||||
color: var(--icon-color);
|
||||
|
||||
&:hover {
|
||||
color: var(--icon-onHover-color);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin truncate {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@mixin hairline-common() {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@mixin hairline-top($color: var(--van-border-color), $left: 0, $right: 0) {
|
||||
@include hairline-common();
|
||||
top: 0;
|
||||
right: $right;
|
||||
left: $left;
|
||||
border-top: 1px solid $color;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
@mixin hairline-bottom($color: var(--van-border-color), $left: 0, $right: 0) {
|
||||
@include hairline-common();
|
||||
right: $right;
|
||||
bottom: 0;
|
||||
left: $left;
|
||||
border-bottom: 1px solid $color;
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
@mixin tag-item($component-prefix) {
|
||||
.#{$ns}#{$component-prefix}-value {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
line-height: calc(
|
||||
var(--Form-input-lineHeight) * var(--Form-input-fontSize) - #{px2rem(2px)}
|
||||
);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
font-size: var(--Pick-base-value-fontSize);
|
||||
color: var(--Pick-base-value-color);
|
||||
font-weight: var(--Pick-base-value-fontWeight);
|
||||
background: var(--Pick-base-value-bgColor);
|
||||
border-width: var(--Pick-base-value-top-border-width)
|
||||
var(--Pick-base-value-right-border-width)
|
||||
var(--Pick-base-value-bottom-border-width)
|
||||
var(--Pick-base-value-left-border-width);
|
||||
border-style: var(--Pick-base-value-top-border-style)
|
||||
var(--Pick-base-value-right-border-style)
|
||||
var(--Pick-base-value-bottom-border-style)
|
||||
var(--Pick-base-value-left-border-style);
|
||||
border-color: var(--Pick-base-value-top-border-color)
|
||||
var(--Pick-base-value-right-border-color)
|
||||
var(--Pick-base-value-bottom-border-color)
|
||||
var(--Pick-base-value-left-border-color);
|
||||
border-radius: var(--Pick-base-top-left-border-radius)
|
||||
var(--Pick-base-top-right-border-radius)
|
||||
var(--Pick-base-bottom-right-border-radius)
|
||||
var(--Pick-base-bottom-left-border-radius);
|
||||
max-width: px2rem(150px);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
|
||||
&:hover {
|
||||
background: var(--Form-selectValue-onHover-bg);
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
pointer-events: none;
|
||||
|
||||
.#{$ns}#{$component-prefix}-valueIcon {
|
||||
opacity: var(--Button-onDisabled-opacity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}#{$component-prefix}-valueIcon {
|
||||
color: var(--Pick-base-value-icon-color);
|
||||
cursor: pointer;
|
||||
border-right: px2rem(1px) solid var(--Form-selectValue-borderColor);
|
||||
padding: 0 5px;
|
||||
|
||||
&:hover {
|
||||
background: var(--Pick-base-value-hover-icon-color);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}#{$component-prefix}-valueLabel {
|
||||
padding: 0 var(--gap-xs);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
@function resolve-params($params...) {
|
||||
@if length($params) == 1 {
|
||||
@return (
|
||||
nth($params, 1),
|
||||
nth($params, 1),
|
||||
nth($params, 1),
|
||||
nth($params, 1)
|
||||
);
|
||||
} @else if length($params) == 2 {
|
||||
@return (
|
||||
nth($params, 1),
|
||||
nth($params, 2),
|
||||
nth($params, 1),
|
||||
nth($params, 2)
|
||||
);
|
||||
} @else if length($params) == 3 {
|
||||
@return (
|
||||
nth($params, 1),
|
||||
nth($params, 2),
|
||||
nth($params, 3),
|
||||
nth($params, 2)
|
||||
);
|
||||
} @else if length($params) == 4 {
|
||||
@return (
|
||||
nth($params, 1),
|
||||
nth($params, 2),
|
||||
nth($params, 3),
|
||||
nth($params, 4)
|
||||
);
|
||||
} @else {
|
||||
@warn "Please provide 1 to 4 params values.";
|
||||
@return null;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin borderRadius($token, $radius...) {
|
||||
$resolved: resolve-params($radius...);
|
||||
#{$token}-top-left-border-radius: nth($resolved, 1);
|
||||
#{$token}-top-right-border-radius: nth($resolved, 2);
|
||||
#{$token}-bottom-right-border-radius: nth($resolved, 3);
|
||||
#{$token}-bottom-left-border-radius: nth($resolved, 4);
|
||||
}
|
||||
|
||||
@mixin borderColor($token, $color...) {
|
||||
$resolved: resolve-params($color...);
|
||||
#{$token}-top-border-color: nth($resolved, 1);
|
||||
#{$token}-right-border-color: nth($resolved, 2);
|
||||
#{$token}-bottom-border-color: nth($resolved, 3);
|
||||
#{$token}-left-border-color: nth($resolved, 4);
|
||||
}
|
||||
|
||||
@mixin borderWidth($token, $width...) {
|
||||
$resolved: resolve-params($width...);
|
||||
#{$token}-top-border-width: nth($resolved, 1);
|
||||
#{$token}-right-border-width: nth($resolved, 2);
|
||||
#{$token}-bottom-border-width: nth($resolved, 3);
|
||||
#{$token}-left-border-width: nth($resolved, 4);
|
||||
}
|
||||
|
||||
@mixin borderStyle($token, $style...) {
|
||||
$resolved: resolve-params($style...);
|
||||
#{$token}-top-border-style: nth($resolved, 1);
|
||||
#{$token}-right-border-style: nth($resolved, 2);
|
||||
#{$token}-bottom-border-style: nth($resolved, 3);
|
||||
#{$token}-left-border-style: nth($resolved, 4);
|
||||
}
|
||||
|
||||
@mixin padding($token, $padding...) {
|
||||
$resolved: resolve-params($padding...);
|
||||
#{$token}-paddingTop: nth($resolved, 1);
|
||||
#{$token}-paddingRight: nth($resolved, 2);
|
||||
#{$token}-paddingBottom: nth($resolved, 3);
|
||||
#{$token}-paddingLeft: nth($resolved, 4);
|
||||
}
|
||||
|
||||
@mixin margin($token, $margin...) {
|
||||
$resolved: resolve-params($margin...);
|
||||
#{$token}-marginTop: nth($resolved, 1);
|
||||
#{$token}-marginRight: nth($resolved, 2);
|
||||
#{$token}-marginBottom: nth($resolved, 3);
|
||||
#{$token}-marginLeft: nth($resolved, 4);
|
||||
}
|
||||
898
packages/amis-ui/scss/_properties.scss
Normal file
898
packages/amis-ui/scss/_properties.scss
Normal file
@@ -0,0 +1,898 @@
|
||||
@use 'sass:color';
|
||||
@import './functions';
|
||||
@import './variables';
|
||||
$remFactor: 16px;
|
||||
|
||||
/* 此处放置需要override的变量,因为部分变量已经在variables.scss中定义 */
|
||||
$Table-strip-bg: transparent;
|
||||
|
||||
:root {
|
||||
--affix-offset-top: 0px;
|
||||
--affix-offset-bottom: 0px;
|
||||
}
|
||||
|
||||
:root,
|
||||
.AMISCSSWrapper {
|
||||
--white: var(--colors-neutral-text-11);
|
||||
--primary: var(--colors-brand-5);
|
||||
--primary-onHover: var(--colors-brand-6);
|
||||
--primary-onActive: var(--colors-brand-4);
|
||||
|
||||
--secondary: var(--colors-neutral-text-4); /* secondary 颜色需进一步确认 */
|
||||
--secondary-onHover: var(--colors-neutral-text-6);
|
||||
--secondary-onActive: var(--colors-neutral-text-4);
|
||||
|
||||
--success: var(--colors-success-5);
|
||||
--success-onHover: var(--colors-success-6);
|
||||
--success-onActive: var(--colors-success-4);
|
||||
|
||||
--info: var(--colors-info-5);
|
||||
--info-onHover: var(--colors-info-6);
|
||||
--info-onActive: var(--colors-info-4);
|
||||
|
||||
--warning: var(--colors-warning-5);
|
||||
--warning-onHover: var(--colors-warning-6);
|
||||
--warning-onActive: var(--colors-warning-4);
|
||||
|
||||
--danger: var(--colors-error-5);
|
||||
--danger-onHover: var(--colors-error-6);
|
||||
--danger-onActive: var(--colors-error-4);
|
||||
|
||||
--light: var(--colors-neutral-fill-11);
|
||||
--dark: var(--colors-neutral-fill-3);
|
||||
|
||||
--fontFamilyMonospace: SFMono-Regular, Menlo, Monaco, Consolas,
|
||||
'Liberation Mono', 'Courier New', monospace;
|
||||
--fontFamilyBase: var(--fonts-base-family);
|
||||
|
||||
--fontSizeBase: var(--fonts-size-7);
|
||||
--fontSizeMd: var(--fonts-size-7);
|
||||
--fontSizeLg: var(--fonts-size-6);
|
||||
--fontSizeXl: var(--fonts-size-5);
|
||||
--fontSizeSm: var(--fonts-size-8);
|
||||
--fontSizeXs: var(--fonts-size-8);
|
||||
|
||||
--text-color: var(--colors-neutral-text-2);
|
||||
--button-color: var(--colors-neutral-text-11);
|
||||
|
||||
--animation-duration: 0.2s;
|
||||
|
||||
--text--muted-color: var(--colors-neutral-text-6);
|
||||
--text--loud-color: var(--colors-neutral-text-2);
|
||||
|
||||
--pre-color: var(--text-color);
|
||||
|
||||
--borderColor: var(--colors-neutral-line-8);
|
||||
--borderColorLight: var(--colors-neutral-line-10);
|
||||
--borderColorDarken: var(--colors-neutral-line-8);
|
||||
--borderRadius: var(--borders-radius-3);
|
||||
--borderRadiusMd: var(--borders-radius-4);
|
||||
--borderRadiusLg: var(--borders-radius-5);
|
||||
|
||||
--boxShadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
|
||||
--boxShadowSm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
||||
--boxTooltipShadow: 0 4px 6px 1px rgb(8 14 26 / 6%),
|
||||
0 1px 10px 0 rgb(8 14 26 / 5%), 0 2px 4px -1px rgb(8 14 26 / 4%);
|
||||
|
||||
--lineHeightBase: var(--fonts-lineHeight-2);
|
||||
|
||||
--body-lineHeight: var(--lineHeightBase);
|
||||
|
||||
--borderWidth: #{px2rem(1px)};
|
||||
|
||||
--fontWeightNormal: 400;
|
||||
--fontWeightBase: var(--fontWeightNormal);
|
||||
--fontWeightMd: 500;
|
||||
--fontWeightBold: 700;
|
||||
|
||||
--background: var(--colors-neutral-fill-11);
|
||||
|
||||
--code-color: var(--danger);
|
||||
--code-background: var(--background);
|
||||
--pre-background: var(--background);
|
||||
|
||||
--body-bg: var(--light);
|
||||
--body-size: var(--fontSizeBase);
|
||||
--body-color: var(--text-color);
|
||||
--body-weight: var(--fontWeightBase);
|
||||
|
||||
--gap-xs: var(--sizes-size-3);
|
||||
--gap-sm: var(--sizes-size-5);
|
||||
--gap-base: var(--sizes-size-7);
|
||||
--gap-md: var(--sizes-size-9);
|
||||
--gap-lg: var(--sizes-base-10);
|
||||
--gap-xl: var(--sizes-base-12);
|
||||
|
||||
--icon-color: var(--colors-neutral-text-5);
|
||||
--icon-onHover-color: var(--colors-brand-5);
|
||||
--icon-onDisabled-color: var(--colors-neutral-text-10);
|
||||
|
||||
--label--default-bg: var(--colors-neutral-fill-3);
|
||||
--label--primary-bg: var(--colors-brand-5);
|
||||
--label--success-bg: var(--success);
|
||||
--label--info-bg: var(--info);
|
||||
--label--warning-bg: var(--warning);
|
||||
--label--danger-bg: var(--danger);
|
||||
|
||||
--label-color: #fff;
|
||||
--label-link--hover-color: #fff;
|
||||
|
||||
--scrollbar-width: #{px2rem(17px)};
|
||||
|
||||
--Audio-border: #{px2rem(1px)} solid #dee2e6;
|
||||
--Audio-height: #{px2rem(50px)};
|
||||
--Audio-input-width: #{px2rem(80px)};
|
||||
--Audio-item-margin: #{px2rem(10px)};
|
||||
--Audio-lineHeight: #{px2rem(50px)};
|
||||
--Audio-play-top: var(--gap-xs);
|
||||
--Audio-play-width: var(--gap-md);
|
||||
--Audio-process-minWidth: #{px2rem(80px)};
|
||||
--Audio-rate-bg: #dee2e6;
|
||||
--Audio-rate-height: #{px2rem(50px)};
|
||||
--Audio-rate-lineHeight: #{px2rem(50px)};
|
||||
--Audio-rate-width: #{px2rem(40px)};
|
||||
--Audio-rateControlItem-bg: #dee2e6;
|
||||
--Audio-rateControlItem-borderRight: #{px2rem(1px)} solid #d3dae0;
|
||||
--Audio-svg-height: var(--gap-md);
|
||||
--Audio-svg-top: #{px2rem(6px)};
|
||||
--Audio-svg-width: var(--gap-md);
|
||||
--Audio-thumb-bg: #606670;
|
||||
--Audio-thumb-height: #{px2rem(14px)};
|
||||
--Audio-thumb-marginTop: #{px2rem(-5px)};
|
||||
--Audio-thumb-width: #{px2rem(14px)};
|
||||
--Audio-times-margin: 0 var(--gap-xs);
|
||||
--Audio-times-width: #{px2rem(75px)};
|
||||
--Audio-track-bg: #d7dbdd;
|
||||
--Audio-track-border: #{px2rem(1px)} solid transparent;
|
||||
--Audio-track-borderRadius: #{px2rem(3px)};
|
||||
--Audio-track-height: #{px2rem(6px)};
|
||||
--Audio-volume-height: #{px2rem(50px)};
|
||||
--Audio-volume-lineHeight: #{px2rem(50px)};
|
||||
--Audio-volume-width: var(--gap-md);
|
||||
--Audio-volumeControl-width: #{px2rem(110px)};
|
||||
--Avatar-bg: #d1d5db;
|
||||
--Avatar-width: #{px2rem(40px)};
|
||||
--Avatar-size-large: #{px2rem(48px)};
|
||||
// 兼容旧的size大小写法
|
||||
--Avatar-size-default: var(--Avatar-width);
|
||||
--Avatar-size-small: #{px2rem(32px)};
|
||||
--Avatar-icon-size-large: #{px2rem(20px)};
|
||||
// 兼容旧的icon大小写法
|
||||
--Avatar-icon-size-default: var(--fontSizeLg);
|
||||
--Avatar-icon-size-small: #{px2rem(12px)};
|
||||
|
||||
--Badge-size: var(--gap-md);
|
||||
--Badge-color: #fff;
|
||||
--Badge--success-bg: var(--success);
|
||||
--Badge--info-bg: var(--info);
|
||||
--Badge--warning-bg: var(--warning);
|
||||
--Badge--danger-bg: var(--danger);
|
||||
|
||||
--Button--sm-fontSize: var(--fontSizeSm);
|
||||
--Button-transition: color var(--animation-duration) ease-in-out,
|
||||
background-color var(--animation-duration) ease-in-out,
|
||||
border-color var(--animation-duration) ease-in-out,
|
||||
box-shadow var(--animation-duration) ease-in-out;
|
||||
|
||||
--ButtonGroup--primary-isActive-color: var(--colors-neutral-fill-11);
|
||||
--ButtonGroup--primary-isActive-bg: var(--colors-brand-5);
|
||||
--ButtonGroup-divider-width: #{px2rem(1px)};
|
||||
--ButtonGroup-divider-color: #fff;
|
||||
--ButtonGroup-borderWidth: var(--borders-width-2);
|
||||
--Button-onDisabled-opacity: 0.3;
|
||||
|
||||
--Breadcrumb-item-fontSize: var(--fontSizeMd);
|
||||
--Breadcrumb-item-default-color: var(--colors-neutral-text-5);
|
||||
--Breadcrumb-item-hover-color: var(--colors-brand-5);
|
||||
--Breadcrumb-item-active-color: var(--colors-brand-4);
|
||||
--Breadcrumb-item-last-color: var(--colors-neutral-text-2);
|
||||
--BreadcrumbDropdown-item-default-color: var(--colors-neutral-text-2);
|
||||
--BreadcrumbDropdown-item-default-bg: var(--colors-neutral-text-11);
|
||||
--BreadcrumbDropdown-item-hover-bg: var(--colors-brand-10);
|
||||
--BreadcrumbDropdown-item-fontSize: var(--fontSizeSm);
|
||||
--BreadcrumbDropdown-item-height: #{px2rem(32px)};
|
||||
--BreadcrumbDropdown-item-paddingX: var(--gap-sm);
|
||||
--BreadcrumbDropdown-item-paddingY: calc(
|
||||
(var(--BreadcrumbDropdown-item-height) - var(--fontSizeSm)) / 2
|
||||
);
|
||||
--Breadcrumb-item-disabled-color: var(--colors-neutral-text-6);
|
||||
|
||||
--Card-actions-borderColor: var(--colors-neutral-line-10);
|
||||
--Card-actions-fontSize: var(--fonts-size-8);
|
||||
--Card-actions-onChecked-onHover-bg: var(--colors-neutral-fill-11);
|
||||
--Card-actions-onChecked-onHover-color: var(--colors-neutral-fill-11);
|
||||
--Card-actions-onHover-bg: var(--colors-neutral-fill-11);
|
||||
--Card-actions-onHover-color: var(--colors-brand-5);
|
||||
--Card-bg: var(--colors-neutral-fill-11);
|
||||
--Card-borderColor: var(--borderColor);
|
||||
--Card-borderRadius: var(--borderRadius);
|
||||
--Card-borderWidth: var(--borderWidth);
|
||||
--Card-secondary-color: var(--colors-neutral-fill-5);
|
||||
--Card-onChecked-bg: var(--colors-neutral-fill-11);
|
||||
--Card-onChecked-borderColor: var(--colors-brand-5);
|
||||
--Card-onChecked-color: var(--colors-brand-5);
|
||||
--Card-onChecked-fieldLabel-color: #{color.adjust(
|
||||
color.adjust(#d9f3fb, $lightness: -40%),
|
||||
$lightness: 20%
|
||||
)};
|
||||
--Card-onDragging-opacity: 0.1;
|
||||
--Card-onModified-bg: var(--colors-neutral-fill-8);
|
||||
--Card-onModified-borderColor: var(--colors-brand-5);
|
||||
--Card-onModified-color: var(--colors-brand-6);
|
||||
--Card-onModified-fieldLabel-color: var(--colors-brand-8);
|
||||
--Card-onModified-onHover-bg: #{color.adjust(#e8f0fe, $lightness: -5%)};
|
||||
--Card-onModified-onHover-color: #{color.adjust(#4285f4, $lightness: -10%)};
|
||||
--Cards--unsaved-heading-bg: #e8f0fe;
|
||||
--Cards--unsaved-heading-color: #4285f4;
|
||||
--Cards-fixedTop-boxShadow: var(--shadows-shadow-normal);
|
||||
--Cards-placeholder-height: #{px2rem(100px)};
|
||||
--Cards-toolbar-marginX: 0;
|
||||
--Cards-toolbar-marginY: var(--gap-base);
|
||||
|
||||
--Carousel--dark-control: black;
|
||||
--Carousel--light-control: white;
|
||||
--Carousel-arrowControl-height: var(--gap-lg);
|
||||
--Carousel-arrowControl-width: var(--gap-lg);
|
||||
--Carousel-bg: var(--colors-neutral-fill-10);
|
||||
--Carousel-dot-borderRadius: #{px2rem(4px)};
|
||||
--Carousel-dot-height: #{px2rem(8px)};
|
||||
--Carousel-dot-margin: #{px2rem(7px)} var(--gap-xs);
|
||||
--Carousel-dot-width: #{px2rem(8px)};
|
||||
--Carousel-height: #{px2rem(200px)};
|
||||
--Carousel-imageDescription-bottom: #{px2rem(25px)};
|
||||
--Carousel-imageTitle-bottom: #{px2rem(45px)};
|
||||
--Carousel-minWidth: #{px2rem(100px)};
|
||||
--Carousel-svg-height: var(--gap-lg);
|
||||
--Carousel-svg-width: var(--gap-lg);
|
||||
--Carousel-transitionDuration: var(--animation-duration);
|
||||
|
||||
--ColorPicker-bg: var(--colors-neutral-fill-11);
|
||||
--ColorPicker-borderColor: var(--Form-input-borderColor);
|
||||
--ColorPicker-borderRadius: var(--borders-radius-3);
|
||||
--ColorPicker-borderWidth: var(--borders-width-2);
|
||||
--ColorPicker-color: var(--colors-neutral-text-2);
|
||||
--ColorPicker-fontSize: var(--Form-input-fontSize);
|
||||
--ColorPicker-height: var(--Form-input-height);
|
||||
--ColorPicker-lineHeight: var(--Form-input-lineHeight);
|
||||
--ColorPicker-height: var(--sizes-base-16);
|
||||
--ColorPicker-onDisabled-bg: var(--colors-neutral-fill-8);
|
||||
--ColorPicker-onDisabled-color: var(--text--muted-color);
|
||||
--ColorPicker-onFocused-borderColor: var(--Form-input-onFocused-borderColor);
|
||||
--ColorPicker-onHover-bg: var(--colors-neutral-fill-11);
|
||||
--ColorPicker-onHover-borderColor: var(--colors-brand-5);
|
||||
--ColorPicker-paddingX: var(--sizes-size-6);
|
||||
--ColorPicker-paddingY: var(--sizes-size-3);
|
||||
--ColorPicker-placeholderColor: var(--colors-neutral-text-6);
|
||||
--ColorPicker-boxShadow: var(--shadows-shadow-normal);
|
||||
|
||||
--Copyable-iconColor: var(--icon-color);
|
||||
--Copyable-onHover-iconColor: var(--icon-onHover-color);
|
||||
|
||||
--Crud-toolbar-gap: var(--sizes-size-6);
|
||||
--Crud-toolbar-height: #{px2rem(30px)};
|
||||
--Crud-toolbar-lineHeight: var(--lineHeightBase);
|
||||
|
||||
--LocationPicker-borderRadius: var(--borders-radius-3);
|
||||
|
||||
--DropDown-caret-marginLeft: var(--gap-sm);
|
||||
--DropDown-menu-bg: var(--colors-neutral-fill-11);
|
||||
--DropDown-menu-borderColor: var(--borderColor);
|
||||
--DropDown-menu-borderRadius: var(--borderRadius);
|
||||
--DropDown-menu-borderWidth: var(--borderWidth);
|
||||
--DropDown-menu-boxShadow: var(--Form-select-outer-boxShadow);
|
||||
--DropDown-menu-height: #{px2rem(32px)};
|
||||
--DropDown-menu-minWidth: #{px2rem(160px)};
|
||||
--DropDown-menu-paddingX: 0;
|
||||
--DropDown-menu-paddingY: var(--gap-xs);
|
||||
--DropDown-menuItem-onHover-bg: var(--Form-select-menu-onHover-bg);
|
||||
--DropDown-group-color: #848b99;
|
||||
--DropDown-menuItem-color: var(--colors-neutral-text-2);
|
||||
--DropDown-menuItem-onHover-color: var(--Form-select-menu-onHover-color);
|
||||
--DropDown-menuItem-onActive-color: var(--colors-brand-5);
|
||||
--DropDown-menuItem-onDisabled-color: #b4b6ba;
|
||||
--DropDown-menuItem-paddingX: var(--select-base-default-option-paddingRight);
|
||||
|
||||
--Fieldset-legend-bgColor: var(--colors-neutral-fill-11);
|
||||
|
||||
--Form--horizontal-gutterWidth: var(--gap-md);
|
||||
--Form--horizontal-label-align: right;
|
||||
--Form--horizontal-label-whiteSpace: normal;
|
||||
|
||||
--Form--horizontal-justify-label-align: left;
|
||||
--Form--horizontal-justify-value-align: right;
|
||||
|
||||
--Form-control-widthBase: #{px2rem(200px)};
|
||||
--Form-control-widthLg: #{px2rem(320px)};
|
||||
--Form-control-widthMd: #{px2rem(240px)};
|
||||
--Form-control-widthSm: #{px2rem(160px)};
|
||||
--Form-control-widthXs: #{px2rem(80px)};
|
||||
|
||||
--Form-fontSize: var(--fontSizeBase);
|
||||
|
||||
--Form-group--lg-gutterWidth: #{px2rem(40px)};
|
||||
--Form-group--md-gutterWidth: #{px2rem(30px)};
|
||||
--Form-group--sm-gutterWidth: var(--gap-md);
|
||||
--Form-group--xs-gutterWidth: #{px2rem(10px)};
|
||||
--Form-group-gutterWidth: var(--Form--horizontal-gutterWidth);
|
||||
|
||||
--Form-input-addOnBg: var(--colors-neutral-fill-11);
|
||||
--Form-input-addOnColor: var(--text-color);
|
||||
--Form-input-addOnDividerBorderWidth: var(--borders-width-2);
|
||||
--Form-input-bg: var(--colors-neutral-fill-11);
|
||||
--Form-input-borderColor: var(--borderColor);
|
||||
--Form-input-borderRadius: var(--borders-radius-3);
|
||||
--Form-input-borderWidth: #{px2rem(1px)};
|
||||
--Form-input-boxShadow: none;
|
||||
--Form-input-color: var(--colors-neutral-text-2);
|
||||
--Form-input-fontSize: var(--Form-fontSize);
|
||||
--Form-input-height: var(--sizes-base-16);
|
||||
--Form-input-iconColor: var(--colors-neutral-text-5);
|
||||
--Form-input-lineHeight: var(--fonts-lineHeight-2);
|
||||
--Form-input-marginBottom: var(--sizes-size-3);
|
||||
--Form-input-onActive-color: var(--info);
|
||||
--Form-input-onDisabled-bg: var(--colors-neutral-fill-10);
|
||||
--Form-input-onDisabled-borderColor: var(--colors-neutral-line-8);
|
||||
--Form-input-onError-bg: var(--colors-neutral-fill-11);
|
||||
--Form-input-onError-borderColor: var(--colors-error-5);
|
||||
--Form-input-onFocus-addOnColor: var(--colors-brand-5);
|
||||
$Form-input-onFocused-bg: $white !default;
|
||||
--Form-input-onFocused-bg: var(--colors-neutral-fill-11);
|
||||
--Form-input-onFocused-borderColor: var(--colors-brand-4);
|
||||
--Form-input-onHover-iconColor: var(--colors-neutral-text-4);
|
||||
--Form-input-onHover-bg: #{rgba($white, 0.6)};
|
||||
--Form-input-onHover-borderColor: var(--colors-brand-5);
|
||||
--Form-input-paddingX: var(--sizes-size-6);
|
||||
|
||||
--Form-input-password-icon-size: var(--sizes-size-9);
|
||||
--Form-input-password-icon-color: var(--colors-neutral-text-5);
|
||||
|
||||
--Form-input-paddingY: var(--sizes-size-3);
|
||||
--Form-input-placeholderColor: var(--text--muted-color);
|
||||
--Form-input-onDisabled-color: var(--colors-neutral-text-5);
|
||||
|
||||
--Form-input-clearBtn-size: var(--fontSizeMd);
|
||||
--Form-input-clearBtn-padding: #{px2rem(3px)};
|
||||
--Form-input-clearBtn-color: var(--colors-neutral-text-7);
|
||||
--Form-input-clearBtn-color-onHover: var(--colors-neutral-text-4);
|
||||
--Form-input-clearBtn-color-onActive: var(--colors-neutral-text-3);
|
||||
|
||||
--Form-label-paddingTop: calc(
|
||||
(
|
||||
var(--Form-input-height) - var(--Form-input-lineHeight) *
|
||||
var(--Form-input-fontSize)
|
||||
) / 2
|
||||
);
|
||||
--Form-row-gutterWidth: #{px2rem(10px)};
|
||||
|
||||
--IconPicker-content-maxHeight: #{px2rem(350px)};
|
||||
--IconPicker-padding: var(--gap-xs);
|
||||
--IconPicker-selectedIcon-marginRight: var(--gap-xs);
|
||||
--IconPicker-sugItem-height: #{px2rem(28px)};
|
||||
--IconPicker-sugItem-lineHeight: #{px2rem(28px)};
|
||||
--IconPicker-sugItem-width: #{px2rem(28px)};
|
||||
--IconPicker-tab-height: #{px2rem(30px)};
|
||||
--IconPicker-tab-lineHeight: #{px2rem(30px)};
|
||||
--IconPicker-tab-onActive-bg: var(--colors-neutral-fill-11);
|
||||
--IconPicker-tab-padding: 0 #{px2rem(10px)};
|
||||
--IconPicker-tabs-bg: #f0f3f4;
|
||||
|
||||
--InputGroup-addOn-bg: var(--Form-input-addOnBg);
|
||||
--InputGroup-addOn-borderColor: var(--Form-input-borderColor);
|
||||
--InputGroup-addOn-borderRadius: var(--Form-input-borderRadius);
|
||||
--InputGroup-addOn-borderWidth: var(--Form-input-borderWidth);
|
||||
--InputGroup-addOn-onFocused-borderColor: var(
|
||||
--Form-input-onFocused-borderColor
|
||||
);
|
||||
--InputGroup-button-borderColor: var(--Form-input-borderColor);
|
||||
--InputGroup-button-borderRadius: var(--borders-radius-3);
|
||||
--InputGroup-button-borderWidth: var(--borders-width-2);
|
||||
--InputGroup-height: var(--Form-input-height);
|
||||
--InputGroup-paddingX: #{px2rem(10px)};
|
||||
--InputGroup-paddingY: calc(
|
||||
(
|
||||
var(--InputGroup-height) - var(--Form-input-lineHeight) *
|
||||
var(--Form-input-fontSize) - #{px2rem(2px)}
|
||||
) / 2
|
||||
);
|
||||
--InputGroup-select-arrowColor: var(--colors-neutral-text-5);
|
||||
--InputGroup-select-bg: var(--colors-neutral-fill-10);
|
||||
--InputGroup-select-borderColor: var(--borderColor);
|
||||
--InputGroup-select-borderRadius: var(--borders-radius-3);
|
||||
--InputGroup-select-borderWidth: var(--borders-width-2);
|
||||
--InputGroup-select-color: var(--colors-neutral-text-2);
|
||||
--InputGroup-select-onFocused-arrowColor: var(--colors-brand-5);
|
||||
--InputGroup-select-onFocused-bg: var(--colors-brand-10);
|
||||
--InputGroup-select-onFocused-color: var(--colors-brand-5);
|
||||
|
||||
--Layout--offscreen-width: 75%;
|
||||
--Layout-aside--folded-width: var(--sizes-base-30);
|
||||
--Layout-aside--lg-width: #{px2rem(300px)};
|
||||
--Layout-aside--md-width: #{px2rem(250px)};
|
||||
--Layout-aside--sm-width: #{px2rem(150px)};
|
||||
--Layout-aside-bg: var(--colors-neutral-fill-2);
|
||||
--Layout-aside-color: #{color.adjust(
|
||||
color.adjust($dark, $lightness: 40%),
|
||||
$saturation: -10%
|
||||
)};
|
||||
--Layout-aside-onAcitve-bg: #{color.adjust(
|
||||
color.adjust($dark, $lightness: -5%),
|
||||
$saturation: 2.5%
|
||||
)};
|
||||
--Layout-aside-onHover-bg: #{color.adjust(
|
||||
color.adjust($dark, $lightness: -3%),
|
||||
$saturation: 2.5%
|
||||
)};
|
||||
--Layout-aside-subList-bg: var(--colors-neutral-fill-2);
|
||||
--Layout-aside-onAcitve-onHover-bg: var(--Layout-aside-onAcitve-bg);
|
||||
--Layout-aside-width: #{px2rem(180px)};
|
||||
--Layout-aside-width-collapsed: #{px2rem(60px)};
|
||||
--Layout-asideDivider-bg: var(--colors-neutral-line-3);
|
||||
--Layout-asideDivider-margin: 0 var(--sizes-size-6);
|
||||
--Layout-asideLabel-color: #{color.adjust(
|
||||
color.adjust(color.adjust($dark, $lightness: 40%), $saturation: -10%),
|
||||
$lightness: -10%
|
||||
)};
|
||||
--Layout-asideLink-color: var(--colors-neutral-text-11);
|
||||
--Layout-asideLink-fontSize: var(--fonts-size-8);
|
||||
--Layout-asideLink-arrowFontSize: var(--fonts-size-8);
|
||||
--Layout-asideLink-arrowColor: var(--colors-neutral-text-5);
|
||||
--Layout-asideLink-iconColor: inherit;
|
||||
--Layout-asideLink-onActive-arrowColor: var(
|
||||
--Layout-asideLink-onActive-color
|
||||
);
|
||||
--Layout-asideLink-onActive-color: var(--colors-brand-6);
|
||||
--Layout-asideLink-onHover-color: var(--colors-brand-6);
|
||||
--Layout-asideLink-onHover-iconColor: var(--colors-brand-6);
|
||||
--Layout-asideLink-onHover-iconSize: var(--sizes-size-9);
|
||||
--Layout-asideLink-onHover-arrowColor: var(--colors-neutral-text-11);
|
||||
--Layout-brand-bg: var(--colors-neutral-fill-2);
|
||||
--Layout-brand-color: var(--colors-neutral-text-11);
|
||||
--Layout-brandBar-color: #{color.adjust(
|
||||
color.adjust($dark, $lightness: 40%),
|
||||
$saturation: -10%
|
||||
)};
|
||||
--Layout-header-bg: var(--colors-neutral-fill-10);
|
||||
--Layout-header-boxShadow: none;
|
||||
--Layout-header-height: #{px2rem(50px)};
|
||||
--Layout-headerBar-borderBottom: none;
|
||||
--Layout-footer-height: #{px2rem(50px)};
|
||||
--Layout-nav--folded-height: var(--sizes-base-20);
|
||||
--Layout-nav-height: #{px2rem(40px)};
|
||||
--Layout-nav-lgHeight: #{px2rem(50px)};
|
||||
--Layout-body-bg: var(--body-bg);
|
||||
--Layout-paddingX: #{px2rem(25px)};
|
||||
--Layout-icon-size: #{px2rem(14px)};
|
||||
--Layout-light-backgroundColor: var(--colors-neutral-fill-11);
|
||||
--Layout-light-bgColor-onHover: var(--colors-brand-10);
|
||||
--Layout-light-fontColor: var(--colors-neutral-text-2);
|
||||
--Layout-fontColor--onHover: var(--colors-brand-5);
|
||||
--Layout-dark-fontColor: var(--colors-neutral-text-11);
|
||||
--Layout-fontColor--onActive: var(--colors-brand-4);
|
||||
--Layout-fontColor--info: var(--colors-brand-5);
|
||||
--Layout-dark-backgroundColor: var(--colors-neutral-fill-2);
|
||||
--Layout-dark-selected-color: var(--colors-brand-6);
|
||||
--Layout-tooltip-fontSize: var(--fonts-size-8);
|
||||
--Layout-dark-tooltip-backgroundColor: var(--colors-brand-1);
|
||||
|
||||
--List--unsaved-heading-bg: #e8f0fe;
|
||||
--List--unsaved-heading-color: #4285f4;
|
||||
--List-bg: var(--colors-neutral-fill-11);
|
||||
--List-borderColor: var(--borderColor);
|
||||
--List-borderRadius: var(--borderRadius);
|
||||
--List-borderWidth: var(--borderWidth);
|
||||
--List-fixedTop-boxShadow: var(--shadows-shadow-normal);
|
||||
--List-placeholder-height: #{px2rem(30px)};
|
||||
--List-toolbar-marginX: 0;
|
||||
--List-toolbar-marginY: var(--gap-base);
|
||||
|
||||
--ListControl-fontSize: var(--Form-fontSize);
|
||||
--ListControl-gutterWidth: #{px2rem(10px)};
|
||||
--ListControl-item-bg: var(--colors-neutral-fill-11);
|
||||
--ListControl-item-borderColor: var(--borderColor);
|
||||
--ListControl-item-borderWidth: var(--borders-width-2);
|
||||
--ListControl-item-borderRadius: var(--borders-radius-3);
|
||||
--ListControl-item-color: var(--colors-neutral-text-2);
|
||||
--ListControl-item-onActive-after-borderColor: #fff;
|
||||
--ListControl-item-onActive-before-bg: var(--colors-brand-5);
|
||||
--ListControl-item-onActive-bg: var(--colors-neutral-fill-11);
|
||||
--ListControl-item-onActive-borderColor: var(--colors-brand-4);
|
||||
--ListControl-item-onActive-color: var(--colors-brand-4);
|
||||
--ListControl-item-onActive-onHover-bg: var(--colors-neutral-fill-11);
|
||||
--ListControl-item-onDisabled-bg: var(--colors-neutral-fill-9);
|
||||
--ListControl-item-onDisabled-borderColor: var(--colors-neutral-line-9);
|
||||
--ListControl-item-onDisabled-color: var(--colors-neutral-text-6);
|
||||
--ListControl-item-onDisabled-opacity: 1;
|
||||
--ListControl-item-onHover-bg: var(--colors-neutral-fill-11);
|
||||
--ListControl-item-onHover-borderColor: var(--colors-brand-5);
|
||||
--ListControl-item-onHover-color: var(--colors-brand-5);
|
||||
--ListControl-item-paddingX: var(--sizes-size-6);
|
||||
--ListControl-item-paddingY: #{px2rem(6px)};
|
||||
--ListControl-item-transition: none;
|
||||
|
||||
--ListItem--strip-bg: var(--colors-neutral-fill-10);
|
||||
--ListItem-borderColor: var(--colors-neutral-line-10);
|
||||
--ListItem-borderWidth: var(--List-borderWidth);
|
||||
--ListItem-onChecked-bg: var(--colors-brand-10);
|
||||
--ListItem-onChecked-borderColor: var(--colors-brand-4);
|
||||
--ListItem-onChecked-color: var(--colors-brand-4);
|
||||
--ListItem-onChecked-fieldLabel-color: var(--colors-brand-4);
|
||||
--ListItem-onDragging-opacity: 0.1;
|
||||
--ListItem-onModified-bg: #e8f0fe;
|
||||
--ListItem-onModified-borderColor: #{color.adjust(#e8f0fe, $lightness: -10%)};
|
||||
--ListItem-onModified-color: #4285f4;
|
||||
--ListItem-onModified-fieldLabel-color: #{color.adjust(
|
||||
#4285f4,
|
||||
$lightness: 20%
|
||||
)};
|
||||
--ListItem-paddingX: var(--gap-base);
|
||||
--ListItem-paddingY: var(--gap-sm);
|
||||
--ListItem--onHover-bg: rgba(0, 126, 255, 0.08);
|
||||
--ListItem--onHover-color: var(--info);
|
||||
|
||||
--listMenu--onActive-borderColor: var(--info);
|
||||
--ListMenu-borderRadius: var(--borders-radius-1);
|
||||
--ListMenu-borderWidth: var(--borders-width-1);
|
||||
--ListMenu-bordrColor: var(--borderColor);
|
||||
--ListMenu-divider-color: var(--borderColorLight);
|
||||
--ListMenu-item--onActive-bg: transparent;
|
||||
--ListMenu-item--onActive-color: var(--info);
|
||||
--ListMenu-item--onDisabled-bg: transparent;
|
||||
--ListMenu-item--onDisabled-color: var(--text--muted-color);
|
||||
--ListMenu-item--onHover-bg: var(--colors-neutral-fill-8);
|
||||
--ListMenu-item--onHover-color: var(--colors-neutral-text-2);
|
||||
--ListMenu-item-bg: var(--colors-neutral-fill-11);
|
||||
--ListMenu-item-color: var(--colors-neutral-text-2);
|
||||
--ListMenu-item-height: var(--sizes-base-15);
|
||||
--ListMenu-item-mobile-margin: #{px2rem(5px)};
|
||||
--ListMenu-item-mobile-width: #{px2rem(90px)};
|
||||
--ListMenu-item-mobile-bg: #f5f5f5;
|
||||
--ListMenu-item-mobile-active-bg: #e7f1ff;
|
||||
|
||||
--Log-bg: #222;
|
||||
--Log-padding: var(--gap-sm) 0;
|
||||
--Log-line-padding: 0 var(--gap-sm);
|
||||
--Log-color: #f1f1f1;
|
||||
--Log-line--onHover-bg: #444;
|
||||
|
||||
--Nav-item-bg: transparent;
|
||||
--Nav-item-borderRadius: var(--borders-radius-1);
|
||||
--Nav-item-color: var(--text-color);
|
||||
--Nav-item-fontSize: var(--fonts-size-7);
|
||||
--Nav-item-collapsed-fontSize: var(--fonts-size-6);
|
||||
--Nav-item-fontWeight: var(--fonts-weight-6);
|
||||
--Nav-item-fontColor-onDisabled: var(--colors-neutral-fill-6);
|
||||
--Nav-item-onActive-bg: var(--colors-neutral-fill-10);
|
||||
--Nav-item-onActive-backgroundColor: var(--colors-neutral-fill-12);
|
||||
--Nav-item-onActive-borderLeft: var(--borders-width-4) var(--borders-style-2)
|
||||
var(--colors-brand-5);
|
||||
--Nav-item-onActive-borderColor: var(--colors-link-5);
|
||||
--Nav-item-onActive-color: var(--colors-brand-5);
|
||||
--Nav-item-onDisabled-color: var(--text--muted-color);
|
||||
--Nav-item-onHover-bg: rgba(0, 0, 0, 0.05);
|
||||
--Nav-item-onHover-color: var(--text--loud-color);
|
||||
// --Nav-subNav-bg: #fafafa;
|
||||
--Nav-subItem-fontSize: var(--fonts-size-8);
|
||||
--Nav-subItem-onActiveBeforeBg: var(--colors-brand-5);
|
||||
--Nav-Item-maxWidth--tabs: #{px2rem(160px)};
|
||||
--Nav-Item-height: #{px2rem(40px)};
|
||||
--Nav-Item-height--horizontal: #{px2rem(50px)};
|
||||
--Nav-Item-Badge-paddingRight: #{px2rem(10px)};
|
||||
--Nav-Item-paddingX: #{px2rem(20px)};
|
||||
--Nav-Item-Drag-color: var(--colors-neutral-text-5);
|
||||
|
||||
--Number-bg: var(--Form-input-bg);
|
||||
--Number-borderColor: var(--colors-neutral-line-7);
|
||||
--Number-borderRadius: var(--Form-input-borderRadius);
|
||||
--Number-borderWidth: var(--borders-width-2);
|
||||
--Number-handler--down-content: '\e6dd';
|
||||
--Number-handler--up-content: '\e6dd';
|
||||
--Number-handler--up-transform: rotate(180deg);
|
||||
--Number-handler-bg: var(--colors-neutral-fill-11);
|
||||
--Number-handler-borderBottom: var(--borders-width-1) solid
|
||||
var(--Form-input-borderColor);
|
||||
--Number-handler-color: var(--Form-input-color);
|
||||
--Number-handler-fontFamily: 'iconfont';
|
||||
--Number-handler-fontSize: var(--fonts-size-8);
|
||||
--Number-handler-onActive-bg: var(--Number-handler-onHover-bg);
|
||||
--Number-handler-onDisabled-bg: var(--Form-input-onDisabled-bg);
|
||||
--Number-handler-onDisabled-color: var(--text--muted-color);
|
||||
--Number-handler-onHover-bg: var(--colors-neutral-fill-11);
|
||||
--Number-handler-onHover-color: var(--colors-brand-5);
|
||||
--Number-handler-width: var(--sizes-base-12);
|
||||
--Number-onDisabled-bg: var(--Form-input-bg);
|
||||
|
||||
--Page-aside-bg: var(--colors-neutral-fill-11);
|
||||
--Page-aside-maxWidth: #{px2rem(300px)};
|
||||
--Page-aside-width: #{px2rem(160px)};
|
||||
--Page-body-padding: var(--gap-base);
|
||||
--Page-content-paddingX: var(--sizes-size-0);
|
||||
--Page-content-paddingY: var(--sizes-size-0);
|
||||
--Page-header-paddingX: var(--sizes-size-9);
|
||||
--Page-header-paddingY: var(--sizes-size-6);
|
||||
--Page-header-bg: transparent;
|
||||
--Page-main-bg: var(--colors-neutral-fill-11);
|
||||
--Page-title-color: var(--colors-neutral-text-2);
|
||||
--Page-title-fontSize: var(--fontSizeLg);
|
||||
--Page-title-fontWeight: var(--fontWeightNormal);
|
||||
--Page-title-lineHeight: 1.5;
|
||||
|
||||
--Pagination-fontSize: var(--fonts-size-8);
|
||||
--Pagination-height: #{px2rem(32px)};
|
||||
--Pagination-height-sm: #{px2rem(24px)};
|
||||
--Pagination-minWidth: #{px2rem(32px)};
|
||||
--Pagination-minWidth-sm: #{px2rem(24px)};
|
||||
--Pagination-onActive-backgroundColor: var(--colors-neutral-fill-11);
|
||||
--Pagination-onActive-border: var(--borders-width-2) var(--borders-style-2)
|
||||
var(--colors-brand-5);
|
||||
--Pagination-onActive-color: var(--colors-brand-5);
|
||||
--Pagination-onDisabled-color: var(--colors-neutral-text-6);
|
||||
--Pagination-onDisabled-backgroundColor: var(--colors-neutral-fill-10);
|
||||
--Pagination-padding: 0 #{px2rem(8px)};
|
||||
--Pagination-padding-sm: 0 #{px2rem(4px)};
|
||||
--Pagination-light-color: var(--colors-neutral-text-4);
|
||||
--Pagination-border: var(--borderWidth) var(--borders-style-2)
|
||||
var(--colors-neutral-line-7);
|
||||
|
||||
--Panel--default-bg: var(--colors-neutral-fill-11);
|
||||
--Panel--default-badgeBg: var(--colors-neutral-fill-3);
|
||||
--Panel--default-badgeColor: var(--colors-neutral-fill-10);
|
||||
|
||||
--Picker-onHover-iconColor: var(--icon-onHover-color);
|
||||
|
||||
--PickerColumns-bg: white;
|
||||
--PickerColumns-toolbar-height: #{px2rem(50px)};
|
||||
--PickerColumns-title-fontSize: var(--fontSizeLg);
|
||||
--PickerColumns-title-color: #222;
|
||||
--PickerColumns-title-lineHeight: 1.5;
|
||||
--PickerColumns-action-padding: 0 var(--gap-md);
|
||||
--PickerColumns-action-fontSize: var(--fontSizeLg);
|
||||
--PickerColumns-confirmAction-color: var(--colors-brand-5);
|
||||
--PickerColumns-cancelAction-color: #666;
|
||||
--PickerColumns-option-fontSize: var(--fontSizeLg);
|
||||
--PickerColumns-optionText-color: var(--text-color);
|
||||
--PickerColumns-optionDisabled-opacity: 0.3;
|
||||
--PickerColumns-loadingIcon-color: var(--icon-color);
|
||||
--PickerColumns-loadingMask-Color: rgba(255, 255, 255, 0.9);
|
||||
|
||||
--PopOver-bg: var(--colors-neutral-fill-11);
|
||||
--PopOverAble-iconColor: inherit;
|
||||
--PopOverAble-onHover-iconColor: inherit;
|
||||
|
||||
--PopUp-cancelAction-color: #666;
|
||||
--PopUp-confirmAction-color: var(--primary);
|
||||
|
||||
--Property-title-bg: var(--colors-neutral-fill-10);
|
||||
--Property-label-bg: var(--colors-neutral-fill-10);
|
||||
|
||||
--Portlet-borderColor: var(--borderColor);
|
||||
--Portlet-borderStyle: solid;
|
||||
--Portlet-borderWidth: var(--borderWidth);
|
||||
--Portlet-borderRadius: var(--borderRadius);
|
||||
|
||||
--QuickEdit-iconSize: #{px2rem(14px)};
|
||||
--QuickEdit-onFocus-borderColor: var(--info);
|
||||
--QuickEdit-onFocus-borderWidth: var(--borderWidth);
|
||||
|
||||
--Remark-bg: var(--colors-neutral-text-11);
|
||||
--Remark-borderColor: var(--colors-neutral-line-8);
|
||||
--Remark-borderWidth: var(--borders-width-2);
|
||||
--Remark-icon-fontSize: var(--fonts-size-8);
|
||||
--Remark-iconColor: var(--colors-neutral-text-5);
|
||||
--Remark-marginLeft: var(--gap-sm);
|
||||
--Remark-onHover-bg: var(--colors-warning-5);
|
||||
--Remark-onHover-borderColor: var(--colors-warning-5);
|
||||
--Remark-onHover-iconColor: var(--colors-neutral-text-11);
|
||||
--Remark-width: var(--sizes-size-9);
|
||||
|
||||
--Sparkline-line-color: var(--info);
|
||||
--Sparkline-area-color: #{rgba($info, 0.1)};
|
||||
|
||||
--Table-fixedLeftLast-boxShadow: inset 10px 0 8px -8px #00000026;
|
||||
--Table-fixedRightFirst-boxShadow: inset -10px 0 8px -8px #00000026;
|
||||
--Table-loading-padding: 30px 0px;
|
||||
|
||||
--TagControl-sugBtn-bg: transparent;
|
||||
--TagControl-sugBtn-border: var(--colors-neutral-line-7);
|
||||
--TagControl-sugBtn-borderRadius: var(--borders-radius-2);
|
||||
--TagControl-sugBtn-borderWidth: var(--borders-width-2);
|
||||
--TagControl-sugBtn-color: var(--colors-neutral-text-2);
|
||||
--TagControl-sugBtn-fontSize: var(--fonts-size-8);
|
||||
--TagControl-sugBtn-fontWeight: var(--fonts-weight-6);
|
||||
--TagControl-sugBtn-height: var(--sizes-base-15);
|
||||
--TagControl-sugBtn-lineHeight: var(--fonts-lineHeight-2);
|
||||
--TagControl-sugBtn-onActive-bg: var(--colors-neutral-fill-8);
|
||||
--TagControl-sugBtn-onActive-border: var(--colors-neutral-line-5);
|
||||
--TagControl-sugBtn-onActive-color: var(--TagControl-sugBtn-color);
|
||||
--TagControl-sugBtn-onHover-bg: var(--colors-neutral-fill-8);
|
||||
--TagControl-sugBtn-onHover-border: var(--colors-neutral-line-6);
|
||||
--TagControl-sugBtn-onHover-color: var(--colors-neutral-text-2);
|
||||
--TagControl-sugBtn-paddingX: var(--sizes-size-6);
|
||||
--TagControl-sugBtn-paddingY: calc(
|
||||
(
|
||||
var(--TagControl-sugBtn-height) - var(--borders-width-2) * 2 -
|
||||
var(--TagControl-sugBtn-lineHeight) *
|
||||
var(--TagControl-sugBtn-fontSize)
|
||||
) / 2
|
||||
);
|
||||
--TagControl-sugTip-color: var(--colors-brand-5);
|
||||
|
||||
--Tooltip--attr-bg: rgba(0, 0, 0, 0.7);
|
||||
--Tooltip--attr-borderColor: var(--borderColor);
|
||||
--Tooltip--attr-borderRadius: var(--borderRadius);
|
||||
--Tooltip--attr-borderWidth: 0;
|
||||
--Tooltip--attr-boxShadow: var(--shadows-shadow-normal);
|
||||
--Tooltip--attr-color: #fff;
|
||||
--Tooltip--attr-fontSize: var(--fontSizeSm);
|
||||
--Tooltip--attr-gap: var(--gap-sm);
|
||||
--Tooltip--attr-lineHeigt: var(--lineHeightBase);
|
||||
--Tooltip--attr-paddingX: #{px2rem(10px)};
|
||||
--Tooltip--attr-paddingY: #{px2rem(2px)};
|
||||
--Tooltip--attr-transition: all var(--animation-duration) ease-in-out;
|
||||
--Tooltip-arrow-color: var(--Tooltip-bg);
|
||||
--Tooltip-arrow-color--dark: rgba(7, 12, 20, 0.85);
|
||||
--Tooltip-arrow-height: #{px2rem(4px)};
|
||||
--Tooltip-arrow-outerColor: #{color.adjust($borderColor, $alpha: 0.05)};
|
||||
--Tooltip-arrow-width: #{px2rem(8px)};
|
||||
--Tooltip-bg: var(--background);
|
||||
--Tooltip-bg--dark: rgba(7, 12, 20, 0.85);
|
||||
--Tooltip-body-color: var(--text-color);
|
||||
--Tooltip-body-color--dark: #fff;
|
||||
--Tooltip-body-paddingX: var(--gap-base);
|
||||
--Tooltip-body-paddingY: var(--gap-sm);
|
||||
--Tooltip-borderColor: var(--borderColor);
|
||||
--Tooltip-borderRadius: var(--borderRadiusLg);
|
||||
--Tooltip-borderWidth: var(--borderWidth);
|
||||
--Tooltip-boxShadow: var(--boxTooltipShadow);
|
||||
--Tooltip-boxShadow--dark: 0 2px 8px 0 rgba(7, 12, 20, 0.12);
|
||||
--Tooltip-fontSize: var(--fontSizeSm);
|
||||
--Tooltip-fontWeight: var(--fonts-weight-5);
|
||||
--Tooltip-maxWidth: #{px2rem(240px)};
|
||||
--Tooltip-minWidth: auto;
|
||||
--Tooltip-title-fontWeight: bold;
|
||||
--Tooltip-title-bg: #{color.adjust($white, $lightness: -3%)};
|
||||
--Tooltip-title-borderBottom-color: #{color.adjust(
|
||||
color.adjust($white, $lightness: -3%),
|
||||
$lightness: -5%
|
||||
)};
|
||||
--Tooltip-title-color: var(--text--loud-color);
|
||||
--Tooltip-title-color--dark: #fff;
|
||||
--Tooltip-title-paddingX: var(--gap-base);
|
||||
--Tooltip-title-paddingY: var(--gap-sm);
|
||||
|
||||
--Transfer-title-bg: var(--colors-neutral-fill-10);
|
||||
--Transfer-selection-maxHeight: #{px2rem(350px)};
|
||||
--TransferSelect--table-heading-bg: var(--colors-neutral-fill-11);
|
||||
--TransferSelect--normal-heading-bg: var(--colors-neutral-fill-10);
|
||||
--TransferSelect-heading-borderBottom: var(--borders-width-1);
|
||||
|
||||
--TabsTransfer-title-bg: var(--colors-neutral-fill-10);
|
||||
--TabsTransfer-border-color: var(--colors-neutral-fill-8);
|
||||
|
||||
--AnchorNav-links-container-borderRight: #{px2rem(2px)} solid #d3dae0;
|
||||
--AnchorNav-onActive-borderWidth: 0 0 0 #{px2rem(2px)};
|
||||
|
||||
--ColumnToggler-backgroundColor: var(--colors-neutral-fill-11);
|
||||
--ColumnToggler-borderRadius: #{px2rem(4px)};
|
||||
--ColumnToggler-lineHeight: #{px2rem(24px)};
|
||||
--ColumnToggler-title-fontColor: #080e1a;
|
||||
--ColumnToggler-fontColor: #151a26;
|
||||
--ColumnToggler-item-backgroundColor: #f6f7f8;
|
||||
--ColumnToggler-item-backgroundColor-onHover: rgba(36, 104, 242, 0.1);
|
||||
--ColumnToggler-item-paddingX: #{px2rem(8px)};
|
||||
--ColumnToggler-item-paddingY: #{px2rem(4px)};
|
||||
--ColumnToggler-item-margin: #{px2rem(4px)};
|
||||
--ColumnToggler-item-dragBar-color: #d8d8d8;
|
||||
|
||||
--InputFormula-header-bgColor: var(--colors-neutral-fill-10);
|
||||
--InputFormula-icon-size: #{px2rem(18px)};
|
||||
--InputFormula-icon-color-onActive: var(--colors-brand-5);
|
||||
--InputFormula-code-bgColor: var(--colors-neutral-fill-10);
|
||||
--InputFormula-input-schema-height: var(--sizes-base-12);
|
||||
|
||||
--UserSelect--post-bg: var(--colors-brand-6);
|
||||
--UserSelect--department-bg: #ffab52;
|
||||
--UserSelect--role-bg: #0bc286;
|
||||
--UserSelect--border-color: #f7f7f9;
|
||||
--UserSelect--content-bg: #f5f7f8;
|
||||
--UserSelect--bread-color: #5e626a;
|
||||
|
||||
--Cascader-border-color: #f7f7f9;
|
||||
--Cascader-border-active-bg-color: #f7f7f9;
|
||||
--Cascader-option-disable-color: #b8babf;
|
||||
|
||||
// tag
|
||||
--Tag-content-fontSize: var(--fontSizeSm);
|
||||
--Tag-height: #{px2rem(24px)};
|
||||
--Tag-borderRadius: #{px2rem(2px)};
|
||||
--Tag-fontColor: #151a26;
|
||||
|
||||
--Tag-default-color: #f2f2f4;
|
||||
--Tag-inactive-color: #b8babf;
|
||||
--Tag-active-color: var(--colors-brand-5);
|
||||
--Tag-processing-color: var(--colors-brand-6);
|
||||
--Tag-success-color: var(--colors-success-5);
|
||||
--Tag-error-color: var(--colors-error-5);
|
||||
--Tag-warning-color: var(--colors-warning-5);
|
||||
|
||||
--Tag-checkable-bgColor: #f2f2f4;
|
||||
--Tag-checkable-bgColor-onDisable: #e6e6e8;
|
||||
--Tag-checkable-bgColor-onHover: #e6e6e8;
|
||||
--Tag-checkable-bgColor-onActive: #e6e6e8;
|
||||
|
||||
--Tag-checkable-bgColor-onHover-onChecked: var(--colors-link-6);
|
||||
--Tag-checkable-bgColor-onActive-onChecked: var(--colors-link-4);
|
||||
--Tag-checkable-bgColor-onChecked: var(--colors-brand-5);
|
||||
|
||||
--Tag-checkable-fontColor-onDisable: #b4b6ba;
|
||||
|
||||
// ContextMenu
|
||||
--menu-background: #fff;
|
||||
--menu-box-shadow: 0 2px 8px 0 rgba(7, 12, 20, 0.12);
|
||||
--menu-border-radius: 6px;
|
||||
--menu-padding: 4px;
|
||||
--menu-font-color: #151b26;
|
||||
--menu-font-family: PingFangSC-Regular;
|
||||
--menu-font-padding: 5px 8px;
|
||||
--menu-font-size: 14px;
|
||||
--menu-border-color: #e8e9eb; // 默认的边框色
|
||||
--menu-active-color: var(--colors-brand-5);
|
||||
--menu-hover-bg-color: #e6f0ff;
|
||||
--menu-disabled-color: #b8babf; // 禁用文字颜色
|
||||
--default-icon-color: #84868c; // 默认的icon颜色
|
||||
--default-padding: 4px 12px; // 6px 12px
|
||||
--menu-min-width: 150px; // 一级子项最小宽度
|
||||
--menu-sub-min-width: 100px; // 二级子项最小宽度
|
||||
|
||||
--Context-menu-border-radius: 6px;
|
||||
--Context-menu-active-color: #2468f2;
|
||||
--Context-menu-hover-color: #151b26;
|
||||
--Context-menu-hover-bg-color: #f2f2f4;
|
||||
--Context-menu-hasChild-active-color: #151b26;
|
||||
|
||||
--SearchBox-width: #{px2rem(150px)};
|
||||
--SearchBox-history-dropdown-maxWidth: calc(var(--SearchBox-width) * 2);
|
||||
--SearchBox-history-dropdown-maxHeight: #{px2rem(200px)};
|
||||
|
||||
--SearchBox-hover-color: var(--colors-brand-5);
|
||||
--SearchBox-focus-color: var(--colors-brand-4);
|
||||
--SearchBox-search-icon-color: var(--colors-neutral-text-5);
|
||||
--SearchBox-enhonce-icon-color: var(--button-primary-default-font-color);
|
||||
--SearchBox-clearable-icon-color: var(--colors-neutral-text-7);
|
||||
--SearchBox-clearable-icon-size: var(--sizes-size-9);
|
||||
--SearchBox-height: var(--sizes-base-15);
|
||||
--SearchBox-disabled-color: var(--colors-neutral-text-10);
|
||||
--SearchBox-enhonce-disabled-color: var(--colors-neutral-text-9);
|
||||
--SearchBox-enhonce-disabled-search-color: var(--colors-neutral-text-6);
|
||||
--SearchBox-enhonce-clearable-gap: var(--borders-radius-4);
|
||||
--SearchBox-search-btn-color--disabled: var(--colors-neutral-fill-6);
|
||||
|
||||
--IconSelect-searchBox-width: #{px2rem(246px)};
|
||||
--IconSelect-type-item-height: #{px2rem(48px)};
|
||||
--IconSelect-dialog-height: #{50vh};
|
||||
--IconSelect-base-margin: var(--gap-base);
|
||||
--IconSelect-xs-margin: var(--gap-xs);
|
||||
--IconSelect-sm-padding: #{px2rem(6px)};
|
||||
--IconSelect-base-border-radius: var(--borderRadiusMd);
|
||||
--IconSelect-border-color: var(--menu-border-color);
|
||||
--IconSelect-preview-icon-size: #{px2rem(16px)};
|
||||
--IconSelect-list-icon-size: #{px2rem(24px)};
|
||||
--IconSelect-type-font-size: var(--fontSizeSm);
|
||||
--IconSelect-active-badge-color: var(--colors-neutral-fill-11);
|
||||
--IconSelect-active-bg-color: var(--colors-brand-5);
|
||||
--IconSelect-icon-name-color: var(--colors-neutral-text-2);
|
||||
--IconSelect-icon-id-color: var(--colors-neutral-text-5);
|
||||
--IconSelect-icon-placeholder-color: var(--colors-neutral-text-6);
|
||||
--IconSelect-type-width: #{px2rem(88px)};
|
||||
--IconSelect-type-li-height: #{px2rem(32px)};
|
||||
--IconSelect-type-li-padding: var(--gap-md);
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
:root {
|
||||
--fontSizeBase: var(--fontSizeLg);
|
||||
}
|
||||
:root,
|
||||
.AMISCSSWrapper {
|
||||
--Page-body-padding: var(--gap-md);
|
||||
}
|
||||
}
|
||||
12
packages/amis-ui/scss/_thirds.scss
Normal file
12
packages/amis-ui/scss/_thirds.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
@import '../../../node_modules/codemirror/lib/codemirror';
|
||||
@import '../../../node_modules/codemirror/theme/base16-dark';
|
||||
@import '../../../node_modules/codemirror/theme/idea';
|
||||
@import '../../../node_modules/froala-editor/css/froala_style.min';
|
||||
@import '../../../node_modules/froala-editor/css/froala_editor.pkgd.min';
|
||||
@import '../../../node_modules/tinymce/skins/ui/oxide/skin';
|
||||
@import '../../../node_modules/video-react/dist/video-react';
|
||||
@import '../../../node_modules/cropperjs/dist/cropper';
|
||||
@import '../../../node_modules/office-viewer/dist/office';
|
||||
@import '../../../node_modules/animate.css/animate.min';
|
||||
|
||||
@import './components/react-datetime';
|
||||
1757
packages/amis-ui/scss/_utilities.scss
Normal file
1757
packages/amis-ui/scss/_utilities.scss
Normal file
File diff suppressed because it is too large
Load Diff
439
packages/amis-ui/scss/_variables.scss
Normal file
439
packages/amis-ui/scss/_variables.scss
Normal file
@@ -0,0 +1,439 @@
|
||||
// 这里只放 sass 里的变量,因为有很多颜色计算,为了保持和之前的兼容性所以还保留这些变量,但后续会通过新增 css 自定义属性的方式逐渐替换
|
||||
// 类名前缀
|
||||
@use 'sass:color';
|
||||
$ns: '' !default;
|
||||
$remFactor: 16px !default;
|
||||
|
||||
$devices: (
|
||||
m: '(max-width: 768px)',
|
||||
pc: '(min-width: 769px)'
|
||||
) !default;
|
||||
|
||||
// 生成颜色的工具有很多,可以参考这些链接来弄。
|
||||
// https://tailwind.ink/
|
||||
// https://www.tailwindshades.com/
|
||||
// https://tailwind.simeongriggs.dev/
|
||||
|
||||
// https://javisperez.github.io/tailwindcolorshades/#/
|
||||
// v1 版本 {
|
||||
// color50: tint($color, 0.95);
|
||||
// color100: tint($color, 0.9);
|
||||
// color200: tint($color, 0.75);
|
||||
// color300: tint($color, 0.6);
|
||||
// color400: tint($color, 0.3);
|
||||
// color500: $color;
|
||||
// color600: shade($color, 0.9);
|
||||
// color700: shade($color, 0.6);
|
||||
// color800: shade($color, 0.45);
|
||||
// color900: shade($color, 0.3);
|
||||
// }
|
||||
$colors: (
|
||||
black: #000,
|
||||
white: #fff,
|
||||
primary: #007bff,
|
||||
secondary: #6c757d,
|
||||
success: #28a745,
|
||||
info: #007bff,
|
||||
warning: #fad733,
|
||||
danger: #dc3545,
|
||||
light: #f8f9fa,
|
||||
dark: #343a40,
|
||||
gray: (
|
||||
50: #f9fafb,
|
||||
100: #f3f4f6,
|
||||
200: #e5e7eb,
|
||||
300: #d1d5db,
|
||||
400: #9ca3af,
|
||||
500: #6b7280,
|
||||
600: #4b5563,
|
||||
700: #374151,
|
||||
800: #1f2937,
|
||||
900: #111827
|
||||
),
|
||||
red: (
|
||||
50: #fef2f2,
|
||||
100: #fee2e2,
|
||||
200: #fecaca,
|
||||
300: #fca5a5,
|
||||
400: #f87171,
|
||||
500: #ef4444,
|
||||
600: #dc2626,
|
||||
700: #b91c1c,
|
||||
800: #991b1b,
|
||||
900: #7f1d1d
|
||||
),
|
||||
yellow: (
|
||||
50: #fffbeb,
|
||||
100: #fef3c7,
|
||||
200: #fde68a,
|
||||
300: #fcd34d,
|
||||
400: #fbbf24,
|
||||
500: #f59e0b,
|
||||
600: #d97706,
|
||||
700: #b45309,
|
||||
800: #92400e,
|
||||
900: #78350f
|
||||
),
|
||||
green: (
|
||||
50: #ecfdf5,
|
||||
100: #d1fae5,
|
||||
200: #a7f3d0,
|
||||
300: #6ee7b7,
|
||||
400: #34d399,
|
||||
500: #10b981,
|
||||
600: #059669,
|
||||
700: #047857,
|
||||
800: #065f46,
|
||||
900: #064e3b
|
||||
),
|
||||
blue: (
|
||||
50: #eff6ff,
|
||||
100: #dbeafe,
|
||||
200: #bfdbfe,
|
||||
300: #93c5fd,
|
||||
400: #60a5fa,
|
||||
500: #3b82f6,
|
||||
600: #2563eb,
|
||||
700: #1d4ed8,
|
||||
800: #1e40af,
|
||||
900: #1e3a8a
|
||||
),
|
||||
cyan: (
|
||||
50: #ecfeff,
|
||||
100: #cffafe,
|
||||
200: #a5f3fc,
|
||||
300: #67e8f9,
|
||||
400: #22d3ee,
|
||||
500: #06b6d4,
|
||||
600: #0891b2,
|
||||
700: #0e7490,
|
||||
800: #155e75,
|
||||
900: #164e63
|
||||
),
|
||||
indigo: (
|
||||
50: #eef2ff,
|
||||
100: #e0e7ff,
|
||||
200: #c7d2fe,
|
||||
300: #a5b4fc,
|
||||
400: #818cf8,
|
||||
500: #6366f1,
|
||||
600: #4f46e5,
|
||||
700: #4338ca,
|
||||
800: #3730a3,
|
||||
900: #312e81
|
||||
),
|
||||
purple: (
|
||||
50: #f5f3ff,
|
||||
100: #ede9fe,
|
||||
200: #ddd6fe,
|
||||
300: #c4b5fd,
|
||||
400: #a78bfa,
|
||||
500: #8b5cf6,
|
||||
600: #7c3aed,
|
||||
700: #6d28d9,
|
||||
800: #5b21b6,
|
||||
900: #4c1d95
|
||||
),
|
||||
pink: (
|
||||
50: #fdf2f8,
|
||||
100: #fce7f3,
|
||||
200: #fbcfe8,
|
||||
300: #f9a8d4,
|
||||
400: #f472b6,
|
||||
500: #ec4899,
|
||||
600: #db2777,
|
||||
700: #be185d,
|
||||
800: #9d174d,
|
||||
900: #831843
|
||||
)
|
||||
) !default;
|
||||
|
||||
// 颜色 Alias 不要直接修改, 直接修改 colors 对象。
|
||||
$white: map-get($colors, white);
|
||||
$gray50: map-get(
|
||||
map-get($colors, gray),
|
||||
50
|
||||
); // node-sass 不支持多个参数用法,所以先这么写。
|
||||
$gray100: map-get(map-get($colors, gray), 100) !default;
|
||||
$gray200: map-get(map-get($colors, gray), 200) !default;
|
||||
$gray300: map-get(map-get($colors, gray), 300) !default;
|
||||
$gray400: map-get(map-get($colors, gray), 400) !default;
|
||||
$gray500: map-get(map-get($colors, gray), 500) !default;
|
||||
$gray600: map-get(map-get($colors, gray), 600) !default;
|
||||
$gray700: map-get(map-get($colors, gray), 700) !default;
|
||||
$gray800: map-get(map-get($colors, gray), 800) !default;
|
||||
$gray900: map-get(map-get($colors, gray), 900) !default;
|
||||
$gray: $gray500 !default;
|
||||
$red: map-get(map-get($colors, red), 500) !default;
|
||||
$yellow: map-get(map-get($colors, yellow), 500) !default;
|
||||
$green: map-get(map-get($colors, green), 500) !default;
|
||||
$blue: map-get(map-get($colors, blue), 500) !default;
|
||||
$cyan: map-get(map-get($colors, cyan), 500) !default;
|
||||
$indigo: map-get(map-get($colors, indigo), 500) !default;
|
||||
$purple: map-get(map-get($colors, purple), 500) !default;
|
||||
$pink: map-get(map-get($colors, pink), 500) !default;
|
||||
$black: map-get($colors, black) !default;
|
||||
|
||||
$primary: map-get($colors, 'primary') !default;
|
||||
$secondary: map-get($colors, 'secondary') !default;
|
||||
$success: map-get($colors, 'success') !default;
|
||||
$info: map-get($colors, 'info') !default;
|
||||
$warning: map-get($colors, 'warning') !default;
|
||||
$danger: map-get($colors, 'danger') !default;
|
||||
$light: map-get($colors, 'light') !default;
|
||||
$dark: map-get($colors, 'dark') !default;
|
||||
|
||||
$spacing: (
|
||||
//
|
||||
// 下面是参考 tailwind
|
||||
//
|
||||
px: px2rem(1px),
|
||||
0: 0,
|
||||
none: 0,
|
||||
0.5: px2rem(2px),
|
||||
1: px2rem(4px),
|
||||
1.5: px2rem(6px),
|
||||
2: px2rem(8px),
|
||||
2.5: px2rem(10px),
|
||||
3: px2rem(12px),
|
||||
3.5: px2rem(14px),
|
||||
4: px2rem(16px),
|
||||
5: px2rem(20px),
|
||||
6: px2rem(24px),
|
||||
7: px2rem(28px),
|
||||
8: px2rem(32px),
|
||||
9: px2rem(36px),
|
||||
10: px2rem(40px),
|
||||
11: px2rem(44px),
|
||||
12: px2rem(48px),
|
||||
14: px2rem(56px),
|
||||
16: px2rem(64px),
|
||||
18: px2rem(72px),
|
||||
20: px2rem(80px),
|
||||
24: px2rem(96px),
|
||||
28: px2rem(112px),
|
||||
32: px2rem(128px),
|
||||
36: px2rem(144px),
|
||||
40: px2rem(160px),
|
||||
44: px2rem(176px),
|
||||
48: px2rem(192px),
|
||||
52: px2rem(208px),
|
||||
56: px2rem(224px),
|
||||
60: px2rem(240px),
|
||||
64: px2rem(256px),
|
||||
72: px2rem(288px),
|
||||
80: px2rem(320px),
|
||||
96: px2rem(384px)
|
||||
) !default;
|
||||
|
||||
$inset: map-merge(
|
||||
$spacing,
|
||||
(
|
||||
auto: auto,
|
||||
'1/2': 50%,
|
||||
'1/3': 33.333333%,
|
||||
'2/3': 66.666667%,
|
||||
'1/4': 25%,
|
||||
'2/4': 50%,
|
||||
'3/4': 75%,
|
||||
'full': 100%
|
||||
)
|
||||
) !default;
|
||||
|
||||
$widths: map-merge(
|
||||
$spacing,
|
||||
(
|
||||
auto: auto,
|
||||
1x: 1em,
|
||||
2x: 2em,
|
||||
3x: 3em,
|
||||
'1/2': 50%,
|
||||
'1/3': 33.333333%,
|
||||
'2/3': 66.666667%,
|
||||
'1/4': 25%,
|
||||
'2/4': 50%,
|
||||
'3/4': 75%,
|
||||
'1/5': 20%,
|
||||
'2/5': 40%,
|
||||
'3/5': 60%,
|
||||
'4/5': 80%,
|
||||
'1/6': 16.666667%,
|
||||
'2/6': 33.333333%,
|
||||
'3/6': 50%,
|
||||
'4/6': 66.666667%,
|
||||
'5/6': 83.333333%,
|
||||
'1/12': 8.333333%,
|
||||
'2/12': 16.666667%,
|
||||
'3/12': 25%,
|
||||
'4/12': 33.333333%,
|
||||
'5/12': 41.666667%,
|
||||
'6/12': 50%,
|
||||
'7/12': 58.333333%,
|
||||
'8/12': 66.666667%,
|
||||
'9/12': 75%,
|
||||
'10/12': 83.333333%,
|
||||
'11/12': 91.666667%,
|
||||
full: 100%,
|
||||
screen: 100vw,
|
||||
min: min-content,
|
||||
max: max-content
|
||||
)
|
||||
) !default;
|
||||
|
||||
$minWidths: (
|
||||
none: none,
|
||||
0: 0rem,
|
||||
xs: 20rem,
|
||||
sm: 24rem,
|
||||
md: 28rem,
|
||||
lg: 32rem,
|
||||
xl: 36rem,
|
||||
2xl: 42rem,
|
||||
3xl: 48rem,
|
||||
4xl: 56rem,
|
||||
5xl: 64rem,
|
||||
6xl: 72rem,
|
||||
7xl: 80rem,
|
||||
full: 100%,
|
||||
min: min-content,
|
||||
max: max-content,
|
||||
prose: 65ch
|
||||
) !default;
|
||||
|
||||
$maxWidths: (
|
||||
none: none,
|
||||
0: 0rem,
|
||||
xs: 20rem,
|
||||
sm: 24rem,
|
||||
md: 28rem,
|
||||
lg: 32rem,
|
||||
xl: 36rem,
|
||||
2xl: 42rem,
|
||||
3xl: 48rem,
|
||||
4xl: 56rem,
|
||||
5xl: 64rem,
|
||||
6xl: 72rem,
|
||||
7xl: 80rem,
|
||||
full: 100%,
|
||||
min: min-content,
|
||||
max: max-content,
|
||||
prose: 65ch
|
||||
) !default;
|
||||
|
||||
$heights: map-merge(
|
||||
$spacing,
|
||||
(
|
||||
auto: auto,
|
||||
'1/2': 50%,
|
||||
'1/3': 33.333333%,
|
||||
'2/3': 66.666667%,
|
||||
'1/4': 25%,
|
||||
'2/4': 50%,
|
||||
'3/4': 75%,
|
||||
'1/5': 20%,
|
||||
'2/5': 40%,
|
||||
'3/5': 60%,
|
||||
'4/5': 80%,
|
||||
'1/6': 16.666667%,
|
||||
'2/6': 33.333333%,
|
||||
'3/6': 50%,
|
||||
'4/6': 66.666667%,
|
||||
'5/6': 83.333333%,
|
||||
full: 100%,
|
||||
screen: 100vh
|
||||
)
|
||||
) !default;
|
||||
|
||||
$maxHeights: map-merge(
|
||||
$spacing,
|
||||
(
|
||||
full: 100%,
|
||||
screen: 100vh
|
||||
)
|
||||
) !default;
|
||||
|
||||
$fontSizes: (
|
||||
xs: 0.75rem 1rem,
|
||||
sm: 0.875rem 1.25rem,
|
||||
base: 1rem 1.5rem,
|
||||
md: 1.125rem 1.75rem,
|
||||
lg: 1.25rem 1.75rem,
|
||||
xl: 1.5rem 2rem,
|
||||
2xl: 1.875rem 2.25rem,
|
||||
3xl: 2.25rem 2.5rem,
|
||||
4xl: 3rem 1,
|
||||
5xl: 3.75rem 1,
|
||||
6xl: 4.5rem 1,
|
||||
7xl: 6rem 1,
|
||||
8xl: 8rem 1
|
||||
) !default;
|
||||
|
||||
$borderColor: $gray300;
|
||||
|
||||
$borderRadiuses: (
|
||||
'none': 0px,
|
||||
'sm': 0.125rem,
|
||||
'default': 0.25rem,
|
||||
'md': 0.375rem,
|
||||
'lg': 0.5rem,
|
||||
'xl': 0.75rem,
|
||||
'2xl': 1rem,
|
||||
'3xl': 1.5rem,
|
||||
'full': 9999px
|
||||
) !default;
|
||||
|
||||
$borderWidths: (
|
||||
'default': 1px,
|
||||
'0': 0px,
|
||||
'2': 2px,
|
||||
'4': 4px,
|
||||
'8': 8px
|
||||
) !default;
|
||||
|
||||
$boxShadows: (
|
||||
'sm': '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
|
||||
'default': '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
|
||||
'md': '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
|
||||
'lg':
|
||||
'0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
|
||||
'xl':
|
||||
'0 20px 25px -5px rgba(0, 0, 0, 0.1) , 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
|
||||
'2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
|
||||
'inner': 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)',
|
||||
'none': none
|
||||
) !default;
|
||||
|
||||
// 窗口适配
|
||||
// @deprecated 不打算支持这么多视图,只区分 pc 和 移动端
|
||||
// 改用 devices 了
|
||||
$breakpoints: (
|
||||
xs: 0,
|
||||
sm: 576px,
|
||||
md: 768px,
|
||||
lg: 992px,
|
||||
xl: 1200px
|
||||
) !default;
|
||||
|
||||
$text-color: #58666e !default;
|
||||
|
||||
// 部分遍历难以用自定义属性替换,所以保留
|
||||
$Grid-columns: 12 !default;
|
||||
$Grid-gutterWidth: px2rem(16px) !default;
|
||||
|
||||
$zindex-affix: 900 !default;
|
||||
$zindex-dropdown: 1000 !default;
|
||||
$zindex-sticky: 900 !default;
|
||||
$zindex-fixed: 1200 !default;
|
||||
$zindex-modal: 1400 !default;
|
||||
$zindex-popover: $zindex-modal !default; // 防止popover被modal遮盖
|
||||
$zindex-contextmenu: 1500 !default;
|
||||
$zindex-tooltip: 1600 !default;
|
||||
$zindex-toast: 2000 !default;
|
||||
$zindex-top: 3000 !default;
|
||||
$zindex-debug: 4000 !default;
|
||||
$zindex-spinner-overlay: 11 !default;
|
||||
|
||||
$Form--horizontal-columns: 12;
|
||||
$Table-strip-bg: color.adjust(#f6f8f8, $lightness: 1%) !default;
|
||||
$Number-handler-mode: 'vertical';
|
||||
$Wizard-steps-liAfterBorder: px2rem(18px) solid transparent !default;
|
||||
84
packages/amis-ui/scss/base/_animate.scss
Normal file
84
packages/amis-ui/scss/base/_animate.scss
Normal file
@@ -0,0 +1,84 @@
|
||||
// 内容放大
|
||||
.amis-hoverZoomIn-show,
|
||||
.amis-hoverZoomIn:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
// 内容缩小
|
||||
.amis-hoverZoomOut-show,
|
||||
.amis-hoverZoomOut:hover {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
// 阴影增强
|
||||
.amis-hoverShadow-show,
|
||||
.amis-hoverShadow:hover {
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
// 发光边框
|
||||
.amis-hoverBorder-show,
|
||||
.amis-hoverBorder:hover {
|
||||
box-shadow: 0 0 10px var(--colors-brand-5),
|
||||
0 0 10px var(--colors-brand-5) inset;
|
||||
}
|
||||
|
||||
// 内容上升
|
||||
.amis-hoverUp-show,
|
||||
.amis-hoverUp:hover {
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
|
||||
// 内容下降
|
||||
.amis-hoverDown-show,
|
||||
.amis-hoverDown:hover {
|
||||
transform: translateY(4px);
|
||||
}
|
||||
|
||||
// 向左滑动
|
||||
.amis-hoverLeft-show,
|
||||
.amis-hoverLeft:hover {
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
|
||||
// 向右滑动
|
||||
.amis-hoverRight-show,
|
||||
.amis-hoverRight:hover {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
// 内容翻转
|
||||
.amis-hoverFlip-show,
|
||||
.amis-hoverFlip:hover {
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
|
||||
// 闪烁
|
||||
@keyframes hoverFlash {
|
||||
from,
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
// 抖动
|
||||
@keyframes hoverShake {
|
||||
from,
|
||||
to {
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
30% {
|
||||
-webkit-transform: translate3d(-5px, 0, 0);
|
||||
transform: translate3d(-5px, 0, 0);
|
||||
}
|
||||
|
||||
60% {
|
||||
-webkit-transform: translate3d(5px, 0, 0);
|
||||
transform: translate3d(5px, 0, 0);
|
||||
}
|
||||
}
|
||||
19
packages/amis-ui/scss/base/_common.scss
Normal file
19
packages/amis-ui/scss/base/_common.scss
Normal file
@@ -0,0 +1,19 @@
|
||||
.has-popover {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.is-keyword {
|
||||
color: var(--primary-onActive);
|
||||
}
|
||||
|
||||
.visibility-sensor {
|
||||
min-height: 5px;
|
||||
}
|
||||
|
||||
.renderer-error-boundary {
|
||||
padding: 5px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-size: 14px;
|
||||
color: #cf1322;
|
||||
border: 1px dashed #cf1322;
|
||||
}
|
||||
376
packages/amis-ui/scss/base/_normalize.scss
Normal file
376
packages/amis-ui/scss/base/_normalize.scss
Normal file
@@ -0,0 +1,376 @@
|
||||
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15; // 1
|
||||
-webkit-text-size-adjust: 100%; //2
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; // 1
|
||||
height: 0; // 2
|
||||
overflow: visible; //2
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; // 1
|
||||
font-size: 1em; // 2
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; // 1
|
||||
text-decoration: underline; // 2
|
||||
text-decoration: underline dotted; // 2
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; // 1
|
||||
font-size: 1em; // 2
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit; // 1
|
||||
font-size: 100%; // 1
|
||||
line-height: 1.15; // 1
|
||||
margin: 0; // 2
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible; // 1
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none; // 1
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
[type='button'],
|
||||
[type='reset'],
|
||||
[type='submit'] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type='button']::-moz-focus-inner,
|
||||
[type='reset']::-moz-focus-inner,
|
||||
[type='submit']::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type='button']:-moz-focusring,
|
||||
[type='reset']:-moz-focusring,
|
||||
[type='submit']:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; // 1
|
||||
color: inherit; // 2
|
||||
display: table; // 1
|
||||
max-width: 100%; // 1
|
||||
padding: 0; // 3
|
||||
white-space: normal; // 1
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type='checkbox'],
|
||||
[type='radio'] {
|
||||
box-sizing: border-box; // 1
|
||||
padding: 0; // 2
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type='number']::-webkit-inner-spin-button,
|
||||
[type='number']::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type='search'] {
|
||||
-webkit-appearance: textfield; // 1
|
||||
outline-offset: -2px; // 2
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type='search']::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; // 1
|
||||
font: inherit; // 2
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/** Browser Compatibility
|
||||
========================================================================== */
|
||||
|
||||
/* 兼容Safari浏览器input disbaled状态下文字颜色不显示 */
|
||||
input[disabled],
|
||||
input:disabled,
|
||||
input.disabled,
|
||||
input.is-disabled {
|
||||
-webkit-text-fill-color: var(--text--muted-color);
|
||||
}
|
||||
|
||||
svg.icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
fill: currentColor;
|
||||
position: relative;
|
||||
top: 0.125em;
|
||||
}
|
||||
|
||||
svg.icon-object {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
svg.r90 {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
svg.icon-success {
|
||||
color: $success;
|
||||
}
|
||||
|
||||
svg.icon-fail {
|
||||
color: $danger;
|
||||
}
|
||||
18
packages/amis-ui/scss/base/_reset.scss
Normal file
18
packages/amis-ui/scss/base/_reset.scss
Normal file
@@ -0,0 +1,18 @@
|
||||
/* Reset
|
||||
=============== */
|
||||
|
||||
// Reset box sizing to border box
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
// Remove figure margin
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
79
packages/amis-ui/scss/base/_typography.scss
Normal file
79
packages/amis-ui/scss/base/_typography.scss
Normal file
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Basic typography style for copy text
|
||||
*/
|
||||
html {
|
||||
font-size: $remFactor;
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--body-color);
|
||||
background: var(--body-bg);
|
||||
font-size: var(--body-size);
|
||||
font-weight: var(--body-weight);
|
||||
font-family: var(--fontFamilyBase);
|
||||
line-height: var(--body-lineHeight);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link-color);
|
||||
font-size: var(--link-fontSize);
|
||||
font-weight: var(--link-fontWeight);
|
||||
text-decoration: var(--link-decoration);
|
||||
font-style: var(--link-font-style);
|
||||
background-color: var(--link-bg-color);
|
||||
|
||||
&:hover {
|
||||
color: var(--link-onHover-color);
|
||||
font-size: var(--link-onHover-fontSize);
|
||||
font-weight: var(--link-onHover-fontWeight);
|
||||
text-decoration: var(--link-onHover-decoration);
|
||||
font-style: var(--link-onHover-font-style);
|
||||
background-color: var(--link-onHover-bg-color);
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: var(--link-onClick-color);
|
||||
font-size: var(--link-onClick-fontSize);
|
||||
font-weight: var(--link-onClick-fontWeight);
|
||||
text-decoration: var(--link-onClick-text-decoration);
|
||||
font-style: var(--link-onClick-font-style);
|
||||
background-color: var(--link-onClick-bg-color);
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: var(--fontWeightNormal);
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: var(--fontWeightNormal);
|
||||
color: var(--text--loud-color);
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.is-matched {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: var(--fontFamilyMonospace);
|
||||
}
|
||||
|
||||
// js sdk 中的有用到
|
||||
.amis-routes-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.amis-animation-placeholder {
|
||||
opacity: 0;
|
||||
}
|
||||
123
packages/amis-ui/scss/components/_alert.scss
Normal file
123
packages/amis-ui/scss/components/_alert.scss
Normal file
@@ -0,0 +1,123 @@
|
||||
.#{$ns}Alert {
|
||||
font-size: var(--Alert-fontSize);
|
||||
font-weight: var(--alert-base-fontWeight);
|
||||
box-shadow: var(--Alert-boxShadow);
|
||||
padding: var(--alert-base-paddingTop) var(--alert-base-paddingRight)
|
||||
var(--alert-base-paddingBottom) var(--alert-base-paddingLeft);
|
||||
border: var(--Alert-borderWidth) solid var(--Alert-borderColor);
|
||||
border-radius: var(--Alert-borderRadius);
|
||||
margin: var(--alert-base-marginTop) var(--alert-base-marginRight)
|
||||
var(--Alert-marginBottom) var(--alert-base-marginLeft);
|
||||
position: relative;
|
||||
color: var(--Alert-fontColor);
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
||||
&-has-title {
|
||||
padding: var(--alert-base-title-paddingTop)
|
||||
var(--alert-base-title-paddingRight) var(--alert-base-title-paddingBottom)
|
||||
var(--alert-base-title-paddingLeft);
|
||||
|
||||
.#{$ns}Alert-content {
|
||||
.#{$ns}Alert-title {
|
||||
line-height: #{px2rem(22px)};
|
||||
}
|
||||
|
||||
.#{$ns}Alert-desc {
|
||||
line-height: #{px2rem(20px)};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-icon {
|
||||
margin-right: var(--alert-icon-margin-right);
|
||||
font-size: var(--alert-icon-size);
|
||||
}
|
||||
|
||||
&-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
.#{$ns}Alert-title {
|
||||
color: var(--alert-base-title-color);
|
||||
font-size: var(--alert-base-title-fontSize);
|
||||
font-weight: var(--alert-base-title-fontWeight);
|
||||
line-height: #{px2rem(24px)};
|
||||
margin-bottom: var(--alert-base-title-margin-bottom);
|
||||
}
|
||||
|
||||
.#{$ns}Alert-desc {
|
||||
min-height: #{px2rem(24px)};
|
||||
line-height: #{px2rem(24px)};
|
||||
}
|
||||
}
|
||||
|
||||
&-actions {
|
||||
margin-right: var(--Alert-actions-marginRight);
|
||||
}
|
||||
|
||||
&-close {
|
||||
outline: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
filter: alpha(opacity=20);
|
||||
opacity: 0.2;
|
||||
margin-left: #{px2rem(8px)};
|
||||
line-height: #{px2rem(24px)};
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
filter: alpha(opacity=50);
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
&--danger {
|
||||
color: var(--Alert--danger-color);
|
||||
background: var(--Alert--danger-bg);
|
||||
border-color: var(--Alert--danger-borderColor);
|
||||
|
||||
.#{$ns}Alert-icon .icon-alert-danger path {
|
||||
fill: var(--alert-level-danger-icon-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--info {
|
||||
color: var(--Alert--info-color);
|
||||
background: var(--Alert--info-bg);
|
||||
border-color: var(--Alert--info-borderColor);
|
||||
|
||||
.#{$ns}Alert-icon .icon-alert-info path {
|
||||
fill: var(--alert-level-info-icon-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--success {
|
||||
color: var(--Alert--success-color);
|
||||
background: var(--Alert--success-bg);
|
||||
border-color: var(--Alert--success-borderColor);
|
||||
|
||||
.#{$ns}Alert-icon .icon-alert-success path {
|
||||
fill: var(--alert-level-success-icon-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--warning {
|
||||
color: var(--Alert--warning-color);
|
||||
background: var(--Alert--warning-bg);
|
||||
border-color: var(--Alert--warning-borderColor);
|
||||
|
||||
.#{$ns}Alert-icon .icon-alert-warning path {
|
||||
fill: var(--alert-level-warning-icon-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
158
packages/amis-ui/scss/components/_anchor-nav.scss
Normal file
158
packages/amis-ui/scss/components/_anchor-nav.scss
Normal file
@@ -0,0 +1,158 @@
|
||||
.#{$ns}AnchorNav {
|
||||
display: flex;
|
||||
min-height: px2rem(400px);
|
||||
|
||||
&--vertical {
|
||||
.#{$ns}AnchorNav-link-wrap {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: var(--Tabs--vertical-width);
|
||||
border-left: var(--AnchorNav-links-container-borderRight);
|
||||
padding-bottom: px2rem(20px);
|
||||
position: sticky;
|
||||
top: var(--affix-offset-top);
|
||||
height: fit-content;
|
||||
max-height: 100%;
|
||||
overflow-y: scroll;
|
||||
|
||||
> .#{$ns}AnchorNav-link {
|
||||
position: relative;
|
||||
display: block;
|
||||
|
||||
&.#{$ns}AnchorNav-link-child {
|
||||
margin-left: px2rem(16px);
|
||||
}
|
||||
|
||||
> a {
|
||||
display: block;
|
||||
border: var(--Tabs-borderWidth) solid transparent;
|
||||
border-width: var(--AnchorNav-onActive-borderWidth);
|
||||
color: var(--Tabs-color);
|
||||
padding: 0 var(--gap-sm);
|
||||
padding-left: px2rem(10px);
|
||||
font-size: var(--fontSizeSm);
|
||||
outline: none;
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
margin-left: px2rem(-2px);
|
||||
height: px2rem(32px);
|
||||
line-height: px2rem(32px);
|
||||
@include truncate();
|
||||
max-width: var(--Tabs--vertical-width);
|
||||
|
||||
&:hover {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: #144bcc;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
> a {
|
||||
color: var(--primary);
|
||||
border-color: var(--primary);
|
||||
}
|
||||
> a:hover {
|
||||
color: #528eff;
|
||||
border-color: #528eff;
|
||||
}
|
||||
> a:active {
|
||||
color: #144bcc;
|
||||
border-color: #144bcc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--horizontal {
|
||||
flex-direction: column;
|
||||
.#{$ns}AnchorNav-link-wrap {
|
||||
user-select: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border-bottom: var(--Tabs-borderWidth) solid var(--Tabs-borderColor);
|
||||
list-style: none;
|
||||
position: sticky;
|
||||
top: var(--affix-offset-top);
|
||||
z-index: 1;
|
||||
background-color: var(--background);
|
||||
|
||||
> .#{$ns}AnchorNav-link {
|
||||
margin-bottom: calc(var(--Tabs-borderWidth) * -1);
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
|
||||
> a {
|
||||
@include truncate();
|
||||
max-width: var(--Tabs--vertical-width);
|
||||
}
|
||||
|
||||
> a:first-child {
|
||||
font-size: var(--Tabs-linkFontSize);
|
||||
outline: 0;
|
||||
border: var(--Tabs-borderWidth) solid transparent;
|
||||
border-width: 0 0 2px 0;
|
||||
border-top-left-radius: var(--Tabs-borderRadius);
|
||||
border-top-right-radius: var(--Tabs-borderRadius);
|
||||
color: var(--Tabs-color);
|
||||
margin: var(--Tabs-linkMargin);
|
||||
padding: var(--Tabs-linkPadding);
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: var(--primary);
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
> a {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
> a:first-child,
|
||||
> a:first-child:hover,
|
||||
> a:first-child:focus {
|
||||
font-size: var(--Tabs-linkFontSize);
|
||||
border-width: 0 0 2px 0;
|
||||
border-color: var(--Tabs--line-onHover-borderColor);
|
||||
color: var(--primary);
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}AnchorNav-section-wrap {
|
||||
> .#{$ns}AnchorNav-section {
|
||||
scroll-margin: calc(var(--affix-offset-top) + 50px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-section-wrap {
|
||||
border: none;
|
||||
flex-grow: 1;
|
||||
overflow: auto;
|
||||
scroll-behavior: smooth;
|
||||
background: var(--Tabs-content-bg);
|
||||
position: relative;
|
||||
|
||||
> .#{$ns}AnchorNav-section {
|
||||
display: block;
|
||||
padding: var(--gap-base);
|
||||
scroll-margin: var(--affix-offset-top);
|
||||
}
|
||||
}
|
||||
}
|
||||
46
packages/amis-ui/scss/components/_app.scss
Normal file
46
packages/amis-ui/scss/components/_app.scss
Normal file
@@ -0,0 +1,46 @@
|
||||
.#{$ns}AppBcn {
|
||||
height: px2rem(30px);
|
||||
line-height: px2rem(30px);
|
||||
font-size: px2rem(12px);
|
||||
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 0 0 var(--gap-md);
|
||||
border-bottom: var(--borderWidth) solid var(--borderColor);
|
||||
|
||||
a {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
&-item {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
&-item + &-item:before {
|
||||
padding: 0 5px;
|
||||
color: #ccc;
|
||||
content: '/\00a0';
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}AppFoldBtn {
|
||||
@include icon-color();
|
||||
padding: px2rem(10px);
|
||||
margin-left: px2rem(-10px);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.#{$ns}AppLogo-html {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.#{$ns}AppContent {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.#{$ns}AppBody {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
107
packages/amis-ui/scss/components/_array-input.scss
Normal file
107
packages/amis-ui/scss/components/_array-input.scss
Normal file
@@ -0,0 +1,107 @@
|
||||
.#{$ns}ArrayInput {
|
||||
&-placeholder {
|
||||
color: var(--text--muted-color);
|
||||
padding-top: var(--Form-label-paddingTop);
|
||||
}
|
||||
|
||||
&-addBtn {
|
||||
> svg {
|
||||
width: var(--Combo-addBtn-fontSize);
|
||||
height: var(--Combo-addBtn-fontSize);
|
||||
}
|
||||
|
||||
font-size: var(--Combo-addBtn-fontSize);
|
||||
|
||||
@include button-size(
|
||||
var(--Combo-addBtn-fontSize),
|
||||
var(--Combo-addBtn-fontWeight),
|
||||
var(--Combo-addBtn-lineHeight),
|
||||
var(--Combo-addBtn-borderRadius),
|
||||
var(--Combo-addBtn-borderRadius),
|
||||
var(--Combo-addBtn-borderRadius),
|
||||
var(--Combo-addBtn-borderRadius),
|
||||
var(--Combo-addBtn-height),
|
||||
var(--Combo-addBtn-paddingY),
|
||||
var(--Combo-addBtn-paddingY),
|
||||
var(--Combo-addBtn-paddingX),
|
||||
var(--Combo-addBtn-paddingX)
|
||||
);
|
||||
|
||||
@include button-variant(
|
||||
var(--Combo-addBtn-bg),
|
||||
var(--Combo-addBtn-border),
|
||||
var(--Combo-addBtn-color),
|
||||
var(--combo-multi-addBtn-hover-bg-color),
|
||||
var(--Combo-addBtn-onHover-border),
|
||||
var(--Combo-addBtn-onHover-color),
|
||||
var(--Combo-addBtn-onActive-bg),
|
||||
var(--Combo-addBtn-onActive-border),
|
||||
var(--Combo-addBtn-onActive-color)
|
||||
);
|
||||
|
||||
&.is-disabled {
|
||||
pointer-events: none;
|
||||
opacity: var(--Button-onDisabled-opacity);
|
||||
}
|
||||
}
|
||||
|
||||
&-toolbar {
|
||||
margin-top: var(--gap-sm);
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
|
||||
&--dnd {
|
||||
padding-left: 29px;
|
||||
}
|
||||
}
|
||||
|
||||
&-sortTip {
|
||||
color: var(--text--muted-color);
|
||||
}
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
margin-bottom: var(--gap-xs);
|
||||
|
||||
> div {
|
||||
flex-grow: 1;
|
||||
width: 0;
|
||||
min-width: 120px;
|
||||
margin-right: var(--gap-xs);
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-left: var(--gap-xs);
|
||||
}
|
||||
}
|
||||
|
||||
&--dragging {
|
||||
position: relative;
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
&-itemRemove,
|
||||
&-itemDrager {
|
||||
margin: 0;
|
||||
flex-grow: unset;
|
||||
display: inline-block;
|
||||
padding: var(--Form-label-paddingTop) var(--gap-xs);
|
||||
cursor: pointer;
|
||||
|
||||
> svg {
|
||||
color: var(--icon-color);
|
||||
}
|
||||
|
||||
&:hover > svg {
|
||||
color: var(--icon-onHover-color);
|
||||
}
|
||||
}
|
||||
|
||||
&-itemDrager {
|
||||
cursor: move;
|
||||
}
|
||||
}
|
||||
146
packages/amis-ui/scss/components/_audio.scss
Normal file
146
packages/amis-ui/scss/components/_audio.scss
Normal file
@@ -0,0 +1,146 @@
|
||||
@mixin input-range {
|
||||
-webkit-appearance: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: none;
|
||||
|
||||
&::-webkit-slider-runnable-track {
|
||||
background: var(--Audio-track-bg);
|
||||
height: var(--Audio-track-height);
|
||||
border-radius: var(--Audio-track-borderRadius);
|
||||
border: var(--Audio-track-border);
|
||||
}
|
||||
|
||||
&::-webkit-slider-thumb {
|
||||
-webkit-appearance: none !important;
|
||||
border-radius: 100%;
|
||||
cursor: pointer;
|
||||
background: var(--Audio-thumb-bg);
|
||||
width: var(--Audio-thumb-width);
|
||||
height: var(--Audio-thumb-height);
|
||||
margin-top: var(--Audio-thumb-marginTop);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin svg {
|
||||
width: var(--Audio-svg-width);
|
||||
height: var(--Audio-svg-height);
|
||||
position: relative;
|
||||
top: var(--Audio-svg-top);
|
||||
}
|
||||
|
||||
.#{$ns}Audio-original {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.#{$ns}Audio--inline {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.#{$ns}Audio {
|
||||
box-sizing: border-box;
|
||||
height: var(--Audio-height);
|
||||
line-height: var(--Audio-lineHeight);
|
||||
border: var(--Audio-border);
|
||||
padding-left: var(--Audio-item-margin);
|
||||
overflow: hidden;
|
||||
|
||||
&-controls {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&-rates {
|
||||
width: var(--Audio-rate-width);
|
||||
height: var(--Audio-rate-height);
|
||||
text-align: center;
|
||||
background: var(--Audio-rate-bg);
|
||||
cursor: pointer;
|
||||
margin-right: var(--Audio-item-margin);
|
||||
}
|
||||
|
||||
&-rateControl {
|
||||
margin-right: var(--Audio-item-margin);
|
||||
|
||||
&::after {
|
||||
clear: both;
|
||||
content: '';
|
||||
}
|
||||
|
||||
.#{$ns}Audio-rateControlItem {
|
||||
width: var(--Audio-rate-width);
|
||||
height: var(--Audio-rate-height);
|
||||
background: var(--Audio-rate-bg);
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
border-right: var(--Audio-rateControlItem-borderRight);
|
||||
}
|
||||
}
|
||||
|
||||
&-play {
|
||||
width: var(--Audio-play-width);
|
||||
cursor: pointer;
|
||||
margin-right: var(--Audio-item-margin);
|
||||
|
||||
svg {
|
||||
@include svg();
|
||||
}
|
||||
}
|
||||
|
||||
&-times {
|
||||
min-width: var(--Audio-times-width);
|
||||
margin-right: var(--Audio-item-margin);
|
||||
cursor: default;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&-process {
|
||||
flex: auto;
|
||||
cursor: pointer;
|
||||
min-width: var(--Audio-process-minWidth);
|
||||
margin-right: var(--Audio-item-margin);
|
||||
|
||||
input[type='range'] {
|
||||
@include input-range();
|
||||
}
|
||||
}
|
||||
|
||||
&-volume {
|
||||
width: var(--Audio-volume-width);
|
||||
height: var(--Audio-volume-height);
|
||||
line-height: var(--Audio-volume-lineHeight);
|
||||
cursor: pointer;
|
||||
margin-right: var(--Audio-item-margin);
|
||||
|
||||
svg {
|
||||
@include svg();
|
||||
}
|
||||
}
|
||||
|
||||
&-volumeControl {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
min-width: var(--Audio-volumeControl-width);
|
||||
height: var(--Audio-volume-height);
|
||||
line-height: var(--Audio-volume-lineHeight);
|
||||
margin-right: var(--Audio-item-margin);
|
||||
|
||||
input[type='range'] {
|
||||
@include input-range();
|
||||
}
|
||||
|
||||
.#{$ns}Audio-volumeControlIcon {
|
||||
margin-right: var(--Audio-item-margin);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
svg {
|
||||
@include svg();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
packages/amis-ui/scss/components/_auto-folder.scss
Normal file
40
packages/amis-ui/scss/components/_auto-folder.scss
Normal file
@@ -0,0 +1,40 @@
|
||||
.#{$ns}AutoFoldedList {
|
||||
white-space: nowrap !important;
|
||||
flex-wrap: nowrap !important;
|
||||
|
||||
&-more {
|
||||
display: inline-block;
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
> span {
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
line-height: calc(
|
||||
var(--Form-input-lineHeight) * var(--Form-input-fontSize) - #{px2rem(
|
||||
2px
|
||||
)}
|
||||
);
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: var(--Form-selectValue-fontSize);
|
||||
font-weight: var(--select-multiple-fontWeight);
|
||||
color: var(--select-multiple-color);
|
||||
background: var(--Form-select-value-bgColor);
|
||||
border: px2rem(1px) solid var(--Form-select-value-borderColor);
|
||||
border-radius: var(--select-multiple-top-left-border-radius)
|
||||
var(--select-multiple-top-right-border-radius)
|
||||
var(--select-multiple-bottom-right-border-radius)
|
||||
var(--select-multiple-bottom-left-border-radius);
|
||||
padding: var(--select-multiple-paddingTop)
|
||||
var(--select-multiple-paddingRight) var(--select-multiple-paddingBottom)
|
||||
var(--select-multiple-paddingLeft);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--Form-selectValue-onHover-bgColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
55
packages/amis-ui/scss/components/_avatar.scss
Normal file
55
packages/amis-ui/scss/components/_avatar.scss
Normal file
@@ -0,0 +1,55 @@
|
||||
@mixin avatar-size($size, $fontSize) {
|
||||
width: $size;
|
||||
height: $size;
|
||||
line-height: $size;
|
||||
|
||||
i {
|
||||
font-size: $fontSize;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Avatar {
|
||||
background: var(--Avatar-bg);
|
||||
@include avatar-size(var(--Avatar-size-default), var(--Avatar-icon-size-default));
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
|
||||
&--lg {
|
||||
@include avatar-size(var(--Avatar-size-large), var(--Avatar-icon-size-large));
|
||||
}
|
||||
|
||||
&--sm {
|
||||
@include avatar-size(var(--Avatar-size-small), var(--Avatar-icon-size-small));
|
||||
}
|
||||
|
||||
&--text {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform-origin: 0 center;
|
||||
}
|
||||
|
||||
&--square {
|
||||
border-radius: 0%;
|
||||
}
|
||||
|
||||
&--rounded {
|
||||
border-radius: 10%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
||||
img,
|
||||
i {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
145
packages/amis-ui/scss/components/_badge.scss
Normal file
145
packages/amis-ui/scss/components/_badge.scss
Normal file
@@ -0,0 +1,145 @@
|
||||
.#{$ns}Badge {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
|
||||
&-text,
|
||||
&-dot,
|
||||
&-ribbon {
|
||||
background: var(--danger);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transform: translate(50%, -50%);
|
||||
transform-origin: 100% 0;
|
||||
z-index: auto;
|
||||
border-radius: calc(var(--Badge-size) / 2);
|
||||
}
|
||||
|
||||
&--top-left {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: auto;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
&--bottom-left {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: auto;
|
||||
transform: translate(-50%, 50%);
|
||||
}
|
||||
|
||||
&--bottom-right {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
left: auto;
|
||||
right: 0;
|
||||
transform: translate(50%, 50%);
|
||||
}
|
||||
|
||||
&--danger {
|
||||
background: var(--Badge--danger-bg);
|
||||
}
|
||||
|
||||
&--info {
|
||||
background: var(--Badge--info-bg);
|
||||
}
|
||||
|
||||
&--success {
|
||||
background: var(--Badge--success-bg);
|
||||
}
|
||||
|
||||
&--warning {
|
||||
background: var(--Badge--warning-bg);
|
||||
}
|
||||
// 显示文字
|
||||
&-text {
|
||||
color: var(--Badge-color);
|
||||
height: var(--Badge-size);
|
||||
line-height: var(--Badge-size);
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
padding: 0 6px;
|
||||
border: 1px solid #ffffff;
|
||||
}
|
||||
|
||||
// 只显示小红点
|
||||
&-dot {
|
||||
z-index: auto;
|
||||
width: var(--Badge-size);
|
||||
height: var(--Badge-size);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
// 横幅
|
||||
&-ribbon-out {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
&-ribbon {
|
||||
color: var(--Badge-color);
|
||||
height: var(--Badge-size);
|
||||
line-height: var(--Badge-size);
|
||||
transform: translateX(calc(50% - 5px)) rotate(45deg) scale(0.7);
|
||||
transform-origin: 50% 0;
|
||||
border-radius: 0;
|
||||
text-align: center;
|
||||
width: px2rem(1000px);
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
&-ribbon-out--top-left,
|
||||
&-ribbon-out--top-right {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&-ribbon-out--top-left,
|
||||
&-ribbon-out--bottom-left {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
&-ribbon--top-left {
|
||||
transform: translateX(calc(-50% + 5px)) rotate(-45deg) scale(0.7);
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
&-ribbon--bottom-left,
|
||||
&-ribbon-out--bottom--left {
|
||||
transform: translateX(calc(-50% + 5px)) rotate(45deg) scale(0.7);
|
||||
transform-origin: 50% 100%;
|
||||
left: 0;
|
||||
right: auto;
|
||||
bottom: 5px;
|
||||
top: auto;
|
||||
}
|
||||
|
||||
&-ribbon--bottom-right,
|
||||
&-ribbon-out--bottom--right {
|
||||
transform: translateX(calc(50% - 5px)) rotate(-45deg) scale(0.7);
|
||||
transform-origin: 50% 100%;
|
||||
left: auto;
|
||||
right: 0;
|
||||
bottom: 5px;
|
||||
top: auto;
|
||||
}
|
||||
|
||||
// 小红点的动画
|
||||
@keyframes badgeDotAnimation {
|
||||
0% {
|
||||
transform: scale(0.8);
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: scale(3.2);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
6
packages/amis-ui/scss/components/_barcode.scss
Normal file
6
packages/amis-ui/scss/components/_barcode.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
.#{$ns}BarCode {
|
||||
> img {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
110
packages/amis-ui/scss/components/_breadcrumb.scss
Normal file
110
packages/amis-ui/scss/components/_breadcrumb.scss
Normal file
@@ -0,0 +1,110 @@
|
||||
.#{$ns}Breadcrumb {
|
||||
font-size: var(--Breadcrumb-item-fontSize);
|
||||
font-weight: var(--fontWeightBase);
|
||||
color: var(--Breadcrumb-item-default-color);
|
||||
|
||||
&-icon {
|
||||
margin-right: px2rem(2px);
|
||||
min-width: var(--gap-xs);
|
||||
}
|
||||
|
||||
&-item {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
&-default {
|
||||
cursor: pointer;
|
||||
color: var(--Breadcrumb-item-default-color);
|
||||
|
||||
&:hover {
|
||||
color: var(--Breadcrumb-item-hover-color);
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: var(--Breadcrumb-item-active-color);
|
||||
}
|
||||
}
|
||||
&-dropdown {
|
||||
cursor: pointer;
|
||||
color: var(--BreadcrumbDropdown-item-default-color);
|
||||
}
|
||||
a:hover {
|
||||
color: var(--Breadcrumb-item-hover-color);
|
||||
}
|
||||
a:active {
|
||||
color: var(--Breadcrumb-item-active-color);
|
||||
}
|
||||
|
||||
&-last &-default {
|
||||
font-weight: var(--fontWeightMd);
|
||||
color: var(--Breadcrumb-item-last-color);
|
||||
}
|
||||
|
||||
&-caret {
|
||||
height: 16px;
|
||||
margin: 0 2px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
transition: transform var(--animation-duration) ease;
|
||||
> svg {
|
||||
width: px2rem(10px);
|
||||
height: px2rem(10px);
|
||||
top: px2rem(-2px);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-opened &-caret {
|
||||
transform: translateY(px2rem(2px)) rotate(180deg);
|
||||
color: var(--Breadcrumb-item-hover-color);
|
||||
}
|
||||
|
||||
&.is-opened &-default {
|
||||
color: var(--Breadcrumb-item-hover-color);
|
||||
}
|
||||
}
|
||||
|
||||
&-separator {
|
||||
user-select: none;
|
||||
margin: 0 var(--gap-sm);
|
||||
text-align: center;
|
||||
min-width: var(--gap-xs);
|
||||
}
|
||||
|
||||
&-dropdown {
|
||||
position: absolute;
|
||||
z-index: $zindex-dropdown;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
margin: px2rem(1px) 0;
|
||||
background: var(--DropDown-menu-bg);
|
||||
list-style: none;
|
||||
padding: var(--DropDown-menu-paddingY) var(--DropDown-menu-paddingX);
|
||||
border: var(--DropDown-menu-borderWidth) solid
|
||||
var(--DropDown-menu-borderColor);
|
||||
border-radius: var(--DropDown-menu-borderRadius);
|
||||
box-shadow: var(--DropDown-menu-boxShadow);
|
||||
min-width: 100%;
|
||||
text-align: left;
|
||||
font-size: var(--BreadcrumbDropdown-item-fontSize);
|
||||
}
|
||||
|
||||
&-dropdown > li {
|
||||
padding: var(--BreadcrumbDropdown-item-paddingX)
|
||||
var(--BreadcrumbDropdown-item-paddingY);
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
padding-left: px2rem(12px);
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
color: var(--BreadcrumbDropdown-item-default-color);
|
||||
background-color: var(--BreadcrumbDropdown-item-default-bg);
|
||||
|
||||
&:hover {
|
||||
background: var(--BreadcrumbDropdown-item-hover-bg);
|
||||
a {
|
||||
color: var(--Breadcrumb-item-hover-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
165
packages/amis-ui/scss/components/_button-group.scss
Normal file
165
packages/amis-ui/scss/components/_button-group.scss
Normal file
@@ -0,0 +1,165 @@
|
||||
.#{$ns}ButtonGroup {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
flex-wrap: wrap;
|
||||
|
||||
> .#{$ns}Button {
|
||||
position: relative;
|
||||
flex: 0 1 auto;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
> .#{$ns}Button,
|
||||
.#{$ns}Badge {
|
||||
@include hover {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active,
|
||||
&.is-active {
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Badge {
|
||||
.#{$ns}Badge-text,
|
||||
.#{$ns}Badge-dot,
|
||||
.#{$ns}Badge-ribbon,
|
||||
.#{$ns}Badge-dot {
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Button + .#{$ns}Button,
|
||||
.#{$ns}Button + .#{$ns}ButtonGroup,
|
||||
.#{$ns}Button + .#{$ns}Badge,
|
||||
.#{$ns}ButtonGroup + .#{$ns}Button,
|
||||
.#{$ns}ButtonGroup + .#{$ns}ButtonGroup,
|
||||
.#{$ns}Badge + .#{$ns}Badge,
|
||||
.#{$ns}Badge + .#{$ns}Button {
|
||||
margin-left: calc(var(--ButtonGroup-borderWidth) * -1);
|
||||
}
|
||||
|
||||
&--block {
|
||||
display: block;
|
||||
}
|
||||
&-button--active {
|
||||
z-index: 1;
|
||||
|
||||
&.is-disabled {
|
||||
color: var(--text-color);
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ButtonToolbar {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
|
||||
.#{$ns}ButtonGroup {
|
||||
margin-left: var(--gap-xs);
|
||||
margin-top: var(--gap-xs);
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ButtonGroup {
|
||||
> .#{$ns}Button:first-child,
|
||||
> .#{$ns}Badge .#{$ns}Button {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
// cxd的ButtonGroup的is-active和:active样式不一样,这里做个兼容
|
||||
.#{$ns}Button--primary.is-active {
|
||||
color: var(--ButtonGroup--primary-isActive-color);
|
||||
background: var(--ButtonGroup--primary-isActive-bg);
|
||||
}
|
||||
|
||||
> .#{$ns}Button:not(:last-child),
|
||||
> .#{$ns}ButtonGroup:not(:last-child) > .#{$ns}Button,
|
||||
> .#{$ns}Badge:not(:last-child) > .#{$ns}Button {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
> .#{$ns}Button:not(:first-child),
|
||||
> .#{$ns}ButtonGroup:not(:first-child) > .#{$ns}Button,
|
||||
> .#{$ns}Badge:not(:first-child) > .#{$ns}Button {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
> .#{$ns}ButtonGroup:last-child > .#{$ns}Button:not(:last-child) {
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ButtonGroup--vertical {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
|
||||
.#{$ns}Button,
|
||||
.#{$ns}ButtonGroup {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
> .#{$ns}Button + .#{$ns}Button,
|
||||
> .#{$ns}Button + .#{$ns}ButtonGroup,
|
||||
> .#{$ns}Button + .#{$ns}Badge,
|
||||
> .#{$ns}ButtonGroup + .#{$ns}Button,
|
||||
> .#{$ns}ButtonGroup + .#{$ns}ButtonGroup,
|
||||
> .#{$ns}Badge + .#{$ns}Badge,
|
||||
> .#{$ns}Badge + .#{$ns}Button {
|
||||
margin-top: calc(var(--ButtonGroup-borderWidth) * -1);
|
||||
margin-left: 0;
|
||||
}
|
||||
> .#{$ns}Button:not(:last-child),
|
||||
> .#{$ns}ButtonGroup:not(:last-child) > .#{$ns}Button,
|
||||
> .#{$ns}Badge:not(:last-child) > .#{$ns}Button {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
> .#{$ns}Button:not(:first-child),
|
||||
> .#{$ns}ButtonGroup:not(:first-child) > .btn,
|
||||
> .#{$ns}Badge:not(:first-child) > .btn {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
/* 修正头尾的圆角 */
|
||||
> .#{$ns}Button:first-child,
|
||||
> .#{$ns}ButtonGroup:first-child > .#{$ns}Button:first-child,
|
||||
> .#{$ns}Badge:first-child > .#{$ns}Button:first-child {
|
||||
border-top-right-radius: var(--borders-radius-3);
|
||||
}
|
||||
|
||||
> .#{$ns}Button:last-child,
|
||||
> .#{$ns}ButtonGroup:last-child > .#{$ns}Button:last-child,
|
||||
> .#{$ns}Badge:last-child > .#{$ns}Button:last-child {
|
||||
border-bottom-left-radius: var(--borders-radius-3);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ButtonGroup--tiled {
|
||||
display: flex;
|
||||
|
||||
.#{$ns}Button,
|
||||
.#{$ns}ButtonGroup,
|
||||
.#{$ns}Badge {
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
.#{$ns}Button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
870
packages/amis-ui/scss/components/_button.scss
Normal file
870
packages/amis-ui/scss/components/_button.scss
Normal file
@@ -0,0 +1,870 @@
|
||||
.#{$ns}Button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
background: transparent;
|
||||
transition: var(--Button-transition);
|
||||
white-space: nowrap;
|
||||
min-width: auto;
|
||||
|
||||
> svg.icon {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&--primary {
|
||||
@include button-variant(
|
||||
var(--button-primary-default-bg-color),
|
||||
var(--button-primary-default-font-color),
|
||||
var(--button-primary-default-top-border-color),
|
||||
var(--button-primary-default-right-border-color),
|
||||
var(--button-primary-default-bottom-border-color),
|
||||
var(--button-primary-default-left-border-color),
|
||||
var(--button-primary-default-top-border-width),
|
||||
var(--button-primary-default-right-border-width),
|
||||
var(--button-primary-default-bottom-border-width),
|
||||
var(--button-primary-default-left-border-width),
|
||||
var(--button-primary-default-top-border-style),
|
||||
var(--button-primary-default-right-border-style),
|
||||
var(--button-primary-default-bottom-border-style),
|
||||
var(--button-primary-default-left-border-style),
|
||||
var(--button-primary-default-shadow),
|
||||
var(--button-primary-hover-bg-color),
|
||||
var(--button-primary-hover-font-color),
|
||||
var(--button-primary-hover-top-border-color),
|
||||
var(--button-primary-hover-right-border-color),
|
||||
var(--button-primary-hover-bottom-border-color),
|
||||
var(--button-primary-hover-left-border-color),
|
||||
var(--button-primary-hover-top-border-width),
|
||||
var(--button-primary-hover-right-border-width),
|
||||
var(--button-primary-hover-bottom-border-width),
|
||||
var(--button-primary-hover-left-border-width),
|
||||
var(--button-primary-hover-top-border-style),
|
||||
var(--button-primary-hover-right-border-style),
|
||||
var(--button-primary-hover-bottom-border-style),
|
||||
var(--button-primary-hover-left-border-style),
|
||||
var(--button-primary-hover-shadow),
|
||||
var(--button-primary-active-bg-color),
|
||||
var(--button-primary-active-font-color),
|
||||
var(--button-primary-active-top-border-color),
|
||||
var(--button-primary-active-right-border-color),
|
||||
var(--button-primary-active-bottom-border-color),
|
||||
var(--button-primary-active-left-border-color),
|
||||
var(--button-primary-active-top-border-width),
|
||||
var(--button-primary-active-right-border-width),
|
||||
var(--button-primary-active-bottom-border-width),
|
||||
var(--button-primary-active-left-border-width),
|
||||
var(--button-primary-active-top-border-style),
|
||||
var(--button-primary-active-right-border-style),
|
||||
var(--button-primary-active-bottom-border-style),
|
||||
var(--button-primary-active-left-border-style),
|
||||
var(--button-primary-active-shadow),
|
||||
var(--button-primary-disabled-bg-color),
|
||||
var(--button-primary-disabled-font-color),
|
||||
var(--button-primary-disabled-top-border-color),
|
||||
var(--button-primary-disabled-right-border-color),
|
||||
var(--button-primary-disabled-bottom-border-color),
|
||||
var(--button-primary-disabled-left-border-color),
|
||||
var(--button-primary-disabled-top-border-width),
|
||||
var(--button-primary-disabled-right-border-width),
|
||||
var(--button-primary-disabled-bottom-border-width),
|
||||
var(--button-primary-disabled-left-border-width),
|
||||
var(--button-primary-disabled-top-border-style),
|
||||
var(--button-primary-disabled-right-border-style),
|
||||
var(--button-primary-disabled-bottom-border-style),
|
||||
var(--button-primary-disabled-left-border-style),
|
||||
var(--button-primary-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--secondary {
|
||||
@include button-variant(
|
||||
var(--button-secondary-default-bg-color),
|
||||
var(--button-secondary-default-font-color),
|
||||
var(--button-secondary-default-top-border-color),
|
||||
var(--button-secondary-default-right-border-color),
|
||||
var(--button-secondary-default-bottom-border-color),
|
||||
var(--button-secondary-default-left-border-color),
|
||||
var(--button-secondary-default-top-border-width),
|
||||
var(--button-secondary-default-right-border-width),
|
||||
var(--button-secondary-default-bottom-border-width),
|
||||
var(--button-secondary-default-left-border-width),
|
||||
var(--button-secondary-default-top-border-style),
|
||||
var(--button-secondary-default-right-border-style),
|
||||
var(--button-secondary-default-bottom-border-style),
|
||||
var(--button-secondary-default-left-border-style),
|
||||
var(--button-secondary-default-shadow),
|
||||
var(--button-secondary-hover-bg-color),
|
||||
var(--button-secondary-hover-font-color),
|
||||
var(--button-secondary-hover-top-border-color),
|
||||
var(--button-secondary-hover-right-border-color),
|
||||
var(--button-secondary-hover-bottom-border-color),
|
||||
var(--button-secondary-hover-left-border-color),
|
||||
var(--button-secondary-hover-top-border-width),
|
||||
var(--button-secondary-hover-right-border-width),
|
||||
var(--button-secondary-hover-bottom-border-width),
|
||||
var(--button-secondary-hover-left-border-width),
|
||||
var(--button-secondary-hover-top-border-style),
|
||||
var(--button-secondary-hover-right-border-style),
|
||||
var(--button-secondary-hover-bottom-border-style),
|
||||
var(--button-secondary-hover-left-border-style),
|
||||
var(--button-secondary-hover-shadow),
|
||||
var(--button-secondary-active-bg-color),
|
||||
var(--button-secondary-active-font-color),
|
||||
var(--button-secondary-active-top-border-color),
|
||||
var(--button-secondary-active-right-border-color),
|
||||
var(--button-secondary-active-bottom-border-color),
|
||||
var(--button-secondary-active-left-border-color),
|
||||
var(--button-secondary-active-top-border-width),
|
||||
var(--button-secondary-active-right-border-width),
|
||||
var(--button-secondary-active-bottom-border-width),
|
||||
var(--button-secondary-active-left-border-width),
|
||||
var(--button-secondary-active-top-border-style),
|
||||
var(--button-secondary-active-right-border-style),
|
||||
var(--button-secondary-active-bottom-border-style),
|
||||
var(--button-secondary-active-left-border-style),
|
||||
var(--button-secondary-active-shadow),
|
||||
var(--button-secondary-disabled-bg-color),
|
||||
var(--button-secondary-disabled-font-color),
|
||||
var(--button-secondary-disabled-top-border-color),
|
||||
var(--button-secondary-disabled-right-border-color),
|
||||
var(--button-secondary-disabled-bottom-border-color),
|
||||
var(--button-secondary-disabled-left-border-color),
|
||||
var(--button-secondary-disabled-top-border-width),
|
||||
var(--button-secondary-disabled-right-border-width),
|
||||
var(--button-secondary-disabled-bottom-border-width),
|
||||
var(--button-secondary-disabled-left-border-width),
|
||||
var(--button-secondary-disabled-top-border-style),
|
||||
var(--button-secondary-disabled-right-border-style),
|
||||
var(--button-secondary-disabled-bottom-border-style),
|
||||
var(--button-secondary-disabled-left-border-style),
|
||||
var(--button-secondary-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--success {
|
||||
@include button-variant(
|
||||
var(--button-success-default-bg-color),
|
||||
var(--button-success-default-font-color),
|
||||
var(--button-success-default-top-border-color),
|
||||
var(--button-success-default-right-border-color),
|
||||
var(--button-success-default-bottom-border-color),
|
||||
var(--button-success-default-left-border-color),
|
||||
var(--button-success-default-top-border-width),
|
||||
var(--button-success-default-right-border-width),
|
||||
var(--button-success-default-bottom-border-width),
|
||||
var(--button-success-default-left-border-width),
|
||||
var(--button-success-default-top-border-style),
|
||||
var(--button-success-default-right-border-style),
|
||||
var(--button-success-default-bottom-border-style),
|
||||
var(--button-success-default-left-border-style),
|
||||
var(--button-success-default-shadow),
|
||||
var(--button-success-hover-bg-color),
|
||||
var(--button-success-hover-font-color),
|
||||
var(--button-success-hover-top-border-color),
|
||||
var(--button-success-hover-right-border-color),
|
||||
var(--button-success-hover-bottom-border-color),
|
||||
var(--button-success-hover-left-border-color),
|
||||
var(--button-success-hover-top-border-width),
|
||||
var(--button-success-hover-right-border-width),
|
||||
var(--button-success-hover-bottom-border-width),
|
||||
var(--button-success-hover-left-border-width),
|
||||
var(--button-success-hover-top-border-style),
|
||||
var(--button-success-hover-right-border-style),
|
||||
var(--button-success-hover-bottom-border-style),
|
||||
var(--button-success-hover-left-border-style),
|
||||
var(--button-success-hover-shadow),
|
||||
var(--button-success-active-bg-color),
|
||||
var(--button-success-active-font-color),
|
||||
var(--button-success-active-top-border-color),
|
||||
var(--button-success-active-right-border-color),
|
||||
var(--button-success-active-bottom-border-color),
|
||||
var(--button-success-active-left-border-color),
|
||||
var(--button-success-active-top-border-width),
|
||||
var(--button-success-active-right-border-width),
|
||||
var(--button-success-active-bottom-border-width),
|
||||
var(--button-success-active-left-border-width),
|
||||
var(--button-success-active-top-border-style),
|
||||
var(--button-success-active-right-border-style),
|
||||
var(--button-success-active-bottom-border-style),
|
||||
var(--button-success-active-left-border-style),
|
||||
var(--button-success-active-shadow),
|
||||
var(--button-success-disabled-bg-color),
|
||||
var(--button-success-disabled-font-color),
|
||||
var(--button-success-disabled-top-border-color),
|
||||
var(--button-success-disabled-right-border-color),
|
||||
var(--button-success-disabled-bottom-border-color),
|
||||
var(--button-success-disabled-left-border-color),
|
||||
var(--button-success-disabled-top-border-width),
|
||||
var(--button-success-disabled-right-border-width),
|
||||
var(--button-success-disabled-bottom-border-width),
|
||||
var(--button-success-disabled-left-border-width),
|
||||
var(--button-success-disabled-top-border-style),
|
||||
var(--button-success-disabled-right-border-style),
|
||||
var(--button-success-disabled-bottom-border-style),
|
||||
var(--button-success-disabled-left-border-style),
|
||||
var(--button-success-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--enhance {
|
||||
@include button-variant(
|
||||
var(--button-enhance-default-bg-color),
|
||||
var(--button-enhance-default-font-color),
|
||||
var(--button-enhance-default-top-border-color),
|
||||
var(--button-enhance-default-right-border-color),
|
||||
var(--button-enhance-default-bottom-border-color),
|
||||
var(--button-enhance-default-left-border-color),
|
||||
var(--button-enhance-default-top-border-width),
|
||||
var(--button-enhance-default-right-border-width),
|
||||
var(--button-enhance-default-bottom-border-width),
|
||||
var(--button-enhance-default-left-border-width),
|
||||
var(--button-enhance-default-top-border-style),
|
||||
var(--button-enhance-default-right-border-style),
|
||||
var(--button-enhance-default-bottom-border-style),
|
||||
var(--button-enhance-default-left-border-style),
|
||||
var(--button-enhance-default-shadow),
|
||||
var(--button-enhance-hover-bg-color),
|
||||
var(--button-enhance-hover-font-color),
|
||||
var(--button-enhance-hover-top-border-color),
|
||||
var(--button-enhance-hover-right-border-color),
|
||||
var(--button-enhance-hover-bottom-border-color),
|
||||
var(--button-enhance-hover-left-border-color),
|
||||
var(--button-enhance-hover-top-border-width),
|
||||
var(--button-enhance-hover-right-border-width),
|
||||
var(--button-enhance-hover-bottom-border-width),
|
||||
var(--button-enhance-hover-left-border-width),
|
||||
var(--button-enhance-hover-top-border-style),
|
||||
var(--button-enhance-hover-right-border-style),
|
||||
var(--button-enhance-hover-bottom-border-style),
|
||||
var(--button-enhance-hover-left-border-style),
|
||||
var(--button-enhance-hover-shadow),
|
||||
var(--button-enhance-active-bg-color),
|
||||
var(--button-enhance-active-font-color),
|
||||
var(--button-enhance-active-top-border-color),
|
||||
var(--button-enhance-active-right-border-color),
|
||||
var(--button-enhance-active-bottom-border-color),
|
||||
var(--button-enhance-active-left-border-color),
|
||||
var(--button-enhance-active-top-border-width),
|
||||
var(--button-enhance-active-right-border-width),
|
||||
var(--button-enhance-active-bottom-border-width),
|
||||
var(--button-enhance-active-left-border-width),
|
||||
var(--button-enhance-active-top-border-style),
|
||||
var(--button-enhance-active-right-border-style),
|
||||
var(--button-enhance-active-bottom-border-style),
|
||||
var(--button-enhance-active-left-border-style),
|
||||
var(--button-enhance-active-shadow),
|
||||
var(--button-enhance-disabled-bg-color),
|
||||
var(--button-enhance-disabled-font-color),
|
||||
var(--button-enhance-disabled-top-border-color),
|
||||
var(--button-enhance-disabled-right-border-color),
|
||||
var(--button-enhance-disabled-bottom-border-color),
|
||||
var(--button-enhance-disabled-left-border-color),
|
||||
var(--button-enhance-disabled-top-border-width),
|
||||
var(--button-enhance-disabled-right-border-width),
|
||||
var(--button-enhance-disabled-bottom-border-width),
|
||||
var(--button-enhance-disabled-left-border-width),
|
||||
var(--button-enhance-disabled-top-border-style),
|
||||
var(--button-enhance-disabled-right-border-style),
|
||||
var(--button-enhance-disabled-bottom-border-style),
|
||||
var(--button-enhance-disabled-left-border-style),
|
||||
var(--button-enhance-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--info {
|
||||
@include button-variant(
|
||||
var(--button-info-default-bg-color),
|
||||
var(--button-info-default-font-color),
|
||||
var(--button-info-default-top-border-color),
|
||||
var(--button-info-default-right-border-color),
|
||||
var(--button-info-default-bottom-border-color),
|
||||
var(--button-info-default-left-border-color),
|
||||
var(--button-info-default-top-border-width),
|
||||
var(--button-info-default-right-border-width),
|
||||
var(--button-info-default-bottom-border-width),
|
||||
var(--button-info-default-left-border-width),
|
||||
var(--button-info-default-top-border-style),
|
||||
var(--button-info-default-right-border-style),
|
||||
var(--button-info-default-bottom-border-style),
|
||||
var(--button-info-default-left-border-style),
|
||||
var(--button-info-default-shadow),
|
||||
var(--button-info-hover-bg-color),
|
||||
var(--button-info-hover-font-color),
|
||||
var(--button-info-hover-top-border-color),
|
||||
var(--button-info-hover-right-border-color),
|
||||
var(--button-info-hover-bottom-border-color),
|
||||
var(--button-info-hover-left-border-color),
|
||||
var(--button-info-hover-top-border-width),
|
||||
var(--button-info-hover-right-border-width),
|
||||
var(--button-info-hover-bottom-border-width),
|
||||
var(--button-info-hover-left-border-width),
|
||||
var(--button-info-hover-top-border-style),
|
||||
var(--button-info-hover-right-border-style),
|
||||
var(--button-info-hover-bottom-border-style),
|
||||
var(--button-info-hover-left-border-style),
|
||||
var(--button-info-hover-shadow),
|
||||
var(--button-info-active-bg-color),
|
||||
var(--button-info-active-font-color),
|
||||
var(--button-info-active-top-border-color),
|
||||
var(--button-info-active-right-border-color),
|
||||
var(--button-info-active-bottom-border-color),
|
||||
var(--button-info-active-left-border-color),
|
||||
var(--button-info-active-top-border-width),
|
||||
var(--button-info-active-right-border-width),
|
||||
var(--button-info-active-bottom-border-width),
|
||||
var(--button-info-active-left-border-width),
|
||||
var(--button-info-active-top-border-style),
|
||||
var(--button-info-active-right-border-style),
|
||||
var(--button-info-active-bottom-border-style),
|
||||
var(--button-info-active-left-border-style),
|
||||
var(--button-info-active-shadow),
|
||||
var(--button-info-disabled-bg-color),
|
||||
var(--button-info-disabled-font-color),
|
||||
var(--button-info-disabled-top-border-color),
|
||||
var(--button-info-disabled-right-border-color),
|
||||
var(--button-info-disabled-bottom-border-color),
|
||||
var(--button-info-disabled-left-border-color),
|
||||
var(--button-info-disabled-top-border-width),
|
||||
var(--button-info-disabled-right-border-width),
|
||||
var(--button-info-disabled-bottom-border-width),
|
||||
var(--button-info-disabled-left-border-width),
|
||||
var(--button-info-disabled-top-border-style),
|
||||
var(--button-info-disabled-right-border-style),
|
||||
var(--button-info-disabled-bottom-border-style),
|
||||
var(--button-info-disabled-left-border-style),
|
||||
var(--button-info-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--warning {
|
||||
@include button-variant(
|
||||
var(--button-warning-default-bg-color),
|
||||
var(--button-warning-default-font-color),
|
||||
var(--button-warning-default-top-border-color),
|
||||
var(--button-warning-default-right-border-color),
|
||||
var(--button-warning-default-bottom-border-color),
|
||||
var(--button-warning-default-left-border-color),
|
||||
var(--button-warning-default-top-border-width),
|
||||
var(--button-warning-default-right-border-width),
|
||||
var(--button-warning-default-bottom-border-width),
|
||||
var(--button-warning-default-left-border-width),
|
||||
var(--button-warning-default-top-border-style),
|
||||
var(--button-warning-default-right-border-style),
|
||||
var(--button-warning-default-bottom-border-style),
|
||||
var(--button-warning-default-left-border-style),
|
||||
var(--button-warning-default-shadow),
|
||||
var(--button-warning-hover-bg-color),
|
||||
var(--button-warning-hover-font-color),
|
||||
var(--button-warning-hover-top-border-color),
|
||||
var(--button-warning-hover-right-border-color),
|
||||
var(--button-warning-hover-bottom-border-color),
|
||||
var(--button-warning-hover-left-border-color),
|
||||
var(--button-warning-hover-top-border-width),
|
||||
var(--button-warning-hover-right-border-width),
|
||||
var(--button-warning-hover-bottom-border-width),
|
||||
var(--button-warning-hover-left-border-width),
|
||||
var(--button-warning-hover-top-border-style),
|
||||
var(--button-warning-hover-right-border-style),
|
||||
var(--button-warning-hover-bottom-border-style),
|
||||
var(--button-warning-hover-left-border-style),
|
||||
var(--button-warning-hover-shadow),
|
||||
var(--button-warning-active-bg-color),
|
||||
var(--button-warning-active-font-color),
|
||||
var(--button-warning-active-top-border-color),
|
||||
var(--button-warning-active-right-border-color),
|
||||
var(--button-warning-active-bottom-border-color),
|
||||
var(--button-warning-active-left-border-color),
|
||||
var(--button-warning-active-top-border-width),
|
||||
var(--button-warning-active-right-border-width),
|
||||
var(--button-warning-active-bottom-border-width),
|
||||
var(--button-warning-active-left-border-width),
|
||||
var(--button-warning-active-top-border-style),
|
||||
var(--button-warning-active-right-border-style),
|
||||
var(--button-warning-active-bottom-border-style),
|
||||
var(--button-warning-active-left-border-style),
|
||||
var(--button-warning-active-shadow),
|
||||
var(--button-warning-disabled-bg-color),
|
||||
var(--button-warning-disabled-font-color),
|
||||
var(--button-warning-disabled-top-border-color),
|
||||
var(--button-warning-disabled-right-border-color),
|
||||
var(--button-warning-disabled-bottom-border-color),
|
||||
var(--button-warning-disabled-left-border-color),
|
||||
var(--button-warning-disabled-top-border-width),
|
||||
var(--button-warning-disabled-right-border-width),
|
||||
var(--button-warning-disabled-bottom-border-width),
|
||||
var(--button-warning-disabled-left-border-width),
|
||||
var(--button-warning-disabled-top-border-style),
|
||||
var(--button-warning-disabled-right-border-style),
|
||||
var(--button-warning-disabled-bottom-border-style),
|
||||
var(--button-warning-disabled-left-border-style),
|
||||
var(--button-warning-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--danger {
|
||||
@include button-variant(
|
||||
var(--button-danger-default-bg-color),
|
||||
var(--button-danger-default-font-color),
|
||||
var(--button-danger-default-top-border-color),
|
||||
var(--button-danger-default-right-border-color),
|
||||
var(--button-danger-default-bottom-border-color),
|
||||
var(--button-danger-default-left-border-color),
|
||||
var(--button-danger-default-top-border-width),
|
||||
var(--button-danger-default-right-border-width),
|
||||
var(--button-danger-default-bottom-border-width),
|
||||
var(--button-danger-default-left-border-width),
|
||||
var(--button-danger-default-top-border-style),
|
||||
var(--button-danger-default-right-border-style),
|
||||
var(--button-danger-default-bottom-border-style),
|
||||
var(--button-danger-default-left-border-style),
|
||||
var(--button-danger-default-shadow),
|
||||
var(--button-danger-hover-bg-color),
|
||||
var(--button-danger-hover-font-color),
|
||||
var(--button-danger-hover-top-border-color),
|
||||
var(--button-danger-hover-right-border-color),
|
||||
var(--button-danger-hover-bottom-border-color),
|
||||
var(--button-danger-hover-left-border-color),
|
||||
var(--button-danger-hover-top-border-width),
|
||||
var(--button-danger-hover-right-border-width),
|
||||
var(--button-danger-hover-bottom-border-width),
|
||||
var(--button-danger-hover-left-border-width),
|
||||
var(--button-danger-hover-top-border-style),
|
||||
var(--button-danger-hover-right-border-style),
|
||||
var(--button-danger-hover-bottom-border-style),
|
||||
var(--button-danger-hover-left-border-style),
|
||||
var(--button-danger-hover-shadow),
|
||||
var(--button-danger-active-bg-color),
|
||||
var(--button-danger-active-font-color),
|
||||
var(--button-danger-active-top-border-color),
|
||||
var(--button-danger-active-right-border-color),
|
||||
var(--button-danger-active-bottom-border-color),
|
||||
var(--button-danger-active-left-border-color),
|
||||
var(--button-danger-active-top-border-width),
|
||||
var(--button-danger-active-right-border-width),
|
||||
var(--button-danger-active-bottom-border-width),
|
||||
var(--button-danger-active-left-border-width),
|
||||
var(--button-danger-active-top-border-style),
|
||||
var(--button-danger-active-right-border-style),
|
||||
var(--button-danger-active-bottom-border-style),
|
||||
var(--button-danger-active-left-border-style),
|
||||
var(--button-danger-active-shadow),
|
||||
var(--button-danger-disabled-bg-color),
|
||||
var(--button-danger-disabled-font-color),
|
||||
var(--button-danger-disabled-top-border-color),
|
||||
var(--button-danger-disabled-right-border-color),
|
||||
var(--button-danger-disabled-bottom-border-color),
|
||||
var(--button-danger-disabled-left-border-color),
|
||||
var(--button-danger-disabled-top-border-width),
|
||||
var(--button-danger-disabled-right-border-width),
|
||||
var(--button-danger-disabled-bottom-border-width),
|
||||
var(--button-danger-disabled-left-border-width),
|
||||
var(--button-danger-disabled-top-border-style),
|
||||
var(--button-danger-disabled-right-border-style),
|
||||
var(--button-danger-disabled-bottom-border-style),
|
||||
var(--button-danger-disabled-left-border-style),
|
||||
var(--button-danger-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--light {
|
||||
@include button-variant(
|
||||
var(--button-light-default-bg-color),
|
||||
var(--button-light-default-font-color),
|
||||
var(--button-light-default-top-border-color),
|
||||
var(--button-light-default-right-border-color),
|
||||
var(--button-light-default-bottom-border-color),
|
||||
var(--button-light-default-left-border-color),
|
||||
var(--button-light-default-top-border-width),
|
||||
var(--button-light-default-right-border-width),
|
||||
var(--button-light-default-bottom-border-width),
|
||||
var(--button-light-default-left-border-width),
|
||||
var(--button-light-default-top-border-style),
|
||||
var(--button-light-default-right-border-style),
|
||||
var(--button-light-default-bottom-border-style),
|
||||
var(--button-light-default-left-border-style),
|
||||
var(--button-light-default-shadow),
|
||||
var(--button-light-hover-bg-color),
|
||||
var(--button-light-hover-font-color),
|
||||
var(--button-light-hover-top-border-color),
|
||||
var(--button-light-hover-right-border-color),
|
||||
var(--button-light-hover-bottom-border-color),
|
||||
var(--button-light-hover-left-border-color),
|
||||
var(--button-light-hover-top-border-width),
|
||||
var(--button-light-hover-right-border-width),
|
||||
var(--button-light-hover-bottom-border-width),
|
||||
var(--button-light-hover-left-border-width),
|
||||
var(--button-light-hover-top-border-style),
|
||||
var(--button-light-hover-right-border-style),
|
||||
var(--button-light-hover-bottom-border-style),
|
||||
var(--button-light-hover-left-border-style),
|
||||
var(--button-light-hover-shadow),
|
||||
var(--button-light-active-bg-color),
|
||||
var(--button-light-active-font-color),
|
||||
var(--button-light-active-top-border-color),
|
||||
var(--button-light-active-right-border-color),
|
||||
var(--button-light-active-bottom-border-color),
|
||||
var(--button-light-active-left-border-color),
|
||||
var(--button-light-active-top-border-width),
|
||||
var(--button-light-active-right-border-width),
|
||||
var(--button-light-active-bottom-border-width),
|
||||
var(--button-light-active-left-border-width),
|
||||
var(--button-light-active-top-border-style),
|
||||
var(--button-light-active-right-border-style),
|
||||
var(--button-light-active-bottom-border-style),
|
||||
var(--button-light-active-left-border-style),
|
||||
var(--button-light-active-shadow),
|
||||
var(--button-light-disabled-bg-color),
|
||||
var(--button-light-disabled-font-color),
|
||||
var(--button-light-disabled-top-border-color),
|
||||
var(--button-light-disabled-right-border-color),
|
||||
var(--button-light-disabled-bottom-border-color),
|
||||
var(--button-light-disabled-left-border-color),
|
||||
var(--button-light-disabled-top-border-width),
|
||||
var(--button-light-disabled-right-border-width),
|
||||
var(--button-light-disabled-bottom-border-width),
|
||||
var(--button-light-disabled-left-border-width),
|
||||
var(--button-light-disabled-top-border-style),
|
||||
var(--button-light-disabled-right-border-style),
|
||||
var(--button-light-disabled-bottom-border-style),
|
||||
var(--button-light-disabled-left-border-style),
|
||||
var(--button-light-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--dark {
|
||||
@include button-variant(
|
||||
var(--button-dark-default-bg-color),
|
||||
var(--button-dark-default-font-color),
|
||||
var(--button-dark-default-top-border-color),
|
||||
var(--button-dark-default-right-border-color),
|
||||
var(--button-dark-default-bottom-border-color),
|
||||
var(--button-dark-default-left-border-color),
|
||||
var(--button-dark-default-top-border-width),
|
||||
var(--button-dark-default-right-border-width),
|
||||
var(--button-dark-default-bottom-border-width),
|
||||
var(--button-dark-default-left-border-width),
|
||||
var(--button-dark-default-top-border-style),
|
||||
var(--button-dark-default-right-border-style),
|
||||
var(--button-dark-default-bottom-border-style),
|
||||
var(--button-dark-default-left-border-style),
|
||||
var(--button-dark-default-shadow),
|
||||
var(--button-dark-hover-bg-color),
|
||||
var(--button-dark-hover-font-color),
|
||||
var(--button-dark-hover-top-border-color),
|
||||
var(--button-dark-hover-right-border-color),
|
||||
var(--button-dark-hover-bottom-border-color),
|
||||
var(--button-dark-hover-left-border-color),
|
||||
var(--button-dark-hover-top-border-width),
|
||||
var(--button-dark-hover-right-border-width),
|
||||
var(--button-dark-hover-bottom-border-width),
|
||||
var(--button-dark-hover-left-border-width),
|
||||
var(--button-dark-hover-top-border-style),
|
||||
var(--button-dark-hover-right-border-style),
|
||||
var(--button-dark-hover-bottom-border-style),
|
||||
var(--button-dark-hover-left-border-style),
|
||||
var(--button-dark-hover-shadow),
|
||||
var(--button-dark-active-bg-color),
|
||||
var(--button-dark-active-font-color),
|
||||
var(--button-dark-active-top-border-color),
|
||||
var(--button-dark-active-right-border-color),
|
||||
var(--button-dark-active-bottom-border-color),
|
||||
var(--button-dark-active-left-border-color),
|
||||
var(--button-dark-active-top-border-width),
|
||||
var(--button-dark-active-right-border-width),
|
||||
var(--button-dark-active-bottom-border-width),
|
||||
var(--button-dark-active-left-border-width),
|
||||
var(--button-dark-active-top-border-style),
|
||||
var(--button-dark-active-right-border-style),
|
||||
var(--button-dark-active-bottom-border-style),
|
||||
var(--button-dark-active-left-border-style),
|
||||
var(--button-dark-active-shadow),
|
||||
var(--button-dark-disabled-bg-color),
|
||||
var(--button-dark-disabled-font-color),
|
||||
var(--button-dark-disabled-top-border-color),
|
||||
var(--button-dark-disabled-right-border-color),
|
||||
var(--button-dark-disabled-bottom-border-color),
|
||||
var(--button-dark-disabled-left-border-color),
|
||||
var(--button-dark-disabled-top-border-width),
|
||||
var(--button-dark-disabled-right-border-width),
|
||||
var(--button-dark-disabled-bottom-border-width),
|
||||
var(--button-dark-disabled-left-border-width),
|
||||
var(--button-dark-disabled-top-border-style),
|
||||
var(--button-dark-disabled-right-border-style),
|
||||
var(--button-dark-disabled-bottom-border-style),
|
||||
var(--button-dark-disabled-left-border-style),
|
||||
var(--button-dark-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--default {
|
||||
@include button-variant();
|
||||
}
|
||||
|
||||
&--size-default {
|
||||
@include button-size(
|
||||
var(--button-size-default-fontSize),
|
||||
var(--button-size-default-fontWeight),
|
||||
var(--button-size-default-lineHeight),
|
||||
var(--button-size-default-top-right-border-radius),
|
||||
var(--button-size-default-top-left-border-radius),
|
||||
var(--button-size-default-bottom-right-border-radius),
|
||||
var(--button-size-default-bottom-left-border-radius),
|
||||
var(--button-size-default-height),
|
||||
var(--button-size-default-paddingTop),
|
||||
var(--button-size-default-paddingBottom),
|
||||
var(--button-size-default-paddingLeft),
|
||||
var(--button-size-default-paddingRight),
|
||||
var(--button-size-default-marginTop),
|
||||
var(--button-size-default-marginBottom),
|
||||
var(--button-size-default-marginLeft),
|
||||
var(--button-size-default-marginRight),
|
||||
var(--button-size-default-minWidth),
|
||||
var(--button-size-default-icon-size),
|
||||
var(--button-size-default-icon-margin)
|
||||
);
|
||||
}
|
||||
|
||||
&--size-xs {
|
||||
@include button-size(
|
||||
var(--button-size-xs-fontSize),
|
||||
var(--button-size-xs-fontWeight),
|
||||
var(--button-size-xs-lineHeight),
|
||||
var(--button-size-xs-top-right-border-radius),
|
||||
var(--button-size-xs-top-left-border-radius),
|
||||
var(--button-size-xs-bottom-right-border-radius),
|
||||
var(--button-size-xs-bottom-left-border-radius),
|
||||
var(--button-size-xs-height),
|
||||
var(--button-size-xs-paddingTop),
|
||||
var(--button-size-xs-paddingBottom),
|
||||
var(--button-size-xs-paddingLeft),
|
||||
var(--button-size-xs-paddingRight),
|
||||
var(--button-size-xs-marginTop),
|
||||
var(--button-size-xs-marginBottom),
|
||||
var(--button-size-xs-marginLeft),
|
||||
var(--button-size-xs-marginRight),
|
||||
var(--button-size-xs-minWidth),
|
||||
var(--button-size-xs-icon-size),
|
||||
var(--button-size-xs-icon-margin)
|
||||
);
|
||||
}
|
||||
|
||||
&--size-sm {
|
||||
@include button-size(
|
||||
var(--button-size-sm-fontSize),
|
||||
var(--button-size-sm-fontWeight),
|
||||
var(--button-size-sm-lineHeight),
|
||||
var(--button-size-sm-top-right-border-radius),
|
||||
var(--button-size-sm-top-left-border-radius),
|
||||
var(--button-size-sm-bottom-right-border-radius),
|
||||
var(--button-size-sm-bottom-left-border-radius),
|
||||
var(--button-size-sm-height),
|
||||
var(--button-size-sm-paddingTop),
|
||||
var(--button-size-sm-paddingBottom),
|
||||
var(--button-size-sm-paddingLeft),
|
||||
var(--button-size-sm-paddingRight),
|
||||
var(--button-size-sm-marginTop),
|
||||
var(--button-size-sm-marginBottom),
|
||||
var(--button-size-sm-marginLeft),
|
||||
var(--button-size-sm-marginRight),
|
||||
var(--button-size-sm-minWidth),
|
||||
var(--button-size-sm-icon-size),
|
||||
var(--button-size-sm-icon-margin)
|
||||
);
|
||||
}
|
||||
|
||||
&--size-md {
|
||||
@include button-size(
|
||||
var(--button-size-md-fontSize),
|
||||
var(--button-size-md-fontWeight),
|
||||
var(--button-size-md-lineHeight),
|
||||
var(--button-size-md-top-right-border-radius),
|
||||
var(--button-size-md-top-left-border-radius),
|
||||
var(--button-size-md-bottom-right-border-radius),
|
||||
var(--button-size-md-bottom-left-border-radius),
|
||||
var(--button-size-md-height),
|
||||
var(--button-size-md-paddingTop),
|
||||
var(--button-size-md-paddingBottom),
|
||||
var(--button-size-md-paddingLeft),
|
||||
var(--button-size-md-paddingRight),
|
||||
var(--button-size-md-marginTop),
|
||||
var(--button-size-md-marginBottom),
|
||||
var(--button-size-md-marginLeft),
|
||||
var(--button-size-md-marginRight),
|
||||
var(--button-size-md-minWidth),
|
||||
var(--button-size-md-icon-size),
|
||||
var(--button-size-md-icon-margin)
|
||||
);
|
||||
}
|
||||
|
||||
&--size-lg {
|
||||
@include button-size(
|
||||
var(--button-size-lg-fontSize),
|
||||
var(--button-size-lg-fontWeight),
|
||||
var(--button-size-lg-lineHeight),
|
||||
var(--button-size-lg-top-right-border-radius),
|
||||
var(--button-size-lg-top-left-border-radius),
|
||||
var(--button-size-lg-bottom-right-border-radius),
|
||||
var(--button-size-lg-bottom-left-border-radius),
|
||||
var(--button-size-lg-height),
|
||||
var(--button-size-lg-paddingTop),
|
||||
var(--button-size-lg-paddingBottom),
|
||||
var(--button-size-lg-paddingLeft),
|
||||
var(--button-size-lg-paddingRight),
|
||||
var(--button-size-lg-marginTop),
|
||||
var(--button-size-lg-marginBottom),
|
||||
var(--button-size-lg-marginLeft),
|
||||
var(--button-size-lg-marginRight),
|
||||
var(--button-size-lg-minWidth),
|
||||
var(--button-size-lg-icon-size),
|
||||
var(--button-size-lg-icon-margin)
|
||||
);
|
||||
}
|
||||
|
||||
@include hover-focus {
|
||||
// color: var(--text-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: var(--Button-onFocus-boxShadow);
|
||||
}
|
||||
|
||||
&.is-disabled,
|
||||
&:disabled {
|
||||
box-shadow: none;
|
||||
cursor: not-allowed;
|
||||
|
||||
& > svg,
|
||||
& > svg path {
|
||||
fill: currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:disabled):not(.is-disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&--link {
|
||||
@include button-variant(
|
||||
var(--button-link-default-bg-color),
|
||||
var(--button-link-default-font-color),
|
||||
var(--button-link-default-top-border-color),
|
||||
var(--button-link-default-right-border-color),
|
||||
var(--button-link-default-bottom-border-color),
|
||||
var(--button-link-default-left-border-color),
|
||||
var(--button-link-default-top-border-width),
|
||||
var(--button-link-default-right-border-width),
|
||||
var(--button-link-default-bottom-border-width),
|
||||
var(--button-link-default-left-border-width),
|
||||
var(--button-link-default-top-border-style),
|
||||
var(--button-link-default-right-border-style),
|
||||
var(--button-link-default-bottom-border-style),
|
||||
var(--button-link-default-left-border-style),
|
||||
var(--button-link-default-shadow),
|
||||
var(--button-link-hover-bg-color),
|
||||
var(--button-link-hover-font-color),
|
||||
var(--button-link-hover-top-border-color),
|
||||
var(--button-link-hover-right-border-color),
|
||||
var(--button-link-hover-bottom-border-color),
|
||||
var(--button-link-hover-left-border-color),
|
||||
var(--button-link-hover-top-border-width),
|
||||
var(--button-link-hover-right-border-width),
|
||||
var(--button-link-hover-bottom-border-width),
|
||||
var(--button-link-hover-left-border-width),
|
||||
var(--button-link-hover-top-border-style),
|
||||
var(--button-link-hover-right-border-style),
|
||||
var(--button-link-hover-bottom-border-style),
|
||||
var(--button-link-hover-left-border-style),
|
||||
var(--button-link-hover-shadow),
|
||||
var(--button-link-active-bg-color),
|
||||
var(--button-link-active-font-color),
|
||||
var(--button-link-active-top-border-color),
|
||||
var(--button-link-active-right-border-color),
|
||||
var(--button-link-active-bottom-border-color),
|
||||
var(--button-link-active-left-border-color),
|
||||
var(--button-link-active-top-border-width),
|
||||
var(--button-link-active-right-border-width),
|
||||
var(--button-link-active-bottom-border-width),
|
||||
var(--button-link-active-left-border-width),
|
||||
var(--button-link-active-top-border-style),
|
||||
var(--button-link-active-right-border-style),
|
||||
var(--button-link-active-bottom-border-style),
|
||||
var(--button-link-active-left-border-style),
|
||||
var(--button-link-active-shadow),
|
||||
var(--button-link-disabled-bg-color),
|
||||
var(--button-link-disabled-font-color),
|
||||
var(--button-link-disabled-top-border-color),
|
||||
var(--button-link-disabled-right-border-color),
|
||||
var(--button-link-disabled-bottom-border-color),
|
||||
var(--button-link-disabled-left-border-color),
|
||||
var(--button-link-disabled-top-border-width),
|
||||
var(--button-link-disabled-right-border-width),
|
||||
var(--button-link-disabled-bottom-border-width),
|
||||
var(--button-link-disabled-left-border-width),
|
||||
var(--button-link-disabled-top-border-style),
|
||||
var(--button-link-disabled-right-border-style),
|
||||
var(--button-link-disabled-bottom-border-style),
|
||||
var(--button-link-disabled-left-border-style),
|
||||
var(--button-link-disabled-shadow)
|
||||
);
|
||||
}
|
||||
|
||||
&--block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
+ .#{$ns}Button--block {
|
||||
margin-top: var(--gap-base);
|
||||
}
|
||||
}
|
||||
|
||||
> .pull-left,
|
||||
> .pull-right {
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
> .fa,
|
||||
> .iconfont,
|
||||
> .glyphicon {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
a.#{$ns}Button.is-disabled,
|
||||
fieldset:disabled a.#{$ns}Button {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.#{$ns}Button--loading {
|
||||
@include button-loading-icon();
|
||||
}
|
||||
|
||||
input[type='submit'],
|
||||
input[type='reset'],
|
||||
input[type='button'] {
|
||||
&.#{$ns}Button--block {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ButtonToolbar {
|
||||
margin-left: calc(var(--gap-xs) * -1);
|
||||
margin-top: calc(var(--gap-xs) * -1);
|
||||
|
||||
> .#{$ns}Button {
|
||||
margin-left: var(--gap-xs);
|
||||
margin-top: var(--gap-xs);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Action {
|
||||
display: inline-block;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
442
packages/amis-ui/scss/components/_calendar.scss
Normal file
442
packages/amis-ui/scss/components/_calendar.scss
Normal file
@@ -0,0 +1,442 @@
|
||||
.#{$ns}ScheduleCalendar {
|
||||
&-icon {
|
||||
position: absolute;
|
||||
bottom: var(--Calendar-icon-bottom);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: block;
|
||||
width: var(--Calendar-icon-width);
|
||||
height: var(--Calendar-icon-height);
|
||||
border-radius: 50%;
|
||||
z-index: 10;
|
||||
}
|
||||
&-action {
|
||||
display: block;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
&:not(:disabled):not(.is-disabled):hover {
|
||||
color: inherit;
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
.rdtDay {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&-text-overflow {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.rdt .rdtPicker {
|
||||
td.rdtActive {
|
||||
background: transparent;
|
||||
color: var(--Calendar-color);
|
||||
> span {
|
||||
color: var(--Calendar-color) !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
}
|
||||
td.rdtActive:hover {
|
||||
background: var(--Calendar-cell-onHover-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ScheduleCalendar-large {
|
||||
width: 100%;
|
||||
|
||||
.rdtPicker {
|
||||
width: 100%;
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
td {
|
||||
border: var(--Calendar-borderWidth) solid var(--borderColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rdtHeader {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.rdtPicker .dow {
|
||||
height: px2rem(40px);
|
||||
}
|
||||
|
||||
.rdtDay {
|
||||
height: var(--Calendar-rdt-day);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.#{$ns}ScheduleCalendar-large-day-wrap {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
min-width: 100%;
|
||||
height: 100%;
|
||||
.#{$ns}ScheduleCalendar-large-schedule-content {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
border-radius: var(--borderRadius);
|
||||
text-align: left;
|
||||
padding: var(--Calendar-schedule-content-padding);
|
||||
height: var(--Calendar-schedule-content-height);
|
||||
color: var(--Calendar-schedule-content-color);
|
||||
text-shadow: none;
|
||||
}
|
||||
.#{$ns}ScheduleCalendar-large-schedule-header,
|
||||
.#{$ns}ScheduleCalendar-large-schedule-footer {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ScheduleCalendar-action {
|
||||
z-index: 20;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}CalendarMobile {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
|
||||
&-pop {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 90vh;
|
||||
background: #fff;
|
||||
border-radius: px2rem(16px) px2rem(16px) 0 0;
|
||||
overflow: hidden;
|
||||
border-width: 0;
|
||||
|
||||
&--quarters,
|
||||
&--months {
|
||||
height: px2rem(400px);
|
||||
}
|
||||
|
||||
&--time {
|
||||
height: px2rem(360px);
|
||||
max-height: 90vh;
|
||||
.#{$ns}PopUp-content {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
&--years {
|
||||
height: px2rem(360px);
|
||||
}
|
||||
}
|
||||
|
||||
&-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&-header {
|
||||
flex-shrink: 0;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
position: relative;
|
||||
|
||||
.subtitle-text {
|
||||
display: inline-block;
|
||||
width: px2rem(110px);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rdtPrev {
|
||||
width: px2rem(20px);
|
||||
height: px2rem(44px);
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: px2rem(-20px);
|
||||
}
|
||||
.rdtNext {
|
||||
width: px2rem(20px);
|
||||
height: px2rem(44px);
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: px2rem(-20px);
|
||||
}
|
||||
}
|
||||
|
||||
&-title,
|
||||
&-subtitle {
|
||||
height: px2rem(44px);
|
||||
font-weight: 500;
|
||||
line-height: px2rem(44px);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: var(--fontSizeLg);
|
||||
}
|
||||
|
||||
&-weekdays {
|
||||
display: flex;
|
||||
|
||||
.weekday {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
line-height: px2rem(30px);
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
&-close {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
color: #c8c9cc;
|
||||
font-size: px2rem(16px);
|
||||
cursor: pointer;
|
||||
top: px2rem(11px);
|
||||
right: px2rem(16px);
|
||||
}
|
||||
|
||||
&-body::-webkit-scrollbar {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
&-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow-y: scroll;
|
||||
|
||||
table {
|
||||
padding: 0;
|
||||
border-spacing: 0 px2rem(4px);
|
||||
}
|
||||
|
||||
.rdt .rdtPicker td.rdtActive,
|
||||
.rdt .rdtPicker td.rdtActive:hover {
|
||||
background: transparent;
|
||||
color: var(--Calendar-color);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.rdt .rdtPicker tr td.rdtDisabled,
|
||||
.rdt .rdtPicker tr td.rdtDisabled:hover {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.rdtOldNone td.rdtOld {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rdtPicker td {
|
||||
height: px2rem(56px);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rdt .rdtPicker {
|
||||
td.rdtDay,
|
||||
td.rdtDay:hover,
|
||||
td.rdtDisabled,
|
||||
td.rdtDisabled:hover {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.calendar-wrap {
|
||||
width: px2rem(50px);
|
||||
position: relative;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: px2rem(4px);
|
||||
padding: 0 px2rem(10px);
|
||||
}
|
||||
}
|
||||
|
||||
&-embed &-body {
|
||||
.calendar-wrap {
|
||||
width: auto;
|
||||
max-width: px2rem(50px);
|
||||
}
|
||||
}
|
||||
|
||||
&-footer {
|
||||
flex-shrink: 0;
|
||||
|
||||
.date-range-confirm {
|
||||
width: 100%;
|
||||
height: px2rem(36px);
|
||||
margin: px2rem(7px) 0;
|
||||
border-radius: var(--borderRadiusMd);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&-toolbar {
|
||||
padding: 0 px2rem(16px);
|
||||
}
|
||||
&-ranges {
|
||||
background: #fff;
|
||||
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.02);
|
||||
border-radius: 24px;
|
||||
overflow-x: auto;
|
||||
position: relative;
|
||||
height: px2rem(48px);
|
||||
line-height: px2rem(48px);
|
||||
}
|
||||
.#{$ns}DateRangePicker-rangers {
|
||||
padding-left: revert;
|
||||
white-space: nowrap;
|
||||
line-height: inherit;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.#{$ns}DatePicker-shortcuts {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&-calendar-wrap {
|
||||
padding: var(--gap-sm) 0;
|
||||
}
|
||||
|
||||
& &-calendar-wrap &-calendar .rdtPicker {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
.rdtOld {
|
||||
visibility: hidden;
|
||||
}
|
||||
.rdtNew {
|
||||
display: none;
|
||||
}
|
||||
.rdtBetween {
|
||||
background: var(--Calendar-cell-onBetween-bg) !important;
|
||||
color: var(--Button--primary-bg);
|
||||
&::after {
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
.rdtRangeStart,
|
||||
.rdtRangeStart:hover,
|
||||
.rdtRangeEnd,
|
||||
.rdtRangeEnd:hover {
|
||||
.calendar-wrap {
|
||||
background: var(--Calendar-cell-onActive-bg) !important;
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgb(0 0 0 / 25%);
|
||||
}
|
||||
}
|
||||
|
||||
.rdtRangeHasEnd,
|
||||
.rdtRangeHasEnd:hover {
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
transparent 0%,
|
||||
transparent 50%,
|
||||
var(--Calendar-cell-onBetween-bg) 51%,
|
||||
var(--Calendar-cell-onBetween-bg) 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.rdtRangeEnd,
|
||||
.rdtRangeEnd:hover {
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
var(--Calendar-cell-onBetween-bg) 0%,
|
||||
var(--Calendar-cell-onBetween-bg) 50%,
|
||||
transparent 51%,
|
||||
transparent 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.rdtToday {
|
||||
border: none;
|
||||
.calendar-wrap {
|
||||
border: 1px solid #2468f2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-calendar-header {
|
||||
height: px2rem(30px);
|
||||
line-height: px2rem(30px);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&-range-text {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
color: #fff;
|
||||
font-size: var(--fontSizeSm);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&-calendar-wrap {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&-calendar-mark {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
z-index: 0;
|
||||
color: rgba(242, 243, 245, 0.8);
|
||||
font-size: px2rem(160px);
|
||||
transform: translate(-50%, -50%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&-toast {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: px2rem(136px);
|
||||
height: px2rem(36px);
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&-time {
|
||||
height: px2rem(180px);
|
||||
&-title {
|
||||
border: var(--Calendar-borderWidth) solid var(--borderColorDarken);
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
text-align: center;
|
||||
height: px2rem(30px);
|
||||
line-height: px2rem(30px);
|
||||
}
|
||||
.rdtPicker {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
.#{$ns}CalendarTime {
|
||||
height: px2rem(130px);
|
||||
overflow: hidden;
|
||||
}
|
||||
.#{$ns}PickerColumns-header {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
389
packages/amis-ui/scss/components/_card.scss
Normal file
389
packages/amis-ui/scss/components/_card.scss
Normal file
@@ -0,0 +1,389 @@
|
||||
.#{$ns}Card {
|
||||
background: var(--Card-bg);
|
||||
border: var(--Card-borderWidth) solid var(--Card-borderColor);
|
||||
border-radius: var(--Card-borderRadius);
|
||||
margin-bottom: var(--gap-base);
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
|
||||
&--link {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&-title {
|
||||
color: var(--text-color);
|
||||
font-size: var(--fontSizeMd);
|
||||
font-weight: var(--fontWeightMd);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&-subTitle {
|
||||
// white-space: nowrap;
|
||||
max-height: calc(var(--fontSizeBase) * var(--lineHeightBase) * 2);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: var(--text--muted-color);
|
||||
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
&-title + &-subTitle {
|
||||
margin-top: var(--gap-xs);
|
||||
}
|
||||
|
||||
&-dragBtn {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding: 0 var(--gap-sm);
|
||||
}
|
||||
|
||||
&-heading {
|
||||
display: flex;
|
||||
padding: var(--gap-md);
|
||||
}
|
||||
|
||||
&-avtar {
|
||||
float: left;
|
||||
margin-right: var(--gap-base);
|
||||
max-width: px2rem(200px);
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-avtarText {
|
||||
flex-shrink: 0;
|
||||
background: var(--primary);
|
||||
color: var(--white);
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border-radius: 500px;
|
||||
float: left;
|
||||
margin-right: var(--gap-base);
|
||||
font-size: var(--fontSizeXl);
|
||||
text-transform: uppercase();
|
||||
}
|
||||
|
||||
&-meta {
|
||||
display: block;
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
&-meta + &-toolbar {
|
||||
margin-left: var(--gap-md);
|
||||
}
|
||||
&-toolbar {
|
||||
line-height: normal;
|
||||
text-align: right;
|
||||
}
|
||||
&-highlight {
|
||||
background: var(--success);
|
||||
width: px2rem(8px);
|
||||
height: px2rem(8px);
|
||||
border-radius: 100%;
|
||||
display: inline-block;
|
||||
margin: 0 var(--gap-sm);
|
||||
}
|
||||
|
||||
&-body {
|
||||
padding: var(--gap-md);
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
|
||||
&-heading + &-body {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
&-field {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
&-fieldValue {
|
||||
position: relative;
|
||||
flex-basis: 0;
|
||||
flex-grow: 2;
|
||||
min-width: 0;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
@media (max-width: 767px) {
|
||||
.#{$ns}Form-item {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
.#{$ns}Form-static {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-fieldLabel {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
flex-basis: 40%;
|
||||
color: var(--text--muted-color);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
&-actions {
|
||||
border-top: var(--Card-borderWidth) solid var(--Card-actions-borderColor);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
|
||||
> a {
|
||||
background: transparent;
|
||||
flex-grow: 1;
|
||||
border-color: var(--Card-actions-borderColor);
|
||||
border-style: solid;
|
||||
border-width: 0 var(--Card-borderWidth) 0 0;
|
||||
color: var(--text-color);
|
||||
text-align: center;
|
||||
line-height: px2rem(40px);
|
||||
font-size: var(--Card-actions-fontSize);
|
||||
|
||||
&:not(.is-disabled) {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: var(--Card-actions-onHover-bg);
|
||||
color: var(--Card-actions-onHover-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
color: var(--text--muted-color);
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
& > .#{$ns}Button-icon:first-child:not(:last-child) {
|
||||
margin-right: var(--button-size-sm-icon-margin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-checked {
|
||||
background: var(--Card-onChecked-bg);
|
||||
border-color: var(--Card-onChecked-borderColor);
|
||||
color: var(--Card-onChecked-color);
|
||||
|
||||
.#{$ns}Card-actions,
|
||||
.#{$ns}Card-actions > a {
|
||||
border-color: var(--Card-onChecked-borderColor);
|
||||
color: var(--Card-onChecked-color);
|
||||
}
|
||||
|
||||
.#{$ns}Card-fieldLabel {
|
||||
color: var(--Card-onChecked-fieldLabel-color);
|
||||
}
|
||||
|
||||
.#{$ns}Card-actions > a:hover {
|
||||
background: var(--Card-actions-onChecked-onHover-bg);
|
||||
color: var(--Card-actions-onChecked-onHover-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-modified,
|
||||
&.is-moved {
|
||||
background: var(--Card-onModified-bg);
|
||||
border-color: var(--Card-onModified-borderColor);
|
||||
color: var(--Card-onModified-color);
|
||||
|
||||
.#{$ns}Card-actions,
|
||||
.#{$ns}Card-actions > a {
|
||||
border-color: var(--Card-onModified-borderColor);
|
||||
color: var(--Card-onModified-color);
|
||||
}
|
||||
|
||||
.#{$ns}Card-fieldLabel {
|
||||
color: var(--Card-onModified-fieldLabel-color);
|
||||
}
|
||||
|
||||
.#{$ns}Card-actions > a:hover {
|
||||
background: var(--Card-onModified-onHover-bg);
|
||||
color: var(--Card-onModified-onHover-color);
|
||||
}
|
||||
}
|
||||
|
||||
.is-dragging > & {
|
||||
opacity: var(--Card-onDragging-opacity);
|
||||
}
|
||||
|
||||
&-footer-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&-actions-wrapper {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
&-checkbox {
|
||||
margin: 0 var(--gap-sm) !important;
|
||||
}
|
||||
&-secondary {
|
||||
max-width: px2rem(200px);
|
||||
color: var(--Card-secondary-color);
|
||||
padding: 0 var(--gap-md);
|
||||
font-size: var(--fontSizeMd);
|
||||
font-weight: var(--fontWeightBase);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
&-secondary + &-actions-wrapper {
|
||||
.#{$ns}Card-actions {
|
||||
margin-left: unset;
|
||||
border: none;
|
||||
width: unset;
|
||||
}
|
||||
.#{$ns}Card-actions > a {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
&-multiMedia--top,
|
||||
&-multiMedia--bottom,
|
||||
&-multiMedia--left,
|
||||
&-multiMedia--right {
|
||||
.#{$ns}Card-actions-wrapper {
|
||||
.#{$ns}Card-actions {
|
||||
margin-left: unset;
|
||||
border: none;
|
||||
width: unset;
|
||||
}
|
||||
.#{$ns}Card-actions > a {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-multiMedia--top {
|
||||
display: block;
|
||||
.#{$ns}Card-multiMedia-img {
|
||||
border-bottom-left-radius: unset;
|
||||
border-bottom-right-radius: unset;
|
||||
}
|
||||
}
|
||||
&-multiMedia--bottom {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
.#{$ns}Card-actions {
|
||||
border-bottom: var(--Card-borderWidth) solid
|
||||
var(--Card-actions-borderColor);
|
||||
}
|
||||
.#{$ns}Card-multiMedia-img {
|
||||
border-top-left-radius: unset;
|
||||
border-top-right-radius: unset;
|
||||
}
|
||||
}
|
||||
&-multiMedia--top,
|
||||
&-multiMedia--bottom {
|
||||
.#{$ns}Card-body {
|
||||
padding-bottom: var(--gap-md);
|
||||
}
|
||||
}
|
||||
&-multiMedia--left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.#{$ns}Card-actions {
|
||||
margin-left: var(--gap-md);
|
||||
border-left: var(--Card-borderWidth) solid var(--Card-actions-borderColor);
|
||||
}
|
||||
|
||||
.#{$ns}Card-multiMedia-img,
|
||||
.#{$ns}Card-multiMedia-video {
|
||||
margin: var(--gap-md) 0 var(--gap-md) var(--gap-md);
|
||||
}
|
||||
}
|
||||
&-multiMedia--right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-direction: row-reverse;
|
||||
|
||||
.#{$ns}Card-actions {
|
||||
margin-right: var(--gap-md);
|
||||
border-right: var(--Card-borderWidth) solid
|
||||
var(--Card-actions-borderColor);
|
||||
}
|
||||
|
||||
.#{$ns}Card-multiMedia-img,
|
||||
.#{$ns}Card-multiMedia-video {
|
||||
margin: var(--gap-md) var(--gap-md) var(--gap-md) 0;
|
||||
}
|
||||
}
|
||||
&-multiMedia-flex {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
&-multiMedia-img {
|
||||
display: block;
|
||||
width: auto;
|
||||
height: auto;
|
||||
object-fit: cover;
|
||||
border-radius: var(--Card-borderRadius);
|
||||
}
|
||||
&-multiMedia-video {
|
||||
width: px2rem(180px);
|
||||
height: px2rem(120px);
|
||||
.#{$ns}Video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: unset;
|
||||
border-radius: var(--Card-borderRadius);
|
||||
overflow: hidden;
|
||||
.#{$ns}Video-player {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.video-react {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-top: unset !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28
packages/amis-ui/scss/components/_card2.scss
Normal file
28
packages/amis-ui/scss/components/_card2.scss
Normal file
@@ -0,0 +1,28 @@
|
||||
.#{$ns}Card2 {
|
||||
width: 100%;
|
||||
background: var(--Card-bg);
|
||||
border: var(--Card-borderWidth) solid var(--Card-borderColor);
|
||||
border-radius: var(--Card-borderRadius);
|
||||
position: relative;
|
||||
|
||||
&.checkOnItem {
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
&-checkbox {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
right: var(--gap-md);
|
||||
top: var(--gap-md);
|
||||
}
|
||||
|
||||
&-body {
|
||||
padding: var(--gap-md);
|
||||
}
|
||||
|
||||
&.is-checked {
|
||||
background: var(--Card-onChecked-bg);
|
||||
border-color: var(--Card-onChecked-borderColor);
|
||||
color: var(--Card-onChecked-color);
|
||||
}
|
||||
}
|
||||
221
packages/amis-ui/scss/components/_cards.scss
Normal file
221
packages/amis-ui/scss/components/_cards.scss
Normal file
@@ -0,0 +1,221 @@
|
||||
.#{$ns}Cards {
|
||||
// 黑科技,让 scrollIntoView 能够跑正确的位置
|
||||
// margin-top: calc(var(--affix-offset-top) * -1);
|
||||
// padding-top: var(--affix-offset-top);
|
||||
scroll-margin-top: var(--affix-offset-top);
|
||||
|
||||
&-toolbar {
|
||||
@include clearfix();
|
||||
padding: var(--Cards-toolbar-marginY) var(--Cards-toolbar-marginX)
|
||||
var(--Cards-toolbar-marginY);
|
||||
}
|
||||
|
||||
&-actions {
|
||||
display: inline-block;
|
||||
|
||||
> * {
|
||||
margin-right: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
|
||||
&-heading {
|
||||
padding: var(--gap-xs) 0;
|
||||
}
|
||||
|
||||
&-header {
|
||||
padding: var(--Cards-toolbar-marginY) var(--Cards-toolbar-marginX);
|
||||
|
||||
> * + .#{$ns}Button,
|
||||
> * + .#{$ns}ButtonGroup,
|
||||
> * + .#{$ns}ButtonToolbar {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
|
||||
&-header + &-toolbar {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
&-fixedTop {
|
||||
position: sticky;
|
||||
background: var(--white);
|
||||
top: var(--affix-offset-top);
|
||||
// box-shadow: var(--Cards-fixedTop-boxShadow);
|
||||
padding: var(--gap-sm);
|
||||
z-index: $zindex-sticky;
|
||||
|
||||
.#{$ns}Cards-toolbar {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&--unsaved &-heading {
|
||||
background: var(--Cards--unsaved-heading-bg);
|
||||
color: var(--Cards--unsaved-heading-color);
|
||||
padding: var(--gap-xs) var(--gap-sm);
|
||||
margin-bottom: var(--gap-sm);
|
||||
}
|
||||
|
||||
&-dragTip {
|
||||
width: 100%;
|
||||
color: var(--info);
|
||||
clear: both;
|
||||
margin-top: var(--gap-xs);
|
||||
}
|
||||
|
||||
&-placeholder {
|
||||
background: var(--white);
|
||||
color: var(--text--muted-color);
|
||||
text-align: center;
|
||||
height: var(--Cards-placeholder-height);
|
||||
line-height: var(--Cards-placeholder-height);
|
||||
|
||||
border: var(--Card-borderWidth) solid var(--Card-borderColor);
|
||||
border-radius: var(--Card-borderRadius);
|
||||
}
|
||||
|
||||
&-body > div {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&--masonry {
|
||||
display: block;
|
||||
|
||||
&:after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
column-gap: 0;
|
||||
column-fill: initial;
|
||||
|
||||
> div {
|
||||
width: 100%;
|
||||
float: none;
|
||||
break-inside: avoid;
|
||||
max-width: unset;
|
||||
display: inline-block;
|
||||
flex: unset;
|
||||
}
|
||||
}
|
||||
|
||||
&-footToolbar--affix,
|
||||
&-footer--affix {
|
||||
position: sticky;
|
||||
bottom: var(--affix-offset-bottom);
|
||||
background: var(--Table-bg);
|
||||
z-index: $zindex-sticky;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(xs) {
|
||||
.#{$ns}Cards--masonryXs1 {
|
||||
column-count: 12;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryXs2 {
|
||||
column-count: 6;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryXs3 {
|
||||
column-count: 4;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryXs4 {
|
||||
column-count: 3;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryXs6 {
|
||||
column-count: 2;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryXs12 {
|
||||
column-count: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
.#{$ns}Cards--masonrySm1 {
|
||||
column-count: 12;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonrySm2 {
|
||||
column-count: 6;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonrySm3 {
|
||||
column-count: 4;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonrySm4 {
|
||||
column-count: 3;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonrySm6 {
|
||||
column-count: 2;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonrySm12 {
|
||||
column-count: 1;
|
||||
}
|
||||
|
||||
.#{$ns}Cards-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.#{$ns}Cards--masonryMd1 {
|
||||
column-count: 12;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryMd2 {
|
||||
column-count: 6;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryMd3 {
|
||||
column-count: 4;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryMd4 {
|
||||
column-count: 3;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryMd6 {
|
||||
column-count: 2;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryMd12 {
|
||||
column-count: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
.#{$ns}Cards--masonryLg1 {
|
||||
column-count: 12;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryLg2 {
|
||||
column-count: 6;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryLg3 {
|
||||
column-count: 4;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryLg4 {
|
||||
column-count: 3;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryLg6 {
|
||||
column-count: 2;
|
||||
}
|
||||
|
||||
.#{$ns}Cards--masonryLg12 {
|
||||
column-count: 1;
|
||||
}
|
||||
}
|
||||
292
packages/amis-ui/scss/components/_carousel.scss
Normal file
292
packages/amis-ui/scss/components/_carousel.scss
Normal file
@@ -0,0 +1,292 @@
|
||||
@mixin arrow-control {
|
||||
width: 10%;
|
||||
min-width: var(--Carousel-arrowControl-width);
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
transition-duration: var(--Carousel-transitionDuration);
|
||||
svg {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
right: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: var(--Carousel-svg-width);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Carousel {
|
||||
min-width: var(--Carousel-minWidth);
|
||||
height: var(--Carousel-height);
|
||||
position: relative;
|
||||
display: block;
|
||||
background: var(--Carousel-bg);
|
||||
|
||||
&.#{$ns}Carousel--light {
|
||||
.#{$ns}Carousel-dot {
|
||||
background: var(--Carousel--light-control);
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: var(--Carousel--light-control);
|
||||
}
|
||||
|
||||
.#{$ns}Carousel-item {
|
||||
.title,
|
||||
.description {
|
||||
color: var(--Carousel--light-control);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.#{$ns}Carousel--dark {
|
||||
.#{$ns}Carousel-dot {
|
||||
background: var(--Carousel--dark-control);
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: var(--Carousel--dark-control);
|
||||
}
|
||||
|
||||
.#{$ns}Carousel-item {
|
||||
.title,
|
||||
.description {
|
||||
color: var(--Carousel--dark-control);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
.#{$ns}Carousel-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
transition-duration: var(--Carousel-transitionDuration);
|
||||
transition-timing-function: ease-out;
|
||||
transition-property: transform, opacity;
|
||||
|
||||
&.fade {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&.fade.in {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.slide {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
&.slide.in {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
&.slide.out {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
&.slideRight {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
&.slideRight.in {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
&.slideRight.out {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.title {
|
||||
position: absolute;
|
||||
bottom: var(--Carousel-imageTitle-bottom);
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.description {
|
||||
position: absolute;
|
||||
bottom: var(--Carousel-imageDescription-bottom);
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&-image .#{$ns}Image-origin {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&-dotsControl {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
text-align: center;
|
||||
|
||||
.#{$ns}Carousel-dot {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: var(--Carousel-dot-width);
|
||||
width: var(--Carousel-dot-height);
|
||||
border-radius: var(--Carousel-dot-borderRadius);
|
||||
margin: var(--Carousel-dot-margin);
|
||||
transition-duration: var(--Carousel-transitionDuration);
|
||||
opacity: 0.3;
|
||||
|
||||
&.is-active {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Carousel-leftArrow {
|
||||
@include arrow-control;
|
||||
display: none;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.#{$ns}Carousel-rightArrow {
|
||||
@include arrow-control;
|
||||
display: none;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
&.#{$ns}Carousel-arrow--always {
|
||||
.#{$ns}Carousel-leftArrow {
|
||||
display: block;
|
||||
}
|
||||
.#{$ns}Carousel-rightArrow {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.#{$ns}Carousel-leftArrow {
|
||||
display: block;
|
||||
}
|
||||
.#{$ns}Carousel-rightArrow {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&-arrowsControl {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&-vertical.#{$ns}Carousel {
|
||||
.#{$ns}Carousel {
|
||||
&-dotsControl {
|
||||
right: 0;
|
||||
bottom: auto;
|
||||
height: 100%;
|
||||
width: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
top: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&-leftArrow,
|
||||
&-rightArrow {
|
||||
height: 10%;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: unset;
|
||||
}
|
||||
|
||||
&-leftArrow {
|
||||
top: 0;
|
||||
svg {
|
||||
transform: translate(-50%, -50%) rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
&-rightArrow {
|
||||
bottom: 0;
|
||||
top: unset;
|
||||
svg {
|
||||
transform: translate(-50%, -50%) rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
&-item.slide {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
&-item.slide.in {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
&-item.slide.out {
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
|
||||
&-item.slideRight {
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
|
||||
&-item.slideRight.in {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
&-item.slideRight.out {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Marquee-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.#{$ns}Marquee-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
will-change: transform;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.#{$ns}Marquee-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
157
packages/amis-ui/scss/components/_cascader.scss
Normal file
157
packages/amis-ui/scss/components/_cascader.scss
Normal file
@@ -0,0 +1,157 @@
|
||||
.#{$ns}Cascader-tabs {
|
||||
display: flex;
|
||||
&.scrollable {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.#{$ns}Cascader-tab {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
width: calc((100vw - 20px) / 3);
|
||||
height: px2rem(260px);
|
||||
overflow-y: auto;
|
||||
display: inline-block;
|
||||
padding-left: px2rem(10px);
|
||||
border: 1px solid var(--Cascader-border-color);
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.#{$ns}Cascader {
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
&-Nav {
|
||||
overflow-x: auto;
|
||||
&Item {
|
||||
display: inline-block;
|
||||
margin-right: px2rem(10px);
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
padding: 0 px2rem(6px);
|
||||
}
|
||||
}
|
||||
&-btnGroup {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: px2rem(60px);
|
||||
}
|
||||
&-options {
|
||||
box-sizing: border-box;
|
||||
height: var(--Cascader-option-height);
|
||||
padding-top: px2rem(6px);
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
&-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: px2rem(6px) 0 px2rem(6px) px2rem(10px);
|
||||
font-size: var(--fontSizeMd);
|
||||
line-height: var(--Cascader-option-lineHeight);
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
|
||||
&.is-active {
|
||||
background-color: var(--Cascader-border-active-bg-color);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
.#{$ns}Cascader-option--text {
|
||||
color: var(--primary);
|
||||
}
|
||||
}
|
||||
&.disabled {
|
||||
span {
|
||||
color: gray;
|
||||
}
|
||||
}
|
||||
&--text {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
line-clamp: 2;
|
||||
box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
user-select: none;
|
||||
|
||||
&.disabled {
|
||||
color: var(--Cascader-option-disable-color);
|
||||
}
|
||||
}
|
||||
|
||||
& > .#{$ns}Checkbox {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
> i + span {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-arrow {
|
||||
flex-shrink: 0;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
text-align: right;
|
||||
padding-right: px2rem(6px);
|
||||
width: 20px;
|
||||
> svg {
|
||||
transform: scale(0.8);
|
||||
transition: transform var(--animation-duration);
|
||||
display: inline-block;
|
||||
color: var(--Form-select-caret-iconColor);
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-selectedNum {
|
||||
min-width: px2rem(16px);
|
||||
height: px2rem(16px);
|
||||
line-height: px2rem(16px);
|
||||
border-radius: 100%;
|
||||
text-align: center;
|
||||
background: var(--Form-select-menu-onActive-color);
|
||||
color: var(--white) !important;
|
||||
font-size: var(--fontSizeSm);
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
&-icon {
|
||||
color: var(--primary);
|
||||
}
|
||||
&-tab {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&-btnCancel {
|
||||
color: var(--PopUp-cancelAction-color);
|
||||
}
|
||||
}
|
||||
22
packages/amis-ui/scss/components/_chart.scss
Normal file
22
packages/amis-ui/scss/components/_chart.scss
Normal file
@@ -0,0 +1,22 @@
|
||||
.#{$ns}Chart {
|
||||
position: relative;
|
||||
|
||||
&-placeholder {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
&-content {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
> .visibility-sensor {
|
||||
height: 100%; // 修复图表高度为 0 时,visibility-sensor 无法触发的问题
|
||||
}
|
||||
}
|
||||
37
packages/amis-ui/scss/components/_city-area.scss
Normal file
37
packages/amis-ui/scss/components/_city-area.scss
Normal file
@@ -0,0 +1,37 @@
|
||||
.#{$ns}CityArea {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
text-align: right;
|
||||
|
||||
&-popup {
|
||||
height: px2rem(280px);
|
||||
}
|
||||
&-Input {
|
||||
margin-top: var(--gap-xs);
|
||||
outline: none;
|
||||
vertical-align: top;
|
||||
border: var(--Form-input-borderWidth) solid var(--Form-input-borderColor);
|
||||
border-radius: var(--Form-input-borderRadius);
|
||||
line-height: var(--Form-input-lineHeight);
|
||||
padding: var(--Form-input-paddingY) var(--Form-input-paddingX);
|
||||
font-size: var(--Form-input-fontSize);
|
||||
display: inline-flex !important;
|
||||
|
||||
&.is-focused,
|
||||
&:hover {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
color: var(--Form-input-placeholderColor);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: var(--Form-input-onFocused-borderColor);
|
||||
box-shadow: var(--Form-input-boxShadow);
|
||||
background: var(--Form-input-onFocused-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
10
packages/amis-ui/scss/components/_code.scss
Normal file
10
packages/amis-ui/scss/components/_code.scss
Normal file
@@ -0,0 +1,10 @@
|
||||
.#{$ns}Code {
|
||||
&--dark {
|
||||
background-color: #1e1e1e;
|
||||
border-radius: var(--borderRadius);
|
||||
}
|
||||
|
||||
&-pre-wrap {
|
||||
padding: var(--sizes-size-5);
|
||||
}
|
||||
}
|
||||
83
packages/amis-ui/scss/components/_collapse-group.scss
Normal file
83
packages/amis-ui/scss/components/_collapse-group.scss
Normal file
@@ -0,0 +1,83 @@
|
||||
.#{$ns}CollapseGroup {
|
||||
.#{$ns}Collapse {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.#{$ns}Collapse:first-child {
|
||||
border-radius: 4px 4px 0 0;
|
||||
& > .#{$ns}Collapse-header {
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Collapse:not(.#{$ns}Collapse--title-bottom):last-child {
|
||||
border-radius: 0 0 4px 4px;
|
||||
& > .#{$ns}Collapse-header {
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
&
|
||||
> .#{$ns}Collapse-contentWrapper
|
||||
> .#{$ns}Collapse-body
|
||||
> .#{$ns}Collapse-content {
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Collapse.is-active:not(.#{$ns}Collapse--title-bottom):last-child {
|
||||
& > .#{$ns}Collapse-header {
|
||||
border-radius: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Collapse--title-bottom:last-child {
|
||||
border-radius: 0 0 4px 4px;
|
||||
& > .#{$ns}Collapse-header {
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Collapse:first-child:nth-last-child(1) {
|
||||
border-radius: 4px;
|
||||
& > .#{$ns}Collapse-header {
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Collapse:not(:last-child):not(.is-mobile) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&.icon-position-right {
|
||||
.#{$ns}Collapse-header {
|
||||
.#{$ns}Collapse-arrow-wrap {
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.#{$ns}Collapse-icon-tranform {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.icon-position-right {
|
||||
.#{$ns}Collapse-header {
|
||||
&.noTitle {
|
||||
text-align: right;
|
||||
.#{$ns}Collapse-arrow-wrap {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
&.icon-position-right {
|
||||
.#{$ns}Collapse-header {
|
||||
.#{$ns}Collapse-arrow-wrap {
|
||||
margin-right: px2rem(-18px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
245
packages/amis-ui/scss/components/_collapse.scss
Normal file
245
packages/amis-ui/scss/components/_collapse.scss
Normal file
@@ -0,0 +1,245 @@
|
||||
.#{$ns}Collapse {
|
||||
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);
|
||||
padding: 0;
|
||||
line-height: px2rem(20px);
|
||||
// 很神奇,设计态弹窗里面放个字段级 fieldset 就会撑开好宽
|
||||
min-width: 0;
|
||||
// overflow: hidden;
|
||||
|
||||
&-header {
|
||||
font-size: var(--Collapse-header-fontSize);
|
||||
font-weight: var(--Collapse-header-fontWeight);
|
||||
color: var(--collapse-default-header-color);
|
||||
line-height: var(--collapse-default-header-lineHeight);
|
||||
padding: var(--Collapse-header-padding);
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
background: var(--Collapse-header-bg);
|
||||
|
||||
&-wrapper {
|
||||
display: inline-flex;
|
||||
flex-direction: var(--Collapse-header-wrapper-direction);
|
||||
}
|
||||
|
||||
&-tpl {
|
||||
margin-right: px2rem(8px);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--Collapse-header-onHover-bg);
|
||||
color: var(--collapse-default-header-hover-color);
|
||||
}
|
||||
|
||||
&.noTitle {
|
||||
padding: 0;
|
||||
background-color: unset;
|
||||
&:hover {
|
||||
background: unset;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
background: none;
|
||||
border-radius: 0 !important;
|
||||
position: relative;
|
||||
padding-left: 0;
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Collapse-arrow {
|
||||
content: var(--collapse-icon-icon);
|
||||
}
|
||||
|
||||
&-arrow-wrap {
|
||||
width: px2rem(16px);
|
||||
height: px2rem(16px);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
&-icon-tranform {
|
||||
display: inline-block;
|
||||
width: px2rem(16px);
|
||||
text-align: center;
|
||||
margin-right: var(--gap-xs);
|
||||
}
|
||||
|
||||
// 干扰太多了,先注释
|
||||
// .#{$ns}TplField {
|
||||
// display: inline-block;
|
||||
// }
|
||||
|
||||
&.is-active > .#{$ns}Collapse-header > .#{$ns}Collapse-arrow-wrap > &-arrow {
|
||||
transform: rotate(var(--collapse-icon-rotate));
|
||||
transform-origin: 50% 50%;
|
||||
}
|
||||
&.is-active > * > &-icon-tranform {
|
||||
transform: rotate(var(--collapse-icon-rotate));
|
||||
}
|
||||
|
||||
&--disabled > &-header {
|
||||
cursor: not-allowed;
|
||||
user-select: none;
|
||||
color: var(--collapse-default-disabled-color);
|
||||
background: var(--collapse-default-disabled-header-bg-color);
|
||||
}
|
||||
|
||||
&--disabled &-arrow-wrap svg {
|
||||
color: var(--collapse-default-disabled-color);
|
||||
}
|
||||
|
||||
// title 显示在底部的模式
|
||||
&--title-bottom &-header {
|
||||
text-align: center;
|
||||
font-size: var(--fontSizeBase);
|
||||
border-top: var(--Collapse-header-collapsed-borderTop);
|
||||
border-bottom: var(--Collapse-header-collapsed-borderBottom);
|
||||
}
|
||||
|
||||
&--title-bottom.is-collapsed &-header {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
&--title-bottom &-arrow {
|
||||
top: px2rem(-4px);
|
||||
transform: rotate(var(--collapse-icon-rotate));
|
||||
}
|
||||
|
||||
&--title-bottom.is-active
|
||||
> .#{$ns}Collapse-header
|
||||
> .#{$ns}Collapse-arrow-wrap
|
||||
> &-arrow {
|
||||
top: 0;
|
||||
transform: rotate(calc(-1 * var(--collapse-icon-rotate)));
|
||||
}
|
||||
|
||||
&-contentWrapper {
|
||||
transition: height var(--animation-duration) ease;
|
||||
&.in,
|
||||
&.out {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
&-content {
|
||||
padding: var(--Collapse-content-padding);
|
||||
color: var(--Collapse-content-color);
|
||||
font-size: var(--Collapse-content-fontSize);
|
||||
font-weight: var(--Collapse-content-fontWeight);
|
||||
line-height: var(--collapse-default-content-lineHeight);
|
||||
background: var(--collapse-default-bg-color);
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.#{$ns}Collapse-icon-tranform,
|
||||
.#{$ns}Collapse-arrow-wrap {
|
||||
margin-right: px2rem(-18px);
|
||||
float: right;
|
||||
margin-top: px2rem(2px);
|
||||
}
|
||||
|
||||
.#{$ns}Collapse-content {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//FieldSet Form + Collapse
|
||||
.#{$ns}Form {
|
||||
.#{$ns}Collapse {
|
||||
border: none;
|
||||
|
||||
.#{$ns}Collapse-header {
|
||||
background-color: var(--white);
|
||||
display: inline-flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-direction: row-reverse;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.#{$ns}Collapse-content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* 恢复 Form 嵌套场景下的样式 */
|
||||
.#{$ns}Collapse-fieldset--disabled {
|
||||
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);
|
||||
|
||||
.#{$ns}Collapse-header {
|
||||
background: var(--Collapse-header-bg);
|
||||
display: block;
|
||||
border-radius: unset;
|
||||
}
|
||||
|
||||
.#{$ns}Collapse-content {
|
||||
padding: var(--Collapse-content-padding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 移动端样式调整 */
|
||||
@include media-breakpoint-down(sm) {
|
||||
.#{$ns}Collapse {
|
||||
border: none;
|
||||
position: relative;
|
||||
margin-bottom: var(--Collapse-mobile-marginBottom);
|
||||
&::before {
|
||||
@include hairline-bottom(var(--collapse-default-bottom-border-color));
|
||||
}
|
||||
}
|
||||
}
|
||||
17
packages/amis-ui/scss/components/_color.scss
Normal file
17
packages/amis-ui/scss/components/_color.scss
Normal file
@@ -0,0 +1,17 @@
|
||||
.#{$ns}ColorField {
|
||||
display: inline-block;
|
||||
|
||||
&-previewIcon {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: px2rem(16px);
|
||||
height: px2rem(16px);
|
||||
box-shadow: var(--boxShadowSm);
|
||||
}
|
||||
|
||||
&-value {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
261
packages/amis-ui/scss/components/_column-toggler.scss
Normal file
261
packages/amis-ui/scss/components/_column-toggler.scss
Normal file
@@ -0,0 +1,261 @@
|
||||
.#{$ns}ColumnToggler {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
&-caret {
|
||||
margin-left: var(--DropDown-caret-marginLeft);
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
|
||||
> svg {
|
||||
width: px2rem(10px);
|
||||
height: px2rem(10px);
|
||||
transition: transform var(--animation-duration) ease;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-opened &-caret svg {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
|
||||
&.is-actived > .#{$ns}Button {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
&--block {
|
||||
display: block;
|
||||
|
||||
.#{$ns}Button {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&-menu {
|
||||
position: absolute;
|
||||
z-index: $zindex-dropdown;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
margin: px2rem(1px) 0 0;
|
||||
background: var(--DropDown-menu-bg);
|
||||
list-style: none;
|
||||
padding: var(--DropDown-menu-paddingY) var(--DropDown-menu-paddingX);
|
||||
border: var(--DropDown-menu-borderWidth) solid
|
||||
var(--DropDown-menu-borderColor);
|
||||
border-radius: var(--DropDown-menu-borderRadius);
|
||||
box-shadow: var(--DropDown-menu-boxShadow);
|
||||
min-width: var(--DropDown-menu-minWidth);
|
||||
text-align: left;
|
||||
max-height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
&--alignRight &-menu {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
&-menuItem,
|
||||
&-menu > li {
|
||||
padding: var(--table-togglable-paddingTop)
|
||||
var(--table-togglable-paddingRight) var(--table-togglable-paddingBottom)
|
||||
var(--table-togglable-paddingLeft);
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
height: var(--DropDown-menu-height);
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
color: var(--link-color);
|
||||
text-decoration: var(--link-decoration);
|
||||
background: var(--table-togglable-bg-color);
|
||||
|
||||
&.is-active {
|
||||
color: var(--DropDown-menuItem-onActive-color);
|
||||
}
|
||||
|
||||
&:not(.is-disabled),
|
||||
&:not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
cursor: not-allowed;
|
||||
// pointer-events: none;
|
||||
color: var(--DropDown-menuItem-onDisabled-color);
|
||||
filter: grayscale(80%);
|
||||
}
|
||||
|
||||
&.#{$ns}DropDown-divider {
|
||||
height: px2rem(1px);
|
||||
margin: px2rem(9px) 0;
|
||||
overflow: hidden;
|
||||
background: var(--DropDown-menu-borderColor);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
> label {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-menu:not(.is-mobile) > li {
|
||||
&:hover {
|
||||
background: var(--table-togglable-hover-bg-color);
|
||||
color: var(--DropDown-menuItem-onHover-color);
|
||||
}
|
||||
}
|
||||
|
||||
&-menu > li a {
|
||||
color: inherit;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&-popover {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
> .#{$ns}Button {
|
||||
min-width: unset;
|
||||
}
|
||||
|
||||
@mixin flex-layout($direction: row) {
|
||||
display: flex;
|
||||
flex-flow: $direction nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&-modal {
|
||||
@include flex-layout(column);
|
||||
width: px2rem(400px);
|
||||
padding: var(--ColumnToggler-lineHeight);
|
||||
margin-top: calc(50vh - 100px);
|
||||
border-radius: var(--ColumnToggler-borderRadius);
|
||||
background: var(--ColumnToggler-backgroundColor);
|
||||
box-shadow: 0 4px 5px 0 rgba(21, 26, 38, 0.06),
|
||||
0 1px 10px 0 rgba(21, 26, 38, 0.05), 0 2px 4px -1px rgba(21, 26, 38, 0.04);
|
||||
|
||||
&-header {
|
||||
width: 100%;
|
||||
padding: 0 px2rem(24px);
|
||||
@include flex-layout();
|
||||
|
||||
a,
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.#{$ns}ColumnToggler-modal-title {
|
||||
opacity: 0.95;
|
||||
font-size: var(--fontSizeMd);
|
||||
color: var(--ColumnToggler-title-fontColor);
|
||||
line-height: var(--ColumnToggler-lineHeight);
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
&-content {
|
||||
padding: 0 px2rem(24px);
|
||||
width: 100%;
|
||||
list-style: none;
|
||||
margin: px2rem(8px) 0;
|
||||
|
||||
.#{$ns}ColumnToggler-menuItem {
|
||||
color: var(--ColumnToggler-title-fontColor);
|
||||
background: var(--ColumnToggler-item-backgroundColor);
|
||||
border-radius: px2rem(2px);
|
||||
font-size: var(--fontSizeSm);
|
||||
padding: 0 var(--ColumnToggler-item-paddingX);
|
||||
line-height: var(--ColumnToggler-lineHeight);
|
||||
height: var(--ColumnToggler-lineHeight);
|
||||
width: calc((100% - var(--ColumnToggler-item-margin) * 6) / 3);
|
||||
margin: var(--ColumnToggler-item-margin);
|
||||
float: left;
|
||||
display: flex;
|
||||
|
||||
> span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
min-width: 0;
|
||||
}
|
||||
> label {
|
||||
width: 100%;
|
||||
}
|
||||
&-label {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
min-width: 0;
|
||||
}
|
||||
&:hover {
|
||||
background: var(--ColumnToggler-item-backgroundColor-onHover);
|
||||
}
|
||||
|
||||
&--dragging {
|
||||
border: 1px solid var(--link-color);
|
||||
}
|
||||
|
||||
&-dragBar {
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
margin-right: var(--gap-xs);
|
||||
vertical-align: super;
|
||||
color: var(--ColumnToggler-item-dragBar-color);
|
||||
cursor: move;
|
||||
}
|
||||
}
|
||||
|
||||
@for $i from 1 through 10 {
|
||||
&--column-#{$i} > .#{$ns}ColumnToggler-menuItem {
|
||||
width: calc((100% - var(--ColumnToggler-item-margin) * $i * 2) / $i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-footer {
|
||||
width: 100%;
|
||||
padding: 0 px2rem(24px);
|
||||
@include flex-layout();
|
||||
|
||||
.#{$ns}ColumnToggler-modeSelect {
|
||||
color: var(--ColumnToggler-fontColor);
|
||||
font-size: var(--fontSizeSm);
|
||||
|
||||
&.is-actived {
|
||||
color: var(--link-color);
|
||||
}
|
||||
}
|
||||
|
||||
& > div {
|
||||
@include flex-layout();
|
||||
|
||||
&:first-child {
|
||||
justify-content: flex-start;
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button:not(:last-child) {
|
||||
margin-right: var(--gap-sm);
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ColumnToggler-tooltip {
|
||||
border: none;
|
||||
|
||||
.#{$ns}Tooltip-arrow::before {
|
||||
border-top-color: transparent;
|
||||
}
|
||||
}
|
||||
501
packages/amis-ui/scss/components/_condition-builder.scss
Normal file
501
packages/amis-ui/scss/components/_condition-builder.scss
Normal file
@@ -0,0 +1,501 @@
|
||||
.#{$ns}ConditionBuilderControl.is-mobile {
|
||||
overflow-x: auto;
|
||||
}
|
||||
.#{$ns}CBGroup {
|
||||
font-size: var(--fontSizeSm);
|
||||
position: relative;
|
||||
// border: 1px solid #e8e9eb;
|
||||
// border-radius: 4px;
|
||||
// border-left: px2rem(3px) solid #e6f0ff;
|
||||
// padding: px2rem(30px) px2rem(27px) px2rem(17px);
|
||||
// margin-top: px2rem(30px);
|
||||
display: flex;
|
||||
&-toolbarCondition {
|
||||
// text-align: center;
|
||||
// margin-top: px2rem(-44px);
|
||||
// margin-bottom: px2rem(16px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 px2rem(10px) 0 0;
|
||||
flex-direction: column;
|
||||
|
||||
&[draggable='true'] {
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
&-arrow {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
font-size: 14px;
|
||||
width: px2rem(20px);
|
||||
height: px2rem(20px);
|
||||
border-radius: 50%;
|
||||
background: var(--conditionBuilder-toolbar-bg-color);
|
||||
text-align: center;
|
||||
color: var(--conditionBuilder-toolbar-color);
|
||||
cursor: pointer;
|
||||
transition: transform 0.3s ease;
|
||||
|
||||
&.is-collapse {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--conditionBuilder-toolbar-hover-bg-color);
|
||||
color: var(--conditionBuilder-toolbar-hover-color);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Select {
|
||||
font-size: var(--conditionBuilder-toolbar-fontSize);
|
||||
height: var(--conditionBuilder-toolbar-height);
|
||||
width: var(--conditionBuilder-toolbar-width);
|
||||
background: var(--conditionBuilder-toolbar-bg-color);
|
||||
border: none;
|
||||
color: var(--conditionBuilder-toolbar-color);
|
||||
font-weight: var(--conditionBuilder-toolbar-fontWeight);
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
min-height: var(--conditionBuilder-toolbar-height);
|
||||
|
||||
&.is-focused {
|
||||
color: var(--conditionBuilder-toolbar-color) !important;
|
||||
font-size: var(--conditionBuilder-toolbar-fontSize);
|
||||
font-weight: var(--conditionBuilder-toolbar-fontWeight);
|
||||
background: var(--conditionBuilder-toolbar-bg-color) !important;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--conditionBuilder-toolbar-hover-color) !important;
|
||||
font-size: var(--conditionBuilder-toolbar-hover-fontSize);
|
||||
font-weight: var(--conditionBuilder-toolbar-hover-fontWeight);
|
||||
background: var(--conditionBuilder-toolbar-hover-bg-color) !important;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
&-valueWrap {
|
||||
padding-right: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&-menu {
|
||||
padding: 0;
|
||||
|
||||
> .#{$ns}Select-option {
|
||||
font-size: px2rem(12px);
|
||||
font-weight: 500;
|
||||
line-height: 2rem !important;
|
||||
text-align: center;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
top: px2rem(5px);
|
||||
bottom: px2rem(5px);
|
||||
width: var(--conditionBuilder-line-width);
|
||||
background-color: var(--conditionBuilder-line-bg-color);
|
||||
}
|
||||
}
|
||||
|
||||
&-body {
|
||||
position: relative;
|
||||
&-wrapper {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&-collapse {
|
||||
text-align: center;
|
||||
color: #84868c;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
> span {
|
||||
padding: 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: ' ';
|
||||
height: 1px;
|
||||
background: #e8e9eb;
|
||||
display: block;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-body-wrapper {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&-toolbar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding-top: px2rem(8px);
|
||||
|
||||
&[draggable='true'] {
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.#{$ns}Button {
|
||||
transition: padding var(--animation-duration);
|
||||
min-width: unset;
|
||||
|
||||
svg {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
top: 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}CBGroup-toolbarConditionAdd {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.#{$ns}ButtonGroup {
|
||||
& > .cxd-Button:not(:last-child) {
|
||||
margin-right: px2rem(24px);
|
||||
}
|
||||
}
|
||||
|
||||
// .#{$ns}CBDelete {
|
||||
// margin-left: var(--gap-xs);
|
||||
// }
|
||||
}
|
||||
}
|
||||
.#{$ns}ResultBox {
|
||||
padding-right: px2rem(3px);
|
||||
}
|
||||
|
||||
&-field,
|
||||
&-operator {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin: px2rem(3px);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
&-fieldCaret,
|
||||
&-operatorCaret {
|
||||
transition: transform var(--animation-duration) ease-out;
|
||||
margin: 5px;
|
||||
display: flex;
|
||||
color: var(--Form-select-caret-iconColor);
|
||||
&:hover {
|
||||
color: var(--Form-select-caret-onHover-iconColor);
|
||||
}
|
||||
|
||||
> svg {
|
||||
width: px2rem(10px);
|
||||
height: px2rem(10px);
|
||||
top: 0;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
&-fieldInput.is-active &-fieldCaret,
|
||||
&-operatorInput.is-active &-operatorCaret {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
&-placeholder {
|
||||
color: var(--text--muted-color);
|
||||
position: relative;
|
||||
padding: var(--conditionBuilder-body-paddingTop)
|
||||
var(--conditionBuilder-body-paddingRight)
|
||||
var(--conditionBuilder-body-paddingBottom) px2rem(10px);
|
||||
background: var(--conditionBuilder-body-bg-color);
|
||||
&.simple {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}CBDelete {
|
||||
margin-left: 5px;
|
||||
font-size: 16px;
|
||||
color: #84868c;
|
||||
// cursor: pointer;
|
||||
// margin-left: auto;
|
||||
}
|
||||
|
||||
// .#{$ns}CBGroupOrItem-body-group.is-hover {
|
||||
// & > .#{$ns}CBGroupOrItem-dragbar {
|
||||
// opacity: 1 !important;
|
||||
// }
|
||||
// & > .#{$ns}CBGroup {
|
||||
// border-left-color: #2468f1;
|
||||
// }
|
||||
// }
|
||||
|
||||
.#{$ns}CBIf {
|
||||
margin-left: 10px;
|
||||
font-size: 16px;
|
||||
color: #84868c;
|
||||
|
||||
&:hover {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
color: #2468f1;
|
||||
}
|
||||
cursor: pointer;
|
||||
// margin-left: auto;
|
||||
}
|
||||
|
||||
.#{$ns}CBGroupOrItem {
|
||||
position: relative;
|
||||
transition: box-shadow 0.3s ease;
|
||||
|
||||
&.is-hover {
|
||||
box-shadow: #e8ebee 0 2px 10px 0;
|
||||
// cursor: grab;
|
||||
}
|
||||
|
||||
& + & {
|
||||
margin-top: px2rem(10px);
|
||||
}
|
||||
&-dragbar {
|
||||
cursor: move;
|
||||
width: 20px;
|
||||
margin-left: -5px;
|
||||
opacity: 0.6;
|
||||
text-align: center;
|
||||
transition: opacity var(--animation-duration) ease-out;
|
||||
@include icon-color();
|
||||
}
|
||||
|
||||
&-body {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
transition: all var(--animation-duration) ease-out;
|
||||
&-group {
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
transition: all 0.2s ease;
|
||||
padding-left: 10px;
|
||||
|
||||
// margin-top: px2rem(16px);
|
||||
|
||||
&.is-hover {
|
||||
cursor: grab;
|
||||
box-shadow: 0px 2px 14px 0px rgb(0 0 0 / 16%);
|
||||
border-radius: 8px;
|
||||
padding: 10px;
|
||||
margin: -10px 0px;
|
||||
background: $white;
|
||||
z-index: $zindex-dropdown;
|
||||
}
|
||||
> .#{$ns}CBGroupOrItem-dragbar {
|
||||
left: px2rem(-5px);
|
||||
position: absolute;
|
||||
}
|
||||
> .#{$ns}CBGroup {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
&-item {
|
||||
background-color: var(--conditionBuilder-body-bg-color);
|
||||
width: 100%;
|
||||
padding: var(--conditionBuilder-body-paddingTop)
|
||||
var(--conditionBuilder-body-paddingRight)
|
||||
var(--conditionBuilder-body-paddingBottom)
|
||||
var(--conditionBuilder-body-paddingLeft);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
> .#{$ns}CBGroupOrItem-dragbar {
|
||||
left: px2rem(10px);
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-dragging {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.is-ghost > &-body:before {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
content: '';
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba($info, 0.2);
|
||||
}
|
||||
|
||||
.#{$ns}CBGroup {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
& > &-body > &-body-group > &-dragbar,
|
||||
& > &-body > &-body-item > &-dragbar,
|
||||
& > &-body > &-body-item > .#{$ns}CBDelete {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&:is(.is-mobile) {
|
||||
> .#{$ns}CBGroupOrItem-body
|
||||
> .#{$ns}CBGroupOrItem-body-group
|
||||
> .#{$ns}CBGroupOrItem-dragbar,
|
||||
> .#{$ns}CBGroupOrItem-body
|
||||
> .#{$ns}CBGroupOrItem-body-item
|
||||
> .#{$ns}CBGroupOrItem-dragbar,
|
||||
> .#{$ns}CBGroupOrItem-body
|
||||
> .#{$ns}CBGroupOrItem-body-item
|
||||
> .#{$ns}CBDelete {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.is-mobile) {
|
||||
&:hover
|
||||
> .#{$ns}CBGroupOrItem-body
|
||||
> .#{$ns}CBGroupOrItem-body-item
|
||||
> .#{$ns}CBGroupOrItem-dragbar,
|
||||
&:hover
|
||||
> .#{$ns}CBGroupOrItem-body
|
||||
> .#{$ns}CBGroupOrItem-body-item
|
||||
> .#{$ns}CBDelete {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&-simple {
|
||||
margin-bottom: var(--gap-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}CBInputSwitch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
// margin: px2rem(3px);
|
||||
cursor: pointer;
|
||||
> a {
|
||||
@include icon-color();
|
||||
}
|
||||
|
||||
svg {
|
||||
width: px2rem(10px);
|
||||
height: px2rem(10px);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}CBFunc {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: px2rem(3px);
|
||||
|
||||
&-select {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&-error {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
&-args {
|
||||
display: inline-block;
|
||||
> span {
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
color: var(--info);
|
||||
}
|
||||
|
||||
> div {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}CBItem {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
flex-wrap: wrap;
|
||||
|
||||
> * {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}CBValue {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: px2rem(3px);
|
||||
flex: 1;
|
||||
min-width: px2rem(100px);
|
||||
|
||||
> * {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}CBFormula {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: px2rem(3px);
|
||||
|
||||
&-label {
|
||||
background: var(--ResultBox-value-bg);
|
||||
color: var(--text--muted-color);
|
||||
display: block;
|
||||
font-size: var(--fontSizeSm);
|
||||
align-self: center;
|
||||
margin: -5px 5px -5px -8px;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}CBSeprator {
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
align-self: center;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.#{$ns}CBPicker-trigger {
|
||||
cursor: pointer;
|
||||
transition: transform var(--animation-duration) ease-out;
|
||||
display: flex;
|
||||
color: var(--Form-select-caret-iconColor);
|
||||
|
||||
&:hover {
|
||||
color: var(--primary);
|
||||
}
|
||||
}
|
||||
204
packages/amis-ui/scss/components/_context-menu.scss
Normal file
204
packages/amis-ui/scss/components/_context-menu.scss
Normal file
@@ -0,0 +1,204 @@
|
||||
// 为了提示用户这不是系统菜单。
|
||||
@keyframes contextMenuInSpecial {
|
||||
from {
|
||||
transform: scale3d(1, 1, 1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale3d(1.05, 1.05, 1.05);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: scale3d(1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes contextMenuIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes contextMenuOut {
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ContextMenu {
|
||||
z-index: $zindex-contextmenu;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
// pointer-events: none;
|
||||
|
||||
&-menu {
|
||||
position: absolute;
|
||||
z-index: $zindex-contextmenu;
|
||||
|
||||
&.in,
|
||||
&.out {
|
||||
// opacity: 1;
|
||||
// transform: translateY(0) scale(1);
|
||||
animation-duration: var(--animation-duration);
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
&.in {
|
||||
animation-name: contextMenuInSpecial;
|
||||
animation-duration: var(--animation-duration);
|
||||
}
|
||||
|
||||
&.out {
|
||||
animation-name: contextMenuOut;
|
||||
}
|
||||
|
||||
display: block;
|
||||
position: absolute;
|
||||
|
||||
margin: 0;
|
||||
padding: var(--menu-padding);
|
||||
|
||||
background: var(--menu-background);
|
||||
box-shadow: var(--menu-box-shadow);
|
||||
border-radius: var(--Context-menu-border-radius);
|
||||
|
||||
color: var(--menu-font-color);
|
||||
font-family: var(--menu-font-family);
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
&-divider {
|
||||
border: none;
|
||||
height: 1px;
|
||||
background: var(--menu-border-color);
|
||||
margin: 4px 1px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-width: var(--menu-min-width);
|
||||
}
|
||||
|
||||
&-item {
|
||||
position: relative;
|
||||
|
||||
> a {
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
padding: var(--menu-font-padding);
|
||||
font-size: var(--menu-font-size);
|
||||
color: var(--menu-font-color);
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
> i {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.is-disabled):hover > a {
|
||||
text-decoration: none;
|
||||
background: var(--Context-menu-hover-bg-color);
|
||||
border-radius: var(--Context-menu-border-radius);
|
||||
color: var(--Context-menu-hover-color);
|
||||
cursor: pointer;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&.is-disabled > a {
|
||||
color: var(--menu-disabled-color);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&.is-active > a {
|
||||
color: var(--Context-menu-active-color);
|
||||
}
|
||||
|
||||
&.has-child {
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
width: 12px;
|
||||
position: absolute;
|
||||
right: -12px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-danger {
|
||||
> a {
|
||||
color: var(--danger-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-itemIcon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
&-subList {
|
||||
display: none;
|
||||
list-style: none;
|
||||
transition: display ease-out 0.25s;
|
||||
}
|
||||
|
||||
&-item:hover > &-subList {
|
||||
display: block;
|
||||
min-width: var(--menu-min-width);
|
||||
animation-duration: var(--animation-duration);
|
||||
animation-fill-mode: both;
|
||||
animation-name: contextMenuIn;
|
||||
position: absolute;
|
||||
left: calc(100% + 8px);
|
||||
top: -3px;
|
||||
margin: 0;
|
||||
padding: var(--menu-padding);
|
||||
background: var(--menu-background);
|
||||
box-shadow: var(--menu-box-shadow);
|
||||
border-radius: var(--Context-menu-border-radius);
|
||||
|
||||
color: var(--Context-menu-hover-color);
|
||||
font-family: var(--menu-font-family);
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
|
||||
&:hover {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&--left &-item:hover > &-subList {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
}
|
||||
|
||||
&-cursor {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
&-overlay {
|
||||
position: fixed !important;
|
||||
z-index: $zindex-contextmenu - 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: transparent;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
10
packages/amis-ui/scss/components/_copyable.scss
Normal file
10
packages/amis-ui/scss/components/_copyable.scss
Normal file
@@ -0,0 +1,10 @@
|
||||
.#{$ns}Field-copyBtn {
|
||||
color: var(--Copyable-iconColor);
|
||||
margin-left: var(--gap-xs);
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: var(--Copyable-onHover-iconColor);
|
||||
}
|
||||
}
|
||||
195
packages/amis-ui/scss/components/_crud.scss
Normal file
195
packages/amis-ui/scss/components/_crud.scss
Normal file
@@ -0,0 +1,195 @@
|
||||
.#{$ns}Crud {
|
||||
position: relative;
|
||||
|
||||
&.is-loading > &-body {
|
||||
// 弹框中,blur 效果变成白班,先去掉。
|
||||
// -webkit-filter: blur(5px);
|
||||
// filter: blur(5px);
|
||||
}
|
||||
|
||||
&-selection {
|
||||
margin-bottom: var(--gap-base);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--gap-xs);
|
||||
line-height: 1;
|
||||
|
||||
> .#{$ns}AutoFoldedList-more > span {
|
||||
line-height: calc(
|
||||
var(--Form-input-lineHeight) * var(--Form-input-fontSize) - #{px2rem(
|
||||
2px
|
||||
)}
|
||||
);
|
||||
font-size: var(--Pick-base-value-fontSize);
|
||||
color: var(--Pick-base-value-color);
|
||||
font-weight: var(--Pick-base-value-fontWeight);
|
||||
background: var(--Pick-base-value-bgColor);
|
||||
border-width: var(--Pick-base-value-top-border-width)
|
||||
var(--Pick-base-value-right-border-width)
|
||||
var(--Pick-base-value-bottom-border-width)
|
||||
var(--Pick-base-value-left-border-width);
|
||||
border-style: var(--Pick-base-value-top-border-style)
|
||||
var(--Pick-base-value-right-border-style)
|
||||
var(--Pick-base-value-bottom-border-style)
|
||||
var(--Pick-base-value-left-border-style);
|
||||
border-color: var(--Pick-base-value-top-border-color)
|
||||
var(--Pick-base-value-right-border-color)
|
||||
var(--Pick-base-value-bottom-border-color)
|
||||
var(--Pick-base-value-left-border-color);
|
||||
border-radius: var(--Pick-base-top-left-border-radius)
|
||||
var(--Pick-base-top-right-border-radius)
|
||||
var(--Pick-base-bottom-right-border-radius)
|
||||
var(--Pick-base-bottom-left-border-radius);
|
||||
|
||||
&:hover {
|
||||
background: var(--Form-selectValue-onHover-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&-overflow {
|
||||
&-wrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
height: calc(
|
||||
(var(--Picker-tag-height) + var(--Picker-tag-marginBottom) * 4) * 3
|
||||
);
|
||||
max-height: calc(
|
||||
(var(--Picker-tag-height) + var(--Picker-tag-marginBottom)) * 5
|
||||
);
|
||||
|
||||
gap: var(--gap-xs);
|
||||
@include tag-item(Crud);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-selectionLabel {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-top: var(--gap-xs);
|
||||
}
|
||||
|
||||
/* tag 样式 */
|
||||
@include tag-item(Crud);
|
||||
|
||||
&-selectionClear {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
margin-left: var(--gap-xs);
|
||||
margin-top: var(--gap-xs);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
&-toolbar-item {
|
||||
margin-top: var(--Crud-toolbar-gap);
|
||||
line-height: var(--Crud-toolbar-lineHeight);
|
||||
height: var(--Crud-toolbar-height);
|
||||
vertical-align: middle;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
&.is-mobile {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&--left:not(:first-child) {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
|
||||
&--right:not(:last-child) {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
|
||||
&--left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
&--right {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
&-actions {
|
||||
> * + .#{$ns}Button,
|
||||
> * + .#{$ns}ButtonGroup,
|
||||
> * + .#{$ns}ButtonToolbar {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
|
||||
&-statistics {
|
||||
line-height: var(--Crud-toolbar-height);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
&-pageSwitch {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
align-items: center;
|
||||
|
||||
.#{$ns}Select {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
|
||||
&-pager {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
&-filter {
|
||||
margin-bottom: var(--gap-base);
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
.#{$ns}Crud-toolbar {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
.#{$ns}Crud {
|
||||
&-toolbar {
|
||||
margin-top: calc(var(--Crud-toolbar-gap) * -1);
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
@include clearfix();
|
||||
}
|
||||
|
||||
&-toolbar-item {
|
||||
line-height: var(--Crud-toolbar-lineHeight);
|
||||
height: var(--Crud-toolbar-height);
|
||||
vertical-align: middle;
|
||||
|
||||
&--left:not(:first-child) {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
|
||||
&--right:not(:last-child) {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
|
||||
&--left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
&--right {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
&-actions {
|
||||
> * + .#{$ns}Button,
|
||||
> * + .#{$ns}Button--disabled-wrap {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
345
packages/amis-ui/scss/components/_crud2.scss
Normal file
345
packages/amis-ui/scss/components/_crud2.scss
Normal file
@@ -0,0 +1,345 @@
|
||||
.#{$ns}Crud2 {
|
||||
position: relative;
|
||||
|
||||
&-selection,
|
||||
&-toolbar,
|
||||
&-body {
|
||||
margin-bottom: var(--gap-base);
|
||||
}
|
||||
|
||||
.#{$ns}Table-render-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&-selectionLabel {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-top: var(--gap-xs);
|
||||
}
|
||||
|
||||
@include tag-item(Crud);
|
||||
&-value {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
line-height: calc(
|
||||
var(--Form-input-lineHeight) * var(--Form-input-fontSize) - #{px2rem(2px)}
|
||||
);
|
||||
display: inline-block;
|
||||
font-size: var(--Pick-base-value-fontSize);
|
||||
color: var(--Pick-base-value-color);
|
||||
font-weight: var(--Pick-base-value-fontWeight);
|
||||
background: var(--Pick-base-value-bgColor);
|
||||
border-width: var(--Pick-base-value-top-border-width)
|
||||
var(--Pick-base-value-right-border-width)
|
||||
var(--Pick-base-value-bottom-border-width)
|
||||
var(--Pick-base-value-left-border-width);
|
||||
border-style: var(--Pick-base-value-top-border-style)
|
||||
var(--Pick-base-value-right-border-style)
|
||||
var(--Pick-base-value-bottom-border-style)
|
||||
var(--Pick-base-value-left-border-style);
|
||||
border-color: var(--Pick-base-value-top-border-color)
|
||||
var(--Pick-base-value-right-border-color)
|
||||
var(--Pick-base-value-bottom-border-color)
|
||||
var(--Pick-base-value-left-border-color);
|
||||
border-radius: var(--Pick-base-top-left-border-radius)
|
||||
var(--Pick-base-top-right-border-radius)
|
||||
var(--Pick-base-bottom-right-border-radius)
|
||||
var(--Pick-base-bottom-left-border-radius);
|
||||
margin-right: var(--gap-xs);
|
||||
margin-top: var(--gap-xs);
|
||||
|
||||
&:hover {
|
||||
background: var(--Form-selectValue-onHover-bg);
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
pointer-events: none;
|
||||
opacity: var(--Button-onDisabled-opacity);
|
||||
}
|
||||
}
|
||||
|
||||
&-valueIcon {
|
||||
color: var(--Pick-base-value-icon-color);
|
||||
cursor: pointer;
|
||||
border-right: px2rem(1px) solid var(--Form-selectValue-borderColor);
|
||||
padding: 1px 5px;
|
||||
|
||||
&:hover {
|
||||
background: var(--Form-selectValue-onHover-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&-valueLabel {
|
||||
padding: 0 var(--gap-xs);
|
||||
}
|
||||
|
||||
&-selectionClear {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
margin-left: var(--gap-xs);
|
||||
margin-top: var(--gap-xs);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
&-toolbar-item {
|
||||
margin-top: var(--Crud-toolbar-gap);
|
||||
line-height: var(--Crud-toolbar-lineHeight);
|
||||
height: var(--Crud-toolbar-height);
|
||||
vertical-align: middle;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
&--left:not(:first-child) {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
|
||||
&--right:not(:last-child) {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
|
||||
&--left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
&--right {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
&-actions {
|
||||
> * + .#{$ns}Button,
|
||||
> * + .#{$ns}ButtonGroup,
|
||||
> * + .#{$ns}ButtonToolbar {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
|
||||
&-statistics {
|
||||
line-height: var(--Crud-toolbar-height);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
&-pageSwitch {
|
||||
.#{$ns}Select {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
|
||||
&-pager {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
&-filter:not(:empty) {
|
||||
margin-bottom: var(--gap-base);
|
||||
}
|
||||
|
||||
&.is-mobile.is-mobile-cards {
|
||||
// 移动端卡片模式不需要列选择器
|
||||
.#{$ns}ColumnToggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.#{$ns}SearchBox {
|
||||
border-radius: var(--Form-input-borderRadius);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.#{$ns}Cards-placeholder {
|
||||
font-size: var(--fonts-size-7);
|
||||
}
|
||||
|
||||
.#{$ns}Card {
|
||||
--Card-borderRadius: var(--sizes-size-5);
|
||||
--gap-base: var(--sizes-size-9);
|
||||
--fontSizeBase: var(--fonts-size-7);
|
||||
--body-lineHeight: var(--sizes-base-11);
|
||||
--Card-actions-borderColor: #f2f2f4;
|
||||
--Card-actions-fontSize: var(--fontSizeBase);
|
||||
font-size: var(--fontSizeBase);
|
||||
border: 0;
|
||||
box-shadow: var(--boxShadowSm);
|
||||
&-field {
|
||||
margin-bottom: var(--sizes-size-3);
|
||||
}
|
||||
&-fieldLabel {
|
||||
color: var(--colors-neutral-text-5);
|
||||
font-size: var(--fontSizeBase);
|
||||
flex-basis: var(--sizes-base-28);
|
||||
line-height: var(--body-lineHeight);
|
||||
margin-right: var(--sizes-size-6);
|
||||
}
|
||||
&-fieldValue {
|
||||
color: var(--colors-neutral-text-2);
|
||||
}
|
||||
|
||||
&-actions {
|
||||
padding-top: var(--sizes-base-4);
|
||||
padding-bottom: var(--sizes-base-4);
|
||||
gap: var(--sizes-base-5);
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
&-wrapper {
|
||||
padding-left: var(--gap-md);
|
||||
padding-right: var(--gap-md);
|
||||
}
|
||||
& > a {
|
||||
line-height: var(--sizes-base-14);
|
||||
background: var(--colors-link-10);
|
||||
border-radius: var(--sizes-base-7);
|
||||
font-size: var(--fontSizeBase);
|
||||
color: var(--colors-link-5);
|
||||
flex-grow: 0;
|
||||
text-align: center;
|
||||
padding: 0 var(--sizes-base-10);
|
||||
&.text-danger {
|
||||
background-color: var(--colors-error-10);
|
||||
color: var(--colors-error-5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Form-item {
|
||||
.#{$ns}Form-value,
|
||||
.#{$ns}Form-control {
|
||||
font-size: var(--fontSizeBase);
|
||||
}
|
||||
}
|
||||
|
||||
&-multiMedia {
|
||||
&--right {
|
||||
align-items: flex-start;
|
||||
}
|
||||
&-img {
|
||||
width: var(--sizes-base-45);
|
||||
height: var(--sizes-base-45);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Image {
|
||||
border: 0;
|
||||
|
||||
&--thumb {
|
||||
padding-left: 0;
|
||||
img {
|
||||
border-radius: var(--sizes-size-5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Panel {
|
||||
--Panel-bodyPadding: var(--gap-md);
|
||||
--Panel-headingPadding: var(--gap-sm) var(--gap-md);
|
||||
--Panel-body-paddingTop: var(--gap-md);
|
||||
--Panel-body-paddingBottom: var(--gap-md);
|
||||
--Panel-body-paddingLeft: var(--gap-md);
|
||||
--Panel-body-paddingRight: var(--gap-md);
|
||||
&--form {
|
||||
margin: 0;
|
||||
margin-bottom: var(--gap-md);
|
||||
border-radius: var(--sizes-size-5);
|
||||
box-shadow: var(--boxShadowSm);
|
||||
}
|
||||
&-body {
|
||||
padding-top: 0;
|
||||
}
|
||||
.#{$ns}Form {
|
||||
&--column {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
&-item {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Button.is-fixed-right-bottom {
|
||||
position: fixed;
|
||||
right: 12px;
|
||||
bottom: 70px;
|
||||
z-index: 1300;
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
border-radius: 50%;
|
||||
background: #528eff;
|
||||
box-shadow: 0 2px 12px 0 rgba(22, 27, 67, 0.2);
|
||||
border: 0 !important;
|
||||
.#{$ns}Button-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.is-fixed-right-bottom-wrapper {
|
||||
flex: 0 !important;
|
||||
& + div {
|
||||
position: sticky !important;
|
||||
top: 0;
|
||||
margin-top: 0;
|
||||
.#{$ns}SearchBox {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Crud2-header-toolbar.is-sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1300;
|
||||
background-color: #fff;
|
||||
padding: 5px 16px;
|
||||
margin-top: calc(-1 * var(--Page-body-padding));
|
||||
margin-left: calc(-1 * var(--Page-body-padding));
|
||||
margin-right: calc(-1 * var(--Page-body-padding));
|
||||
.#{$ns}SearchBox {
|
||||
background: #f7f7f9;
|
||||
border-radius: 4px;
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
.#{$ns}Crud {
|
||||
&-toolbar {
|
||||
margin-top: calc(var(--Crud-toolbar-gap) * -1);
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
@include clearfix();
|
||||
}
|
||||
|
||||
&-toolbar-item {
|
||||
line-height: var(--Crud-toolbar-lineHeight);
|
||||
height: var(--Crud-toolbar-height);
|
||||
vertical-align: middle;
|
||||
|
||||
&--left:not(:first-child) {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
|
||||
&--right:not(:last-child) {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
|
||||
&--left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
&--right {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
&-actions {
|
||||
> * + .#{$ns}Button,
|
||||
> * + .#{$ns}Button--disabled-wrap {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
259
packages/amis-ui/scss/components/_debug.scss
Normal file
259
packages/amis-ui/scss/components/_debug.scss
Normal file
@@ -0,0 +1,259 @@
|
||||
/**
|
||||
* Debug 模块的 UI,由于没法使用任何主题,所以这里使用独立配色风格
|
||||
*/
|
||||
|
||||
.AMISDebug {
|
||||
position: fixed;
|
||||
z-index: $zindex-debug;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 100vh;
|
||||
width: 24px;
|
||||
pointer-events: none;
|
||||
|
||||
h3 {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.primary {
|
||||
color: #009fff;
|
||||
}
|
||||
|
||||
&-inspectIcon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
|
||||
cursor: pointer;
|
||||
margin-right: 8px;
|
||||
|
||||
&.is-active {
|
||||
fill: #009fff;
|
||||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
padding: var(--Drawer-header-padding);
|
||||
background: var(--Drawer-header-bg);
|
||||
border-bottom: var(--Drawer-content-borderWidth) solid
|
||||
var(--Drawer-header-borderColor);
|
||||
}
|
||||
|
||||
&-hoverBox {
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
outline: 1px dashed #1c76c4;
|
||||
z-index: 2000;
|
||||
}
|
||||
|
||||
&-activeBox {
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
outline: 1px #1c76c4 solid;
|
||||
z-index: 2000;
|
||||
}
|
||||
|
||||
&-tab {
|
||||
border-bottom: 1px solid #3d3d3d;
|
||||
height: 30px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&-tab > button {
|
||||
color: inherit;
|
||||
background: inherit;
|
||||
display: inline-block;
|
||||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
line-height: 29px;
|
||||
padding: 0 var(--gap-md);
|
||||
transition: 0.3s;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
&-tab > button:hover {
|
||||
color: #e7e7e7;
|
||||
}
|
||||
|
||||
&-tab > button.active {
|
||||
color: #e7e7e7;
|
||||
border-bottom-color: #e7e7e7;
|
||||
}
|
||||
|
||||
&-toggle {
|
||||
pointer-events: all;
|
||||
background: var(--body-bg);
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
width: 24px;
|
||||
height: 48px;
|
||||
box-shadow: 0 4px 6px 0 rgb(8 14 26 / 4%), 0 1px 10px 0 rgb(8 14 26 / 5%),
|
||||
0 2px 4px -1px rgb(8 14 26 / 6%);
|
||||
border-radius: var(--borderRadius) 0 0 var(--borderRadius);
|
||||
padding-top: 14px;
|
||||
padding-left: 6px;
|
||||
cursor: pointer;
|
||||
i {
|
||||
color: var(--text-color);
|
||||
}
|
||||
&:hover {
|
||||
i {
|
||||
color: var(--primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-content {
|
||||
pointer-events: all;
|
||||
display: none;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&-resize {
|
||||
position: absolute;
|
||||
width: 4px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
cursor: col-resize;
|
||||
&:hover {
|
||||
background: #75715e;
|
||||
}
|
||||
}
|
||||
|
||||
&-changePosition {
|
||||
position: absolute;
|
||||
font-size: 18px;
|
||||
right: 40px;
|
||||
top: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&-close {
|
||||
position: absolute;
|
||||
font-size: 18px;
|
||||
right: var(--gap-sm);
|
||||
top: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.is-expanded {
|
||||
width: 420px;
|
||||
|
||||
background: #272821;
|
||||
color: #cccccc;
|
||||
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
|
||||
.AMISDebug-toggle {
|
||||
display: none;
|
||||
}
|
||||
.AMISDebug-content {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-left {
|
||||
left: 0;
|
||||
.AMISDebug-resize {
|
||||
left: unset;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-log {
|
||||
padding: var(--gap-sm);
|
||||
button {
|
||||
cursor: pointer;
|
||||
background: #0e639c;
|
||||
flex-grow: 1;
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 6px 11px;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
max-width: 300px;
|
||||
border: none;
|
||||
}
|
||||
button:hover {
|
||||
background: #1177bb;
|
||||
}
|
||||
}
|
||||
|
||||
&-inspect {
|
||||
padding: var(--gap-sm);
|
||||
}
|
||||
|
||||
&-log,
|
||||
&-inspect {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
|
||||
// 火狐浏览器
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #6b6b6b #2b2b2b;
|
||||
&::-webkit-scrollbar {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
background-color: #2c2c2c;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-left: 1px solid #3d3d3d;
|
||||
// border-top: 1px solid #3d3d3d;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #6b6b6b;
|
||||
background-clip: content-box;
|
||||
border: 4px solid transparent;
|
||||
border-radius: 500px;
|
||||
|
||||
&:hover {
|
||||
background: #939393;
|
||||
background-clip: content-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-logLine {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
&-footer {
|
||||
height: 30px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
background: #2c2c2c;
|
||||
|
||||
> svg {
|
||||
width: 11px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
> input {
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: #cccccc;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-value {
|
||||
color: rgb(253, 151, 31);
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
81
packages/amis-ui/scss/components/_divider.scss
Normal file
81
packages/amis-ui/scss/components/_divider.scss
Normal file
@@ -0,0 +1,81 @@
|
||||
.#{$ns}Divider {
|
||||
margin: var(--Divider-marginTop) var(--Divider-marginRight)
|
||||
var(--Divider-marginBottom) var(--Divider-marginLeft);
|
||||
font-size: 0;
|
||||
|
||||
&--dashed {
|
||||
border-bottom-style: dashed;
|
||||
}
|
||||
|
||||
&--horizontal.#{$ns}Divider--solid {
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
&--horizontal.#{$ns}Divider--dashed {
|
||||
border-bottom-style: dashed;
|
||||
}
|
||||
|
||||
&--vertical.#{$ns}Divider--solid {
|
||||
border-left-style: solid;
|
||||
}
|
||||
&--vertical.#{$ns}Divider--dashed {
|
||||
border-left-style: dashed;
|
||||
}
|
||||
|
||||
&--horizontal {
|
||||
position: relative;
|
||||
height: px2rem(2px);
|
||||
border-bottom: var(--Divider-width) var(--Divider-style)
|
||||
var(--Divider-color);
|
||||
transform-origin: 0 center;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
&--vertical {
|
||||
border-left: var(--Divider-width) var(--Divider-style) var(--Divider-color);
|
||||
height: var(--sizes-base-15);
|
||||
transform-origin: center bottom;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Divider--with-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: unset;
|
||||
border-bottom-width: 0 !important;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
height: 0;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
border-bottom: inherit;
|
||||
border-bottom-width: var(--Divider-width);
|
||||
}
|
||||
|
||||
&.#{$ns}Divider--with-text-left:before,
|
||||
&.#{$ns}Divider--with-text-right:after {
|
||||
flex-basis: var(--Divider-text-width);
|
||||
flex-grow: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Divider-text {
|
||||
margin: var(--Divider-text-marginTop) var(--Divider-text-marginRight)
|
||||
var(--Divider-text-marginBottom) var(--Divider-text-marginLeft);
|
||||
font-size: var(--Divider-text-fontSize);
|
||||
font-weight: var(--Divider-text-fontWeight);
|
||||
line-height: 1;
|
||||
color: var(--Divider-text-color);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 移动端样式调整 */
|
||||
@include media-breakpoint-down(sm) {
|
||||
.#{$ns}Divider {
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
}
|
||||
393
packages/amis-ui/scss/components/_drawer.scss
Normal file
393
packages/amis-ui/scss/components/_drawer.scss
Normal file
@@ -0,0 +1,393 @@
|
||||
.#{$ns}Drawer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-modal;
|
||||
overflow: hidden;
|
||||
outline: 0;
|
||||
|
||||
&-content {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: auto;
|
||||
background: var(--Drawer-bg);
|
||||
background-clip: padding-box;
|
||||
outline: 0;
|
||||
z-index: 2;
|
||||
border-radius: var(--Drawer-content-borderRadius);
|
||||
transition: transform ease-in-out var(--animation-duration);
|
||||
}
|
||||
|
||||
&-overlay {
|
||||
transition: ease-out opacity var(--animation-duration);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
background: var(--Drawer-overlay-bg);
|
||||
opacity: 0;
|
||||
|
||||
&.in {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
padding: var(--Drawer-header-padding);
|
||||
background: var(--Drawer-header-bg);
|
||||
@include clearfix();
|
||||
border-bottom: var(--Drawer-content-borderWidth) solid
|
||||
var(--Drawer-header-borderColor);
|
||||
border-top-left-radius: var(--Drawer-content-borderRadius);
|
||||
border-top-right-radius: var(--Drawer-content-borderRadius);
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: var(--drawer-header-fontSize);
|
||||
font-weight: var(--drawer-header-fontWeight);
|
||||
color: var(--drawer-header-color);
|
||||
height: var(--drawer-header-height);
|
||||
}
|
||||
|
||||
&-close {
|
||||
position: absolute;
|
||||
color: var(--Drawer-close-color);
|
||||
line-height: 1;
|
||||
text-decoration: none;
|
||||
|
||||
svg {
|
||||
margin-top: px2rem(2px);
|
||||
width: var(--drawer-header-icon-size);
|
||||
height: var(--drawer-header-icon-size);
|
||||
fill: var(--Drawer-close-color);
|
||||
color: var(--drawer-header-icon-color);
|
||||
}
|
||||
|
||||
.Drawer-close {
|
||||
content: var(--drawer-header-icon-icon);
|
||||
}
|
||||
|
||||
&:not(.is-disabled) {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
color: var(--Drawer-close-onHover-color);
|
||||
|
||||
svg {
|
||||
fill: var(--Drawer-close-onHover-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-body {
|
||||
padding: 0 var(--drawer-content-paddingRight)
|
||||
var(--drawer-content-paddingBottom) var(--drawer-content-paddingLeft);
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
overflow: auto;
|
||||
|
||||
// 因为如果成员里面有 position:sticky 的内容
|
||||
// 用 padding 会导致位置不正确
|
||||
// 所以改成这种写法
|
||||
&:before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: var(--drawer-content-paddingTop);
|
||||
}
|
||||
}
|
||||
|
||||
&-footer {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
height: var(--drawer-footer-height);
|
||||
justify-content: flex-end;
|
||||
padding: var(--Drawer-footer-padding);
|
||||
border-top: var(--Drawer-content-borderWidth) solid
|
||||
var(--Drawer-footer-borderColor);
|
||||
border-bottom-left-radius: var(--Drawer-content-borderRadius);
|
||||
border-bottom-right-radius: var(--Drawer-content-borderRadius);
|
||||
|
||||
.#{$ns}Button {
|
||||
margin-left: var(--gap-xs);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-info {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
text-align: left;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-error {
|
||||
color: var(--danger);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--noOverlay {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-resizeCtrl {
|
||||
position: absolute;
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
background: var(--white);
|
||||
border-radius: var(--borderRadius);
|
||||
font-size: var(--fontSizeSm);
|
||||
line-height: px2rem(10px);
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
// size
|
||||
@include media-breakpoint-up(sm) {
|
||||
.#{$ns}Drawer .#{$ns}Drawer-content {
|
||||
width: var(--Drawer-widthBase);
|
||||
height: var(--Drawer-widthBase);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--xs .#{$ns}Drawer-content {
|
||||
width: var(--drawer-size-xs-width);
|
||||
height: var(--Drawer-widthXs);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--sm .#{$ns}Drawer-content {
|
||||
width: var(--drawer-size-sm-width);
|
||||
height: var(--Drawer-widthSm);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--md .#{$ns}Drawer-content {
|
||||
width: var(--drawer-size-md-width);
|
||||
height: var(--Drawer-widthMd);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--lg .#{$ns}Drawer-content {
|
||||
width: var(--drawer-size-lg-width);
|
||||
height: var(--Drawer-widthLg);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--xl .#{$ns}Drawer-content {
|
||||
width: var(--drawer-size-xl-width);
|
||||
height: var(--Drawer-widthXl);
|
||||
}
|
||||
|
||||
// 从第二层弹框开始左右弹框的每层宽度或高度递减
|
||||
@for $i from 2 through 6 {
|
||||
$space-diff: 20;
|
||||
.#{$ns}Drawer--right.#{$ns}Modal--#{$i}th,
|
||||
.#{$ns}Drawer--left.#{$ns}Modal--#{$i}th {
|
||||
&.#{$ns}Drawer .#{$ns}Drawer-content {
|
||||
width: calc(var(--Drawer-widthBase) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--xs .#{$ns}Drawer-content {
|
||||
width: calc(var(--Drawer-widthXs) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--sm .#{$ns}Drawer-content {
|
||||
width: calc(var(--Drawer-widthSm) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--md .#{$ns}Drawer-content {
|
||||
width: calc(var(--Drawer-widthMd) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--lg .#{$ns}Drawer-content {
|
||||
width: calc(var(--Drawer-widthLg) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--xl .#{$ns}Drawer-content {
|
||||
width: calc(var(--Drawer-widthXl) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--top.#{$ns}Modal--#{$i}th,
|
||||
.#{$ns}Drawer--bottom.#{$ns}Modal--#{$i}th {
|
||||
&.#{$ns}Drawer .#{$ns}Drawer-content {
|
||||
height: calc(var(--Drawer-widthBase) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--xs .#{$ns}Drawer-content {
|
||||
height: calc(var(--Drawer-widthXs) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--sm .#{$ns}Drawer-content {
|
||||
height: calc(var(--Drawer-widthSm) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--md .#{$ns}Drawer-content {
|
||||
height: calc(var(--Drawer-widthMd) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--lg .#{$ns}Drawer-content {
|
||||
height: calc(var(--Drawer-widthLg) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
|
||||
&.#{$ns}Drawer--xl .#{$ns}Drawer-content {
|
||||
height: calc(var(--Drawer-widthXl) - #{($i - 1) * $space-diff}px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// positons
|
||||
.#{$ns}Drawer--top .#{$ns}Drawer-content.in,
|
||||
.#{$ns}Drawer--right .#{$ns}Drawer-content.in,
|
||||
.#{$ns}Drawer--bottom .#{$ns}Drawer-content.in,
|
||||
.#{$ns}Drawer--left .#{$ns}Drawer-content.in {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--top {
|
||||
.#{$ns}Drawer-close {
|
||||
top: var(--gap-base);
|
||||
right: var(--gap-base);
|
||||
left: auto;
|
||||
margin-top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-content {
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
transform: translate3d(0, -100%, 0);
|
||||
box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.2);
|
||||
min-height: 120px;
|
||||
border-bottom: var(--common-popover-border);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-resizeCtrl {
|
||||
bottom: px2rem(-6px);
|
||||
left: 50%;
|
||||
cursor: ns-resize;
|
||||
width: px2rem(24px);
|
||||
height: px2rem(12px);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--right {
|
||||
.#{$ns}Drawer-close {
|
||||
top: var(--gap-md);
|
||||
right: var(--gap-md);
|
||||
margin-right: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-content {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: auto;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
transform: translate3d(100%, 0, 0);
|
||||
box-shadow: -10px 0 10px -10px rgba(0, 0, 0, 0.2);
|
||||
min-width: 120px;
|
||||
border-left: var(--common-popover-border);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-footer {
|
||||
justify-content: flex-end;
|
||||
|
||||
.#{$ns}Button {
|
||||
margin-left: var(--drawer-footer-margin-left);
|
||||
margin-right: var(--gap-xs);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-info {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-error {
|
||||
color: var(--danger);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-resizeCtrl {
|
||||
left: px2rem(-6px);
|
||||
top: 50%;
|
||||
cursor: ew-resize;
|
||||
writing-mode: vertical-lr;
|
||||
width: px2rem(12px);
|
||||
height: px2rem(24px);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--bottom {
|
||||
.#{$ns}Drawer-close {
|
||||
top: var(--gap-base);
|
||||
right: var(--gap-base);
|
||||
left: auto;
|
||||
margin-bottom: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-content {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
box-shadow: 0 -10px 10px -10px rgba(0, 0, 0, 0.2);
|
||||
min-height: 120px;
|
||||
border-top: var(--common-popover-border);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-resizeCtrl {
|
||||
top: px2rem(-6px);
|
||||
left: 50%;
|
||||
cursor: ns-resize;
|
||||
width: px2rem(24px);
|
||||
height: px2rem(12px);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Drawer--left {
|
||||
.#{$ns}Drawer-close {
|
||||
left: auto;
|
||||
right: var(--gap-base);
|
||||
top: var(--gap-base);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-content {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: auto;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
box-shadow: 10px 0 10px -10px rgba(0, 0, 0, 0.2);
|
||||
border-width: 0 var(--Drawer-content-borderWidth) 0 0;
|
||||
min-width: 120px;
|
||||
border-right: var(--common-popover-border);
|
||||
}
|
||||
|
||||
.#{$ns}Drawer-resizeCtrl {
|
||||
right: px2rem(-6px);
|
||||
top: 50%;
|
||||
cursor: ew-resize;
|
||||
writing-mode: vertical-lr;
|
||||
width: px2rem(12px);
|
||||
height: px2rem(24px);
|
||||
}
|
||||
|
||||
.#{$ns}Button {
|
||||
margin-left: var(--Drawer-footer-margin);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
.#{$ns}DropdownContextMenus {
|
||||
width: px2rem(20px);
|
||||
height: px2rem(20px);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
border-radius: var(--borders-radius-4);
|
||||
background-color: var(--button-light-default-bg-color);
|
||||
color: var(--icon-color);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--button-light-hover-bg-color);
|
||||
color: var(--icon-onHover-color);
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
color: var(--icon-onDisabled-color);
|
||||
}
|
||||
|
||||
> svg {
|
||||
fill: currentColor;
|
||||
width: px2rem(12px);
|
||||
height: px2rem(12px);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
156
packages/amis-ui/scss/components/_dropdown.scss
Normal file
156
packages/amis-ui/scss/components/_dropdown.scss
Normal file
@@ -0,0 +1,156 @@
|
||||
.#{$ns}DropDown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
&-caret {
|
||||
margin-left: var(--DropDown-caret-marginLeft);
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
|
||||
> svg {
|
||||
width: px2rem(10px);
|
||||
height: px2rem(10px);
|
||||
top: 0;
|
||||
transform: rotate(90deg);
|
||||
transition: transform var(--animation-duration) ease;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-opened &-caret svg {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
|
||||
&.is-actived {
|
||||
.#{$ns}Button {
|
||||
color: var(--link-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--block {
|
||||
display: block;
|
||||
|
||||
.#{$ns}Button {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&-menu {
|
||||
background: var(--DropDown-menu-bg);
|
||||
list-style: none;
|
||||
padding: var(--DropDown-menu-paddingY) var(--DropDown-menu-paddingX);
|
||||
margin: 0;
|
||||
min-width: var(--DropDown-menu-minWidth);
|
||||
text-align: left;
|
||||
border: none;
|
||||
user-select: none;
|
||||
|
||||
&-root {
|
||||
position: absolute;
|
||||
z-index: $zindex-dropdown;
|
||||
left: 0;
|
||||
margin: px2rem(1px) 0 0;
|
||||
border: var(--Form-select-outer-borderWidth) solid
|
||||
var(--Form-select-outer-borderColor);
|
||||
border-radius: var(--DropDown-menu-borderRadius);
|
||||
box-shadow: var(--DropDown-menu-boxShadow);
|
||||
min-width: var(--DropDown-menu-minWidth);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
max-height: px2rem(300px);
|
||||
margin-top: px2rem(4px);
|
||||
}
|
||||
}
|
||||
|
||||
&--alignRight &-menu {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
&-menuItem,
|
||||
&-menu > li {
|
||||
padding: 0 var(--DropDown-menuItem-paddingX);
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
height: var(--DropDown-menu-height);
|
||||
line-height: var(--DropDown-menu-height);
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
color: var(--DropDown-menuItem-color);
|
||||
text-decoration: var(--link-decoration);
|
||||
|
||||
&.is-active {
|
||||
background: var(--DropDown-menuItem-onHover-bg);
|
||||
color: var(--DropDown-menuItem-onActive-color);
|
||||
}
|
||||
|
||||
&:not(.is-disabled),
|
||||
&:not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
cursor: not-allowed;
|
||||
// pointer-events: none;
|
||||
color: var(--DropDown-menuItem-onDisabled-color);
|
||||
filter: grayscale(80%);
|
||||
}
|
||||
|
||||
&.#{$ns}DropDown-divider {
|
||||
height: px2rem(1px);
|
||||
margin: px2rem(4px) 0;
|
||||
overflow: hidden;
|
||||
background: var(--DropDown-menu-borderColor);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&.#{$ns}DropDown-groupTitle {
|
||||
height: inherit;
|
||||
font-size: var(--fontSizeSm);
|
||||
padding: var(--gap-xs) var(--gap-xs);
|
||||
padding-left: var(--gap-sm);
|
||||
color: var(--DropDown-group-color);
|
||||
flex-grow: 1;
|
||||
cursor: default;
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
}
|
||||
|
||||
span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
& ~ .#{$ns}DropDown-button {
|
||||
padding-left: var(--gap-lg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-menuItem,
|
||||
&-menu:not(.is-mobile) > li:not(.is-disabled) {
|
||||
&:hover {
|
||||
background: var(--DropDown-menuItem-onHover-bg);
|
||||
color: var(--DropDown-menuItem-onHover-color);
|
||||
}
|
||||
}
|
||||
|
||||
&-menu > li a {
|
||||
color: inherit;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&-popover {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
// 如果是在PopOver position: absolute会使overlayNode没有高度 定位不正确
|
||||
// 改成static z-index不生效 无法点击操作
|
||||
> .#{$ns}DropDown-menu-root {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$ns}Button {
|
||||
min-width: unset;
|
||||
}
|
||||
}
|
||||
7
packages/amis-ui/scss/components/_each.scss
Normal file
7
packages/amis-ui/scss/components/_each.scss
Normal file
@@ -0,0 +1,7 @@
|
||||
.#{$ns}Each {
|
||||
&-placeholder {
|
||||
color: var(--text--muted-color);
|
||||
text-align: left;
|
||||
padding: var(--gap-sm);
|
||||
}
|
||||
}
|
||||
721
packages/amis-ui/scss/components/_formula.scss
Normal file
721
packages/amis-ui/scss/components/_formula.scss
Normal file
@@ -0,0 +1,721 @@
|
||||
.#{$ns}FormulaEditor {
|
||||
overflow: visible;
|
||||
max-width: 100%;
|
||||
box-sizing: content-box;
|
||||
min-height: px2rem(450px);
|
||||
|
||||
@mixin scrollbar {
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 3px;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin panel-header {
|
||||
width: 100%;
|
||||
height: px2rem(30px);
|
||||
line-height: px2rem(30px);
|
||||
padding: 0 #{px2rem(10px)};
|
||||
box-sizing: border-box;
|
||||
background: var(--InputFormula-header-bgColor);
|
||||
border-radius: var(--borderRadius) var(--borderRadius) 0 0;
|
||||
border-bottom: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&-content {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
max-width: #{px2rem(530px)};
|
||||
min-width: 0;
|
||||
border-top: var(--Form-input-borderWidth) solid
|
||||
var(--Form-input-borderColor);
|
||||
border-bottom: var(--Form-input-borderWidth) solid
|
||||
var(--Form-input-borderColor);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&-runPanel {
|
||||
&.in {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
height: px2rem(200px);
|
||||
transition: height 0.1s ease-out;
|
||||
border-top: 1px solid var(--Form-input-borderColor);
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
|
||||
&-context,
|
||||
&-result {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
> header {
|
||||
@include panel-header();
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
> div {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
&-context {
|
||||
border-right: 1px solid var(--Form-input-borderColor);
|
||||
}
|
||||
|
||||
&-result {
|
||||
> div {
|
||||
padding: 0 px2rem(10px);
|
||||
}
|
||||
|
||||
&.is-error {
|
||||
color: var(--Form-input-onError-borderColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
@include panel-header();
|
||||
|
||||
&-toolbar {
|
||||
font-size: 12px;
|
||||
float: right;
|
||||
> span {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-editor {
|
||||
@include scrollbar();
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
padding: #{px2rem(5px)};
|
||||
padding-right: 0;
|
||||
|
||||
.CodeMirror {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-error &-editor {
|
||||
border-color: var(--Form-input-onError-borderColor);
|
||||
}
|
||||
|
||||
&.is-focused &-editor {
|
||||
border-color: var(--Form-input-onFocused-borderColor);
|
||||
}
|
||||
|
||||
&-settings {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: stretch;
|
||||
justify-content: space-between;
|
||||
height: #{px2rem(450px)};
|
||||
margin-top: #{px2rem(10px)};
|
||||
|
||||
&.is-mobile {
|
||||
width: 100%;
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
&-settings.only-variable {
|
||||
height: #{px2rem(350px)};
|
||||
}
|
||||
|
||||
&-panel {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: stretch;
|
||||
height: 100%;
|
||||
width: #{px2rem(188px)};
|
||||
border: var(--Form-input-borderWidth) solid var(--Form-input-borderColor);
|
||||
|
||||
&-header {
|
||||
@include panel-header();
|
||||
}
|
||||
|
||||
&-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
max-height: calc(100% - 30px);
|
||||
overflow: hidden;
|
||||
|
||||
&--tabs {
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-panel.left {
|
||||
justify-content: normal !important;
|
||||
border-radius: var(--borderRadius) 0 0 var(--borderRadius);
|
||||
}
|
||||
|
||||
&-panel.right {
|
||||
width: #{px2rem(330px)};
|
||||
border-radius: 0 var(--borderRadius) var(--borderRadius) 0;
|
||||
}
|
||||
|
||||
/* 变量列表 */
|
||||
&-VariableList {
|
||||
height: 100%;
|
||||
&-root {
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
&-body {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
&-base {
|
||||
--Form-input-fontSize: var(--fontSizeSm);
|
||||
--gap-sm: #{px2rem(10px)};
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
&-base.is-scrollable {
|
||||
@include scrollbar();
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
max-height: 100% !important;
|
||||
}
|
||||
|
||||
&-searchBox {
|
||||
display: flex;
|
||||
width: auto;
|
||||
flex-shrink: 0;
|
||||
padding: #{px2rem(8px)};
|
||||
|
||||
& > div {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
font-size: var(--fontSizeSm);
|
||||
height: var(--gap-xl);
|
||||
}
|
||||
}
|
||||
|
||||
&-tabs {
|
||||
--Tabs--line-fontSize: var(--fontSizeSm);
|
||||
--Tabs--line-active-fontSize: var(--fontSizeSm);
|
||||
--Tabs--line-hover-fontSize: var(--fontSizeSm);
|
||||
--Tabs--line-lineHeight: 30px;
|
||||
--Tabs--line-active-lineHeight: 30px;
|
||||
--Tabs--line-hover-lineHeight: 30px;
|
||||
--Tabs--line-fontWeight: 500;
|
||||
--Tabs--line-active-fontWeight: 500;
|
||||
--Tabs--line-hover-fontWeight: 500;
|
||||
--Tabs--card-linkPadding: #{px2rem(5px)};
|
||||
|
||||
max-height: 100%;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.#{$ns}Tabs {
|
||||
&-content {
|
||||
padding: 0;
|
||||
.#{$ns}FormulaEditor-VariableList {
|
||||
&-sub {
|
||||
.#{$ns}FormulaEditor-VariableList-body {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
&-FormulaEditor-VariableList-base {
|
||||
@include scrollbar();
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-linksContainer {
|
||||
&-wrapper {
|
||||
@include panel-header();
|
||||
max-height: px2rem(30px);
|
||||
min-height: px2rem(30px);
|
||||
ul.#{$ns}Tabs-links {
|
||||
> li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
> a {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--overflow {
|
||||
> div {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > div {
|
||||
@include scrollbar();
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
border-radius: var(--borderRadius);
|
||||
}
|
||||
}
|
||||
|
||||
&-tab {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
|
||||
& > label {
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1;
|
||||
width: 0;
|
||||
display: inline-block;
|
||||
min-width: #{px2rem(50px)};
|
||||
}
|
||||
|
||||
& > .icon {
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.fa-ellipsis-h {
|
||||
margin-right: #{px2rem(5px)};
|
||||
&:hover {
|
||||
color: var(--primary);
|
||||
}
|
||||
}
|
||||
|
||||
&-tag {
|
||||
cursor: auto;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
padding: 0 #{px2rem(8px)};
|
||||
border-radius: var(--borderRadius);
|
||||
background: var(--colors-neutral-fill-10);
|
||||
color: var(--colors-neutral-text-2);
|
||||
font-size: var(--fontSizeSm);
|
||||
line-height: #{px2rem(24px)};
|
||||
height: #{px2rem(24px)};
|
||||
}
|
||||
|
||||
&-oper {
|
||||
list-style: none;
|
||||
max-width: #{px2rem(235px)};
|
||||
font-size: var(--fontSizeSm);
|
||||
min-width: 100px;
|
||||
padding: 0 5px;
|
||||
margin: 5px;
|
||||
text-align: left;
|
||||
li {
|
||||
line-height: 24px;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
background: var(--Form-select-menu-onHover-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.#{$ns}GroupedSelection {
|
||||
max-height: 100%;
|
||||
&-item {
|
||||
&-tag {
|
||||
line-height: 17px;
|
||||
}
|
||||
}
|
||||
&-itemLabel {
|
||||
font-size: var(--fontSizeSm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 函数列表 */
|
||||
&-FuncList {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
height: 100%;
|
||||
|
||||
&-searchBox {
|
||||
display: flex;
|
||||
width: auto;
|
||||
flex-shrink: 0;
|
||||
padding: #{px2rem(8px)};
|
||||
|
||||
& > div {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
font-size: var(--fontSizeSm);
|
||||
height: var(--gap-xl);
|
||||
}
|
||||
}
|
||||
|
||||
&-body {
|
||||
@include scrollbar();
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
&-collapseGroup {
|
||||
.#{$ns}FormulaEditor-FuncList-collapse {
|
||||
border: none;
|
||||
|
||||
.#{$ns}FormulaEditor-FuncList-expandIcon {
|
||||
font-size: var(--fontSizeSm);
|
||||
line-height: var(--fontSizeXl);
|
||||
transform-origin: #{px2rem(7px)} #{px2rem(9px)};
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-groupTitle {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: unset;
|
||||
padding: #{px2rem(5px)} #{px2rem(10px)};
|
||||
background: transparent;
|
||||
font-size: var(--fontSizeSm);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&-groupBody {
|
||||
> div {
|
||||
padding: 5px 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-item {
|
||||
cursor: pointer;
|
||||
padding: 0 #{px2rem(30px)};
|
||||
height: var(--gap-xl);
|
||||
line-height: var(--gap-xl);
|
||||
|
||||
&.is-active {
|
||||
background: var(--Tree-item-onHover-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&-doc {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
padding: 0 #{px2rem(10px)};
|
||||
font-size: 12px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
border-radius: var(--borderRadius);
|
||||
margin-top: 0;
|
||||
|
||||
code {
|
||||
color: #2468f2;
|
||||
}
|
||||
}
|
||||
|
||||
&-example {
|
||||
font-size: var(--fontSizeSm) !important;
|
||||
th {
|
||||
padding: #{px2rem(5px)} !important;
|
||||
font-size: var(--fontSizeSm) !important;
|
||||
}
|
||||
td {
|
||||
padding: #{px2rem(5px)} !important;
|
||||
}
|
||||
}
|
||||
|
||||
&-desc {
|
||||
@include scrollbar();
|
||||
color: var(--text--loud-color);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-FuncList.withDoc {
|
||||
max-height: 50% !important;
|
||||
}
|
||||
|
||||
&-FuncDoc {
|
||||
height: 300px;
|
||||
overflow: hidden;
|
||||
background: var(--InputFormula-code-bgColor);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}FormulaPicker {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
&-popup {
|
||||
height: px2rem(580px);
|
||||
|
||||
&-inner {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0 px2rem(16px);
|
||||
}
|
||||
}
|
||||
|
||||
&-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-right: #{px2rem(10px)};
|
||||
padding-right: px2rem(4px);
|
||||
max-width: calc(100% - #{px2rem(42px)});
|
||||
}
|
||||
|
||||
&-action {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&-icon {
|
||||
top: 0 !important;
|
||||
font-size: var(--InputFormula-icon-size);
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: var(--fontSizeSm);
|
||||
}
|
||||
|
||||
&.is-filled {
|
||||
&.icon-function.icon {
|
||||
font-size: var(--InputFormula-icon-size) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-ResultBox {
|
||||
padding-right: 10px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
span.c-field {
|
||||
background: #007bff;
|
||||
padding: 3px 5px;
|
||||
margin: 0 1px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
span.c-func {
|
||||
color: #ae4597;
|
||||
font-weight: bold;
|
||||
line-height: 14px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}FormulaPicker.is-input-group {
|
||||
border: var(--Form-input-borderWidth) solid var(--Form-input-borderColor);
|
||||
padding: 0 var(--Form-input-paddingX) 0 0;
|
||||
border-radius: var(--borderRadius);
|
||||
background-color: var(--colors-neutral-fill-11);
|
||||
height: var(--Form-input-height);
|
||||
|
||||
&.#{$ns}FormulaPicker--text {
|
||||
padding: var(--Form-input-paddingY) var(--Form-input-paddingX)
|
||||
var(--Form-input-paddingY) px2rem(5px);
|
||||
}
|
||||
|
||||
.#{$ns}FormulaPicker-input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: none;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
margin-right: #{px2rem(10px)};
|
||||
max-width: unset;
|
||||
|
||||
&:focus {
|
||||
border: none;
|
||||
outline: none;
|
||||
box-sizing: none;
|
||||
}
|
||||
|
||||
&-select,
|
||||
&-number,
|
||||
&-boolean,
|
||||
&-date,
|
||||
&-time,
|
||||
&-datetime {
|
||||
height: var(--InputFormula-input-schema-height);
|
||||
padding-left: var(--Form-input-paddingX);
|
||||
}
|
||||
|
||||
&-number {
|
||||
.#{$ns}Number-handler-wrap {
|
||||
height: unset; /* 避免调节器超出Input框 */
|
||||
}
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
&-custom {
|
||||
border: 0;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
> div {
|
||||
border: 0;
|
||||
padding: 0 0 0 var(--Form-input-paddingX);
|
||||
align-items: center;
|
||||
height: var(--InputFormula-input-schema-height);
|
||||
}
|
||||
}
|
||||
|
||||
&-variable {
|
||||
border: none;
|
||||
min-height: unset;
|
||||
line-height: #{px2rem(18px)};
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}FormulaPicker-toggler {
|
||||
color: var(--colors-neutral-text-2);
|
||||
.icon-function {
|
||||
transform: scale(1.3);
|
||||
}
|
||||
|
||||
.icon-ellipsis-v {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: var(--colors-brand-5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}FormulaCodeEditor {
|
||||
.cm-field,
|
||||
.cm-func {
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cm-field {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
.cm-field {
|
||||
background: #28a745;
|
||||
}
|
||||
.cm-func {
|
||||
color: #ae4597;
|
||||
font-weight: bold;
|
||||
line-height: 14px;
|
||||
}
|
||||
.cm-expression {
|
||||
background-color: #007bff;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cm-error-token {
|
||||
background-position: left bottom;
|
||||
background-repeat: repeat-x;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==);
|
||||
}
|
||||
|
||||
.CodeMirror-placeholder {
|
||||
color: var(--Form-input-placeholderColor) !important;
|
||||
}
|
||||
|
||||
.lint-error {
|
||||
color: var(--Form-input-onError-borderColor);
|
||||
}
|
||||
|
||||
&--singleLine {
|
||||
max-width: 100%;
|
||||
line-height: 20px;
|
||||
> .CodeMirror {
|
||||
height: 20px;
|
||||
|
||||
.CodeMirror-hscrollbar,
|
||||
.CodeMirror-vscrollbar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.CodeMirror-sizer {
|
||||
min-height: 20px !important;
|
||||
min-width: auto !important;
|
||||
border-right-width: 0 !important;
|
||||
}
|
||||
.CodeMirror-scroll {
|
||||
height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
.CodeMirror-sizer + div {
|
||||
// 不设置可以用触摸板滚动,将代码滚不见了
|
||||
height: 0 !important;
|
||||
}
|
||||
.CodeMirror-lines {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}InputBox > .#{$ns}FormulaCodeEditor {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
128
packages/amis-ui/scss/components/_grid-nav.scss
Normal file
128
packages/amis-ui/scss/components/_grid-nav.scss
Normal file
@@ -0,0 +1,128 @@
|
||||
.u-hairline::after {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
top: -50%;
|
||||
right: -50%;
|
||||
bottom: -50%;
|
||||
left: -50%;
|
||||
border: 0 solid var(--borderColorLight);
|
||||
z-index: 1;
|
||||
transform: scale(0.5);
|
||||
}
|
||||
|
||||
.#{$ns}GridNav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&-top {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
border-top-width: px2rem(1px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}GridNavItem {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
|
||||
&--square {
|
||||
height: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&-icon {
|
||||
width: var(--rv-grid-item-icon-size);
|
||||
}
|
||||
|
||||
&-text {
|
||||
color: var(--text-color);
|
||||
font-size: var(--fontSizeSm);
|
||||
line-height: 1.5;
|
||||
word-break: break-all;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&-icon + &-text {
|
||||
margin-top: px2rem(8px);
|
||||
}
|
||||
|
||||
&-image {
|
||||
display: inline-block;
|
||||
|
||||
svg,
|
||||
img {
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
&-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
padding: var(--gap-md) var(--gap-sm);
|
||||
background-color: var(--white);
|
||||
position: relative;
|
||||
|
||||
.#{$ns}Badge-text {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
&--border::after {
|
||||
border-width: 0 var(--borderWidth) var(--borderWidth) 0;
|
||||
}
|
||||
|
||||
&--square {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&--center {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&--horizontal {
|
||||
flex-direction: row;
|
||||
|
||||
.#{$ns}GridNavItem-text {
|
||||
margin: 0 0 0 var(--gap-sm);
|
||||
}
|
||||
}
|
||||
|
||||
&--reverse {
|
||||
flex-direction: column-reverse;
|
||||
|
||||
.#{$ns}GridNavItem-text {
|
||||
margin: 0 0 var(--gap-sm);
|
||||
}
|
||||
}
|
||||
|
||||
&--horizontal &--reverse {
|
||||
flex-direction: row-reverse;
|
||||
|
||||
.#{$ns}GridNavItem-text {
|
||||
margin: 0 var(--gap-sm) 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
&--surround {
|
||||
&::after {
|
||||
border-width: var(--borderWidth);
|
||||
}
|
||||
}
|
||||
|
||||
&--clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
51
packages/amis-ui/scss/components/_horizontal-scroll.scss
Normal file
51
packages/amis-ui/scss/components/_horizontal-scroll.scss
Normal file
@@ -0,0 +1,51 @@
|
||||
.#{$ns}HorizontalScroll-wrapper {
|
||||
.#{$ns}HorizontalScroll {
|
||||
&-Container {
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
}
|
||||
&-Container-main {
|
||||
flex: 1 1 auto;
|
||||
scrollbar-width: none;
|
||||
max-width: calc(100% - 64px);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&-arrow {
|
||||
flex: 0 0 16px;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
box-sizing: content-box;
|
||||
|
||||
.icon {
|
||||
top: 0;
|
||||
width: var(--Remark-icon-fontSize);
|
||||
height: var(--Remark-icon-fontSize);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--icon-onHover-color);
|
||||
}
|
||||
|
||||
&--left {
|
||||
margin-right: 16px;
|
||||
.icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
&--right {
|
||||
margin-left: 16px;
|
||||
}
|
||||
&--disabled {
|
||||
.iconfont {
|
||||
cursor: not-allowed;
|
||||
color: var(--Number-handler-onDisabled-color);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--Number-handler-onDisabled-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
4
packages/amis-ui/scss/components/_icon.scss
Normal file
4
packages/amis-ui/scss/components/_icon.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
.#{$ns}Icon {
|
||||
height: var(--fontSizeBase);
|
||||
vertical-align: middle;
|
||||
}
|
||||
331
packages/amis-ui/scss/components/_image-gallery.scss
Normal file
331
packages/amis-ui/scss/components/_image-gallery.scss
Normal file
@@ -0,0 +1,331 @@
|
||||
@keyframes disappear {
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ImageGallery {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
max-width: 1010px !important;
|
||||
padding-top: 0;
|
||||
|
||||
&-close {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: px2rem(16px);
|
||||
height: px2rem(16px);
|
||||
}
|
||||
}
|
||||
|
||||
&-title,
|
||||
&-caption {
|
||||
height: px2rem(18px);
|
||||
vertical-align: top;
|
||||
line-height: px2rem(18px);
|
||||
font-size: px2rem(12px);
|
||||
color: var(--white);
|
||||
text-align: center;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
&-caption {
|
||||
text-align: left;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
&-main {
|
||||
background: #000;
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
height: 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
|
||||
> img {
|
||||
cursor: move;
|
||||
cursor: -webkit-grab;
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
}
|
||||
|
||||
&.is-dragging > img {
|
||||
transition: none;
|
||||
user-select: none;
|
||||
cursor: -webkit-grabbing;
|
||||
}
|
||||
}
|
||||
|
||||
&-prevBtn,
|
||||
&-nextBtn {
|
||||
svg {
|
||||
width: var(--image-images-item-size);
|
||||
height: var(--image-images-item-size);
|
||||
}
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
cursor: pointer;
|
||||
color: var(--image-images-item-color);
|
||||
text-shadow: rgba(0, 0, 0, 0.3) 0px 0px 4px;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 0px 0px 4px;
|
||||
}
|
||||
animation-name: disappear;
|
||||
animation-delay: var(--animation-duration);
|
||||
animation-duration: var(--animation-duration);
|
||||
animation-fill-mode: both;
|
||||
|
||||
&.is-disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
&-main:hover &-prevBtn,
|
||||
&-main:hover &-nextBtn {
|
||||
animation-name: appear;
|
||||
animation-delay: 0s;
|
||||
animation-duration: var(--animation-duration);
|
||||
}
|
||||
|
||||
&-prevBtn {
|
||||
left: var(--gap-md);
|
||||
}
|
||||
|
||||
&-nextBtn {
|
||||
right: var(--gap-md);
|
||||
}
|
||||
|
||||
&-footer {
|
||||
min-height: px2rem(74px);
|
||||
background: #222;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
&-prevList,
|
||||
&-nextList {
|
||||
width: var(--gap-md);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
color: #fff;
|
||||
|
||||
&.is-disabled {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 1);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
&-itemsWrap {
|
||||
flex-grow: 1;
|
||||
flex-basis: 0;
|
||||
width: 0;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
display: flex;
|
||||
|
||||
// 火狐浏览器
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #111 transparent;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
// display: none;
|
||||
background-color: transparent;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
overflow: visible;
|
||||
height: 10px !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background-color: #111; // #babac0;
|
||||
border-radius: 6px;
|
||||
border: 4px solid transparent;
|
||||
|
||||
&:hover {
|
||||
background-color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&-items {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&-item {
|
||||
margin: 10px 5px 0;
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
display: inline-flex;
|
||||
position: relative;
|
||||
border: 1px solid #666;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
> img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
@supports (object-fit: cover) {
|
||||
> img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
&:after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: block;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 1;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border: 1px solid #e5e5e5;
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
border: 1px solid var(--primary);
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ImageGallery-prevBtn {
|
||||
content: var(--image-images-prev-icon);
|
||||
}
|
||||
|
||||
.ImageGallery-nextBtn {
|
||||
content: var(--image-images-next-icon);
|
||||
}
|
||||
|
||||
.#{$ns}ImageGallery-toolbar {
|
||||
background-color: var(--image-images-preview-bgColor);
|
||||
border-radius: var(--image-images-preview-radius);
|
||||
box-shadow: 0 2px 6px 0 rgba(211, 211, 211, 0.5);
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: var(--image-images-preview-paddingTop)
|
||||
var(--image-images-preview-paddingRight)
|
||||
var(--image-images-preview-paddingBottom)
|
||||
var(--image-images-preview-paddingLeft);
|
||||
position: absolute;
|
||||
bottom: px2rem(20px);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
&-action {
|
||||
padding: px2rem(13px);
|
||||
border-radius: px2rem(4px);
|
||||
width: px2rem(40px);
|
||||
height: px2rem(40px);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&-icon {
|
||||
display: block;
|
||||
color: var(--black);
|
||||
|
||||
svg {
|
||||
fill: var(--black);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
cursor: not-allowed;
|
||||
color: var(--icon-onDisabled-color);
|
||||
|
||||
.#{$ns}ImageGallery-toolbar-action-icon {
|
||||
color: var(--icon-onDisabled-color);
|
||||
|
||||
svg {
|
||||
color: var(--icon-onDisabled-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #f2f3f5;
|
||||
|
||||
.#{$ns}ImageGallery-toolbar-action-icon {
|
||||
color: var(--primary);
|
||||
|
||||
svg {
|
||||
fill: var(--primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
650
packages/amis-ui/scss/components/_images.scss
Normal file
650
packages/amis-ui/scss/components/_images.scss
Normal file
@@ -0,0 +1,650 @@
|
||||
@use 'sass:math';
|
||||
|
||||
.sm-ss-sss-m,
|
||||
.sss-ss-ms-m,
|
||||
.sms-ss-sms-m,
|
||||
.sm-ss-sss-ss,
|
||||
.ms-ss-sss-ss,
|
||||
.sss-ss-sm-ss,
|
||||
.mss-ss-ssm-ss,
|
||||
.sss-ss-mm-ss,
|
||||
[class^="even-"]{
|
||||
.#{$ns}Image{
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Images {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: calc(var(--gap-xs) * -1);
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
margin: var(--image-images-item-marginTop)
|
||||
var(--image-images-item-marginRight) var(--image-images-item-marginBottom)
|
||||
var(--image-images-item-marginLeft);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Image {
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
overflow: hidden;
|
||||
|
||||
&--original {
|
||||
height: 100%;
|
||||
.#{$ns}Image-origin--cover {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&--thumb {
|
||||
display: inline-block;
|
||||
padding: var(--image-image-normal-paddingTop)
|
||||
var(--image-image-normal-paddingRight)
|
||||
var(--image-image-normal-paddingBottom)
|
||||
var(--image-image-normal-paddingLeft);
|
||||
}
|
||||
|
||||
&-thumbWrap {
|
||||
position: relative;
|
||||
// height: 100%;
|
||||
}
|
||||
|
||||
&-image {
|
||||
display: block;
|
||||
|
||||
&--loading {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
&--original &-image {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
&-thumb {
|
||||
width: px2rem(110px);
|
||||
height: px2rem(110px);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
> img {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
||||
|
||||
&-info {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
&--thumb &-info {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&-thumb--4-3 {
|
||||
height: px2rem(math.div(110px * 3, 4));
|
||||
}
|
||||
|
||||
&-thumb--16-9 {
|
||||
height: px2rem(math.div(110px * 9, 16));
|
||||
}
|
||||
|
||||
&-thumb--fixed-size {
|
||||
min-width: px2rem(110px);
|
||||
min-height: px2rem(110px);
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&-thumb--fixed-size &-thumb {
|
||||
width: 100%;
|
||||
// height: 100%;
|
||||
|
||||
> img {
|
||||
width: auto;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-thumb--w-full > img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@supports (object-fit: contain) {
|
||||
&-thumb--contain > img {
|
||||
position: static;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
transform: translate(0, 0);
|
||||
top: 0;
|
||||
left: 0;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
&-origin--contain > img {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
@supports (object-fit: cover) {
|
||||
&-thumb--cover > img {
|
||||
position: static;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
transform: translate(0, 0);
|
||||
top: 0;
|
||||
left: 0;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
&-origin--cover > img {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
&-caption {
|
||||
font-size: var(--image-image-description-fontSize);
|
||||
color: var(--image-image-description-color);
|
||||
margin-top: var(--image-image-description-marginTop);
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: var(--image-image-normal-fontSize);
|
||||
color: var(--image-image-normal-color);
|
||||
margin-top: var(--image-image-normal-title-marginTop);
|
||||
}
|
||||
|
||||
&-overlay {
|
||||
background: rgba(8, 14, 26, 0.5);
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
flex-wrap: wrap;
|
||||
color: #fff;
|
||||
|
||||
> div {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
> a {
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
line-height: 1;
|
||||
font-size: px2rem(16px);
|
||||
|
||||
svg {
|
||||
width: px2rem(16px);
|
||||
height: px2rem(16px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-origin:hover &-overlay,
|
||||
&-thumbWrap:hover &-overlay {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.#{$ns}Img-container{
|
||||
position: relative;
|
||||
|
||||
img{
|
||||
transition: all ease-in-out .3s;
|
||||
|
||||
}
|
||||
|
||||
.mask{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
opacity: 0;
|
||||
font-weight: bold;
|
||||
font-size: px2rem(15px);
|
||||
background-color: rgb(44, 63, 82);
|
||||
color: #fff;
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
}
|
||||
|
||||
.hover-slide{
|
||||
&:hover .mask{
|
||||
opacity: 1;
|
||||
transform: translate(5%, 5%);
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.pull-top{
|
||||
.mask{
|
||||
opacity: 1;
|
||||
}
|
||||
img{
|
||||
position: absolute;
|
||||
}
|
||||
&:hover img{
|
||||
transform: translateY(-70%);
|
||||
}
|
||||
}
|
||||
|
||||
.scale-center{
|
||||
.mask{
|
||||
scale: 0.5;
|
||||
|
||||
span{
|
||||
position: absolute;
|
||||
top: 5%;
|
||||
left: 5%;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover .mask{
|
||||
transform: scale(2);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:hover img{
|
||||
transform: scale(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.scale-top{
|
||||
img{
|
||||
position: absolute;
|
||||
}
|
||||
.mask {
|
||||
opacity: 1;
|
||||
span{
|
||||
position: absolute;
|
||||
bottom: 5%;
|
||||
left: 5%;
|
||||
}
|
||||
}
|
||||
&:hover img{
|
||||
transform: translateY(-50%) scale(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.text-style-1{
|
||||
overflow: hidden;
|
||||
.mask{
|
||||
z-index: 1;
|
||||
opacity: 1;
|
||||
background: rgba(48, 133, 163, 0.4);
|
||||
span{
|
||||
position: absolute;
|
||||
left: 5%;
|
||||
bottom: 5%;
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
}
|
||||
img{
|
||||
scale: 1.2;
|
||||
transform: translateX(-5%);
|
||||
}
|
||||
&:hover .mask{
|
||||
background: rgba(48, 133, 163, 0);
|
||||
span{
|
||||
transform: translateY(-200%);
|
||||
}
|
||||
}
|
||||
&:hover img{
|
||||
transform: translateX(5%);
|
||||
}
|
||||
}
|
||||
|
||||
.text-style-2{
|
||||
.mask{
|
||||
opacity: 1;
|
||||
background: transparent;
|
||||
span{
|
||||
z-index: 1;
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
}
|
||||
.mask::before{
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 0%;
|
||||
background: linear-gradient(to bottom, rgba(72, 76, 97, 0) 0, rgba(72, 76, 97, .8) 75%);
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
&:hover .mask::before{
|
||||
height: 100%;
|
||||
}
|
||||
&:hover .mask span{
|
||||
transform: translateY(-200%);
|
||||
}
|
||||
}
|
||||
|
||||
.text-style-3{
|
||||
overflow: hidden;
|
||||
.mask{
|
||||
z-index: 1;
|
||||
opacity: 1;
|
||||
background: transparent;
|
||||
span{
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
}
|
||||
img{
|
||||
scale: 1.2;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
.mask::before,
|
||||
.mask::after{
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
bottom: 10%;
|
||||
left: 15%;
|
||||
right: 15%;
|
||||
transition: all 0.3s ease-in-out;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
opacity: 0;
|
||||
}
|
||||
.mask::before{
|
||||
border-top: 1px solid #ffffff;
|
||||
border-bottom: 1px solid #ffffff;
|
||||
transform: scaleX(0); /* 初始状态:水平方向缩放为0 */
|
||||
transform-origin: left; /* 设置变换的原点为左侧 */
|
||||
}
|
||||
.mask::after {
|
||||
border-left: 1px solid #ffffff;
|
||||
border-right: 1px solid #ffffff;
|
||||
transform: scaleY(0); /* 初始状态:垂直方向缩放为0 */
|
||||
transform-origin: top; /* 设置变换的原点为顶部 */
|
||||
}
|
||||
&:hover .mask::before{
|
||||
opacity: 1;
|
||||
transform: scaleX(1.2) translateX(-10%); /* 鼠标悬停时:水平方向缩放为1 */
|
||||
}
|
||||
&:hover .mask::after{
|
||||
opacity: 1;
|
||||
transform: scaleY(1.2) translateY(-10%); /* 鼠标悬停时:垂直方向缩放为1 */
|
||||
}
|
||||
&:hover .mask{
|
||||
background: rgba(48, 133, 163, 0.4);
|
||||
span{
|
||||
top: 20%;
|
||||
}
|
||||
}
|
||||
&:hover img{
|
||||
transform: translateY(10%);
|
||||
}
|
||||
}
|
||||
|
||||
.text-style-4{
|
||||
.mask{
|
||||
background: #fff;
|
||||
opacity: 1;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
top: auto;
|
||||
height: 0!important;
|
||||
transform-origin: bottom;
|
||||
color: #0b0a22;
|
||||
z-index: 1;
|
||||
span{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover .mask{
|
||||
height: 40%!important;
|
||||
span{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.text-style-5{
|
||||
.mask{
|
||||
opacity: 1;
|
||||
background: rgba(48, 133, 163, 0);
|
||||
z-index: 1;
|
||||
span{
|
||||
position: relative;
|
||||
bottom: -10%;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
}
|
||||
.mask::before{
|
||||
content: "";
|
||||
border: 1px solid #ffffff;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
width: 0;
|
||||
height: 0;
|
||||
transition: all 0.3s ease-in-out;
|
||||
opacity: 0;
|
||||
}
|
||||
&:hover .mask::before{
|
||||
width: 90%;
|
||||
height: 90%;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:hover .mask{
|
||||
background: rgba(48, 133, 163, 0.4);
|
||||
span{
|
||||
bottom: 10%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.text-style-6{
|
||||
.mask{
|
||||
opacity: 1;
|
||||
z-index: 1;
|
||||
background: rgba(48, 133, 163, 0.4);
|
||||
span{
|
||||
position: absolute;
|
||||
transition: all 0.3s ease-in-out;
|
||||
bottom: 40%;
|
||||
}
|
||||
}
|
||||
.mask::before,
|
||||
.mask::after{
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 5%;
|
||||
bottom: 5%;
|
||||
left: 7%;
|
||||
right: 7%;
|
||||
transition: all 0.3s ease-in-out;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
opacity: 0;
|
||||
}
|
||||
.mask::before{
|
||||
border-top: 1px solid #ffffff;
|
||||
border-bottom: 1px solid #ffffff;
|
||||
transform: scaleX(0); /* 初始状态:水平方向缩放为0 */
|
||||
}
|
||||
.mask::after {
|
||||
border-left: 1px solid #ffffff;
|
||||
border-right: 1px solid #ffffff;
|
||||
transform: scaleY(0); /* 初始状态:垂直方向缩放为0 */
|
||||
}
|
||||
&:hover .mask::before{
|
||||
opacity: 1;
|
||||
transform: scaleX(1); /* 鼠标悬停时:水平方向缩放为1 */
|
||||
}
|
||||
&:hover .mask::after{
|
||||
opacity: 1;
|
||||
transform: scaleY(1); /* 鼠标悬停时:垂直方向缩放为1 */
|
||||
}
|
||||
&:hover .mask{
|
||||
background: rgba(48, 133, 163, 0);
|
||||
span{
|
||||
bottom: 5%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.text-style-7{
|
||||
.mask{
|
||||
opacity: 1;
|
||||
z-index: 1;
|
||||
background: rgba(48, 133, 163, 0);
|
||||
span{
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
}
|
||||
.mask::before,
|
||||
.mask::after{
|
||||
content: "";
|
||||
width: 80%;
|
||||
height: 1px;
|
||||
background: #ffffff;
|
||||
position: absolute;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
&:hover .mask{
|
||||
background: rgba(48, 133, 163, 0.4);
|
||||
span{
|
||||
top: 20%;
|
||||
}
|
||||
}
|
||||
&:hover .mask::before{
|
||||
transform: rotateZ(45deg);
|
||||
}
|
||||
&:hover .mask::after{
|
||||
transform: rotateZ(-45deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ImageField--thumb {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
@include clearfix();
|
||||
// margin-bottom: var(--gap-md);
|
||||
}
|
||||
|
||||
.#{$ns}ImagesField {
|
||||
position: relative;
|
||||
@include clearfix();
|
||||
|
||||
&--full {
|
||||
position: relative;
|
||||
|
||||
.#{$ns}Images {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
cursor: grab;
|
||||
|
||||
&-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
&-item {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fff;
|
||||
will-change: transform, opacity;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
&-itemInner {
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
max-height: 100vh;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.#{$ns}Image-image {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
|
||||
&--contain {
|
||||
object-fit: contain;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&--cover {
|
||||
object-fit: cover;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-itemIndex {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
bottom: 16px;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
color: white;
|
||||
padding: 4px 8px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
z-index: 10;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Image-view-icon {
|
||||
content: var(--image-image-normal-icon);
|
||||
}
|
||||
|
||||
|
||||
|
||||
111
packages/amis-ui/scss/components/_input-box.scss
Normal file
111
packages/amis-ui/scss/components/_input-box.scss
Normal file
@@ -0,0 +1,111 @@
|
||||
.#{$ns}InputBox {
|
||||
height: var(--input-size-default-height);
|
||||
|
||||
@include input-input();
|
||||
@include input-border();
|
||||
|
||||
&--inline {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
> input[readonly] {
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
&.is-error,
|
||||
.is-error > & {
|
||||
border-color: var(--Form-input-onError-borderColor);
|
||||
background: var(--Form-input-onError-bg);
|
||||
}
|
||||
|
||||
&.is-focused {
|
||||
border-color: var(--Form-input-onFocused-borderColor);
|
||||
box-shadow: var(--Form-input-boxShadow);
|
||||
background: var(--Form-input-onFocused-bg);
|
||||
}
|
||||
|
||||
&.is-clickable:hover {
|
||||
border-color: var(--Form-input-onFocused-borderColor);
|
||||
box-shadow: var(--Form-input-boxShadow);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.is-error.is-focused {
|
||||
border-color: var(--Form-input-onError-borderColor);
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
color: var(--text--muted-color);
|
||||
background: var(--Form-input-onDisabled-bg);
|
||||
border-color: var(--Form-input-onDisabled-borderColor);
|
||||
}
|
||||
|
||||
&-clear {
|
||||
visibility: hidden;
|
||||
@include input-clear();
|
||||
}
|
||||
|
||||
&.is-focused &-clear,
|
||||
&:hover &-clear {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
> svg {
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
color: var(--icon-color);
|
||||
margin-top: px2rem(2px);
|
||||
}
|
||||
|
||||
> a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&-caret {
|
||||
transition: transform var(--animation-duration) ease-out;
|
||||
margin: 5px;
|
||||
display: flex;
|
||||
color: var(--Form-select-caret-iconColor);
|
||||
transform: rotate(90deg);
|
||||
&:hover {
|
||||
color: var(--Form-select-caret-onHover-iconColor);
|
||||
}
|
||||
|
||||
> svg {
|
||||
width: px2rem(10px);
|
||||
height: px2rem(10px);
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-active &-caret {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
@include hairline-bottom(var(--Form-input-borderColor));
|
||||
}
|
||||
|
||||
&.is-error,
|
||||
.is-error > & {
|
||||
border-bottom-color: var(--Form-input-onError-borderColor);
|
||||
}
|
||||
|
||||
&.is-focused {
|
||||
border-bottom-color: var(--Form-input-onFocused-borderColor);
|
||||
}
|
||||
|
||||
&.is-error.is-focused {
|
||||
border-bottom-color: var(--Form-input-onError-borderColor);
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
border-bottom-color: var(--Form-input-onDisabled-borderColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
149
packages/amis-ui/scss/components/_json-schema-editor.scss
Normal file
149
packages/amis-ui/scss/components/_json-schema-editor.scss
Normal file
@@ -0,0 +1,149 @@
|
||||
.#{$ns}SchemaEditor {
|
||||
&Props {
|
||||
width: 100%;
|
||||
|
||||
> button {
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
&-placeholder {
|
||||
color: var(--text--muted-color);
|
||||
}
|
||||
}
|
||||
|
||||
&Props--depth {
|
||||
position: relative;
|
||||
margin-left: px2rem(40px);
|
||||
|
||||
&:before {
|
||||
width: 1px;
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
bottom: 10px;
|
||||
left: -35px;
|
||||
border-left: dashed 1px var(--icon-color);
|
||||
}
|
||||
|
||||
& .#{$ns}SchemaEditorItem:before {
|
||||
height: 1px;
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 17px;
|
||||
width: 25px;
|
||||
left: -35px;
|
||||
border-top: dashed 1px var(--icon-color);
|
||||
}
|
||||
|
||||
& > button {
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
height: 1px;
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
width: 25px;
|
||||
left: -35px;
|
||||
border-top: dashed 1px var(--icon-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&ArrayProps:before {
|
||||
bottom: 15px;
|
||||
}
|
||||
|
||||
&Item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--gap-xs);
|
||||
font-size: var(--fonts-size-8);
|
||||
|
||||
align-items: stretch;
|
||||
position: relative;
|
||||
|
||||
&--mini {
|
||||
> button {
|
||||
padding: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&Item + &Item {
|
||||
margin-top: var(--gap-sm);
|
||||
}
|
||||
|
||||
&Object,
|
||||
&Array {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--gap-xs);
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&-itemsLabel {
|
||||
line-height: px2rem(32px);
|
||||
}
|
||||
|
||||
&-caret {
|
||||
display: inline-block;
|
||||
height: px2rem(24px);
|
||||
text-align: center;
|
||||
line-height: px2rem(24px);
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
transform: rotate(0deg);
|
||||
transition: transform var(--animation-duration);
|
||||
color: var(--icon-color);
|
||||
margin-top: calc((var(--Form-input-height) - var(--Switch-height)) / 2);
|
||||
transform: rotate(90deg);
|
||||
> svg {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-caret.is-collapsed {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
&-required {
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
&-key,
|
||||
&-title,
|
||||
&-description {
|
||||
flex: 1;
|
||||
max-width: 200px;
|
||||
min-width: 80px;
|
||||
|
||||
> input {
|
||||
flex-basis: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-info {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
@include input-input();
|
||||
@include input-border();
|
||||
}
|
||||
&-typeLabel {
|
||||
color: var(--Form-input-placeholderColor);
|
||||
}
|
||||
}
|
||||
166
packages/amis-ui/scss/components/_json-schema.scss
Normal file
166
packages/amis-ui/scss/components/_json-schema.scss
Normal file
@@ -0,0 +1,166 @@
|
||||
.#{$ns}JSONSchemaMember {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
gap: var(--gap-sm);
|
||||
|
||||
&-key {
|
||||
min-width: 80px;
|
||||
max-width: 150px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
||||
& > span {
|
||||
display: flex;
|
||||
background: var(--Form-input-bg);
|
||||
border: var(--Form-input-borderWidth) solid var(--Form-input-borderColor);
|
||||
border-radius: var(--Form-input-borderRadius);
|
||||
// height: var(--Form-input-height);
|
||||
line-height: var(--Form-input-lineHeight);
|
||||
padding: var(--Form-input-paddingY) var(--Form-input-paddingX);
|
||||
font-size: var(--Form-input-fontSize);
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
|
||||
color: var(--Form-input-color);
|
||||
}
|
||||
|
||||
& > * {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
& > span {
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
border-bottom: var(--Form-input-borderWidth) solid
|
||||
var(--Form-input-borderColor);
|
||||
}
|
||||
|
||||
.#{$ns}InputBox {
|
||||
height: 100%;
|
||||
line-height: 1;
|
||||
|
||||
> .#{$ns}InputBox-caret {
|
||||
svg {
|
||||
top: 0.125em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-value {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
gap: var(--gap-sm);
|
||||
|
||||
> a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
> div {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
& + & {
|
||||
margin-top: var(--gap-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}JSONSchemaObject {
|
||||
&-caret {
|
||||
display: inline-block;
|
||||
height: px2rem(24px);
|
||||
text-align: center;
|
||||
line-height: px2rem(24px);
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
transform: rotate(0deg);
|
||||
transition: transform var(--animation-duration);
|
||||
color: var(--icon-color);
|
||||
margin-top: calc((var(--Form-input-height) - var(--Switch-height)) / 2);
|
||||
transform: rotate(90deg);
|
||||
> svg {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-caret.is-collapsed {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
&.is-expanded {
|
||||
position: relative;
|
||||
margin-left: px2rem(20px);
|
||||
|
||||
&:before {
|
||||
width: 1px;
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
bottom: 10px;
|
||||
left: -33px;
|
||||
border-left: dashed 1px var(--icon-color);
|
||||
}
|
||||
|
||||
& .#{$ns}JSONSchemaMember {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
& .#{$ns}JSONSchemaMember:before {
|
||||
height: 1px;
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 17px;
|
||||
width: 25px;
|
||||
left: -33px;
|
||||
border-top: dashed 1px var(--icon-color);
|
||||
}
|
||||
|
||||
& .#{$ns}JSONSchemaMember:first-child:before {
|
||||
left: -20px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
& > button {
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
height: 1px;
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
width: 25px;
|
||||
left: -33px;
|
||||
border-top: dashed 1px var(--icon-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
.#{$ns}Number {
|
||||
border-radius: 0;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
@include hairline-bottom(var(--Form-input-borderColor));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
packages/amis-ui/scss/components/_json.scss
Normal file
7
packages/amis-ui/scss/components/_json.scss
Normal file
@@ -0,0 +1,7 @@
|
||||
.#{$ns}JsonField {
|
||||
&-nodeValue {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
}
|
||||
22
packages/amis-ui/scss/components/_link.scss
Normal file
22
packages/amis-ui/scss/components/_link.scss
Normal file
@@ -0,0 +1,22 @@
|
||||
.#{$ns}Link {
|
||||
&.is-disabled {
|
||||
cursor: not-allowed;
|
||||
color: var(--link-disabled-color);
|
||||
font-size: var(--link-disabled-fontSize);
|
||||
font-weight: var(--link-disabled-fontWeight);
|
||||
text-decoration: var(--link-disabled-text-decoration);
|
||||
font-style: var(--link-disabled-font-style);
|
||||
background-color: var(--link-disabled-bg-color);
|
||||
}
|
||||
i {
|
||||
font-size: var(--link-icon-size);
|
||||
margin: 0 var(--link-icon-margin);
|
||||
}
|
||||
svg {
|
||||
height: var(--link-icon-size);
|
||||
width: var(--link-icon-size);
|
||||
margin: 0 var(--link-icon-margin);
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
}
|
||||
114
packages/amis-ui/scss/components/_list-menu.scss
Normal file
114
packages/amis-ui/scss/components/_list-menu.scss
Normal file
@@ -0,0 +1,114 @@
|
||||
.#{$ns}ListMenu {
|
||||
background: var(--ListMenu-item-bg);
|
||||
min-width: px2rem(200px);
|
||||
border: var(--ListMenu-borderWidth) solid var(--ListMenu-bordrColor);
|
||||
border-radius: var(--ListMenu-borderRadius);
|
||||
|
||||
&-groupLabel {
|
||||
font-size: var(--fontSizeXs);
|
||||
color: var(--text--muted-color);
|
||||
padding: calc(
|
||||
(
|
||||
var(--ListMenu-item-height) - var(--Form-input-lineHeight) *
|
||||
var(--Form-input-fontSize) - var(--gap-sm)
|
||||
) / 2
|
||||
)
|
||||
0 0 calc(var(--Form-select-paddingX) - var(--gap-xs));
|
||||
}
|
||||
|
||||
&-group:not(:first-child) > &-groupLabel {
|
||||
border-top: px2rem(1px) solid var(--ListMenu-divider-color);
|
||||
}
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
min-height: var(--ListMenu-item-height);
|
||||
color: var(--ListMenu-item-color);
|
||||
line-height: var(--Form-input-lineHeight);
|
||||
font-size: var(--Form-input-fontSize);
|
||||
cursor: pointer;
|
||||
padding: calc(
|
||||
(
|
||||
var(--ListMenu-item-height) - var(--Form-input-lineHeight) *
|
||||
var(--Form-input-fontSize)
|
||||
) / 2
|
||||
)
|
||||
var(--Form-select-paddingX);
|
||||
|
||||
&.is-active {
|
||||
color: var(--ListMenu-item--onActive-color);
|
||||
background: var(--ListMenu-item--onActive-bg);
|
||||
}
|
||||
|
||||
// &:hover,
|
||||
&.is-highlight {
|
||||
color: var(--ListMenu-item--onHover-color);
|
||||
background: var(--ListMenu-item--onHover-bg);
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
color: var(--ListMenu-item--onDisabled-color);
|
||||
background: var(--ListMenu-item--onDisabled-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&-placeholder {
|
||||
display: block;
|
||||
min-height: var(--ListMenu-item-height);
|
||||
color: var(--text--muted-color);
|
||||
line-height: var(--Form-input-lineHeight);
|
||||
font-size: var(--Form-input-fontSize);
|
||||
cursor: pointer;
|
||||
padding: calc(
|
||||
(
|
||||
var(--ListMenu-item-height) - var(--Form-input-lineHeight) *
|
||||
var(--Form-input-fontSize)
|
||||
) / 2
|
||||
)
|
||||
var(--Form-select-paddingX);
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.#{$ns}ListMenu-item {
|
||||
width: calc((100vw - var(--ListMenu-item-mobile-margin) * 7) / 3);
|
||||
display: inline-flex;
|
||||
background: var(--ListMenu-item-mobile-bg);
|
||||
margin: var(--ListMenu-item-mobile-margin);
|
||||
|
||||
&.is-active {
|
||||
background: var(--ListMenu-item-mobile-active-bg);
|
||||
}
|
||||
|
||||
.#{$ns}ListMenu-itemLabel {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ListMenu-add-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: var(--ListMenu-item-mobile-margin);
|
||||
text-align: left;
|
||||
|
||||
.#{$ns}ResultBox {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
padding: var(--Form-item-mobile-gap) 0;
|
||||
border-bottom: 1px solid var(--borderColor);
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}PopOver > .#{$ns}ListMenu {
|
||||
border-color: var(--listMenu--onActive-borderColor);
|
||||
}
|
||||
313
packages/amis-ui/scss/components/_list.scss
Normal file
313
packages/amis-ui/scss/components/_list.scss
Normal file
@@ -0,0 +1,313 @@
|
||||
.#{$ns}List {
|
||||
position: relative;
|
||||
// 黑科技,让 scrollIntoView 能够跑正确的位置
|
||||
// margin-top: calc(var(--affix-offset-top) * -1);
|
||||
// padding-top: var(--affix-offset-top);
|
||||
scroll-margin-top: var(--affix-offset-top);
|
||||
|
||||
&-items {
|
||||
border-radius: var(--List-borderRadius);
|
||||
border: var(--List-borderWidth) solid var(--List-borderColor);
|
||||
background: var(--List-bg);
|
||||
margin-bottom: var(--gap-sm);
|
||||
margin-right: px2rem(15px);
|
||||
}
|
||||
|
||||
&-toolbar {
|
||||
@include clearfix();
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: var(--List-toolbar-marginY) var(--List-toolbar-marginX)
|
||||
var(--List-toolbar-marginY);
|
||||
}
|
||||
|
||||
&-actions {
|
||||
display: inline-block;
|
||||
|
||||
> * {
|
||||
margin-right: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
padding: var(--List-toolbar-marginY) var(--List-toolbar-marginX);
|
||||
|
||||
> * + .#{$ns}Button,
|
||||
> * + .#{$ns}ButtonGroup,
|
||||
> * + .#{$ns}ButtonToolbar {
|
||||
margin-left: var(--Crud-toolbar-gap);
|
||||
}
|
||||
}
|
||||
|
||||
&-header + &-toolbar {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
&-heading {
|
||||
padding: var(--gap-xs) 0;
|
||||
}
|
||||
|
||||
&-fixedTop {
|
||||
position: sticky;
|
||||
background: var(--white);
|
||||
z-index: $zindex-sticky;
|
||||
top: var(--affix-offset-top);
|
||||
// box-shadow: var(--List-fixedTop-boxShadow);
|
||||
// padding: var(--gap-sm);
|
||||
|
||||
.#{$ns}Cards-toolbar {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&--unsaved &-heading {
|
||||
background: var(--List--unsaved-heading-bg);
|
||||
color: var(--List--unsaved-heading-color);
|
||||
padding: var(--gap-xs) var(--gap-sm);
|
||||
margin-bottom: var(--gap-sm);
|
||||
}
|
||||
|
||||
&-dragTip {
|
||||
width: 100%;
|
||||
color: var(--info);
|
||||
clear: both;
|
||||
margin-top: var(--gap-xs);
|
||||
}
|
||||
|
||||
&-placeholder {
|
||||
color: var(--text--muted-color);
|
||||
text-align: center;
|
||||
min-height: var(--List-placeholder-height);
|
||||
line-height: var(--List-placeholder-height);
|
||||
}
|
||||
|
||||
&-footToolbar--affix,
|
||||
&-footer--affix {
|
||||
position: sticky;
|
||||
bottom: var(--affix-offset-bottom);
|
||||
background: var(--Table-bg);
|
||||
z-index: $zindex-sticky;
|
||||
}
|
||||
|
||||
&-content-wrapper {
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&-main {
|
||||
flex: 1;
|
||||
min-width: 0; // 防止内容溢出
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ListGroup {
|
||||
max-width: px2rem(400px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
&-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: var(--ListItem-paddingY) var(--ListItem-paddingX);
|
||||
margin-bottom: px2rem(-1px);
|
||||
background: var(--white);
|
||||
border: var(--ListItem-borderWidth) solid var(--List-borderColor);
|
||||
|
||||
&:first-child {
|
||||
border-top-left-radius: var(--borderRadius);
|
||||
border-top-right-radius: var(--borderRadius);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom-left-radius: var(--borderRadius);
|
||||
border-bottom-right-radius: var(--borderRadius);
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
// todo
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
// todo
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
color: var(--text--muted-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--expanded {
|
||||
.#{$ns}ListGroup-item {
|
||||
border-radius: var(--borderRadius);
|
||||
|
||||
margin-bottom: var(--gap-sm);
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}ListItem {
|
||||
@include clearfix();
|
||||
|
||||
& + & {
|
||||
border-top: var(--ListItem-borderWidth) solid var(--List-borderColor);
|
||||
}
|
||||
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: var(--ListItem-paddingY) var(--ListItem-paddingX);
|
||||
|
||||
&:nth-child(even) {
|
||||
background: var(--ListItem--strip-bg);
|
||||
}
|
||||
|
||||
&-checkBtn {
|
||||
float: left;
|
||||
margin-right: var(--gap-sm);
|
||||
}
|
||||
|
||||
&-dragBtn {
|
||||
cursor: move;
|
||||
float: left;
|
||||
margin-right: var(--gap-sm);
|
||||
}
|
||||
|
||||
&-actions {
|
||||
float: right;
|
||||
}
|
||||
|
||||
&--actions-at-left &-actions {
|
||||
float: left;
|
||||
margin-right: var(--gap-base);
|
||||
}
|
||||
|
||||
&-title {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: var(--fontSizeBase);
|
||||
color: var(--text--loud-color);
|
||||
font-weight: var(--fontWeightNormal);
|
||||
}
|
||||
|
||||
&-content {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&-field {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
&-fieldValue {
|
||||
position: relative;
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
max-width: 100%;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&-fieldLabel {
|
||||
width: px2rem(150px);
|
||||
color: var(--text--muted-color);
|
||||
}
|
||||
|
||||
&.is-checked {
|
||||
background: var(--ListItem-onChecked-bg);
|
||||
border-color: var(--ListItem-onChecked-borderColor);
|
||||
color: var(--ListItem-onChecked-color);
|
||||
|
||||
+ .#{$ns}ListItem {
|
||||
border-color: var(--ListItem-onChecked-borderColor);
|
||||
}
|
||||
|
||||
.#{$ns}ListItem-fieldLabel {
|
||||
color: var(--ListItem-onChecked-fieldLabel-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-modified,
|
||||
&.is-moved {
|
||||
background: var(--ListItem-onModified-bg);
|
||||
border-color: var(--ListItem-onModified-borderColor);
|
||||
color: var(--ListItem-onModified-color);
|
||||
|
||||
+ .#{$ns}ListItem {
|
||||
border-color: var(--ListItem-onModified-borderColor);
|
||||
}
|
||||
|
||||
.#{$ns}ListItem-fieldLabel {
|
||||
color: var(--ListItem-onModified-fieldLabel-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-dragging {
|
||||
opacity: var(--ListItem-onDragging-opacity);
|
||||
}
|
||||
|
||||
&--hasItemAction {
|
||||
cursor: pointer;
|
||||
}
|
||||
&--hasItemAction:hover {
|
||||
color: var(--ListMenu-item--onHover-color);
|
||||
background: var(--ListMenu-item--onHover-bg);
|
||||
}
|
||||
}
|
||||
|
||||
// 修改索引条样式
|
||||
.#{$ns}AlphabetIndexer {
|
||||
position: sticky;
|
||||
top: calc(var(--affix-offset-top) + var(--gap-base));
|
||||
right: px2rem(5px);
|
||||
height: fit-content;
|
||||
padding: px2rem(10px) px2rem(5px);
|
||||
background: var(--white);
|
||||
border-radius: var(--borderRadius);
|
||||
box-shadow: var(--boxShadow);
|
||||
z-index: 1050;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-self: flex-start;
|
||||
overflow-y: auto;
|
||||
|
||||
// 移动端样式
|
||||
@media (max-width: 768px) {
|
||||
position: sticky;
|
||||
top: calc(var(--affix-offset-top) + var(--gap-base));
|
||||
right: px2rem(5px);
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
&-letter {
|
||||
font-size: var(--fontSizeSm);
|
||||
padding: px2rem(2px) px2rem(4px);
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding: px2rem(1px) px2rem(2px);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
color: var(--white);
|
||||
background: var(--primary);
|
||||
border-radius: var(--borderRadius-sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
169
packages/amis-ui/scss/components/_log.scss
Normal file
169
packages/amis-ui/scss/components/_log.scss
Normal file
@@ -0,0 +1,169 @@
|
||||
.#{$ns}Log {
|
||||
position: relative;
|
||||
|
||||
&-body {
|
||||
background: var(--Log-bg);
|
||||
color: var(--Log-color);
|
||||
padding: var(--Log-padding);
|
||||
overflow-y: auto;
|
||||
font-family: var(--fontFamilyMonospace);
|
||||
}
|
||||
|
||||
&-line {
|
||||
padding: var(--Log-line-padding);
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
// bootstrap 会修改这些,覆盖掉
|
||||
code {
|
||||
color: inherit;
|
||||
background: inherit;
|
||||
}
|
||||
&:hover {
|
||||
background: var(--Log-line--onHover-bg);
|
||||
}
|
||||
&-number {
|
||||
color: #999;
|
||||
font-style: italic;
|
||||
margin-right: 5px;
|
||||
}
|
||||
&-highlight {
|
||||
background: #ffffb6;
|
||||
display: inline-block;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
&-operation {
|
||||
position: relative;
|
||||
background: rgba(28, 28, 28, 0.5);
|
||||
& > a {
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
line-height: var(--Form-input-lineHeight);
|
||||
font-size: var(--Form-input-fontSize);
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
padding-left: 8px;
|
||||
transition: all var(--animation-duration) ease-in-out;
|
||||
border: var(--Form-input-borderWidth) solid transparent;
|
||||
border-radius: var(--Form-input-borderRadius);
|
||||
overflow: hidden;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
a {
|
||||
color: #000;
|
||||
}
|
||||
& > a:hover {
|
||||
background: var(--Form-input-onHover-bg);
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
& > a > svg {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
& > a.is-disabled {
|
||||
cursor: not-allowed;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
& > a.is-disabled:hover {
|
||||
cursor: not-allowed;
|
||||
background: transparent;
|
||||
color: #6b7280;
|
||||
}
|
||||
}
|
||||
|
||||
.ansi-bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.ansi-italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.ansi-underline {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.ansi-black-fg,
|
||||
.ansi-bright-black-fg {
|
||||
color: #4e4e4e;
|
||||
}
|
||||
|
||||
.ansi-red-fg,
|
||||
.ansi-bright-red-fg {
|
||||
color: #ff6c60;
|
||||
}
|
||||
|
||||
.ansi-green-fg,
|
||||
.ansi-bright-green-fg {
|
||||
color: #0a0;
|
||||
}
|
||||
|
||||
.ansi-yellow-fg,
|
||||
.ansi-bright-yellow-fg {
|
||||
color: #ffffb6;
|
||||
}
|
||||
|
||||
.ansi-blue-fg,
|
||||
.ansi-bright-blue-fg {
|
||||
color: #96cbfe;
|
||||
}
|
||||
|
||||
.ansi-magenta-fg,
|
||||
.ansi-bright-magenta-fg {
|
||||
color: #ff73fd;
|
||||
}
|
||||
|
||||
.ansi-cyan-fg,
|
||||
.ansi-bright-cyan-fg {
|
||||
color: #5ff;
|
||||
}
|
||||
|
||||
.ansi-white-fg,
|
||||
.ansi-bright-white-fg {
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.ansi-grey-fg,
|
||||
.ansi-bright-grey-fg {
|
||||
color: #969696;
|
||||
}
|
||||
|
||||
.ansi-black-bg {
|
||||
background-color: #4e4e4e;
|
||||
}
|
||||
|
||||
.ansi-red-bg {
|
||||
background-color: #ff6c60;
|
||||
}
|
||||
|
||||
.ansi-green-bg {
|
||||
background-color: #0a0;
|
||||
}
|
||||
|
||||
.ansi-yellow-bg {
|
||||
background-color: #ffffb6;
|
||||
}
|
||||
|
||||
.ansi-blue-bg {
|
||||
background-color: #96cbfe;
|
||||
}
|
||||
|
||||
.ansi-magenta-bg {
|
||||
background-color: #ff73fd;
|
||||
}
|
||||
|
||||
.ansi-cyan-bg {
|
||||
background-color: #0aa;
|
||||
}
|
||||
|
||||
.ansi-white-bg {
|
||||
background-color: #eee;
|
||||
}
|
||||
}
|
||||
6
packages/amis-ui/scss/components/_mapping.scss
Normal file
6
packages/amis-ui/scss/components/_mapping.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
.#{$ns}MappingField {
|
||||
margin-right: var(--gap-xs);
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
266
packages/amis-ui/scss/components/_markdown.scss
Normal file
266
packages/amis-ui/scss/components/_markdown.scss
Normal file
@@ -0,0 +1,266 @@
|
||||
.#{$ns}Markdown {
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
button:-moz-focusring,
|
||||
[type='button']:-moz-focusring,
|
||||
[type='reset']:-moz-focusring,
|
||||
[type='submit']:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
[type='checkbox'] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table td,
|
||||
table th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 0;
|
||||
margin: 15px 0;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
hr::before {
|
||||
display: table;
|
||||
content: '';
|
||||
}
|
||||
|
||||
hr::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: '';
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
padding-left: 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ol {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
ul ul ol,
|
||||
ul ol ol,
|
||||
ol ul ol,
|
||||
ol ol ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
p,
|
||||
blockquote,
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
table,
|
||||
pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 4px;
|
||||
padding: 0;
|
||||
margin: 16px 0;
|
||||
background-color: #e7e7e7;
|
||||
border: 0 none;
|
||||
}
|
||||
|
||||
ul:not(.dropdown-menu):not(.nav),
|
||||
ol {
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
ul ul,
|
||||
ul ol,
|
||||
ol ol,
|
||||
ol ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
li > p {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
dl {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
dl dt {
|
||||
padding: 0;
|
||||
margin-top: 16px;
|
||||
font-size: 1em;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
padding: 0 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 0 15px;
|
||||
color: #777;
|
||||
border-left: 4px solid #ddd;
|
||||
}
|
||||
|
||||
blockquote > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
blockquote > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
table th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table th,
|
||||
table td {
|
||||
padding: 6px 13px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
table tr {
|
||||
background-color: #fff;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
table tr:nth-child(2n) {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
img {
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0;
|
||||
padding-top: 0.2em;
|
||||
padding-bottom: 0.2em;
|
||||
margin: 0;
|
||||
background-color: rgba(0, 0, 0, 0.04);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
code:before,
|
||||
code:after {
|
||||
letter-spacing: -0.2em;
|
||||
content: '\00a0';
|
||||
}
|
||||
|
||||
pre > code {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
word-break: normal;
|
||||
white-space: pre;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.highlight pre,
|
||||
pre {
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
line-height: 1.45;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.highlight pre {
|
||||
margin-bottom: 0;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
pre {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
pre code {
|
||||
display: inline;
|
||||
max-width: initial;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: initial;
|
||||
line-height: inherit;
|
||||
word-wrap: normal;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
pre code:before,
|
||||
pre code:after {
|
||||
content: normal;
|
||||
}
|
||||
|
||||
kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
line-height: 10px;
|
||||
color: #555;
|
||||
vertical-align: middle;
|
||||
background-color: #fcfcfc;
|
||||
border: solid 1px #ccc;
|
||||
border-bottom-color: #bbb;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0 #bbb;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-bottom-color: #eee;
|
||||
}
|
||||
}
|
||||
795
packages/amis-ui/scss/components/_menu.scss
Normal file
795
packages/amis-ui/scss/components/_menu.scss
Normal file
@@ -0,0 +1,795 @@
|
||||
@mixin popup-dark {
|
||||
& > .#{$ns}Nav-Menu {
|
||||
background-color: var(--Menu-dark-backgroundColor);
|
||||
|
||||
.#{$ns}Nav-Menu-item {
|
||||
@include item-dark();
|
||||
|
||||
&-active,
|
||||
&-selected {
|
||||
@include item-active-dark();
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-submenu-title {
|
||||
@include item-dark();
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-submenu-active,
|
||||
.#{$ns}Nav-Menu-submenu-selected {
|
||||
> .#{$ns}Nav-Menu-submenu-title {
|
||||
@include item-active-dark();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin item-dark {
|
||||
color: var(--Menu-dark-fontColor);
|
||||
|
||||
.#{$ns}Nav-Menu-item-icon,
|
||||
.#{$ns}Nav-Menu-item-icon-after,
|
||||
.#{$ns}Nav-Menu-item-label,
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
color: var(--Menu-dark-fontColor);
|
||||
|
||||
svg {
|
||||
fill: var(--Menu-dark-fontColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin item-selected-dark {
|
||||
color: var(--Menu-dark-fontColor-onActive);
|
||||
|
||||
.#{$ns}Nav-Menu-item-icon,
|
||||
.#{$ns}Nav-Menu-item-icon-after,
|
||||
.#{$ns}Nav-Menu-item-label,
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
color: var(--Menu-dark-fontColor-onActive);
|
||||
|
||||
svg {
|
||||
fill: var(--Menu-dark-fontColor-onActive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin item-active-dark {
|
||||
background-color: var(--Menu-dark-backgroundColor);
|
||||
color: var(--Menu-dark-fontColor-onHover);
|
||||
|
||||
.#{$ns}Nav-Menu-item-icon,
|
||||
.#{$ns}Nav-Menu-item-icon-after,
|
||||
.#{$ns}Nav-Menu-item-label,
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
color: var(--Menu-dark-fontColor-onHover);
|
||||
|
||||
svg {
|
||||
fill: currentColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin item-selected {
|
||||
color: var(--Menu-light-fontColor-onHover);
|
||||
|
||||
.#{$ns}Nav-Menu-item-label,
|
||||
.#{$ns}Nav-Menu-item-icon,
|
||||
.#{$ns}Nav-Menu-item-icon-after,
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
color: var(--Menu-light-fontColor-onHover);
|
||||
|
||||
svg {
|
||||
fill: currentColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin item-active {
|
||||
color: var(--Menu-light-fontColor-onActive);
|
||||
|
||||
.#{$ns}Nav-Menu-item-label,
|
||||
.#{$ns}Nav-Menu-item-icon,
|
||||
.#{$ns}Nav-Menu-item-icon-after,
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
color: var(--Menu-light-fontColor-onActive);
|
||||
|
||||
svg {
|
||||
fill: currentColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin selected-indicator($themeColor) {
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-right: px2rem(3px) solid $themeColor;
|
||||
transform: scaleY(1);
|
||||
opacity: 1;
|
||||
transition: transform 0.15s cubic-bezier(0.645, 0.045, 0.355, 1),
|
||||
opacity 0.15s cubic-bezier(0.645, 0.045, 0.355, 1),
|
||||
-webkit-transform 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu {
|
||||
--Menu-width: var(--Layout-aside-width);
|
||||
--Menu-width--collapsed: var(--Layout-aside-width-collapsed);
|
||||
--Menu-fontSize--collapsed: var(--Nav-item-collapsed-fontSize);
|
||||
--Menu-fontColor-onDisabled: var(--Nav-item-fontColor-onDisabled);
|
||||
--Menu-Submenu-item-paddingX: var(--Nav-Item-Badge-paddingRight);
|
||||
|
||||
--Menu-light-backgroundColor: var(--Layout-light-backgroundColor);
|
||||
--Menu-light-active-backgroundColor: var(--colors-neutral-fill-8);
|
||||
--Menu-light-backgroundColor-onHover: var(--Layout-light-bgColor-onHover);
|
||||
--Menu-light-fontColor: var(--Layout-light-fontColor);
|
||||
--Menu-light-fontColor-onHover: var(--Layout-fontColor--onHover);
|
||||
--Menu-light-ancestor-fontColor-onActive: var(--Layout-light-fontColor);
|
||||
--Menu-light-fontColor-onActive: var(--Layout-fontColor--onActive);
|
||||
--Menu-light-groupTitle-fontColor: #84868c;
|
||||
--Menu-light-selectedIndicator-color: var(--Layout-fontColor--info);
|
||||
|
||||
--Menu-dark-backgroundColor: var(--Layout-dark-backgroundColor);
|
||||
--Menu-dark-backgroundColor-onHover: var(--Layout-fontColor--info);
|
||||
--Menu-dark-fontColor: var(--Layout-dark-fontColor);
|
||||
--Menu-dark-fontColor-onHover: var(--Layout-fontColor--onHover);
|
||||
--Menu-dark-fontColor-onActive: var(--Layout-dark-fontColor);
|
||||
--Menu-dark-groupTitle-fontColor: #84868c;
|
||||
--Menu-dark-selectedIndicator-color: var(--Layout-dark-selected-color);
|
||||
|
||||
outline: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
transition: all 0.3s;
|
||||
width: 100%;
|
||||
|
||||
&-dark {
|
||||
background-color: var(--Menu-dark-backgroundColor);
|
||||
}
|
||||
|
||||
&-horizontal {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
&-submenu {
|
||||
&-hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&-panel {
|
||||
&-wrapper {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--Menu-light-fontColor);
|
||||
font-size: var(--Nav-item-fontSize);
|
||||
|
||||
&:hover {
|
||||
color: var(--Menu-light-fontColor-onHover);
|
||||
}
|
||||
|
||||
&__icon-wrapper {
|
||||
width: var(--Tabs-linkFontSize);
|
||||
height: var(--Tabs-linkFontSize);
|
||||
line-height: var(--Tabs-linkFontSize);
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
fill: currentColor;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&__label {
|
||||
&.is-group-header {
|
||||
color: var(--Menu-light-groupTitle-fontColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-group {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
&-item {
|
||||
min-width: 120px;
|
||||
|
||||
&__header {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&-item + &-item {
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-overflow-item {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
&-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&-collapse {
|
||||
overflow: hidden;
|
||||
transition: height 0.3s ease-out;
|
||||
}
|
||||
|
||||
&-collapsed {
|
||||
width: var(--Menu-width--collapsed);
|
||||
}
|
||||
|
||||
&-root.#{$ns}Nav-Menu-collapsed {
|
||||
.#{$ns}Nav-Menu-item,
|
||||
.#{$ns}Nav-Menu-submenu-title {
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
&-item-link {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
cursor: inherit;
|
||||
font-weight: inherit;
|
||||
|
||||
&:hover,
|
||||
&:active {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
&-item-divider {
|
||||
border-bottom: px2rem(1px) solid #e6e6e8;
|
||||
|
||||
&-dark {
|
||||
border-bottom: px2rem(1px) solid #3a3e47;
|
||||
}
|
||||
}
|
||||
|
||||
&-item-icon,
|
||||
&-item-icon-after {
|
||||
display: inline-block;
|
||||
zoom: 1;
|
||||
vertical-align: middle;
|
||||
|
||||
img,
|
||||
svg {
|
||||
width: var(--Tabs-linkFontSize);
|
||||
height: var(--Tabs-linkFontSize);
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
i,
|
||||
img,
|
||||
svg {
|
||||
float: left;
|
||||
}
|
||||
svg {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-item-icon {
|
||||
&-collapsed {
|
||||
font-size: var(--Menu-fontSize--collapsed);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&-svg {
|
||||
&-collapsed {
|
||||
font-size: var(--Menu-fontSize--collapsed);
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-item-label {
|
||||
user-select: none;
|
||||
|
||||
&-collapsed {
|
||||
font-size: var(--Menu-fontSize--collapsed);
|
||||
margin: 0 auto;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&-item-dragBar {
|
||||
color: var(--Nav-Item-Drag-color);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
&-item-group-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
&-item-group-title {
|
||||
color: var(--Menu-light-groupTitle-fontColor);
|
||||
line-height: px2rem(20px);
|
||||
padding: 0 var(--Menu-Submenu-item-paddingX) 0 px2rem(16px);
|
||||
font-size: px2rem(12px);
|
||||
margin: px2rem(12px) 0 px2rem(4px) 0;
|
||||
|
||||
&.#{$ns}Nav-Menu-dark {
|
||||
color: var(--Menu-dark-groupTitle-fontColor);
|
||||
}
|
||||
}
|
||||
|
||||
&-item,
|
||||
&-submenu {
|
||||
.#{$ns}Badge {
|
||||
position: static;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
}
|
||||
.#{$ns}Nav-Menu-item-wrap {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
&-item-extra {
|
||||
position: relative;
|
||||
|
||||
.#{$ns}DropDown {
|
||||
> .#{$ns}Button {
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
|
||||
> i {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-inline {
|
||||
.#{$ns}Nav-Menu-item-selected {
|
||||
background-color: var(--Menu-light-active-backgroundColor);
|
||||
@include item-selected();
|
||||
@include selected-indicator(var(--Menu-light-selectedIndicator-color));
|
||||
}
|
||||
|
||||
&.#{$ns}Nav-Menu-dark {
|
||||
.#{$ns}Nav-Menu-item-selected {
|
||||
background-color: var(--Menu-dark-backgroundColor-onHover);
|
||||
@include item-selected-dark();
|
||||
@include selected-indicator(var(--Menu-dark-selectedIndicator-color));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-vertical.#{$ns}Nav-Menu-sub {
|
||||
min-width: px2rem(160px);
|
||||
}
|
||||
|
||||
|
||||
&-item,
|
||||
&-submenu-title {
|
||||
margin: 0;
|
||||
position: relative;
|
||||
padding: 0 px2rem(16px);
|
||||
display: block;
|
||||
|
||||
&:active {
|
||||
@include item-active();
|
||||
}
|
||||
}
|
||||
|
||||
&-submenu-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.#{$ns}Nav-Menu-item-wrap {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
&-item-active {
|
||||
@include item-selected();
|
||||
|
||||
.#{$ns}Nav-Menu-item-dragBar {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
&-item-selected {
|
||||
@include item-selected();
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-submenu-active {
|
||||
> .#{$ns}Nav-Menu-submenu-title {
|
||||
@include item-selected();
|
||||
|
||||
.#{$ns}Nav-Menu-item-dragBar {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-submenu-selected {
|
||||
> .#{$ns}Nav-Menu-submenu-title {
|
||||
@include item-selected();
|
||||
}
|
||||
}
|
||||
|
||||
&-dark {
|
||||
.#{$ns}Nav-Menu-item,
|
||||
.#{$ns}Nav-Menu-submenu-title {
|
||||
@include item-dark();
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item-active {
|
||||
@include item-active-dark();
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item-selected {
|
||||
@include item-active-dark();
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-submenu-active {
|
||||
> .#{$ns}Nav-Menu-submenu-title {
|
||||
@include item-active-dark();
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-submenu-selected {
|
||||
> .#{$ns}Nav-Menu-submenu-title {
|
||||
@include item-active-dark();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-item-tooltip-wrap {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&-collapsed > &-item,
|
||||
&-collapsed > &-submenu-title,
|
||||
&-collapsed > .#{$ns}Nav-Menu-submenu > &-submenu-title {
|
||||
text-overflow: initial;
|
||||
}
|
||||
|
||||
& > &-item-divider {
|
||||
height: px2rem(1px);
|
||||
margin: 0 px2rem(16px) px2rem(4px) px2rem(16px);
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
&-submenu {
|
||||
&-popup {
|
||||
position: absolute !important;
|
||||
z-index: 1500;
|
||||
background-color: var(--Layout-light-backgroundColor);
|
||||
line-height: var(--Nav-Item-height);
|
||||
cursor: pointer;
|
||||
border: var(--Form-select-outer-borderWidth) solid
|
||||
var(--Form-select-outer-borderColor);
|
||||
border-radius: px2rem(2px);
|
||||
max-height: px2rem(400px);
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 px2rem(4px) px2rem(5px) 0 rgba(21, 26, 38, 0.06),
|
||||
0 px2rem(1px) px2rem(10px) 0 rgba(21, 26, 38, 0.05),
|
||||
0 px2rem(2px) px2rem(4px) px2rem(-1px) rgba(21, 26, 38, 0.04);
|
||||
|
||||
// 横向收纳模式且有子菜单项的情况下 会显示2个展开箭头
|
||||
// 用css隐藏1个 自适应收纳的情况下 判断不出是子菜单项还是收纳项
|
||||
.#{$ns}Nav-Menu-submenu-title {
|
||||
.#{$ns}Nav-Menu-item-link {
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item-link {
|
||||
max-width: var(--Menu-width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-submenu-popup-dark {
|
||||
@include popup-dark();
|
||||
}
|
||||
|
||||
&-overflow {
|
||||
&-item-rest {
|
||||
.#{$ns}Nav-Menu-submenu-title {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-horizontal {
|
||||
border: none;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
|
||||
.#{$ns}Nav-Menu-item-tooltip-wrap {
|
||||
display: inline-block;
|
||||
zoom: 1;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-overflow-item.#{$ns}Nav-Menu-overflow-item-rest
|
||||
> .#{$ns}Nav-Menu-submenu-title {
|
||||
.#{$ns}Nav-Menu-overflowedIcon {
|
||||
margin-right: 0;
|
||||
line-height: inherit; // 到了saas中 会被fortawesome的样式影响 因此需要覆盖一下
|
||||
|
||||
i,
|
||||
svg,
|
||||
img {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item.#{$ns}Nav-Menu-item-selected {
|
||||
background: none;
|
||||
&:after {
|
||||
content: ' ';
|
||||
width: 100%;
|
||||
height: px2rem(2px);
|
||||
background: var(--Menu-light-fontColor-onHover);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
&:active {
|
||||
&:after {
|
||||
background: var(--Menu-light-fontColor-onActive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > .#{$ns}Nav-Menu-submenu,
|
||||
& > .#{$ns}Nav-Menu-item {
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
display: inline-block;
|
||||
font-size: px2rem(9px);
|
||||
text-transform: none;
|
||||
text-rendering: auto;
|
||||
line-height: px2rem(20px);
|
||||
margin-left: px2rem(5px);
|
||||
|
||||
& > svg {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.#{$ns}Nav-Menu-rtl {
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
margin-left: 0;
|
||||
margin-right: px2rem(5px);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item-label {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&-vertical,
|
||||
&-vertical-left,
|
||||
&-vertical-right,
|
||||
&-inline {
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
font-size: px2rem(10px);
|
||||
margin: 0 0 0 px2rem(10px);
|
||||
}
|
||||
|
||||
&.#{$ns}Nav-Menu-expand-before {
|
||||
.#{$ns}Nav-Menu-submenu-title {
|
||||
flex-direction: row-reverse;
|
||||
|
||||
> .#{$ns}Nav-Menu-submenu-arrow {
|
||||
margin: 0 px2rem(10px) 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.#{$ns}Nav-Menu-rtl {
|
||||
&.#{$ns}Nav-Menu-expand-before {
|
||||
.#{$ns}Nav-Menu-submenu-title {
|
||||
.#{$ns}Nav-Menu-item-wrap {
|
||||
padding-right: px2rem(16px);
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-inline {
|
||||
&.#{$ns}Nav-Menu-rtl {
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
margin: 0 px2rem(10px) 0 0;
|
||||
}
|
||||
|
||||
&.#{$ns}Nav-Menu-expand-before {
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
margin: 0 0 0 px2rem(10px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-vertical {
|
||||
&.#{$ns}Nav-Menu-rtl {
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
margin: 0 0 0 px2rem(10px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-vertical-right {
|
||||
&.#{$ns}Nav-Menu-rtl {
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
margin: 0 px2rem(10px) 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-inline,
|
||||
&-horizontal {
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
svg {
|
||||
transition: transform 0.3s;
|
||||
transform: rotate(90deg);
|
||||
color: var(--colors-neutral-text-2);
|
||||
}
|
||||
}
|
||||
|
||||
& .#{$ns}Nav-Menu-submenu-open > .#{$ns}Nav-Menu-submenu-title {
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
svg {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-collapsed {
|
||||
.#{$ns}Nav-Menu-item {
|
||||
&-wrap {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item-group-title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item-group-list {
|
||||
.#{$ns}Nav-Menu-item-divider {
|
||||
height: px2rem(1px);
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin item-disabled {
|
||||
cursor: not-allowed;
|
||||
color: var(--Menu-fontColor-onDisabled) !important;
|
||||
|
||||
svg {
|
||||
fill: currentColor !important;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item-disabled,
|
||||
.#{$ns}Nav-Menu-submenu-disabled {
|
||||
@include item-disabled();
|
||||
|
||||
&.#{$ns}Nav-Menu-item {
|
||||
@include item-disabled();
|
||||
|
||||
.#{$ns}Nav-Menu-item-link {
|
||||
@include item-disabled();
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-submenu-title {
|
||||
@include item-disabled();
|
||||
& > .#{$ns}Nav-Menu-item-icon,
|
||||
& > .#{$ns}Nav-Menu-item-icon-after,
|
||||
& > .#{$ns}Nav-Menu-item-label,
|
||||
& > .#{$ns}Nav-Menu-submenu-arrow {
|
||||
@include item-disabled();
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item-icon,
|
||||
.#{$ns}Nav-Menu-item-icon-after,
|
||||
.#{$ns}Nav-Menu-item-label,
|
||||
.#{$ns}Nav-Menu-submenu-arrow {
|
||||
@include item-disabled();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Nav-Menu-item-tooltip {
|
||||
font-size: var(--Layout-tooltip-fontSize);
|
||||
color: var(--Layout-light-fontColor);
|
||||
background: var(--Layout-light-backgroundColor);
|
||||
border: var(--common-popover-border);
|
||||
border-radius: var(--Tooltip--attr-borderRadius);
|
||||
box-shadow: 0 px2rem(4px) px2rem(6px) 0 rgb(8 14 26 / 6%),
|
||||
0 px2rem(1px) px2rem(10px) 0 rgb(8 14 26 / 5%),
|
||||
0 px2rem(2px) px2rem(4px) px2rem(-1px) rgb(8 14 26 / 4%);
|
||||
|
||||
.#{$ns}Tooltip-arrow {
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.#{$ns}Nav-Menu-item-tooltip-dark {
|
||||
background: var(--Layout-dark-tooltip-backgroundColor);
|
||||
|
||||
.#{$ns}Tooltip-arrow {
|
||||
&:after {
|
||||
border-right-color: var(--Layout-dark-tooltip-backgroundColor);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Tooltip-body {
|
||||
&,
|
||||
span {
|
||||
color: var(--Layout-dark-fontColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
175
packages/amis-ui/scss/components/_mobile-dev-tool.scss
Normal file
175
packages/amis-ui/scss/components/_mobile-dev-tool.scss
Normal file
@@ -0,0 +1,175 @@
|
||||
.ae-MobileDevTool {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
background-color: #fff;
|
||||
z-index: 1001;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
height: 20px;
|
||||
&-dimensions {
|
||||
width: 40%;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
&-select {
|
||||
font-size: 12px;
|
||||
padding: 0;
|
||||
border: none !important;
|
||||
min-height: initial;
|
||||
margin-left: 10px;
|
||||
vertical-align: initial;
|
||||
span {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.cxd-PopOver {
|
||||
width: 180px !important;
|
||||
z-index: 10000;
|
||||
}
|
||||
}
|
||||
&-dimension {
|
||||
span {
|
||||
margin-right: 5px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
&-input {
|
||||
width: 32px;
|
||||
height: 16px;
|
||||
border: none;
|
||||
border-radius: 0.125rem;
|
||||
padding: 0 2px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-right: 5px;
|
||||
&:focus,
|
||||
&:hover {
|
||||
outline: none;
|
||||
border: 1px solid #2468f2;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-right {
|
||||
width: 40%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
height: 20px;
|
||||
&-scale {
|
||||
margin-right: 10px;
|
||||
display: flex;
|
||||
position: relative;
|
||||
&-auto-value {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
width: 40px;
|
||||
left: 10px;
|
||||
}
|
||||
&-auto {
|
||||
cursor: pointer;
|
||||
margin-left: 10px;
|
||||
&:hover {
|
||||
color: #2468f2;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-rotate-screen {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
&:hover {
|
||||
color: #2468f2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ae-PreviewIFrameBody {
|
||||
* {
|
||||
cursor: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAFKADAAQAAAABAAAAFAAAAACy3fD9AAABQ0lEQVQ4EaWVsWrDMBCGI4mCMxRMxgxZvKTQyWvmDn0AQx/Aj+U38NbVXTMUitd4SrZAIARDZ+P+v/EZ46pJKgmEpP90n2Wf7qxmlpYkiQnDcN00zdoYs2zb9pHblFLf0I7QqrquqzzPm6m7mgppmj5Be0FfTG2T9QXrIsuy3Vg3o4UCjKBX9PlI/2vKPc9xHD+UZXmQTQOwh23E8I9x1UP39OmA/WvyZK6N0BNOejYMQBAEbyDd85rXHriMouhLM5rYdSsA10BiW5CleTVE8R3J0rxnviDxJ0vLpRXRZyRL+wBsvprpZDO4aGQxKEcXZ5sPWQxKZTO6aGRpVg04M9F924Us3ZegwpcG/4KsLpeZg0xwiCtH8BZl7JO+Q7VhCXKEEvYhBxmAFADds2pgyuy5VSz43d/lZJh37VfFpurzC/gBw0WEc6PyhBMAAAAASUVORK5CYII='),
|
||||
auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
.ae-MobileDevTool-rightHandle {
|
||||
cursor: ew-resize;
|
||||
position: absolute;
|
||||
right: -6px;
|
||||
top: 40%;
|
||||
width: 10px;
|
||||
height: 22px;
|
||||
z-index: 1000;
|
||||
border: 1px solid #dee2e6;
|
||||
background-color: #fff;
|
||||
border-radius: 0.125rem;
|
||||
color: #666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
&:hover {
|
||||
color: #000;
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
&::before {
|
||||
content: '···';
|
||||
display: block;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
.ae-MobileDevTool-bottomHandle {
|
||||
cursor: ns-resize;
|
||||
position: absolute;
|
||||
bottom: -6px;
|
||||
left: calc(50% - 11px);
|
||||
width: 22px;
|
||||
height: 10px;
|
||||
z-index: 1000;
|
||||
border: 1px solid #dee2e6;
|
||||
background-color: #fff;
|
||||
border-radius: 0.125rem;
|
||||
color: #666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
&:hover {
|
||||
color: #000;
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
&::before {
|
||||
content: '···';
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.height-move {
|
||||
&::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 10000000;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
* {
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
.width-move {
|
||||
&::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 10000000;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
* {
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
280
packages/amis-ui/scss/components/_modal.scss
Normal file
280
packages/amis-ui/scss/components/_modal.scss
Normal file
@@ -0,0 +1,280 @@
|
||||
.is-modalOpened {
|
||||
overflow: hidden;
|
||||
|
||||
.#{$ns}Modal {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes modalIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -300px, 0) scale(0.2);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes modalOut {
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -300px, 0) scale(0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Modal {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-modal;
|
||||
overflow: hidden;
|
||||
outline: 0;
|
||||
|
||||
&-content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
||||
pointer-events: auto;
|
||||
background: var(--Modal-bg);
|
||||
background-clip: padding-box;
|
||||
outline: 0;
|
||||
z-index: 2;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: var(--Modal-content-startMarginTop);
|
||||
margin-bottom: var(--gap-md);
|
||||
padding: var(--dialog-default-padding-y) var(--Modal-body-paddingX);
|
||||
border: var(--Modal-content-borderWidth) solid
|
||||
var(--Modal-content-borderColor);
|
||||
border-radius: var(--dialog-default-border-radius);
|
||||
|
||||
&.in,
|
||||
&.out {
|
||||
animation-duration: var(--animation-duration);
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
&.in {
|
||||
animation-name: modalIn;
|
||||
}
|
||||
|
||||
&.out {
|
||||
animation-name: modalOut;
|
||||
}
|
||||
}
|
||||
&-fullScreen {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
max-width: 100% !important;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
&-draggable > &-header {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
&-overlay {
|
||||
transition: ease-in-out opacity var(--animation-duration);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
background: var(--Modal-overlay-bg);
|
||||
pointer-events: none; // 很重要,如果不设置,弹框虽然滚轮可滚,但是鼠标没办法操作滚动条。
|
||||
opacity: 0;
|
||||
|
||||
&.in {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.out {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
padding: var(--Modal-header-paddingY) #{px2rem(24px)};
|
||||
background: var(--Modal-header-bg);
|
||||
@include clearfix();
|
||||
border-bottom: var(--Modal-body-borderTop);
|
||||
border-top-left-radius: var(--Modal-content-borderRadius);
|
||||
border-top-right-radius: var(--Modal-content-borderRadius);
|
||||
&-icons {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: var(--dialog-header-fontSize);
|
||||
color: var(--dialog-header-color);
|
||||
font-weight: var(--dialog-header-fontWeight);
|
||||
height: var(--dialog-header-height);
|
||||
}
|
||||
|
||||
&-close {
|
||||
float: right;
|
||||
color: var(--Modal-close-color);
|
||||
line-height: inherit;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
z-index: calc(#{$zindex-spinner-overlay} + 1);
|
||||
|
||||
.Dialog-close {
|
||||
content: var(--dialog-icon-icon);
|
||||
}
|
||||
|
||||
svg {
|
||||
width: var(--dialog-icon-size);
|
||||
height: var(--dialog-icon-size);
|
||||
fill: var(--Modal-close-color);
|
||||
color: var(--dialog-icon-color);
|
||||
}
|
||||
|
||||
&:not(.is-disabled) {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
color: var(--Model-close-onHover-color);
|
||||
|
||||
svg {
|
||||
fill: var(--Model-close-onHover-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-screen {
|
||||
margin-right: #{px2rem(16px)};
|
||||
}
|
||||
|
||||
&-content > &-close {
|
||||
position: absolute;
|
||||
right: var(--gap-md);
|
||||
top: var(--gap-sm);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
&-body {
|
||||
margin: #{px2rem(16px)} 0 #{px2rem(24px)} 0;
|
||||
flex-grow: 1;
|
||||
height: auto;
|
||||
// overflow-y: auto;
|
||||
padding: 0 #{px2rem(24px)};
|
||||
font-size: var(--dialog-content-fontSize);
|
||||
color: var(--dialog-content-color);
|
||||
}
|
||||
|
||||
&-footer {
|
||||
// @include clearfix();
|
||||
|
||||
height: var(--dialog-footer-height);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: var(--Modal-footer-padding) #{px2rem(24px)};
|
||||
border-top: var(--Modal-body-borderBottom);
|
||||
margin: var(--Modal-footer-marginY) var(--Modal-footer-marginX);
|
||||
border-bottom-left-radius: var(--Modal-content-borderRadius);
|
||||
border-bottom-right-radius: var(--Modal-content-borderRadius);
|
||||
|
||||
.#{$ns}Button {
|
||||
min-width: var(--Modal-footer-button-width);
|
||||
margin-left: var(--dialog-footer-margin-left);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@for $i from (2) through 10 {
|
||||
.#{$ns}Modal--#{$i}th {
|
||||
.#{$ns}Modal-content {
|
||||
margin-top: calc(
|
||||
var(--Modal-content-startMarginTop) +
|
||||
#{($i - 1)} *
|
||||
var(--Modal-content-stepMarginTop)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
.#{$ns}Modal-content:not(.#{$ns}Modal-content-custom) {
|
||||
max-width: var(--dialog-size-normal-width);
|
||||
}
|
||||
|
||||
.#{$ns}Modal--sm .#{$ns}Modal-content {
|
||||
max-width: var(--dialog-size-sm-width);
|
||||
}
|
||||
|
||||
.#{$ns}Modal--base .#{$ns}Modal-content {
|
||||
max-width: var(--Modal-widthBase);
|
||||
}
|
||||
|
||||
.#{$ns}Modal--md .#{$ns}Modal-content {
|
||||
max-width: var(--Modal-widthMd);
|
||||
}
|
||||
|
||||
.#{$ns}Modal--lg .#{$ns}Modal-content {
|
||||
max-width: var(--dialog-size-lg-width);
|
||||
}
|
||||
|
||||
.#{$ns}Modal--xl .#{$ns}Modal-content {
|
||||
max-width: var(--dialog-size-xl-width);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Dialog-info {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.#{$ns}Dialog-error {
|
||||
color: var(--danger);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.#{$ns}Modal--full {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
> .#{$ns}Modal-content {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
margin: 30px;
|
||||
width: calc(100% - 60px);
|
||||
max-width: unset;
|
||||
|
||||
> .#{$ns}Modal-body {
|
||||
height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 移动端样式调整 */
|
||||
@include media-breakpoint-down(sm) {
|
||||
.#{$ns}Modal {
|
||||
.#{$ns}Modal-footer {
|
||||
display: flex;
|
||||
|
||||
> .#{$ns}Button {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
height: px2rem(44px);
|
||||
font-size: var(--fontSizeMd);
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20
packages/amis-ui/scss/components/_multiline-text.scss
Normal file
20
packages/amis-ui/scss/components/_multiline-text.scss
Normal file
@@ -0,0 +1,20 @@
|
||||
.#{$ns}MultilineText {
|
||||
position: relative;
|
||||
&-counter,
|
||||
&-display {
|
||||
white-space: pre-line;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&-counter {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: -99;
|
||||
}
|
||||
|
||||
&-button-wrapper {
|
||||
margin-top: --(gap-xs);
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
45
packages/amis-ui/scss/components/_nav.scss
Normal file
45
packages/amis-ui/scss/components/_nav.scss
Normal file
@@ -0,0 +1,45 @@
|
||||
.#{$ns}Nav {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
background-color: var(--Layout-light-backgroundColor);
|
||||
font-size: var(--Nav-item-fontSize);
|
||||
line-height: var(--Nav-Item-height);
|
||||
min-height: px2rem(10px);
|
||||
color: var(--colors-neutral-text-2);
|
||||
|
||||
&-horizontal {
|
||||
line-height: var(--Nav-Item-height--horizontal);
|
||||
}
|
||||
|
||||
.#{$ns}Nav-dropIndicator {
|
||||
position: absolute;
|
||||
background: var(--Nav-item-onActive-color);
|
||||
height: px2rem(2px);
|
||||
}
|
||||
|
||||
&--searchable {
|
||||
display: flex;
|
||||
|
||||
&:not(.#{$ns}Nav-horizontal) {
|
||||
flex-flow: column nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
|
||||
.#{$ns}Nav-SearchBox {
|
||||
&.is-active {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.#{$ns}Nav-horizontal {
|
||||
flex-flow: column nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
|
||||
.#{$ns}Nav-SearchBox {
|
||||
margin-left: px2rem(16px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
5
packages/amis-ui/scss/components/_overflow-tpl.scss
Normal file
5
packages/amis-ui/scss/components/_overflow-tpl.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
.#{$ns}OverflowTpl {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
198
packages/amis-ui/scss/components/_page.scss
Normal file
198
packages/amis-ui/scss/components/_page.scss
Normal file
@@ -0,0 +1,198 @@
|
||||
.#{$ns}Page {
|
||||
width: 100%;
|
||||
background: var(--Page-main-bg);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: stretch;
|
||||
|
||||
&-header {
|
||||
padding: var(--Page-header-paddingY) var(--Page-header-paddingX);
|
||||
}
|
||||
|
||||
&-main {
|
||||
// background: var(--Page-main-bg);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&-content {
|
||||
padding: var(--Page-content-paddingY) var(--Page-content-paddingX);
|
||||
position: relative;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&-main > &-header {
|
||||
border-bottom: var(--borderWidth) solid var(--borderColor);
|
||||
// background: var(--Page-header-bg);
|
||||
}
|
||||
|
||||
&-headerRow {
|
||||
// background: var(--Page-header-bg);
|
||||
border-bottom: var(--borderWidth) solid var(--borderColor);
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
.#{$ns}Page-header,
|
||||
.#{$ns}Page-toolbar {
|
||||
flex-grow: 1;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.#{$ns}Page-toolbar {
|
||||
text-align: right;
|
||||
padding-right: var(--gap-base);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
&-title {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: var(--Page-title-color);
|
||||
line-height: var(--Page-title-lineHeight);
|
||||
font-size: var(--Page-title-fontSize);
|
||||
font-weight: var(--Page-title-fontWeight);
|
||||
}
|
||||
|
||||
&-body {
|
||||
padding: var(--Page-body-padding);
|
||||
flex: 1 auto;
|
||||
}
|
||||
|
||||
&-asideTplWrapper {
|
||||
padding: var(--gap-xs);
|
||||
}
|
||||
|
||||
&-asideResizor {
|
||||
position: absolute;
|
||||
right: px2rem(-6px);
|
||||
top: 50%;
|
||||
cursor: ew-resize;
|
||||
writing-mode: vertical-lr;
|
||||
width: px2rem(12px);
|
||||
height: px2rem(24px);
|
||||
margin-top: px2rem(-12px);
|
||||
border: 0.0625rem solid #dee2e6;
|
||||
background-color: #fff;
|
||||
border-radius: px2rem(2px);
|
||||
font-size: 12px;
|
||||
line-height: px2rem(10px);
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
color: #666;
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12),
|
||||
0 2px 4px 0 rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: '···';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Page-toolbar {
|
||||
> * + * {
|
||||
margin-left: var(--gap-xs);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Page-aside {
|
||||
// background: var(--Page-aside-bg);
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
.#{$ns}Page {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.#{$ns}Page-aside {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.#{$ns}Page-content {
|
||||
flex-grow: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.#{$ns}Page-main {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.#{$ns}Page-aside {
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: inherit;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
background: inherit;
|
||||
border: inherit;
|
||||
}
|
||||
|
||||
flex-shrink: 0;
|
||||
width: var(--Page-aside-width);
|
||||
border-right: var(--borderWidth) solid var(--borderColor);
|
||||
|
||||
&--withWidth {
|
||||
min-width: var(--Page-aside-width);
|
||||
max-width: var(--Page-aside-maxWidth);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Page--withSidebar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: stretch;
|
||||
|
||||
> .#{$ns}Page-content,
|
||||
> .#{$ns}PullRefresh {
|
||||
width: 0;
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
// 右侧侧边栏时,调整侧边栏相关的样式
|
||||
.#{$ns}Page--rightAside {
|
||||
flex-direction: row-reverse;
|
||||
|
||||
> .#{$ns}Page-aside {
|
||||
border-left: var(--borderWidth) solid var(--borderColor);
|
||||
border-right: unset;
|
||||
|
||||
> .#{$ns}Page-asideResizor {
|
||||
left: px2rem(-6px);
|
||||
right: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Page--asideSticky {
|
||||
> .#{$ns}Page-aside {
|
||||
position: sticky;
|
||||
top: var(--affix-offset-top);
|
||||
max-height: calc(
|
||||
100vh - var(--affix-offset-top) - var(--affix-offset-bottom)
|
||||
);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
403
packages/amis-ui/scss/components/_pagination.scss
Normal file
403
packages/amis-ui/scss/components/_pagination.scss
Normal file
@@ -0,0 +1,403 @@
|
||||
.#{$ns}Pagination {
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
margin: 0 0 px2rem(-8px);
|
||||
border-radius: px2rem(4px);
|
||||
|
||||
> li {
|
||||
display: inline-flex;
|
||||
cursor: pointer;
|
||||
|
||||
> a,
|
||||
> span {
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
float: left;
|
||||
text-decoration: none;
|
||||
min-width: var(--Pagination-minWidth);
|
||||
height: var(--Pagination-height);
|
||||
border: 0;
|
||||
line-height: var(--Pagination-height);
|
||||
padding: var(--Pagination-padding);
|
||||
text-align: center;
|
||||
color: var(--Pagination-light-color);
|
||||
border-radius: 0;
|
||||
margin-left: 0;
|
||||
font-size: var(--Pagination-fontSize);
|
||||
}
|
||||
|
||||
> a:hover,
|
||||
> span:hover,
|
||||
> a:focus,
|
||||
> span:focus {
|
||||
background: transparent;
|
||||
color: var(--primary);
|
||||
}
|
||||
}
|
||||
|
||||
> li.is-disabled {
|
||||
> span,
|
||||
> a {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
> a,
|
||||
> span,
|
||||
> a:hover,
|
||||
> span:hover,
|
||||
> a:focus,
|
||||
> span:focus {
|
||||
color: #cccccc;
|
||||
}
|
||||
}
|
||||
|
||||
> li.is-active {
|
||||
> a,
|
||||
> span,
|
||||
> a:hover,
|
||||
> span:hover,
|
||||
> a:focus,
|
||||
> span:focus {
|
||||
background: var(--Pagination-onActive-backgroundColor);
|
||||
color: var(--Pagination-onActive-color);
|
||||
border: var(--Pagination-onActive-border);
|
||||
border-radius: var(--borderRadius);
|
||||
}
|
||||
}
|
||||
|
||||
&-simple {
|
||||
color: var(--Pagination-light-color);
|
||||
> ul > li {
|
||||
&:hover,
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
&.is-active > a {
|
||||
border: none;
|
||||
&:hover,
|
||||
&:focus {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&-prev {
|
||||
> span {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
&-next {
|
||||
> span {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
&-total {
|
||||
display: inline-block;
|
||||
color: var(--Pagination-light-color);
|
||||
}
|
||||
|
||||
&-inputGroup {
|
||||
display: inline-flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
height: var(--Pagination-height);
|
||||
|
||||
&-left {
|
||||
color: var(--Pagination-light-color);
|
||||
}
|
||||
input {
|
||||
min-width: px2rem(50px);
|
||||
width: px2rem(50px);
|
||||
height: var(--Pagination-height);
|
||||
line-height: var(--Pagination-height);
|
||||
// height: var(--Pagination-height);
|
||||
border: none;
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
border-radius: var(--borderRadius) 0 0 var(--borderRadius);
|
||||
padding: var(--Pagination-padding);
|
||||
background-color: var(--colors-neutral-fill-11);
|
||||
color: var(--Pagination-light-color);
|
||||
margin-left: px2rem(8px);
|
||||
text-align: center;
|
||||
|
||||
&:focus,
|
||||
&:hover {
|
||||
outline: none;
|
||||
// border: var(--borderWidth) solid var(--primary);
|
||||
border-color: var(--primary);
|
||||
}
|
||||
}
|
||||
&-right {
|
||||
display: inline-block;
|
||||
width: px2rem(32px);
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
height: var(--Pagination-height);
|
||||
line-height: var(--Pagination-height);
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
border-left: none;
|
||||
border-radius: 0 var(--borderRadius) var(--borderRadius) 0;
|
||||
font-size: var(--fontSizeSm);
|
||||
margin-left: -1px;
|
||||
&:hover {
|
||||
color: var(--primary);
|
||||
border-color: var(--primary);
|
||||
border-left: var(--borderWidth) solid var(--primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-simplego {
|
||||
display: inline-flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
height: var(--Pagination-height);
|
||||
|
||||
input {
|
||||
min-width: px2rem(40px);
|
||||
width: px2rem(40px);
|
||||
height: var(--Pagination-height);
|
||||
line-height: var(--Pagination-height);
|
||||
border: none;
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
border-radius: var(--borderRadius);
|
||||
padding: var(--Pagination-padding);
|
||||
background-color: var(--colors-neutral-fill-11);
|
||||
color: var(--Pagination-light-color);
|
||||
margin-right: px2rem(8px);
|
||||
text-align: center;
|
||||
|
||||
&:focus,
|
||||
&:hover {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
}
|
||||
}
|
||||
&-right {
|
||||
display: inline-block;
|
||||
min-width: px2rem(32px);
|
||||
height: var(--Pagination-height);
|
||||
line-height: var(--Pagination-height);
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
font-size: var(--fontSizeSm);
|
||||
&:hover {
|
||||
color: #666666 !important;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-ellipsis {
|
||||
cursor: unset;
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
> a {
|
||||
opacity: 0;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
> span {
|
||||
opacity: 1;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
}
|
||||
|
||||
> a {
|
||||
cursor: unset;
|
||||
position: absolute !important;
|
||||
top: px2rem(-4px);
|
||||
opacity: 1;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
> span {
|
||||
opacity: 0;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Pagination-wrap {
|
||||
.#{$ns}Pagination-item {
|
||||
&.#{$ns}Pagination-perpage {
|
||||
margin-left: px2rem(8px);
|
||||
vertical-align: baseline;
|
||||
}
|
||||
&:nth-child(1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
&.disabled {
|
||||
background-color: #fff;
|
||||
.#{$ns}Pagination {
|
||||
> li {
|
||||
> a,
|
||||
> span {
|
||||
color: var(--Pagination-onDisabled-color);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
> a,
|
||||
> span,
|
||||
> a:hover,
|
||||
> span:hover,
|
||||
> a:focus,
|
||||
> span:focus {
|
||||
background-color: var(--Pagination-onDisabled-backgroundColor);
|
||||
border-color: var(--Pagination-onDisabled-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}PaginationWrapper-pager {
|
||||
&:first-child {
|
||||
margin-bottom: var(--gap-sm);
|
||||
}
|
||||
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.#{$ns}Pagination-wrap-size--sm {
|
||||
line-height: px2rem(24px);
|
||||
|
||||
.#{$ns}Pagination-item {
|
||||
margin-left: px2rem(4px);
|
||||
> li {
|
||||
> a,
|
||||
> span {
|
||||
min-width: var(--Pagination-minWidth-sm);
|
||||
height: var(--Pagination-height-sm);
|
||||
line-height: var(--Pagination-height-sm);
|
||||
padding: var(--Pagination-padding-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Pagination-inputGroup,
|
||||
.#{$ns}Pagination-simplego {
|
||||
height: var(--Pagination-height);
|
||||
&-input {
|
||||
min-width: px2rem(40px);
|
||||
width: px2rem(40px);
|
||||
height: var(--Pagination-height-sm);
|
||||
line-height: var(--Pagination-height-sm);
|
||||
padding: var(--Pagination-padding-sm);
|
||||
margin-left: px2rem(4px);
|
||||
}
|
||||
&-right {
|
||||
height: var(--Pagination-height-sm);
|
||||
line-height: var(--Pagination-height-sm);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Pagination-simplego {
|
||||
&-input {
|
||||
min-width: px2rem(32px);
|
||||
}
|
||||
}
|
||||
}
|
||||
.#{$ns}Pagination-perpage {
|
||||
margin-left: px2rem(4px);
|
||||
padding: 0 px2rem(6px);
|
||||
min-height: px2rem(24px);
|
||||
vertical-align: baseline;
|
||||
}
|
||||
}
|
||||
@include media-breakpoint-down(sm) {
|
||||
.#{$ns}Pagination-wrap-size--sm {
|
||||
.#{$ns}Pagination-item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: px2rem(16px);
|
||||
> li {
|
||||
> a,
|
||||
> span {
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
padding: var(--Pagination-padding);
|
||||
min-width: var(--Pagination-minWidth);
|
||||
height: var(--Pagination-height);
|
||||
line-height: var(--Pagination-height);
|
||||
border-radius: var(--borderRadius);
|
||||
}
|
||||
&.disabled {
|
||||
> a,
|
||||
> span {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Pagination-inputGroup,
|
||||
.#{$ns}Pagination-simplego {
|
||||
&-input {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
&-right {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.#{$ns}Pagination-wrap-size--md {
|
||||
.#{$ns}Pagination-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
> li {
|
||||
> a,
|
||||
> span {
|
||||
border: var(--Pagination-border);
|
||||
border-radius: var(--borderRadius);
|
||||
}
|
||||
&.disabled {
|
||||
> a,
|
||||
> span {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Pagination-inputGroup,
|
||||
.#{$ns}Pagination-simplego {
|
||||
&-input {
|
||||
border: none;
|
||||
}
|
||||
&-right {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.#{$ns}Pagination {
|
||||
&-simplego {
|
||||
display: inline-flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
height: var(--Pagination-height);
|
||||
}
|
||||
input {
|
||||
display: inline-block;
|
||||
min-width: var(--Pagination-minWidth);
|
||||
width: px2rem(32px);
|
||||
height: var(--Pagination-height);
|
||||
line-height: var(--Pagination-height);
|
||||
font-size: var(--fontSizeSm);
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
&:focus,
|
||||
&:hover {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
263
packages/amis-ui/scss/components/_panel.scss
Normal file
263
packages/amis-ui/scss/components/_panel.scss
Normal file
@@ -0,0 +1,263 @@
|
||||
.#{$ns}Panel {
|
||||
margin: var(--Panel-marginTop) var(--Panel-marginRight)
|
||||
var(--Panel-marginBottom) var(--Panel-marginLeft);
|
||||
background: var(--Panel-bg-color);
|
||||
border-color: var(--Panel-top-border-color) var(--Panel-right-border-color)
|
||||
var(--Panel-bottom-border-color) var(--Panel-left-border-color);
|
||||
border-style: var(--Panel-top-border-style) var(--Panel-right-border-style)
|
||||
var(--Panel-bottom-border-style) var(--Panel-left-border-style);
|
||||
border-width: var(--Panel-borderWidth);
|
||||
border-radius: var(--Panel-borderRadius);
|
||||
-webkit-box-shadow: var(--Panel-boxShadow);
|
||||
box-shadow: var(--Panel-shadow);
|
||||
|
||||
/* 主题 */
|
||||
&--default {
|
||||
border-color: var(--Panel-top-border-color) var(--Panel-right-border-color)
|
||||
var(--Panel-bottom-border-color) var(--Panel-left-border-color);
|
||||
|
||||
> .#{$ns}Panel-heading {
|
||||
background: var(--Panel-heading-bg-color);
|
||||
color: var(--Panel-heading-color);
|
||||
|
||||
.badge {
|
||||
color: var(--Panel--default-badgeColor);
|
||||
background: var(--Panel--default-badgeBg);
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$ns}Panel-heading {
|
||||
border-color: var(--Panel-heading-top-border-color)
|
||||
var(--Panel-heading-right-border-color)
|
||||
var(--Panel-heading-bottom-border-color)
|
||||
var(--Panel-heading-left-border-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--primary {
|
||||
border-color: var(--primary);
|
||||
|
||||
> .#{$ns}Panel-heading {
|
||||
background: var(--primary);
|
||||
color: var(--white);
|
||||
|
||||
.badge {
|
||||
color: var(--primary);
|
||||
background: var(--white);
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$ns}Panel-heading,
|
||||
> .#{$ns}Panel-footer {
|
||||
border-color: var(--primary);
|
||||
}
|
||||
}
|
||||
|
||||
&--success {
|
||||
border-color: var(--success);
|
||||
|
||||
> .#{$ns}Panel-heading {
|
||||
background: var(--success);
|
||||
color: var(--white);
|
||||
|
||||
.badge {
|
||||
color: var(--success);
|
||||
background: var(--white);
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$ns}Panel-heading,
|
||||
> .#{$ns}Panel-footer {
|
||||
border-color: var(--success);
|
||||
}
|
||||
}
|
||||
|
||||
&--info {
|
||||
border-color: var(--info);
|
||||
|
||||
> .#{$ns}Panel-heading {
|
||||
background: var(--info);
|
||||
color: var(--white);
|
||||
|
||||
.badge {
|
||||
color: var(--info);
|
||||
background: var(--white);
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$ns}Panel-heading,
|
||||
> .#{$ns}Panel-footer {
|
||||
border-color: var(--info);
|
||||
}
|
||||
}
|
||||
|
||||
&--warning {
|
||||
border-color: var(--warning);
|
||||
|
||||
> .#{$ns}Panel-heading {
|
||||
background: var(--warning);
|
||||
color: var(--white);
|
||||
|
||||
.badge {
|
||||
color: var(--warning);
|
||||
background: var(--white);
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$ns}Panel-heading,
|
||||
> .#{$ns}Panel-footer {
|
||||
border-color: var(--warning);
|
||||
}
|
||||
}
|
||||
|
||||
&--danger {
|
||||
border-color: var(--danger);
|
||||
|
||||
> .#{$ns}Panel-heading {
|
||||
background: var(--danger);
|
||||
color: var(--white);
|
||||
|
||||
.badge {
|
||||
color: var(--danger);
|
||||
background: var(--white);
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$ns}Panel-heading,
|
||||
> .#{$ns}Panel-footer {
|
||||
border-color: var(--danger);
|
||||
}
|
||||
}
|
||||
|
||||
/* 子组件 */
|
||||
&-heading {
|
||||
padding: var(--Panel-headingPadding);
|
||||
border-color: var(--Panel-heading-top-border-color)
|
||||
var(--Panel-heading-right-border-color)
|
||||
var(--Panel-heading-bottom-border-color)
|
||||
var(--Panel-heading-left-border-color);
|
||||
border-style: var(--Panel-heading-top-border-style)
|
||||
var(--Panel-heading-right-border-style)
|
||||
var(--Panel-heading-bottom-border-style)
|
||||
var(--Panel-heading-left-border-style);
|
||||
border-width: var(--Panel-heading-top-border-width)
|
||||
var(--Panel-heading-right-border-width)
|
||||
var(--Panel-heading-bottom-border-width)
|
||||
var(--Panel-heading-left-border-width);
|
||||
border-radius: var(--Panel-headingBorderRadius);
|
||||
|
||||
&.is-collapsible {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
&-arrow {
|
||||
transition: transform 0.1s ease-in;
|
||||
transform: rotate(180deg);
|
||||
&.is-collapsed {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
&-title {
|
||||
margin: 0;
|
||||
font-size: var(--Panel-heading-fontSize);
|
||||
color: var(--Panel-heading-color);
|
||||
font-weight: var(--Panel-heading-fontWeight);
|
||||
line-height: var(--Panel-heading-lineHeight);
|
||||
}
|
||||
|
||||
&-body {
|
||||
padding: var(--Panel-bodyPadding);
|
||||
}
|
||||
|
||||
&-footer {
|
||||
border-color: var(--Panel-footerBorderColor);
|
||||
border-radius: var(--Panel-footerBorderRadius);
|
||||
background: var(--Panel-footerBg);
|
||||
padding: var(--Panel-footerPadding);
|
||||
border-style: var(--Panel-footer-top-border-style)
|
||||
var(--Panel-footer-right-border-style)
|
||||
var(--Panel-footer-bottom-border-style)
|
||||
var(--Panel-footer-left-border-style);
|
||||
border-width: var(--Panel-footer-top-border-width)
|
||||
var(--Panel-footer-right-border-width)
|
||||
var(--Panel-footer-bottom-border-width)
|
||||
var(--Panel-footer-left-border-width);
|
||||
clear: both;
|
||||
|
||||
.#{$ns}Button + .#{$ns}Button {
|
||||
margin-left: var(--Panel-footerButtonMarginLeft);
|
||||
}
|
||||
}
|
||||
|
||||
&-fixedBottom {
|
||||
position: sticky;
|
||||
background: var(--white);
|
||||
bottom: var(--affix-offset-bottom);
|
||||
z-index: $zindex-sticky;
|
||||
}
|
||||
|
||||
&-btnToolbar {
|
||||
@include clearfix();
|
||||
text-align: var(--Panel-btnToolbarTextAlign);
|
||||
|
||||
.#{$ns}Button {
|
||||
margin-left: var(--Panel-footerButtonMarginLeft);
|
||||
}
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 移动端样式调整 */
|
||||
@include media-breakpoint-down(sm) {
|
||||
.#{$ns}Panel--form {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
|
||||
margin: 0 calc(var(--Panel-body-paddingTop) * -1)
|
||||
calc(var(--Panel-marginBottom) / 2);
|
||||
|
||||
.#{$ns}Panel-body {
|
||||
// padding: 0 var(--gap-md) var(--gap-md);
|
||||
}
|
||||
|
||||
> .#{$ns}Panel-heading {
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
|
||||
.#{$ns}Panel-title {
|
||||
.icon {
|
||||
width: var(--sizes-base-7);
|
||||
height: var(--sizes-base-7);
|
||||
}
|
||||
font-size: var(--fontSizeLg);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Panel-footerWrap {
|
||||
padding-bottom: var(--Panel-body-paddingBottom);
|
||||
}
|
||||
|
||||
.#{$ns}Panel-footer {
|
||||
border-top: none;
|
||||
display: flex;
|
||||
padding: 0 var(--Panel-body-paddingLeft);
|
||||
|
||||
> .#{$ns}Button {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
47
packages/amis-ui/scss/components/_pdf_viewer.scss
Normal file
47
packages/amis-ui/scss/components/_pdf_viewer.scss
Normal file
@@ -0,0 +1,47 @@
|
||||
.#{$ns}PdfViewer {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-width: 300px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 50px 0;
|
||||
&-Content {
|
||||
width: max-content;
|
||||
max-width: 100%;
|
||||
&.is-loaded {
|
||||
box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
&-Loading {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&-Tool {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
padding: 5px 15px;
|
||||
bottom: 60px;
|
||||
background-color: #444444;
|
||||
border-radius: 10px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
.gap {
|
||||
margin: 0 4px;
|
||||
}
|
||||
.icon {
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
margin: 0 10px;
|
||||
&:hover {
|
||||
color: var(--colors-brand-5);
|
||||
}
|
||||
}
|
||||
.page-input {
|
||||
width: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
140
packages/amis-ui/scss/components/_picker-columns.scss
Normal file
140
packages/amis-ui/scss/components/_picker-columns.scss
Normal file
@@ -0,0 +1,140 @@
|
||||
.#{$ns}PickerColumns {
|
||||
position: relative;
|
||||
background-color: var(--PickerColumns-bg);
|
||||
user-select: none;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
font-size: var(--PickerColumns-option-fontSize);
|
||||
|
||||
li:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: var(--PickerColumns-toolbar-height);
|
||||
}
|
||||
|
||||
&-cancel,
|
||||
&-confirm {
|
||||
height: 100%;
|
||||
padding: var(--PickerColumns-action-padding);
|
||||
font-size: var(--PickerColumns-action-fontSize);
|
||||
background-color: transparent !important;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:active {
|
||||
background-color: none !important;
|
||||
}
|
||||
&:hover {
|
||||
background-color: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
&-confirm {
|
||||
color: var(--PickerColumns-confirmAction-color);
|
||||
}
|
||||
|
||||
&-cancel {
|
||||
color: var(--PickerColumns-cancelAction-color);
|
||||
}
|
||||
|
||||
&-title {
|
||||
max-width: 50%;
|
||||
font-weight: 500;
|
||||
font-size: var(--PickerColumns-title-fontSize);
|
||||
line-height: var(--PickerColumns-title-lineHeight);
|
||||
text-align: center;
|
||||
color: var(--PickerColumns-title-color);
|
||||
}
|
||||
|
||||
&-columns {
|
||||
touch-action: none;
|
||||
position: relative;
|
||||
display: flex;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
&-loading {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--PickerColumns-loadingIcon-color);
|
||||
background-color: var(--PickerColumns-loadingMask-color);
|
||||
}
|
||||
|
||||
&-frame {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: var(--gap-md);
|
||||
left: var(--gap-md);
|
||||
z-index: 2;
|
||||
transform: translateY(-50%);
|
||||
pointer-events: none;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
border-bottom: 1px solid var(--borderColor);
|
||||
border-top: 1px solid var(--borderColor);
|
||||
top: -50%;
|
||||
right: -50%;
|
||||
left: -50%;
|
||||
bottom: -50%;
|
||||
transform: scale(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
&-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: linear-gradient(
|
||||
180deg,
|
||||
hsla(0, 0%, 100%, 0.9),
|
||||
hsla(0, 0%, 100%, 0.4)
|
||||
),
|
||||
linear-gradient(0deg, hsla(0, 0%, 100%, 0.9), hsla(0, 0%, 100%, 0.4));
|
||||
background-repeat: no-repeat;
|
||||
background-position: top, bottom;
|
||||
transform: translateZ(0);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&-columnWrapper {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
transition-timing-function: cubic-bezier(0.23, 1, 0.68, 1);
|
||||
}
|
||||
|
||||
&-columnItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--PickerColumns-optionText-color);
|
||||
}
|
||||
&-columnItem.is-disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: var(--PickerColumns-optionDisabled-opacity);
|
||||
}
|
||||
|
||||
&-columnItemis-selected {
|
||||
font-size: 18px;
|
||||
color: var(--PickerColumns-title-color);
|
||||
}
|
||||
}
|
||||
54
packages/amis-ui/scss/components/_popover.scss
Normal file
54
packages/amis-ui/scss/components/_popover.scss
Normal file
@@ -0,0 +1,54 @@
|
||||
.#{$ns}PopOver {
|
||||
position: absolute;
|
||||
background: var(--PopOver-bg);
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-popover;
|
||||
display: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-weight: var(--fontWeightNormal);
|
||||
letter-spacing: normal;
|
||||
line-height: var(--lineHeightBase);
|
||||
text-align: left;
|
||||
text-align: start;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
text-transform: none;
|
||||
white-space: normal;
|
||||
word-break: normal;
|
||||
word-spacing: normal;
|
||||
word-wrap: normal;
|
||||
font-size: var(--fontSizeBase);
|
||||
box-shadow: var(--boxShadow);
|
||||
border: var(--common-popover-border);
|
||||
border-radius: var(--borderRadius);
|
||||
|
||||
& > * {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
&-overlay {
|
||||
position: fixed !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
bottom: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&-isMobile {
|
||||
.#{$ns}PopOver-overlay {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
&--leftBottomLeftTop {
|
||||
margin-top: px2rem(4px);
|
||||
}
|
||||
&--leftTopLeftBottom {
|
||||
margin-top: px2rem(-4px);
|
||||
}
|
||||
}
|
||||
100
packages/amis-ui/scss/components/_popoverable.scss
Normal file
100
packages/amis-ui/scss/components/_popoverable.scss
Normal file
@@ -0,0 +1,100 @@
|
||||
.#{$ns}Field-popOverBtn {
|
||||
color: var(--PopOverAble-iconColor);
|
||||
margin-left: var(--gap-xs);
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
vertical-align: middle;
|
||||
|
||||
&:hover {
|
||||
color: var(--PopOverAble-onHover-iconColor);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}TableCell-ellipsis {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.#{$ns}Field--popOverAble {
|
||||
outline: none;
|
||||
position: relative;
|
||||
|
||||
.#{$ns}Field-popOverWrap {
|
||||
display: -webkit-inline-box;
|
||||
vertical-align: middle;
|
||||
|
||||
&-ellipsis {
|
||||
width: auto;
|
||||
max-height: var(--sizes-base-15);
|
||||
overflow: hidden;
|
||||
display: -webkit-inline-box;
|
||||
-webkit-box-orient: vertical;
|
||||
line-clamp: 1;
|
||||
-webkit-line-clamp: 1;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
&-noWrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Field--copyable {
|
||||
white-space: nowrap;
|
||||
|
||||
.#{$ns}Form-item {
|
||||
display: inline-block;
|
||||
margin-bottom: unset;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.#{$ns}Field-copyBtn {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}PopOverAble-popover {
|
||||
min-width: px2rem(320px);
|
||||
max-width: px2rem(640px);
|
||||
|
||||
.#{$ns}Panel {
|
||||
margin-bottom: 0;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}PopOverAble--fixed {
|
||||
position: fixed;
|
||||
|
||||
> * {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}PopOverAble--fixed-center {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.#{$ns}PopOverAble--fixed-left-top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.#{$ns}PopOverAble--fixed-right-top {
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.#{$ns}PopOverAble--fixed-left-bottom {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.#{$ns}PopOverAble--fixed-right-bottom {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
171
packages/amis-ui/scss/components/_popup.scss
Normal file
171
packages/amis-ui/scss/components/_popup.scss
Normal file
@@ -0,0 +1,171 @@
|
||||
@keyframes PopUpIn {
|
||||
from {
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes PopUpOut {
|
||||
to {
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes PopUpOpacityIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes PopUpOpacityOut {
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.#{$ns}PopUp {
|
||||
width: 100%;
|
||||
height: px2rem(400px);
|
||||
position: fixed;
|
||||
background: var(--PopOver-bg);
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: $zindex-top;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-weight: var(--fontWeightNormal);
|
||||
letter-spacing: normal;
|
||||
line-height: var(--lineHeightBase);
|
||||
text-align: left;
|
||||
text-align: start;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
text-transform: none;
|
||||
white-space: normal;
|
||||
word-break: normal;
|
||||
word-spacing: normal;
|
||||
word-wrap: normal;
|
||||
font-size: var(--fontSizeBase);
|
||||
box-shadow: var(--boxShadow);
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
border-radius: var(--borderRadius);
|
||||
overflow: hidden;
|
||||
&.in,
|
||||
&.out {
|
||||
animation-duration: var(--animation-duration);
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
&.in {
|
||||
animation-name: PopUpIn;
|
||||
.#{$ns}PopUp-overlay {
|
||||
animation-name: PopUpOpacityIn;
|
||||
}
|
||||
}
|
||||
|
||||
&.out {
|
||||
animation-name: PopUpOut;
|
||||
.#{$ns}PopUp-overlay {
|
||||
animation-name: PopUpOpacityOut;
|
||||
}
|
||||
}
|
||||
|
||||
&-inner {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
background: $white;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
&-closeBox {
|
||||
width: px2rem(48px);
|
||||
height: px2rem(48px);
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
cursor: pointer;
|
||||
right: 0;
|
||||
top: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&-closeWrap {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
height: px2rem(48px);
|
||||
line-height: px2rem(48px);
|
||||
}
|
||||
|
||||
&-closeWrap &-close {
|
||||
z-index: 1;
|
||||
color: var(--icon-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: px2rem(60px);
|
||||
}
|
||||
&-title {
|
||||
font-size: var(--fontSizeMd);
|
||||
}
|
||||
|
||||
&-cancel {
|
||||
color: var(--PopUp-cancelAction-color);
|
||||
margin-left: var(--gap-sm);
|
||||
}
|
||||
|
||||
&-confirm {
|
||||
color: var(--PopUp-confirmAction-color);
|
||||
margin-right: var(--gap-sm);
|
||||
border: none;
|
||||
}
|
||||
|
||||
&-content {
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
|
||||
> div {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
& > * {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
&-overlay {
|
||||
position: fixed !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
opacity: 1;
|
||||
animation-duration: var(--animation-duration);
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
&--leftBottomLeftTop {
|
||||
margin-top: px2rem(4px);
|
||||
}
|
||||
&--leftTopLeftBottom {
|
||||
margin-top: px2rem(-4px);
|
||||
}
|
||||
&-safearea {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
}
|
||||
51
packages/amis-ui/scss/components/_portlet.scss
Normal file
51
packages/amis-ui/scss/components/_portlet.scss
Normal file
@@ -0,0 +1,51 @@
|
||||
.#{$ns}Portlet {
|
||||
border: var(--Portlet-borderWidth) var(--Portlet-borderStyle) var(--Portlet-borderColor);
|
||||
border-radius: var(--Portlet-borderRadius);
|
||||
|
||||
padding: var(--gap-base);
|
||||
|
||||
&-tab.unactive-select {
|
||||
.is-active {
|
||||
a:first-child,
|
||||
&:hover > a:first-child,
|
||||
> a:first-child:focus {
|
||||
border: none !important;
|
||||
color: inherit !important;
|
||||
cursor: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-tab.no-divider {
|
||||
.#{$ns}Tabs-links {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Tabs-pane {
|
||||
padding: unset;
|
||||
}
|
||||
|
||||
&-toolbar {
|
||||
display: inline-flex;
|
||||
float: right;
|
||||
justify-content: flex-end;
|
||||
|
||||
.#{$ns}Button {
|
||||
margin-left: calc(var(--gap-xs));
|
||||
}
|
||||
}
|
||||
|
||||
&-header-desc {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin-left: var(--gap-base);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Portlet.no-header {
|
||||
.#{$ns}Portlet-tab .#{$ns}Tabs-links {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
13
packages/amis-ui/scss/components/_print.scss
Normal file
13
packages/amis-ui/scss/components/_print.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
@media print {
|
||||
.pe-no-print {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.pe-preserve-ancestor {
|
||||
display: block !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
165
packages/amis-ui/scss/components/_progress.scss
Normal file
165
packages/amis-ui/scss/components/_progress.scss
Normal file
@@ -0,0 +1,165 @@
|
||||
.#{$ns}Progress {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--text-color);
|
||||
font-size: var(--fontSizeXs);
|
||||
min-width: 50px;
|
||||
&-line {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
&-threshold {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
border-left: 1px solid #007bff;
|
||||
&-text {
|
||||
position: absolute;
|
||||
font-size: 12px;
|
||||
bottom: -20px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
&-inter {
|
||||
height: 100%;
|
||||
background-color: var(--Progress-line-bg);
|
||||
overflow: hidden;
|
||||
border-radius: var(--Progress-borderRadius);
|
||||
}
|
||||
|
||||
&-text {
|
||||
display: inline-block;
|
||||
flex-grow: 1;
|
||||
margin-left: 8px;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
word-break: normal;
|
||||
color: var(--Progress-line-color);
|
||||
font-size: var(--Progress-line-fontSize);
|
||||
.icon {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
&-bar {
|
||||
float: left;
|
||||
width: 0;
|
||||
height: 8px;
|
||||
background: var(--Progress-line-theme-color);
|
||||
transition: width var(--animation-duration) ease;
|
||||
border-radius: var(--Progress-borderRadius);
|
||||
|
||||
&.bg-info {
|
||||
background: var(--Progress-line-theme-color);
|
||||
}
|
||||
|
||||
&--stripe {
|
||||
background-image: linear-gradient(
|
||||
45deg,
|
||||
rgba(255, 255, 255, 0.15) 25%,
|
||||
transparent 25%,
|
||||
transparent 50%,
|
||||
rgba(255, 255, 255, 0.15) 50%,
|
||||
rgba(255, 255, 255, 0.15) 75%,
|
||||
transparent 75%,
|
||||
transparent
|
||||
);
|
||||
background-size: px2rem(32px) px2rem(32px);
|
||||
}
|
||||
|
||||
&--animate {
|
||||
position: relative;
|
||||
transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: var(--Progress-animate-backgroundColor);
|
||||
border-radius: 10px;
|
||||
opacity: 0;
|
||||
animation: progress-bar-active 2.4s cubic-bezier(0.23, 1, 0.32, 1)
|
||||
infinite;
|
||||
content: '';
|
||||
}
|
||||
}
|
||||
&--stripe-animate {
|
||||
animation: progress-bar-stripes 1s linear infinite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-circle {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
&-text {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
transform: translate(-50%, -50%);
|
||||
color: var(--Progress-circle-color);
|
||||
font-size: var(--Progress-circle-fontSize);
|
||||
.icon {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
.bg-warning-circle {
|
||||
&-path {
|
||||
stroke: var(--warning);
|
||||
}
|
||||
}
|
||||
.bg-danger-circle {
|
||||
&-path {
|
||||
stroke: var(--danger);
|
||||
}
|
||||
}
|
||||
.bg-info-circle {
|
||||
&-path {
|
||||
stroke: var(--info);
|
||||
}
|
||||
}
|
||||
.bg-success-circle {
|
||||
&-path {
|
||||
stroke: var(--success);
|
||||
}
|
||||
}
|
||||
.bg-primary-circle {
|
||||
&-path {
|
||||
stroke: var(--primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes progress-bar-active {
|
||||
0% {
|
||||
transform: translateX(-100%) scaleX(0);
|
||||
opacity: 0.1;
|
||||
}
|
||||
|
||||
20% {
|
||||
transform: translateX(-100%) scaleX(0);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(0) scaleX(1);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 2rem 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
47
packages/amis-ui/scss/components/_property.scss
Normal file
47
packages/amis-ui/scss/components/_property.scss
Normal file
@@ -0,0 +1,47 @@
|
||||
.#{$ns}Property {
|
||||
> table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
|
||||
> thead > tr > th {
|
||||
padding: var(--gap-sm);
|
||||
background: var(--Property-title-bg);
|
||||
border: 1px solid var(--borderColor);
|
||||
}
|
||||
|
||||
> tbody > tr {
|
||||
background: var(--background);
|
||||
|
||||
> td,
|
||||
> th {
|
||||
border: 1px solid var(--borderColor);
|
||||
padding: var(--gap-sm);
|
||||
|
||||
.#{$ns}Form-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
> th {
|
||||
background: var(--Property-label-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--simple {
|
||||
> table {
|
||||
> thead > tr > th {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
> tbody > tr {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
> tbody > tr > td,
|
||||
> tbody > tr > th {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
30
packages/amis-ui/scss/components/_pull-refresh.scss
Normal file
30
packages/amis-ui/scss/components/_pull-refresh.scss
Normal file
@@ -0,0 +1,30 @@
|
||||
.#{$ns}PullRefresh {
|
||||
&-wrap {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&-header {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
transform: translateY(-100%);
|
||||
overflow: hidden;
|
||||
padding: var(--gap-xs) 0;
|
||||
min-height: var(--gap-lg);
|
||||
line-height: var(--gap-lg);
|
||||
color: #999;
|
||||
}
|
||||
&-footer {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
margin-bottom: 12px;
|
||||
font-size: var(--fontSizeMd);
|
||||
}
|
||||
|
||||
.loading-icon {
|
||||
animation: var(--Button-animation-spin);
|
||||
margin-right: var(--gap-xs);
|
||||
}
|
||||
}
|
||||
53
packages/amis-ui/scss/components/_quick-edit.scss
Normal file
53
packages/amis-ui/scss/components/_quick-edit.scss
Normal file
@@ -0,0 +1,53 @@
|
||||
.#{$ns}Field-quickEditBtn {
|
||||
margin-left: var(--gap-xs);
|
||||
height: auto;
|
||||
padding: 0;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
.fa {
|
||||
font-size: var(--QuickEdit-iconSize);
|
||||
}
|
||||
|
||||
> svg {
|
||||
width: var(--QuickEdit-iconSize);
|
||||
height: var(--QuickEdit-iconSize);
|
||||
color: currentColor;
|
||||
fill: currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Field--quickEditable {
|
||||
outline: none;
|
||||
position: relative;
|
||||
|
||||
&:focus {
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
border: var(--QuickEdit-onFocus-borderWidth) dashed
|
||||
var(--QuickEdit-onFocus-borderColor);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover .#{$ns}Field-quickEditBtn {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}QuickEdit-popover {
|
||||
min-width: px2rem(320px);
|
||||
max-width: px2rem(640px);
|
||||
|
||||
.#{$ns}Panel {
|
||||
margin-bottom: 0;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
58
packages/amis-ui/scss/components/_remark.scss
Normal file
58
packages/amis-ui/scss/components/_remark.scss
Normal file
@@ -0,0 +1,58 @@
|
||||
.#{$ns}Remark {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-left: var(--Remark-marginLeft);
|
||||
> span {
|
||||
color: var(--Remark-iconColor);
|
||||
font-size: var(--fontSizeSm);
|
||||
}
|
||||
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
|
||||
&-icon {
|
||||
color: var(--Remark-iconColor);
|
||||
font-size: var(--Remark-icon-fontSize);
|
||||
background: var(--Remark-bg);
|
||||
border: var(--Remark-borderWidth) solid var(--Remark-borderColor);
|
||||
width: var(--Remark-width);
|
||||
height: var(--Remark-width);
|
||||
line-height: 1;
|
||||
display: inline-flex;
|
||||
vertical-align: baseline;
|
||||
align-self: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: var(--fontSizeSm);
|
||||
user-select: none;
|
||||
|
||||
> svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
&-icon--circle {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
> span + .#{$ns}Remark-icon {
|
||||
margin-left: var(--gap-xs);
|
||||
}
|
||||
|
||||
&:hover > &-icon {
|
||||
color: var(--Remark-onHover-iconColor);
|
||||
background: var(--Remark-onHover-bg);
|
||||
border-color: var(--Remark-onHover-borderColor);
|
||||
}
|
||||
|
||||
> svg {
|
||||
width: calc(var(--Remark-width) - #{px2rem(2px)});
|
||||
height: calc(var(--Remark-width) - #{px2rem(2px)});
|
||||
color: var(--Remark-iconColor);
|
||||
}
|
||||
|
||||
&:hover > svg {
|
||||
color: var(--Remark-onHover-iconColor);
|
||||
}
|
||||
}
|
||||
380
packages/amis-ui/scss/components/_result-box.scss
Normal file
380
packages/amis-ui/scss/components/_result-box.scss
Normal file
@@ -0,0 +1,380 @@
|
||||
.#{$ns}ResultBox {
|
||||
padding: 0 px2rem(12px);
|
||||
min-height: var(--Form-input-height);
|
||||
align-items: center;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
color: var(--Form-select-color);
|
||||
font-size: var(--select-base-default-fontSize);
|
||||
font-weight: var(--select-base-default-fontWeight);
|
||||
border-width: var(--Form-select-borderWidth);
|
||||
border-style: var(--select-base-default-top-border-style)
|
||||
var(--select-base-default-right-border-style)
|
||||
var(--select-base-default-bottom-border-style)
|
||||
var(--select-base-default-left-border-style);
|
||||
border-color: var(--Form-select-borderColor);
|
||||
background: var(--Form-select-bg);
|
||||
border-radius: var(--Form-select-borderRadius);
|
||||
min-height: var(--Form-selectOption-height);
|
||||
padding: var(--select-base-default-paddingTop)
|
||||
var(--select-base-default-paddingRight)
|
||||
var(--select-base-default-paddingBottom)
|
||||
var(--select-base-default-paddingLeft);
|
||||
|
||||
@include input-input();
|
||||
@include input-border();
|
||||
|
||||
flex-wrap: nowrap;
|
||||
|
||||
input {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&.is-error {
|
||||
border-color: var(--Form-input-onError-borderColor);
|
||||
background: var(--Form-input-onError-bg);
|
||||
}
|
||||
|
||||
&.is-focused,
|
||||
&:focus {
|
||||
outline: none;
|
||||
background: var(--Form-select-onHover-bg);
|
||||
border-width: var(--select-base-hover-top-border-width)
|
||||
var(--select-base-hover-right-border-width)
|
||||
var(--select-base-hover-bottom-border-width)
|
||||
var(--select-base-hover-left-border-width);
|
||||
border-style: var(--select-base-hover-top-border-style)
|
||||
var(--select-base-hover-right-border-style)
|
||||
var(--select-base-hover-bottom-border-style)
|
||||
var(--select-base-hover-left-border-style);
|
||||
border-color: var(--select-base-hover-top-border-color)
|
||||
var(--select-base-hover-right-border-color)
|
||||
var(--select-base-hover-bottom-border-color)
|
||||
var(--select-base-hover-left-border-color);
|
||||
}
|
||||
|
||||
&.is-active,
|
||||
&.is-opened {
|
||||
border-width: var(--select-base-active-top-border-width)
|
||||
var(--select-base-active-right-border-width)
|
||||
var(--select-base-active-bottom-border-width)
|
||||
var(--select-base-active-left-border-width);
|
||||
border-style: var(--select-base-active-top-border-style)
|
||||
var(--select-base-active-right-border-style)
|
||||
var(--select-base-active-bottom-border-style)
|
||||
var(--select-base-active-left-border-style);
|
||||
border-color: var(--select-base-active-top-border-color)
|
||||
var(--select-base-active-right-border-color)
|
||||
var(--select-base-active-bottom-border-color)
|
||||
var(--select-base-active-left-border-color);
|
||||
box-shadow: var(--select-base-active-shadow);
|
||||
background: var(--select-base-active-bg-color);
|
||||
}
|
||||
|
||||
&.is-clickable:not(.is-disabled) {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: var(--Form-select-onHover-bg);
|
||||
border-width: var(--select-base-hover-top-border-width)
|
||||
var(--select-base-hover-right-border-width)
|
||||
var(--select-base-hover-bottom-border-width)
|
||||
var(--select-base-hover-left-border-width);
|
||||
border-style: var(--select-base-hover-top-border-style)
|
||||
var(--select-base-hover-right-border-style)
|
||||
var(--select-base-hover-bottom-border-style)
|
||||
var(--select-base-hover-left-border-style);
|
||||
border-color: var(--select-base-hover-top-border-color)
|
||||
var(--select-base-hover-right-border-color)
|
||||
var(--select-base-hover-bottom-border-color)
|
||||
var(--select-base-hover-left-border-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-error.is-focused {
|
||||
border-color: var(--Form-input-onError-borderColor);
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
color: var(--text--muted-color);
|
||||
pointer-events: none;
|
||||
border-width: var(--select-base-disabled-top-border-width)
|
||||
var(--select-base-disabled-right-border-width)
|
||||
var(--select-base-disabled-bottom-border-width)
|
||||
var(--select-base-disabled-left-border-width);
|
||||
border-style: var(--select-base-disabled-top-border-style)
|
||||
var(--select-base-disabled-right-border-style)
|
||||
var(--select-base-disabled-bottom-border-style)
|
||||
var(--select-base-disabled-left-border-style);
|
||||
border-color: var(--select-base-disabled-top-border-color)
|
||||
var(--select-base-disabled-right-border-color)
|
||||
var(--select-base-disabled-bottom-border-color)
|
||||
var(--select-base-disabled-left-border-color);
|
||||
background: var(--select-base-disabled-bg-color);
|
||||
|
||||
div.#{$ns}ResultBox-value {
|
||||
background: var(--TabsTransfer-border-color);
|
||||
|
||||
.#{$ns}ResultBox-valueLabel {
|
||||
color: var(--Pagination-light-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-value-wrap {
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--sizes-size-3);
|
||||
|
||||
> .#{$ns}AutoFoldedList {
|
||||
flex-grow: 5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sizes-size-3);
|
||||
}
|
||||
}
|
||||
|
||||
&-actions {
|
||||
margin-left: px2rem(4px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&-singleValue {
|
||||
flex-grow: 1;
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all; // 避免超长单词撑开
|
||||
}
|
||||
|
||||
&-pc-arrow {
|
||||
width: var(--gap-md);
|
||||
height: 100%;
|
||||
margin: auto 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: transform var(--animation-duration) ease;
|
||||
transform: rotate(90deg);
|
||||
|
||||
> svg {
|
||||
width: px2rem(10px);
|
||||
height: px2rem(10px);
|
||||
top: 0;
|
||||
color: var(--default-icon-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-opened &-pc-arrow {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
|
||||
&-clear {
|
||||
@include input-clear();
|
||||
height: 100%;
|
||||
margin: auto 0;
|
||||
background-color: unset;
|
||||
|
||||
&-with-arrow {
|
||||
right: 33px;
|
||||
}
|
||||
}
|
||||
|
||||
&-clear-wrap {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
> svg {
|
||||
display: inline-block;
|
||||
width: px2rem(14px);
|
||||
color: var(--icon-color);
|
||||
}
|
||||
|
||||
> a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&-value {
|
||||
background: var(--ResultBox-value-bg);
|
||||
color: var(--ResultBox-value-color);
|
||||
font-size: var(--select-multiple-fontSize);
|
||||
min-height: var(--ResultBox-tag-height);
|
||||
flex-wrap: nowrap;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: var(--select-multiple-paddingTop)
|
||||
var(--select-multiple-paddingRight) var(--select-multiple-paddingBottom)
|
||||
var(--select-multiple-paddingLeft);
|
||||
user-select: none;
|
||||
border-radius: var(--select-multiple-top-left-border-radius)
|
||||
var(--select-multiple-top-right-border-radius)
|
||||
var(--select-multiple-bottom-right-border-radius)
|
||||
var(--select-multiple-bottom-left-border-radius);
|
||||
|
||||
> a {
|
||||
cursor: pointer;
|
||||
margin-left: px2rem(10px);
|
||||
color: var(--ResultBox-icon-color);
|
||||
|
||||
&:hover {
|
||||
color: var(--ResultBox-icon--onHover-color);
|
||||
}
|
||||
|
||||
> svg {
|
||||
width: px2rem(10px);
|
||||
height: px2rem(10px);
|
||||
|
||||
&.icon {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--ResultBox-value--onHover-bg);
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
pointer-events: none;
|
||||
color: var(--ResultBox-value--onDisabled-color);
|
||||
|
||||
> a {
|
||||
color: var(--ResultBox-icon--onDisabled-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-invalid {
|
||||
color: var(--Form-selectValue-onInvalid-color);
|
||||
}
|
||||
}
|
||||
|
||||
&-valueLabel {
|
||||
max-width: var(--Form-valueLabel-maxWidth);
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&-placeholder {
|
||||
color: var(--Form-input-placeholderColor);
|
||||
flex-grow: 1;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
> input {
|
||||
padding-left: 8px;
|
||||
min-height: 24px;
|
||||
}
|
||||
|
||||
&.#{$ns}TransferDropDown {
|
||||
&.is-group {
|
||||
> .#{$ns}TransferDropDown-icon {
|
||||
margin-right: var(--gap-sm);
|
||||
}
|
||||
|
||||
> .#{$ns}ResultBox-placeholder {
|
||||
padding-left: var(--gap-sm);
|
||||
}
|
||||
}
|
||||
|
||||
> .#{$ns}ResultBox-value {
|
||||
background: var(--Form-select-value-bgColor);
|
||||
|
||||
&:hover {
|
||||
background: var(--Form-selectValue-onHover-bgColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-overflow {
|
||||
&-wrapper {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
max-height: calc(
|
||||
(var(--ResultBox-tag-height) + var(--ResultBox-tag-marginBottom)) * 5
|
||||
);
|
||||
}
|
||||
|
||||
&.#{$ns}Tooltip--dark {
|
||||
.#{$ns}ResultBox-overflow-wrapper {
|
||||
.#{$ns}ResultBox-value {
|
||||
color: var(--white);
|
||||
background-color: var(--Form-select-value-bgColor--dark);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--ResultBox-value--onHover-bg--dark);
|
||||
}
|
||||
|
||||
& > a {
|
||||
color: var(--Form-select-valueIcon-color--dark);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
min-height: calc(var(--Form-input-lineHeight) * var(--fontSizeLg));
|
||||
border: none;
|
||||
padding: 0;
|
||||
font-size: var(--fontSizeLg);
|
||||
border: none;
|
||||
justify-content: flex-end;
|
||||
width: 100%;
|
||||
|
||||
&.is-focused,
|
||||
&:hover {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.#{$ns}ResultBox-value-wrap {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.#{$ns}ResultBox-clear {
|
||||
@include input-clear();
|
||||
width: px2rem(26px);
|
||||
height: px2rem(26px);
|
||||
margin: 0 px2rem(-2px);
|
||||
margin-left: auto;
|
||||
padding: px2rem(4px);
|
||||
position: unset;
|
||||
right: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: unset;
|
||||
}
|
||||
|
||||
.#{$ns}ResultBox-arrow {
|
||||
margin-right: var(--gap-xs);
|
||||
// margin-left: var(--gap-xs);
|
||||
width: var(--gap-md);
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
margin-left: 4px;
|
||||
|
||||
> svg {
|
||||
transition: transform var(--animation-duration);
|
||||
display: inline-block;
|
||||
color: var(--Form-select-caret-iconColor);
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
267
packages/amis-ui/scss/components/_search-box.scss
Normal file
267
packages/amis-ui/scss/components/_search-box.scss
Normal file
@@ -0,0 +1,267 @@
|
||||
.#{$ns}SearchBox {
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
|
||||
line-height: var(--Form-input-lineHeight);
|
||||
font-size: var(--Form-input-fontSize);
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
height: var(--input-size-default-height);
|
||||
width: 30px;
|
||||
padding-left: 8px;
|
||||
|
||||
transition: all var(--animation-duration) ease-in-out;
|
||||
border: var(--Form-input-borderWidth) solid transparent;
|
||||
border-radius: var(--Form-input-borderRadius);
|
||||
|
||||
&:hover {
|
||||
background: var(--Form-input-onHover-bg);
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
background: var(--Form-input-bg);
|
||||
border: var(--Form-input-borderWidth) solid var(--Form-input-borderColor);
|
||||
width: var(--SearchBox-width);
|
||||
position: relative;
|
||||
> input {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-color: var(--SearchBox-hover-color);
|
||||
}
|
||||
|
||||
&.is-focused {
|
||||
border-color: var(--SearchBox-focus-color);
|
||||
}
|
||||
}
|
||||
|
||||
&-searchBtn {
|
||||
display: inline-block;
|
||||
padding: #{px2rem(5px)} #{px2rem(10px)};
|
||||
|
||||
&--loading {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
&-activeBtn,
|
||||
&-cancelBtn {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
&-activeBtn,
|
||||
&-searchBtn,
|
||||
&-cancelBtn {
|
||||
cursor: pointer;
|
||||
color: var(--SearchBox-search-icon-color);
|
||||
svg {
|
||||
top: px2rem(2px);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--icon-onHover-color);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-disabled &-activeBtn,
|
||||
&.is-disabled &-searchBtn,
|
||||
&.is-disabled &-cancelBtn {
|
||||
color: var(--SearchBox-search-btn-color--disabled);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
background-color: var(--SearchBox-disabled-color);
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--Form-input-borderColor);
|
||||
}
|
||||
|
||||
> input {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
> input {
|
||||
outline: none;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--Form-input-color);
|
||||
|
||||
width: 0;
|
||||
height: calc(var(--Form-input-lineHeight) * var(--Form-input-fontSize));
|
||||
|
||||
&::placeholder {
|
||||
color: var(--Form-input-placeholderColor);
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
&-clearable {
|
||||
display: flex;
|
||||
width: var(--SearchBox-clearable-icon-size);
|
||||
height: var(--SearchBox-clearable-icon-size);
|
||||
color: var(--SearchBox-clearable-icon-color);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
|
||||
.icon {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--Form-input-clearBtn-color-onHover);
|
||||
}
|
||||
}
|
||||
|
||||
&--enhance.is-active &-searchBtn {
|
||||
color: var(--SearchBox-enhonce-icon-color);
|
||||
background: var(--SearchBox-hover-color);
|
||||
position: absolute;
|
||||
top: px2rem(-1px);
|
||||
bottom: px2rem(-1px);
|
||||
right: px2rem(-1px);
|
||||
border-radius: 0 var(--borderRadius) var(--borderRadius) 0;
|
||||
svg {
|
||||
top: px2rem(2px);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--button-primary-hover-bg-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--enhance &-clearable {
|
||||
margin-right: var(--SearchBox-enhonce-clearable-gap);
|
||||
}
|
||||
|
||||
&--enhance.is-active.is-disabled &-searchBtn {
|
||||
background: var(--SearchBox-enhonce-disabled-color);
|
||||
color: var(--SearchBox-enhonce-disabled-search-color);
|
||||
}
|
||||
|
||||
&.is-mobile {
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
border-bottom: var(--borderWidth) solid var(--borderColor);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}SearchBox-history {
|
||||
& > .is-history {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.#{$ns}SearchBox-history-dropdown {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
z-index: 998;
|
||||
padding: var(--gap-sm) 0;
|
||||
width: 100%;
|
||||
max-width: var(--SearchBox-history-dropdown-maxWidth);
|
||||
min-height: #{px2rem(72px)};
|
||||
max-height: var(--SearchBox-history-dropdown-maxHeight);
|
||||
background: var(--white);
|
||||
border: var(--borderWidth) solid var(--borderColor);
|
||||
border-top: none;
|
||||
border-radius: var(--borderRadius);
|
||||
box-shadow: var(--boxShadow);
|
||||
display: none;
|
||||
|
||||
&.is-active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
header {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 var(--gap-md);
|
||||
margin-bottom: #{px2rem(10px)};
|
||||
|
||||
h4 {
|
||||
font-size: var(--fontSizeBase);
|
||||
height: #{px2rem(24px)};
|
||||
line-height: #{px2rem(24px)};
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
font-size: var(--fontSizeSm);
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}SearchBox-history-content {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 0 var(--gap-md);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
max-height: calc(
|
||||
var(--SearchBox-history-dropdown-maxHeight) - 38px - var(--gap-sm) * 2
|
||||
);
|
||||
}
|
||||
|
||||
.#{$ns}SearchBox-history-tag {
|
||||
display: inlin-flex;
|
||||
height: var(--Tag-height);
|
||||
padding: 0 var(--gap-sm);
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: var(--Tag-content-fontSize);
|
||||
max-width: 160px;
|
||||
border-radius: var(--Tag-borderRadius);
|
||||
background-color: var(--Tag-default-color);
|
||||
color: var(--Tag-fontColor);
|
||||
margin-bottom: var(--gap-sm);
|
||||
margin-right: var(--gap-sm);
|
||||
max-width: 96px;
|
||||
cursor: pointer;
|
||||
|
||||
&-text {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
&-close {
|
||||
margin-left: var(--gap-sm);
|
||||
margin-right: var(--gap-xs);
|
||||
cursor: pointer;
|
||||
|
||||
i {
|
||||
font-size: #{px2rem(8px)};
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: #{px2rem(8px)};
|
||||
height: #{px2rem(8px)};
|
||||
position: inherit;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
&:active {
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
packages/amis-ui/scss/components/_service.scss
Normal file
3
packages/amis-ui/scss/components/_service.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.#{$ns}Service {
|
||||
position: relative;
|
||||
}
|
||||
19
packages/amis-ui/scss/components/_shape.scss
Normal file
19
packages/amis-ui/scss/components/_shape.scss
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @file _shape.scss
|
||||
*
|
||||
* @author allenve(yupeng12@baidu.com)
|
||||
* @created: 2024/12/12
|
||||
*/
|
||||
|
||||
.#{$ns}Shape {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
&-svg {
|
||||
position: absolute;
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
98
packages/amis-ui/scss/components/_signature.scss
Normal file
98
packages/amis-ui/scss/components/_signature.scss
Normal file
@@ -0,0 +1,98 @@
|
||||
.#{$ns}Signature {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
&-canvas {
|
||||
border: 1px dashed #aaa;
|
||||
}
|
||||
|
||||
&-Tool {
|
||||
height: var(--signature-tool-height);
|
||||
margin-top: var(--signature-tool-margin-top);
|
||||
.actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.left-actions {
|
||||
button {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.right-actions {
|
||||
button {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-placeholder {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: var(--signature-tool-height);
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: var(--signature-placeholder-gap);
|
||||
color: var(--signature-placeholder-color);
|
||||
}
|
||||
|
||||
&-Embed {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
&-Preview {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-left: 10px;
|
||||
height: 30px;
|
||||
margin: 1px;
|
||||
padding: 2px;
|
||||
border: 1px dashed #aaa;
|
||||
.preview-close {
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: #aaa;
|
||||
top: 0;
|
||||
&:hover {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
img {
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
&-Body {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-fullScreen,
|
||||
&-Embed-Body.is-fullScreen {
|
||||
flex-direction: row-reverse;
|
||||
justify-content: space-between;
|
||||
align-items: stretch;
|
||||
.#{$ns}Signature-Tool {
|
||||
width: calc(
|
||||
var(--signature-tool-height) - var(--signature-tool-margin-top)
|
||||
);
|
||||
height: auto;
|
||||
margin-top: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.actions {
|
||||
white-space: nowrap;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
27
packages/amis-ui/scss/components/_slider.scss
Normal file
27
packages/amis-ui/scss/components/_slider.scss
Normal file
@@ -0,0 +1,27 @@
|
||||
.#{$ns}Slider {
|
||||
display: flex;
|
||||
&-BodyContainer {
|
||||
width: 60%;
|
||||
}
|
||||
&-LeftContainer,
|
||||
&-RightContainer {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
.#{$ns}Slider {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
&-BodyContainer {
|
||||
flex: 1;
|
||||
}
|
||||
&-LeftContainer,
|
||||
&-RightContainer {
|
||||
flex: initial;
|
||||
width: 0;
|
||||
transition: width 0.3s;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
packages/amis-ui/scss/components/_sparkline.scss
Normal file
18
packages/amis-ui/scss/components/_sparkline.scss
Normal file
@@ -0,0 +1,18 @@
|
||||
.#{$ns}Sparkline {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
|
||||
&-line {
|
||||
stroke: var(--Sparkline-line-color);
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
&-area {
|
||||
fill: var(--Sparkline-area-color);
|
||||
}
|
||||
|
||||
&--clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
214
packages/amis-ui/scss/components/_spinner.scss
Normal file
214
packages/amis-ui/scss/components/_spinner.scss
Normal file
@@ -0,0 +1,214 @@
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Spinner {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
transition: ease-out opacity var(--animation-duration);
|
||||
|
||||
&.in {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.#{$ns}Spinner-icon {
|
||||
width: var(--Spinner-width);
|
||||
height: var(--Spinner-height);
|
||||
position: relative;
|
||||
transform: translateZ(0);
|
||||
animation: spin 2s linear infinite;
|
||||
transition: ease-out all var(--animation-duration);
|
||||
|
||||
&--default {
|
||||
background: var(--Spinner-bg);
|
||||
background-size: 100%;
|
||||
animation: none;
|
||||
}
|
||||
|
||||
&--simple {
|
||||
background: transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: var(--Spinner-color);
|
||||
}
|
||||
|
||||
svg.icon {
|
||||
top: 0;
|
||||
|
||||
path {
|
||||
fill: var(--Spinner-color);
|
||||
}
|
||||
}
|
||||
|
||||
i.icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: var(--Spinner-width);
|
||||
}
|
||||
}
|
||||
|
||||
&--custom {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
&.#{$ns}Spinner-icon--disabled > svg.icon {
|
||||
color: var(--Spinner-color--disabled);
|
||||
fill: var(--Spinner-color--disabled);
|
||||
|
||||
& path {
|
||||
fill: var(--Spinner-color--disabled);
|
||||
}
|
||||
}
|
||||
|
||||
&--lg {
|
||||
width: var(--Spinner--lg-width);
|
||||
height: var(--Spinner--lg-height);
|
||||
|
||||
i.icon {
|
||||
font-size: var(--Spinner--lg-height);
|
||||
}
|
||||
}
|
||||
|
||||
&--sm {
|
||||
width: var(--Spinner--sm-width);
|
||||
height: var(--Spinner--sm-height);
|
||||
|
||||
i.icon {
|
||||
font-size: var(--Spinner--sm-height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Spinner-icon--darkBg {
|
||||
svg.icon path {
|
||||
fill: var(--loading-dark-bg-color);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Spinner-tip {
|
||||
margin: px2rem(12px) 0 0 0;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
font-size: var(--spinner-base-fontSize);
|
||||
color: var(--Spinner-color);
|
||||
font-weight: var(--spinner-base-fontWeight);
|
||||
}
|
||||
|
||||
&.#{$ns}Spinner-tip--top {
|
||||
flex-direction: column-reverse;
|
||||
|
||||
.#{$ns}Spinner-tip {
|
||||
margin: 0 0 var(--spinner-base-tip-size) 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.#{$ns}Spinner-tip--right {
|
||||
flex-direction: row;
|
||||
|
||||
.#{$ns}Spinner-tip {
|
||||
margin: 0 0 0 var(--spinner-base-tip-size);
|
||||
}
|
||||
}
|
||||
|
||||
&.#{$ns}Spinner-tip--bottom {
|
||||
flex-direction: column;
|
||||
|
||||
.#{$ns}Spinner-tip {
|
||||
margin: var(--spinner-base-tip-size) 0 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.#{$ns}Spinner-tip--left {
|
||||
flex-direction: row-reverse;
|
||||
|
||||
.#{$ns}Spinner-tip {
|
||||
margin: 0 var(--spinner-base-tip-size) 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
&--overlay {
|
||||
position: absolute;
|
||||
z-index: $zindex-spinner-overlay;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, -50%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Spinner-overlay {
|
||||
position: absolute;
|
||||
z-index: calc(#{$zindex-spinner-overlay} - 1);
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: var(--Spinner-overlay-bg);
|
||||
transition: ease-out opacity var(--animation-duration);
|
||||
opacity: 0;
|
||||
-webkit-backdrop-filter: blur(1px);
|
||||
backdrop-filter: blur(1px);
|
||||
filter: blur(1px);
|
||||
|
||||
&.in {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
// spinner渲染器scss
|
||||
.#{$ns}Spinner-wrap {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.#{$ns}Spinner {
|
||||
position: absolute;
|
||||
z-index: $zindex-spinner-overlay;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, -50%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Spinner-mark {
|
||||
position: absolute;
|
||||
z-index: -999;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.#{$ns}RootLoader {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
.#{$ns}Spinner-icon {
|
||||
width: var(--Spinner-width);
|
||||
height: var(--Spinner-height);
|
||||
}
|
||||
}
|
||||
118
packages/amis-ui/scss/components/_status.scss
Normal file
118
packages/amis-ui/scss/components/_status.scss
Normal file
@@ -0,0 +1,118 @@
|
||||
.#{$ns}StatusField {
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
display: inline-flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
&-label {
|
||||
font-size: var(--Status-font-size);
|
||||
margin-left: var(--Status-font-margin);
|
||||
}
|
||||
|
||||
@keyframes animation-rolling_red {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animation-rolling_blue {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateX(-20px);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
svg.#{$ns}Status-icon {
|
||||
width: var(--Status-icon-width);
|
||||
height: var(--Status-icon-height);
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.#{$ns}Status-icon {
|
||||
&.rolling {
|
||||
width: 30px;
|
||||
height: 10px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border: 5px solid var(--Status-pending-beforeColor);
|
||||
border-radius: 500px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
animation: animation-rolling_red 2s;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border: 5px solid var(--Status-pending-afterColor);
|
||||
border-radius: 500px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
|
||||
animation: animation-rolling_blue 2s;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
}
|
||||
|
||||
&.icon-warning {
|
||||
color: var(--Status-warning-color);
|
||||
}
|
||||
|
||||
&.icon-fail {
|
||||
color: var(--Status-fail-color)
|
||||
}
|
||||
|
||||
&.icon-success {
|
||||
color: var(--Status-success-color)
|
||||
}
|
||||
|
||||
&.icon-schedule {
|
||||
color: var(--Status-schedule-color)
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Status-icon.rolling + &-label {
|
||||
color: var(--Status-warning-color);
|
||||
}
|
||||
|
||||
.#{$ns}Status-icon.icon-success + &-label {
|
||||
color: var(--Status-success-color);
|
||||
}
|
||||
|
||||
.#{$ns}Status-icon.icon-fail + &-label {
|
||||
color: var(--Status-fail-color);
|
||||
}
|
||||
|
||||
.#{$ns}Status-icon.icon-warning + &-label {
|
||||
color: var(--Status-warning-color);
|
||||
}
|
||||
|
||||
.#{$ns}Status-icon.icon-schedule + &-label {
|
||||
color: var(--Status-schedule-color);
|
||||
}
|
||||
}
|
||||
481
packages/amis-ui/scss/components/_steps.scss
Normal file
481
packages/amis-ui/scss/components/_steps.scss
Normal file
@@ -0,0 +1,481 @@
|
||||
.#{$ns}Steps {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
|
||||
.#{$ns}StepsItem {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding: 0 px2rem(8px);
|
||||
height: auto;
|
||||
line-height: px2rem(22px);
|
||||
&-container {
|
||||
&.#{$ns}StepsItem-vertical {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
position: relative;
|
||||
&Icon {
|
||||
vertical-align: top;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding-right: var(--steps-base-icon-paddingRight);
|
||||
height: px2rem(24px);
|
||||
.#{$ns}StepsItem-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: var(--steps-base-icon-size);
|
||||
height: var(--steps-base-icon-size);
|
||||
border-radius: 50%;
|
||||
font-size: var(--Steps-icon-fontsize);
|
||||
.icon {
|
||||
width: px2rem(12px);
|
||||
height: px2rem(12px);
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
&Wrapper {
|
||||
display: inline-flex;
|
||||
position: relative;
|
||||
.#{$ns}StepsItem-body {
|
||||
.#{$ns}StepsItem-title {
|
||||
font-size: var(--Steps-title-fontsize);
|
||||
color: var(--Steps-title-color);
|
||||
font-weight: var(--steps-base-fontWeight);
|
||||
padding-right: var(--steps-base-title-paddingRight);
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
> span {
|
||||
display: inline-block;
|
||||
}
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: px2rem(11px);
|
||||
height: 1px;
|
||||
left: 100%;
|
||||
width: 9999px;
|
||||
padding-right: var(--steps-base-title-paddingRight);
|
||||
background-color: var(--Steps-line-bg);
|
||||
}
|
||||
}
|
||||
.#{$ns}StepsItem-title.is-success {
|
||||
&:after {
|
||||
background-color: var(--Steps-line-success-bg);
|
||||
}
|
||||
}
|
||||
.#{$ns}StepsItem-ellText {
|
||||
max-width: px2rem(158px);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.#{$ns}StepsItem-subTitle {
|
||||
padding-left: var(--steps-base-subTitle-paddingLeft);
|
||||
font-size: var(--Steps-sub-title-fontsize);
|
||||
color: var(--Steps-sub-title-color);
|
||||
font-weight: var(--steps-base-subTitle-fontWeight);
|
||||
}
|
||||
.#{$ns}StepsItem-description {
|
||||
max-width: px2rem(140px);
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
line-height: px2rem(20px);
|
||||
// bottom: px2rem(20px);
|
||||
> span {
|
||||
color: var(--Steps-description-title-color);
|
||||
font-size: var(--Steps-description-title-fontsize);
|
||||
font-weight: var(--steps-base-des-fontWeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
flex: none;
|
||||
.#{$ns}StepsItem-title {
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--vertical {
|
||||
flex-direction: column;
|
||||
.#{$ns}StepsItem {
|
||||
padding: px2rem(5px) 0;
|
||||
min-height: 75px;
|
||||
overflow: hidden !important;
|
||||
&-container {
|
||||
&Icon {
|
||||
position: relative;
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 36%;
|
||||
transform: translateX(-50%);
|
||||
right: 0;
|
||||
top: px2rem(28px);
|
||||
height: 9999px;
|
||||
width: 1px;
|
||||
background-color: var(--Steps-line-bg);
|
||||
}
|
||||
}
|
||||
&Wrapper > .#{$ns}StepsItem-body > .#{$ns}StepsItem-title {
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&Tail:after {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
flex: none;
|
||||
.#{$ns}StepsItem-containerIcon {
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-ProgressDot {
|
||||
margin-left: 10px;
|
||||
.#{$ns}StepsItem {
|
||||
&-container {
|
||||
flex-direction: row;
|
||||
&Tail {
|
||||
display: none;
|
||||
}
|
||||
&Wrapper {
|
||||
width: px2rem(400px);
|
||||
}
|
||||
&ProgressDot {
|
||||
margin-left: 0px;
|
||||
margin-top: px2rem(10px);
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
top: px2rem(28px);
|
||||
width: 1px;
|
||||
left: 3px;
|
||||
height: 9999px;
|
||||
background-color: var(--Steps-line-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
&-title > span {
|
||||
display: inline-block !important;
|
||||
}
|
||||
&-vertical-ProgressDot {
|
||||
right: px2rem(10px);
|
||||
}
|
||||
&-body {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
.#{$ns}StepsItem {
|
||||
&-containerProgressDot:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.is-finish {
|
||||
.#{$ns}StepsItem-container {
|
||||
&ProgressDot:after {
|
||||
background: var(--Steps-status-success);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--Placement-vertical {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
.#{$ns}StepsItem {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
padding: 0;
|
||||
overflow: visible;
|
||||
&-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
&Tail:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
top: px2rem(12px);
|
||||
height: 1px;
|
||||
left: px2rem(130px);
|
||||
width: calc(100% - 55px);
|
||||
background-color: var(--Steps-line-bg);
|
||||
}
|
||||
&Icon {
|
||||
margin-left: px2rem(90px);
|
||||
left: px2rem(12px);
|
||||
}
|
||||
&Wrapper {
|
||||
width: px2rem(200px);
|
||||
.#{$ns}StepsItem-body {
|
||||
text-align: center;
|
||||
.#{$ns}StepsItem-title {
|
||||
padding: 0 px2rem(10px);
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
> span {
|
||||
display: block;
|
||||
position: relative;
|
||||
left: px2rem(12px);
|
||||
}
|
||||
.#{$ns}StepsItem-subTitle {
|
||||
word-break: break-all;
|
||||
padding: 0 px2rem(10px);
|
||||
position: relative;
|
||||
left: px2rem(10px);
|
||||
}
|
||||
}
|
||||
.#{$ns}StepsItem-title:after {
|
||||
display: none;
|
||||
}
|
||||
.#{$ns}StepsItem-description {
|
||||
min-width: px2rem(200px);
|
||||
word-break: break-all;
|
||||
padding: 0 px2rem(20px);
|
||||
}
|
||||
.#{$ns}StepsItem-title.is-success {
|
||||
&:after {
|
||||
background-color: var(--Steps-line-success-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
.#{$ns}StepsItem-container {
|
||||
&Tail:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.is-finish {
|
||||
.#{$ns}StepsItem {
|
||||
&-containerTail:after {
|
||||
background: var(--Steps-status-success);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--ProgressDot {
|
||||
.#{$ns}StepsItem {
|
||||
&-container {
|
||||
&Tail:after {
|
||||
left: px2rem(110px);
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
&ProgressDot {
|
||||
margin-top: px2rem(9px);
|
||||
margin-bottom: px2rem(5px);
|
||||
width: var(--steps-dot-icon-size);
|
||||
height: var(--steps-dot-icon-size);
|
||||
margin-left: px2rem(96px);
|
||||
border: 1px solid var(--steps-dot-process-bg-color);
|
||||
border-radius: 100%;
|
||||
background: var(--steps-dot-finish-bg-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
.is-finish {
|
||||
.#{$ns}StepsItem-container {
|
||||
&Tail:after {
|
||||
background: var(--Steps-line-success-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
.is-wait {
|
||||
.#{$ns}StepsItem-container {
|
||||
&ProgressDot {
|
||||
background: var(--steps-dot-wait-bg-color);
|
||||
border: 1px solid var(--steps-dot-wait-bg-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
.is-error {
|
||||
.#{$ns}StepsItem-container {
|
||||
&ProgressDot {
|
||||
background: var(--steps-dot-error-bg-color);
|
||||
border: 1px solid var(--steps-dot-error-bg-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
.is-process {
|
||||
.#{$ns}StepsItem-container {
|
||||
&ProgressDot {
|
||||
border: 1px solid var(--steps-dot-process-bg-color);
|
||||
background: var(--steps-dot-process-bg-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}StepsItem.is-wait {
|
||||
.#{$ns}StepsItem-icon {
|
||||
background-color: var(--steps-status-wait-bg-color);
|
||||
color: var(--Steps-bg);
|
||||
border: 1px solid var(--Steps-bg);
|
||||
}
|
||||
.#{$ns}StepsItem-title,
|
||||
.#{$ns}StepsItem-subTitle,
|
||||
.#{$ns}StepsItem-description {
|
||||
color: var(--Steps-status-wait);
|
||||
}
|
||||
}
|
||||
.#{$ns}StepsItem.is-error {
|
||||
.#{$ns}StepsItem-icon {
|
||||
background-color: var(--Steps-status-error);
|
||||
color: var(--steps-status-error-color);
|
||||
}
|
||||
}
|
||||
.#{$ns}StepsItem.is-finish {
|
||||
.#{$ns}StepsItem-icon {
|
||||
background-color: var(--Steps-status-success);
|
||||
color: var(--steps-status-finish-color);
|
||||
}
|
||||
}
|
||||
.#{$ns}StepsItem.is-process {
|
||||
.#{$ns}StepsItem-icon {
|
||||
background-color: var(--steps-status-process-bg-color);
|
||||
color: var(--steps-status-process-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--simple {
|
||||
justify-content: center;
|
||||
|
||||
.#{$ns}StepsItem {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.#{$ns}StepsItem-containerWrapper
|
||||
.#{$ns}StepsItem-body
|
||||
.#{$ns}StepsItem-title:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.#{$ns}StepsItem-icon-line {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-left: px2rem(8px);
|
||||
|
||||
svg {
|
||||
width: var(--steps-simple-icon-size);
|
||||
height: var(--steps-simple-icon-size);
|
||||
font-size: var(--steps-simple-icon-size);
|
||||
}
|
||||
}
|
||||
|
||||
.StepsItem-icon-line {
|
||||
content: var(--steps-simple-icon);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}StepsItem.is-clickable {
|
||||
.#{$ns}StepsItem-container {
|
||||
&ProgressDot,
|
||||
&Icon,
|
||||
&Wrapper {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Steps-mobile.#{$ns}Steps--horizontal {
|
||||
.#{$ns}StepsItem {
|
||||
overflow: visible;
|
||||
&-container {
|
||||
&Tail:after {
|
||||
display: none;
|
||||
}
|
||||
&Wrapper {
|
||||
transform: translateX(px2rem(-5px));
|
||||
.#{$ns}StepsItem-body {
|
||||
.#{$ns}StepsItem-title {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
&::after {
|
||||
display: none !important;
|
||||
}
|
||||
span {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.#{$ns}StepsItem-description {
|
||||
min-width: px2rem(140px);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}StepsItem-body {
|
||||
.#{$ns}StepsItem-title {
|
||||
.#{$ns}StepsItem-subTitle {
|
||||
padding-left: px2rem(5px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&Icon {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-left: px2rem(40px);
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: px2rem(15px);
|
||||
height: 1px;
|
||||
left: px2rem(35px);
|
||||
width: px2rem(80px);
|
||||
background-color: var(--Steps-line-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&Icon.is-success {
|
||||
&:after {
|
||||
background-color: var(--Steps-line-success-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
|
||||
.#{$ns}StepsItem-container {
|
||||
&Icon {
|
||||
&:after {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1234
packages/amis-ui/scss/components/_table.scss
Normal file
1234
packages/amis-ui/scss/components/_table.scss
Normal file
File diff suppressed because it is too large
Load Diff
1025
packages/amis-ui/scss/components/_table2.scss
Normal file
1025
packages/amis-ui/scss/components/_table2.scss
Normal file
File diff suppressed because it is too large
Load Diff
1410
packages/amis-ui/scss/components/_tabs.scss
Normal file
1410
packages/amis-ui/scss/components/_tabs.scss
Normal file
File diff suppressed because it is too large
Load Diff
191
packages/amis-ui/scss/components/_tag.scss
Normal file
191
packages/amis-ui/scss/components/_tag.scss
Normal file
@@ -0,0 +1,191 @@
|
||||
.#{$ns}Tag {
|
||||
display: inline-flex;
|
||||
height: var(--Tag-height);
|
||||
padding: var(--Tag-base-padding);
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: var(--Tag-content-fontSize);
|
||||
font-weight: var(--Tag-base-fontWeight);
|
||||
max-width: 160px;
|
||||
transition: all 0.3;
|
||||
border-radius: var(--Tag-borderRadius);
|
||||
background-color: var(--Tag-default-color);
|
||||
color: var(--Tag-fontColor);
|
||||
|
||||
&-text {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
line-height: var(--Tag-height);
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: var(--gap-sm);
|
||||
}
|
||||
|
||||
&--normal {
|
||||
border-width: var(--Tag-normal-borderWidth);
|
||||
border-radius: var(--Tag-normal-borderRadius);
|
||||
border-color: var(--Tag-normal-borderColor);
|
||||
|
||||
&--hasColor {
|
||||
color: var(--white);
|
||||
}
|
||||
&--inactive {
|
||||
color: var(--Tag-inactive-color);
|
||||
background: var(--Tag-inactive-bg-color);
|
||||
}
|
||||
&--active {
|
||||
color: var(--Tag-active-color);
|
||||
background: var(--Tag-active-bg-color);
|
||||
}
|
||||
&--processing {
|
||||
color: var(--Tag-processing-color);
|
||||
background: var(--Tag-processing-bg-color);
|
||||
}
|
||||
&--success {
|
||||
color: var(--Tag-success-color);
|
||||
background: var(--Tag-success-bg-color);
|
||||
}
|
||||
&--error {
|
||||
color: var(--Tag-error-color);
|
||||
background: var(--Tag-error-bg-color);
|
||||
}
|
||||
&--warning {
|
||||
color: var(--Tag-warning-color);
|
||||
background: var(--Tag-warning-bg-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--rounded {
|
||||
background-color: var(--white);
|
||||
border-style: var(--Tag-rounded-borderStyle);
|
||||
border-width: var(--Tag-rounded-borderWidth);
|
||||
border-radius: var(--Tag-rounded-borderRadius);
|
||||
border-color: var(--Tag-rounded-borderColor);
|
||||
color: var(--Tag-default-color);
|
||||
line-height: 22px;
|
||||
|
||||
&--inactive {
|
||||
color: var(--Tag-inactive-bg-color);
|
||||
}
|
||||
&--active {
|
||||
color: var(--Tag-active-bg-color);
|
||||
}
|
||||
&--processing {
|
||||
color: var(--Tag-processing-bg-color);
|
||||
}
|
||||
&--success {
|
||||
color: var(--Tag-success-bg-color);
|
||||
}
|
||||
&--error {
|
||||
color: var(--Tag-error-bg-color);
|
||||
}
|
||||
&--warning {
|
||||
color: var(--Tag-warning-bg-color);
|
||||
}
|
||||
}
|
||||
|
||||
&--status {
|
||||
background-color: var(--white);
|
||||
&--inactive .#{$ns}Tag--prev {
|
||||
color: var(--Tag-inactive-bg-color);
|
||||
}
|
||||
&--active .#{$ns}Tag--prev {
|
||||
color: var(--Tag-active-bg-color);
|
||||
}
|
||||
&--processing .#{$ns}Tag--prev {
|
||||
color: var(--Tag-processing-bg-color);
|
||||
}
|
||||
&--success .#{$ns}Tag--prev {
|
||||
color: var(--Tag-success-bg-color);
|
||||
}
|
||||
&--error .#{$ns}Tag--prev {
|
||||
color: var(--Tag-error-bg-color);
|
||||
}
|
||||
&--warning .#{$ns}Tag--prev {
|
||||
color: var(--Tag-warning-bg-color);
|
||||
}
|
||||
|
||||
&:not(&--processing):not(&--active) {
|
||||
.icon-dot {
|
||||
#dotWave {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--prev {
|
||||
color: var(--Tag-default-color);
|
||||
margin-right: var(--Tag-status-margin);
|
||||
i {
|
||||
font-size: #{px2rem(8px)};
|
||||
}
|
||||
.#{$ns}Tag-default-icon {
|
||||
width: var(--Tag-status-size);
|
||||
height: var(--Tag-status-size);
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&--close {
|
||||
margin-left: var(--Tag-close-margin);
|
||||
i {
|
||||
font-size: #{px2rem(8px)};
|
||||
}
|
||||
.icon {
|
||||
width: var(--Tag-close-size);
|
||||
height: var(--Tag-close-size);
|
||||
position: inherit;
|
||||
}
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
&:active {
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
|
||||
.#{$ns}Tag--close {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
&--checkable {
|
||||
background-color: var(--Tag-checkable-bgColor);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--Tag-checkable-bgColor-onHover);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--Tag-checkable-bgColor-onActive);
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
cursor: not-allowed;
|
||||
background-color: var(--Tag-checkable-bgColor-onDisable);
|
||||
color: var(--Tag-checkable-fontColor-onDisable);
|
||||
}
|
||||
|
||||
&--checked:not(&--disabled) {
|
||||
color: var(--white);
|
||||
background-color: var(--Tag-checkable-bgColor-onChecked);
|
||||
&:hover {
|
||||
background-color: var(--Tag-checkable-bgColor-onHover-onChecked);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--Tag-checkable-bgColor-onActive-onChecked);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user