123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545 |
- @import "./variables.scss";
- $module: #{$prefix}-upload;
- .#{$module} {
- display: flex;
- flex-wrap: wrap;
- &-disabled {
- cursor: not-allowed;
- .#{$module}-file-card {
- cursor: not-allowed;
- &-close {
- cursor: not-allowed;
- }
- }
- .#{$module}-drag-area {
- border: none;
- cursor: not-allowed;
- &:hover {
- background-color: $color-upload_drag_area-bg;
- }
- &-main-text,
- &-sub-text,
- &-icon {
- cursor: not-allowed;
- color: $color-upload_drag_area_disabled-text;
- }
- }
- }
- &-hidden-input {
- display: none;
- }
- &-hidden-input-replace {
- display: none;
- }
- &-add {
- display: flex;
- align-items: center;
- }
- &[x-prompt-pos="right"] {
- .#{$module}-add {
- display: inline-flex;
- }
- .#{$module}-prompt {
- display: inline-flex;
- }
- }
- &[x-prompt-pos="bottom"] {
- .#{$module}-add {
- display: flex;
- }
- .#{$module}-prompt {
- display: flex;
- flex-basis: 100%;
- }
- .#{$module}-file-list {
- flex-basis: 100%;
- }
- }
- &[x-prompt-pos="left"] {
- .#{$module}-add {
- display: inline-flex;
- order: 2;
- }
- .#{$module}-prompt {
- display: inline-flex;
- order: 1;
- }
- .#{$module}-file-list {
- order: 2;
- }
- }
- &-file-list {
- flex-basis: 100%;
- flex-shrink: 0;
- display: block;
- margin-top: $spacing-tight;
- margin-bottom: $spacing-tight;
- &-main {
- display: flex;
- flex-wrap: wrap;
- flex-shrink: 0;
- gap: $spacing-upload_picture_file_card-gap;
- margin-bottom: $spacing-upload_picture_file_card-marginBottom;
- p {
- @include ver-center;
- }
- }
- &-title {
- @include font-size-small;
- color: $color-upload_assist-text;
- &-choosen {
- margin-right: $spacing-upload_title_choosen-marginRight;
- }
- &-clear {
- cursor: pointer;
- color: $color-upload_clear-text;
- }
- margin-bottom: $spacing-upload_title-marginBottom;
- }
- }
- &-file-card {
- // border: 1px solid $color-upload-border;
- border-radius: $radius-upload_file_card;
- display: inline-flex;
- align-items: center;
- justify-content: space-between;
- height: $height-upload_file_card;
- width: $width-upload_file_card;
- background-color: $color-upload_card-bg;
- cursor: pointer;
- &:hover {
- background-color: $color-upload_card-bg-hover;
- }
- a {
- text-decoration: none;
- // color: inherit;
- }
- &-preview {
- height: $height-upload_file_card_preview;
- width: $width-upload_file_card_preview;
- color: $color-upload_preview-icon;
- margin: $spacing-upload_file_card_preview-margin;
- @include all-center;
- border-radius: $radius-upload_file_card_preview;
- flex-shrink: 0;
- img {
- width: $width-upload_file_card_preview_img;
- height: $width-upload_file_card_preview_img;
- object-fit: cover;
- }
- }
- &-preview-placeholder {
- background-color: $color-upload_file_card_preview_placeholder-bg;
- color: $color-upload_file_card_preview_placeholder-text;
- }
- &-show-pointer {
- cursor: pointer;
- }
- &-info {
- display: flex;
- align-items: center;
- &-main {
- display: flex;
- flex-wrap: wrap;
- flex: 1;
- &-text {
- @include ver-center;
- flex-basis: 100%;
- }
- &-control {
- display: flex;
- }
- }
- &-name {
- // width: $width-upload_file_card_info_name;
- width: 0;
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- display: inline-block;
- @include font-size-regular;
- font-weight: $font-upload_file_card_info_name-fontWeight;
- color: $color-upload-text;
- }
- &-size {
- @include font-size-small;
- font-weight: $font-upload_file_card_info_size-fontWeight;
- margin-left: $spacing-upload_file_card_info_size-marginLeft;
- color: $color-upload_assist-text;
- margin-top: 1px;
- }
- &-replace {
- display: inline-flex;
- margin-left: $spacing-tight;
- color: var(--semi-color-text-2);
- }
- &-validate-message {
- @include font-size-small;
- @include ver-center;
- color: $color-upload-text;
- }
- &-retry {
- @include font-size-small;
- color: $color-upload_retry-text;
- cursor: pointer;
- margin-left: $spacing-upload_file_card_info_retry-marginLeft;
- }
- .#{$prefix}-progress {
- flex-basis: 100%;
- margin-top: $spacing-upload_file_card_info_progress-marginTop;
- }
- }
- &-close {
- margin-left: $spacing-upload_file_card_close-marginLeft;
- margin-right: $spacing-upload_file_card_close-marginRight;
- flex-shrink: 0;
- }
- &-replace {
- margin-left: $spacing-tight;
- width: 24px;
- flex-shrink: 0;
- }
- &-icon {
- &-loading,
- &-error {
- font-size: $width-upload_file_card-icon;
- margin-right: $spacing-upload_file_card_icon-marginRight;
- }
- &-error {
- position: relative;
- top: $spacing-upload_picture_file_card_icon_error-top;
- }
- &-loading {
- .#{$prefix}-spin-wrapper svg {
- height: $width-upload_file_card-icon;
- width: $width-upload_file_card-icon;
- }
- }
- }
- &-fail {
- background-color: $color-upload_card_fail-bg;
- &:hover {
- background-color: $color-upload_card_fail-bg-hover;
- }
- .#{$module}-file-card {
- &-info-validate-message {
- color: $color-upload_file_card_fail_info-text;
- }
- }
- }
- }
- // listType = 'picture'
- &-picture {
- display: flex;
- &[x-prompt-pos="bottom"] {
- flex-direction: column;
- .#{$module}-prompt {
- order: 1;
- }
- .#{$module}-add {
- order: 0;
- }
- }
- &[x-prompt-pos="right"] {
- .#{$module}-prompt {
- order: 1;
- }
- .#{$module}-add {
- order: 0;
- }
- }
- &-add {
- background-color: $color-upload_pic_add-bg;
- height: $height-upload_file_pic_card;
- width: $width-upload_file_pic_card;
- box-sizing: border-box;
- display: inline-flex;
- justify-content: center;
- align-items: center;
- border: $width-upload_picture_add-border dashed $color-upload-border;
- color: $color-upload-icon;
- border-radius: $radius-upload_picture_add;
- order: 2;
- cursor: pointer;
- &:hover {
- background-color: $color-upload_pic_add-bg-hover;
- }
- &:active {
- background-color: $color-upload_pic_add-bg-active;
- }
- }
- &-add-disabled {
- cursor: not-allowed;
- &:hover {
- background-color: $color-upload_pic_add-bg;
- }
- &:active {
- background-color: $color-upload_pic_add-bg;
- }
- }
- &-file-list {
- flex-basis: inherit;
- margin-top: 0;
- margin-bottom: 0;
- // width: 100%;
- }
- &-file-card {
- display: flex;
- align-items: center;
- justify-content: center;
- height: $height-upload_file_pic_card;
- width: $width-upload_file_pic_card;
- border-radius: $radius-upload_picture_file_card_img;
- position: relative;
- overflow: hidden;
- img {
- height: $width-upload_picture_file_card_img;
- width: $width-upload_picture_file_card_img;
- object-fit: cover;
- border-radius: $radius-upload_picture_file_card_img;
- }
- &-close {
- width: $width-upload_picture_file_card_close;
- height: $width-upload_picture_file_card_close;
- background-color: $color-upload_pic_remove-bg;
- position: absolute;
- top: $spacing-upload_picture_file_card_close-top;
- right: $spacing-upload_picture_file_card_close-right;
- @include all-center;
- display: none;
- border-radius: $radius-upload_picture_file_card_close;
- color: white;
- cursor: pointer;
- transition: all 0s;
- }
- &:hover {
- .#{$module}-picture-file-card-close {
- display: flex;
- }
- .#{$module}-picture-file-card-replace {
- visibility: visible;
- }
- }
- .#{$prefix}-progress-circle {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- &-retry {
- background-color: $color-upload_file_card_retry-bg;
- width: $width-upload_file_card_retry;
- height: $width-upload_file_card_retry;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- color: $color-upload_file_card_retry-text;
- border-radius: $radius-upload_file_card_retry;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- }
- &-icon-retry {
- transform: scale(-1, 1);
- font-size: $width-upload_file_card_retry-icon;
- }
- &-replace {
- visibility: hidden;
- display: inline-flex;
- position: absolute;
- cursor: pointer;
- top: 50%;
- left: 50%;
- color: $color-upload_replace-text;
- transform: translate3D(-50%, -50%, 0);
- }
- &-pic-info {
- display: inline-flex;
- box-sizing: border-box;
- justify-content: space-between;
- align-items: center;
- position: absolute;
- width: 100%;
- height: 24px;
- padding: 0 10px;
- bottom: 0;
- left: 0;
- color: $color-upload_picture_file_card_pic_info-text;
- font-size: $font-upload_picture_file_card_pic_info-fontSize;
- font-weight: $font-upload_picture_file_card_pic_info-fontWeight;
- background: linear-gradient(0deg, rgba(22, 22, 26, 0.3) 0%, rgba(22, 22, 26, 0) 77.08%);
- }
- &-icon-loading,
- &-icon-error {
- position: absolute;
- bottom: $spacing-upload_picture_file_card_loading_error-bottom;
- right: $spacing-upload_picture_file_card_loading_error-right;
- color: $color-upload_picture_file_card_loading_error-icon;
- }
- &-icon-loading {
- font-size: $width-upload_picture_file_card_loading-icon;
- }
- &-show-pointer {
- cursor: pointer;
- }
- &-error {
- outline: 1px solid $color-upload_picture_file_card_error-border;
- }
- }
- }
- &-drag-area {
- border-radius: $radius-upload_drag_area;
- border: $width-upload_drag_area-border dashed $color-upload-border;
- width: 100%;
- padding: $spacing-upload_drag_area-padding;
- background-color: $color-upload_drag_area-bg;
- @include all-center;
- flex-direction: column;
- cursor: pointer;
- &:hover {
- background-color: $color-upload_drag_area-bg-hover;
- border-color: $color-upload_drag_area-border-hover;
- }
- &-custom {
- border: none;
- padding: 0;
- background-color: inherit;
- &:hover {
- background-color: inherit;
- }
- }
- &-legal {
- background-color: $color-upload_drag_area-bg-hover;
- border-color: $color-upload_drag_area-border-hover;
- .#{$module}-drag-area-sub-text {
- display: none;
- }
- }
- &-icon {
- color: $color-upload_drag_area_icon;
- }
- &-text {
- text-align: center;
- }
- &-main-text {
- cursor: pointer;
- @include font-size-regular;
- margin-bottom: $spacing-upload_drag_area_main_text-marginBottom;
- }
- &-sub-text {
- cursor: pointer;
- @include font-size-small;
- }
- &-tips {
- @include font-size-small;
- font-weight: $font-upload_drag_area_tips-fontWeight;
- &-legal {
- color: $color-upload_drag_area_tips-text;
- }
- }
- }
- &-validate-message {
- flex-basis: 100%;
- flex-shrink: 0;
- display: block;
- color: $color-upload_file_card_fail_info-text;
- }
- }
- @import "./rtl.scss";
|