UNPKG

ygd

Version:

An enterprise-class UI design language and React-based implementation

483 lines (482 loc) 11.8 kB
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ /* stylelint-disable no-duplicate-selectors */ /* stylelint-disable */ /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ .yg-upload { box-sizing: content-box; margin: 0; padding: 0; color: #333; font-size: 12px; list-style: none; outline: 0; } .yg-upload p { margin: 0; } .yg-upload-btn { display: block; width: 100%; outline: none; } .yg-upload input[type='file'] { cursor: pointer; } .yg-upload.yg-upload-select { display: inline-block; } .yg-upload.yg-upload-select-picture-card { display: table; padding: 8px; width: 104px; height: 104px; margin-right: 8px; margin-bottom: 8px; text-align: center; vertical-align: top; background-color: #fafafa; border: 1px dashed #ccc; border-radius: 2px; cursor: pointer; transition: border-color 0.3s ease; } .yg-upload.yg-upload-select-picture-card > .yg-upload { display: table-cell; width: 100%; height: 100%; padding: 8px; text-align: center; vertical-align: middle; } .yg-upload.yg-upload-select-picture-card:hover { border-color: #00a1ff; } .yg-upload.yg-upload-drag { position: relative; width: 100%; height: 100%; text-align: center; background: #fafafa; border: 1px dashed #ccc; border-radius: 2px; cursor: pointer; transition: border-color 0.3s; } .yg-upload.yg-upload-drag .yg-upload { padding: 16px 0; } .yg-upload.yg-upload-drag.yg-upload-drag-hover:not(.yg-upload-disabled) { border: 2px dashed #29b8ff; } .yg-upload.yg-upload-drag.yg-upload-disabled { cursor: not-allowed; } .yg-upload.yg-upload-drag .yg-upload-btn { display: table; height: 100%; } .yg-upload.yg-upload-drag .yg-upload-drag-container { display: table-cell; vertical-align: middle; } .yg-upload.yg-upload-drag:not(.yg-upload-disabled):hover { border-color: #29b8ff; } .yg-upload.yg-upload-drag p.yg-upload-drag-icon { margin-bottom: 20px; } .yg-upload.yg-upload-drag p.yg-upload-drag-icon .anticon { color: #29b8ff; font-size: 48px; } .yg-upload.yg-upload-drag p.yg-upload-text { margin: 0 0 4px; color: #333333; font-size: 14px; } .yg-upload.yg-upload-drag p.yg-upload-hint { color: rgba(0, 0, 0, 0.45); font-size: 12px; } .yg-upload.yg-upload-drag .anticon-plus { color: rgba(51, 51, 51, 0.25); font-size: 30px; transition: all 0.3s; } .yg-upload.yg-upload-drag .anticon-plus:hover { color: rgba(0, 0, 0, 0.45); } .yg-upload.yg-upload-drag:hover .anticon-plus { color: rgba(0, 0, 0, 0.45); } .yg-upload-list { box-sizing: content-box; margin: 0; padding: 0; color: #333; font-size: 12px; list-style: none; zoom: 1; } .yg-upload-list::before, .yg-upload-list::after { content: ''; display: table; } .yg-upload-list::after { clear: both; } .yg-upload-list-item { position: relative; height: 22px; margin-top: 8px; font-size: 12px; } .yg-upload-list-item-name { display: inline-block; width: 100%; padding-left: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .yg-upload-list-item-info { height: 100%; padding: 0 12px 0 4px; transition: background-color 0.3s; height: 20px; line-height: 20px; } .yg-upload-list-item-info > span { display: block; } .yg-upload-list-item-info .anticon-loading, .yg-upload-list-item-info .anticon-paper-clip { position: absolute; top: 4px; color: rgba(0, 0, 0, 0.45); font-size: 12px; } .yg-upload-list-item .anticon-close { display: inline-block; font-size: 12px; font-size: 10px \9; transform: scale(0.83333333) rotate(0deg); position: absolute; top: 4px; right: 4px; color: rgba(0, 0, 0, 0.45); line-height: 0; cursor: pointer; opacity: 0; transition: all 0.3s; } :root .yg-upload-list-item .anticon-close { font-size: 12px; } .yg-upload-list-item .anticon-close:hover { color: #333; } .yg-upload-list-item:hover .yg-upload-list-item-info { background-color: #e1edff; } .yg-upload-list-item:hover .anticon-close { opacity: 1; } .yg-upload-list-item-error, .yg-upload-list-item-error .anticon-paper-clip, .yg-upload-list-item-error .yg-upload-list-item-name { color: #e2062c; } .yg-upload-list-item-error .anticon-close { color: #e2062c; opacity: 1; } .yg-upload-list-item-progress { position: absolute; bottom: -12px; width: 100%; padding-left: 24px; font-size: 12px; line-height: 0; } .yg-upload-list-picture .yg-upload-list-item, .yg-upload-list-picture-card .yg-upload-list-item { position: relative; height: 48px; padding: 8px; border: 1px solid #ccc; border-radius: 2px; } .yg-upload-list-picture .yg-upload-list-item:hover, .yg-upload-list-picture-card .yg-upload-list-item:hover { background: transparent; } .yg-upload-list-picture .yg-upload-list-item-error, .yg-upload-list-picture-card .yg-upload-list-item-error { border-color: #e2062c; } .yg-upload-list-picture .yg-upload-list-item-info, .yg-upload-list-picture-card .yg-upload-list-item-info { padding: 0; } .yg-upload-list-picture .yg-upload-list-item:hover .yg-upload-list-item-info, .yg-upload-list-picture-card .yg-upload-list-item:hover .yg-upload-list-item-info { background: transparent; } .yg-upload-list-picture .yg-upload-list-item-uploading, .yg-upload-list-picture-card .yg-upload-list-item-uploading { border-style: dashed; } .yg-upload-list-picture .yg-upload-list-item-thumbnail, .yg-upload-list-picture-card .yg-upload-list-item-thumbnail { position: absolute; top: 8px; left: 8px; width: 48px; height: 48px; font-size: 26px; line-height: 54px; text-align: center; opacity: 0.8; } .yg-upload-list-picture .yg-upload-list-item-icon, .yg-upload-list-picture-card .yg-upload-list-item-icon { position: absolute; top: 50%; left: 50%; font-size: 26px; transform: translate(-50%, -50%); } .yg-upload-list-picture .yg-upload-list-item-thumbnail img, .yg-upload-list-picture-card .yg-upload-list-item-thumbnail img { display: block; width: 48px; height: 48px; overflow: hidden; } .yg-upload-list-picture .yg-upload-list-item-name, .yg-upload-list-picture-card .yg-upload-list-item-name { display: inline-block; box-sizing: content-box; max-width: 100%; width: calc(100% - 64px); margin: 0 0 0 8px; padding-right: 8px; padding-left: 48px; overflow: hidden; line-height: 44px; white-space: nowrap; text-overflow: ellipsis; transition: all 0.3s; } .yg-upload-list-picture .yg-upload-list-item-uploading .yg-upload-list-item-name, .yg-upload-list-picture-card .yg-upload-list-item-uploading .yg-upload-list-item-name { line-height: 28px; } .yg-upload-list-picture .yg-upload-list-item-progress, .yg-upload-list-picture-card .yg-upload-list-item-progress { bottom: 14px; width: calc(100% - 24px); margin-top: 0; padding-left: 56px; } .yg-upload-list-picture .anticon-close, .yg-upload-list-picture-card .anticon-close { position: absolute; top: 8px; right: 8px; line-height: 1; opacity: 1; } .yg-upload-list-picture-card { float: left; } .yg-upload-list-picture-card.yg-upload-list::after { display: none; } .yg-upload-list-picture-card .yg-upload-list-item { float: left; width: 104px; height: 104px; margin: 0 8px 8px 0; } .yg-upload-list-picture-card .yg-upload-list-item-info { position: relative; height: 100%; overflow: hidden; } .yg-upload-list-picture-card .yg-upload-list-item-info::before { position: absolute; z-index: 1; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); opacity: 0; transition: all 0.3s; content: ' '; } .yg-upload-list-picture-card .yg-upload-list-item:hover .yg-upload-list-item-info::before { opacity: 1; } .yg-upload-list-picture-card .yg-upload-list-item-actions { position: absolute; top: 50%; left: 50%; z-index: 10; white-space: nowrap; transform: translate(-50%, -50%); opacity: 0; transition: all 0.3s; } .yg-upload-list-picture-card .yg-upload-list-item-actions .anticon-eye-o, .yg-upload-list-picture-card .yg-upload-list-item-actions .anticon-delete { z-index: 10; width: 16px; margin: 0 4px; color: rgba(255, 255, 255, 0.85); font-size: 16px; cursor: pointer; transition: all 0.3s; } .yg-upload-list-picture-card .yg-upload-list-item-actions .anticon-eye-o:hover, .yg-upload-list-picture-card .yg-upload-list-item-actions .anticon-delete:hover { color: #fff; } .yg-upload-list-picture-card .yg-upload-list-item-info:hover + .yg-upload-list-item-actions, .yg-upload-list-picture-card .yg-upload-list-item-actions:hover { opacity: 1; } .yg-upload-list-picture-card .yg-upload-list-item-thumbnail, .yg-upload-list-picture-card .yg-upload-list-item-thumbnail img { position: static; display: block; width: 100%; height: 100%; } .yg-upload-list-picture-card .yg-upload-list-item-name { display: none; margin: 8px 0 0; padding: 0; line-height: 28px; text-align: center; } .yg-upload-list-picture-card .anticon-picture + .yg-upload-list-item-name { display: block; } .yg-upload-list-picture-card .yg-upload-list-item-uploading.yg-upload-list-item { background-color: #fafafa; } .yg-upload-list-picture-card .yg-upload-list-item-uploading .yg-upload-list-item-info { height: auto; } .yg-upload-list-picture-card .yg-upload-list-item-uploading .yg-upload-list-item-info::before, .yg-upload-list-picture-card .yg-upload-list-item-uploading .yg-upload-list-item-info .anticon-eye-o, .yg-upload-list-picture-card .yg-upload-list-item-uploading .yg-upload-list-item-info .anticon-delete { display: none; } .yg-upload-list-picture-card .yg-upload-list-item-uploading-text { margin-top: 18px; color: rgba(0, 0, 0, 0.45); } .yg-upload-list-picture-card .yg-upload-list-item-progress { bottom: 32px; padding-left: 0; } .yg-upload-list .yg-upload-success-icon { color: #228b22; font-weight: bold; } .yg-upload-list .yg-upload-animate-enter, .yg-upload-list .yg-upload-animate-leave, .yg-upload-list .yg-upload-animate-inline-enter, .yg-upload-list .yg-upload-animate-inline-leave { -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: cubic-bezier(0.78, 0.14, 0.15, 0.86); animation-fill-mode: cubic-bezier(0.78, 0.14, 0.15, 0.86); } .yg-upload-list .yg-upload-animate-enter { -webkit-animation-name: uploadAnimateIn; animation-name: uploadAnimateIn; } .yg-upload-list .yg-upload-animate-leave { -webkit-animation-name: uploadAnimateOut; animation-name: uploadAnimateOut; } .yg-upload-list .yg-upload-animate-inline-enter { -webkit-animation-name: uploadAnimateInlineIn; animation-name: uploadAnimateInlineIn; } .yg-upload-list .yg-upload-animate-inline-leave { -webkit-animation-name: uploadAnimateInlineOut; animation-name: uploadAnimateInlineOut; } @-webkit-keyframes uploadAnimateIn { from { height: 0; margin: 0; padding: 0; opacity: 0; } } @keyframes uploadAnimateIn { from { height: 0; margin: 0; padding: 0; opacity: 0; } } @-webkit-keyframes uploadAnimateOut { to { height: 0; margin: 0; padding: 0; opacity: 0; } } @keyframes uploadAnimateOut { to { height: 0; margin: 0; padding: 0; opacity: 0; } } @-webkit-keyframes uploadAnimateInlineIn { from { width: 0; height: 0; margin: 0; padding: 0; opacity: 0; } } @keyframes uploadAnimateInlineIn { from { width: 0; height: 0; margin: 0; padding: 0; opacity: 0; } } @-webkit-keyframes uploadAnimateInlineOut { to { width: 0; height: 0; margin: 0; padding: 0; opacity: 0; } } @keyframes uploadAnimateInlineOut { to { width: 0; height: 0; margin: 0; padding: 0; opacity: 0; } }