winbox-ui-next
Version:
We Design Vue 2.0: A Vue.js 3 UI Library
391 lines (390 loc) • 9.57 kB
CSS
/******** borderSize *******/
/******** borderStyle *******/
/******** radius *******/
/******** shadow distance *******/
/******** size *******/
/******** spacing *******/
/******** shadow *******/
/******** opacity *******/
/******** fontSize *******/
/******** fontWeight ********/
/******** radius *******/
/******** Primary *******/
/******** success *******/
/******** warning *******/
/******** danger *******/
/******** link *******/
/******** radius *******/
/********* icon hover *********/
.w-upload {
display: inline-block;
max-width: 100%;
cursor: pointer;
}
.w-upload.w-upload-draggable {
width: 100%;
}
.w-upload-tip {
margin-top: 4px;
overflow: hidden;
color: var(--color-text-3);
font-size: 12px;
line-height: 1.5;
white-space: nowrap;
text-overflow: ellipsis;
}
.w-upload-picture-card {
display: flex;
flex-direction: column;
justify-content: center;
min-width: 108px;
height: 108px;
margin-bottom: 0;
color: var(--color-text-2);
text-align: center;
background: var(--color-fill-2);
border: 1px dashed var(--color-neutral-3);
border-radius: var(--border-radius-medium);
transition: all 0.1s cubic-bezier(0, 0, 1, 1);
}
.w-upload-picture-card:hover {
color: var(--color-text-2);
background-color: var(--color-fill-3);
border-color: rgb(var(--primary-6));
}
.w-upload-drag {
width: 100%;
padding: 50px 0;
color: var(--color-text-1);
text-align: center;
background-color: var(--color-fill-1);
border: 1px dashed var(--color-neutral-3);
border-radius: var(--border-radius-small);
transition: all 0.2s ease;
}
.w-upload-drag .w-icon-plus {
margin-bottom: 24px;
color: var(--color-text-2);
font-size: 14px;
}
.w-upload-drag:hover {
background-color: var(--color-fill-3);
border-color: rgb(var(--primary-6));
}
.w-upload-drag:hover .w-upload-drag-text {
color: var(--color-text-1);
}
.w-upload-drag:hover .w-icon-plus {
color: var(--color-text-2);
}
.w-upload-drag-active {
color: var(--color-text-1);
background-color: var(--color-primary-light-1);
border-color: rgb(var(--primary-6));
}
.w-upload-drag-active .w-upload-drag-text {
color: var(--color-text-1);
}
.w-upload-drag-active .w-icon-plus {
color: rgb(var(--primary-6));
}
.w-upload-drag .w-upload-tip {
margin-top: 0;
}
.w-upload-drag-text {
color: var(--color-text-1);
font-size: 14px;
line-height: 1.5;
}
.w-upload-wrapper {
width: 100%;
}
.w-upload-wrapper.w-upload-wrapper-type-picture-card {
display: flex;
justify-content: flex-start;
}
.w-upload-drag {
width: 100%;
}
.w-upload-hide {
display: none;
}
.w-upload-disabled .w-upload-picture-card,
.w-upload-disabled .w-upload-picture-card:hover {
color: var(--color-text-4);
background-color: var(--color-fill-1);
border-color: var(--color-neutral-4);
cursor: not-allowed;
}
.w-upload-disabled .w-upload-drag,
.w-upload-disabled .w-upload-drag:hover {
background-color: var(--color-fill-1);
border-color: var(--color-text-4);
cursor: not-allowed;
}
.w-upload-disabled .w-upload-drag .w-icon-plus,
.w-upload-disabled .w-upload-drag:hover .w-icon-plus,
.w-upload-disabled .w-upload-drag .w-upload-drag-text,
.w-upload-disabled .w-upload-drag:hover .w-upload-drag-text {
color: var(--color-text-4);
}
.w-upload-disabled .w-upload-tip {
color: var(--color-text-4);
}
.w-upload-icon {
cursor: pointer;
}
.w-upload-icon-error {
margin-left: 4px;
color: rgb(var(--danger-6));
}
.w-upload-icon-success {
color: rgb(var(--success-6));
font-size: 14px;
line-height: 14px;
}
.w-upload-icon-remove {
position: relative;
font-size: 20px;
}
.w-upload-icon-start,
.w-upload-icon-cancel {
position: absolute;
top: 50%;
left: 50%;
color: var(--color-white);
font-size: 12px;
transform: translateX(-50%) translateY(-50%);
}
.w-upload-icon-upload {
color: rgb(var(--primary-6));
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
}
.w-upload-icon-upload:active,
.w-upload-icon-upload:hover {
color: rgb(var(--primary-7));
}
.w-upload-list {
margin: 0;
padding: 0;
list-style: none;
/*** listtype is text ****/
/*** end ****/
}
.w-upload-list.w-upload-list-type-text,
.w-upload-list.w-upload-list-type-picture {
width: 100%;
}
.w-upload-list-item-done .w-upload-list-item-file-icon {
color: rgb(var(--primary-6));
}
.w-upload-list-item {
position: relative;
display: flex;
align-items: center;
box-sizing: border-box;
margin-top: 12px;
padding-right: 10px;
padding-left: 12px;
}
.w-upload-list-item-content {
display: flex;
flex-wrap: nowrap;
align-items: center;
box-sizing: border-box;
width: 100%;
padding: 8px 0;
overflow: hidden;
font-size: 14px;
border-radius: var(--border-radius-medium);
transition: background-color 0.1s cubic-bezier(0, 0, 1, 1);
}
.w-upload-list-item-file-icon {
margin-right: 12px;
color: rgb(var(--primary-6));
font-size: 16px;
line-height: 16px;
}
.w-upload-list-item-thumbnail {
flex-shrink: 0;
width: 54px;
height: 54px;
margin-right: 14px;
}
.w-upload-list-item-thumbnail img {
width: 100%;
height: 100%;
}
.w-upload-list-item-name {
display: flex;
flex: 1;
align-items: center;
margin-right: 10px;
overflow: hidden;
color: var(--color-text-1);
font-size: 14px;
line-height: 1.4286;
white-space: nowrap;
text-overflow: ellipsis;
}
.w-upload-list-item-name-link {
overflow: hidden;
color: rgb(var(--link-6));
text-decoration: none;
text-overflow: ellipsis;
cursor: pointer;
}
.w-upload-list-item-name-text {
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
}
.w-upload-list-item .w-upload-progress {
position: relative;
margin-left: auto;
line-height: 12px;
}
.w-upload-list-item .w-upload-progress:hover .w-progress-circle-bg {
stroke: rgba(var(--gray-10), 0.2);
}
.w-upload-list-item .w-upload-progress:hover .w-progress-circle-bar {
stroke: rgb(var(--primary-7));
}
.w-upload-list-item-operation {
margin-left: 12px;
color: var(--color-text-2);
font-size: 12px;
}
.w-upload-list-item-operation .w-upload-icon-remove {
font-size: inherit;
}
.w-upload-list-item-error .w-upload-list-status,
.w-upload-list-item-done .w-upload-list-status {
display: none;
}
.w-upload-list-type-text .w-upload-list-item-error .w-upload-list-item-name-link,
.w-upload-list-type-text .w-upload-list-item-error .w-upload-list-item-name {
color: rgb(var(--danger-6));
}
.w-upload-list.w-upload-list-type-picture-card {
display: flex;
flex-wrap: wrap;
vertical-align: top;
}
.w-upload-list.w-upload-list-type-picture-card .w-upload-list-status {
top: 50%;
margin-left: 0;
transform: translateY(-50%);
}
.w-upload-list-picture {
display: inline-block;
margin-top: 0;
margin-right: 8px;
margin-bottom: 8px;
padding-right: 0;
overflow: hidden;
vertical-align: top;
transition: all 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
}
.w-upload-list-picture-status-error .w-upload-list-picture-mask {
opacity: 1;
}
.w-upload-list-picture {
position: relative;
box-sizing: border-box;
width: 108px;
height: 108px;
overflow: hidden;
line-height: 108px;
text-align: center;
vertical-align: top;
border-radius: var(--border-radius-small);
}
.w-upload-list-picture img {
width: 100%;
height: 100%;
}
.w-upload-list-picture-mask {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
color: var(--color-white);
font-size: 16px;
line-height: 108px;
text-align: center;
background: rgba(0, 0, 0, 0.5);
cursor: pointer;
opacity: 0;
transition: opacity 0.1s cubic-bezier(0, 0, 1, 1);
}
.w-upload-list-picture-operation {
display: none;
font-size: 20px;
}
.w-upload-list-picture-operation .w-upload-icon-retry {
color: var(--color-white);
}
.w-upload-list-picture-error-tip .w-upload-icon-error {
color: var(--color-white);
font-size: 26px;
}
.w-upload-list-picture-mask:hover {
opacity: 1;
}
.w-upload-list-picture-mask:hover .w-upload-list-picture-operation {
display: flex;
justify-content: space-evenly;
}
.w-upload-list-picture-mask:hover .w-upload-list-picture-error-tip {
display: none;
}
.w-upload-list-type-picture .w-upload-list-item-content {
padding-top: 8px;
padding-bottom: 8px;
}
.w-upload-list-type-picture .w-upload-list-item-error .w-upload-list-item-content {
background-color: var(--color-danger-light-1);
}
.w-upload-list-type-picture .w-upload-list-item-error .w-upload-list-item-name-link,
.w-upload-list-type-picture .w-upload-list-item-error .w-upload-list-item-name {
color: rgb(var(--danger-6));
}
.w-upload-hide + .w-upload-list .w-upload-list-item:first-of-type {
margin-top: 0;
}
.w-upload-slide-up-enter {
opacity: 0;
}
.w-upload-slide-up-enter-active {
opacity: 1;
transition: opacity 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
}
.w-upload-slide-up-exit {
opacity: 1;
}
.w-upload-slide-up-exit-active {
margin: 0;
overflow: hidden;
opacity: 0;
transition: opacity 0.1s cubic-bezier(0, 0, 1, 1), height 0.3s cubic-bezier(0.34, 0.69, 0.1, 1) 0.1s, margin 0.3s cubic-bezier(0.34, 0.69, 0.1, 1) 0.1s;
}
.w-upload-list-item.w-upload-slide-inline-enter {
opacity: 0;
}
.w-upload-list-item.w-upload-slide-inline-enter-active {
opacity: 1;
transition: opacity 0.2s cubic-bezier(0, 0, 1, 1);
}
.w-upload-list-item.w-upload-slide-inline-exit {
opacity: 1;
}
.w-upload-list-item.w-upload-slide-inline-exit-active {
margin: 0;
overflow: hidden;
opacity: 0;
transition: opacity 0.1s cubic-bezier(0, 0, 1, 1), width 0.3s cubic-bezier(0.34, 0.69, 0.1, 1) 0.1s, margin 0.3s cubic-bezier(0.34, 0.69, 0.1, 1) 0.1s;
}