index.scss 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. @import './FilePreviewAndLink/index.scss';
  2. @import './FileProgress/index.scss';
  3. @import './FileInfo/index.scss';
  4. @import './Buttons/index.scss';
  5. .uppy-Dashboard-Item {
  6. display: flex;
  7. align-items: center;
  8. padding: 10px;
  9. border-bottom: 1px solid $gray-200;
  10. padding-inline-end: 0;
  11. [data-uppy-theme="dark"] & {
  12. border-bottom: 1px solid $gray-800;
  13. }
  14. // @media bigger than .md
  15. $rl-margin: 15px;
  16. .uppy-size--md & {
  17. // For the Remove button
  18. position: relative;
  19. display: block;
  20. float: inline-start;
  21. /* When changing width: also update `itemsPerRow` values in `src/components/Dashboard.js`. */
  22. width: calc(33.333% - #{$rl-margin} - #{$rl-margin});
  23. height: 215px;
  24. margin: 5px $rl-margin;
  25. padding: 0;
  26. border-bottom: 0;
  27. }
  28. .uppy-size--lg & {
  29. /* When changing width: also update `itemsPerRow` values in `src/components/Dashboard.js`. */
  30. width: calc(25% - #{$rl-margin} - #{$rl-margin});
  31. height: 190px;
  32. margin: 5px $rl-margin;
  33. }
  34. .uppy-size--xl & {
  35. /* When changing width: also update `itemsPerRow` values in `src/components/Dashboard.js`. */
  36. width: calc(20% - #{$rl-margin} - #{$rl-margin});
  37. height: 210px;
  38. }
  39. }
  40. .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-previewInnerWrap {
  41. opacity: 0.2;
  42. }
  43. .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-name {
  44. opacity: 0.7;
  45. }
  46. .uppy-Dashboard-Item.is-ghost .uppy-Dashboard-Item-preview::before {
  47. position: absolute;
  48. top: 0;
  49. right: 0;
  50. bottom: 0;
  51. left: 0;
  52. z-index: $zIndex-5;
  53. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='35' height='39' viewBox='0 0 35 39'%3E%3Cpath d='M1.708 38.66c1.709 0 3.417-3.417 6.834-3.417 3.416 0 5.125 3.417 8.61 3.417 3.348 0 5.056-3.417 8.473-3.417 4.305 0 5.125 3.417 6.833 3.417.889 0 1.709-.889 1.709-1.709v-19.68C34.167-5.757 0-5.757 0 17.271v19.68c0 .82.888 1.709 1.708 1.709zm8.542-17.084a3.383 3.383 0 01-3.417-3.416 3.383 3.383 0 013.417-3.417 3.383 3.383 0 013.417 3.417 3.383 3.383 0 01-3.417 3.416zm13.667 0A3.383 3.383 0 0120.5 18.16a3.383 3.383 0 013.417-3.417 3.383 3.383 0 013.416 3.417 3.383 3.383 0 01-3.416 3.416z' fill='%2523000' fill-rule='nonzero'/%3E%3C/svg%3E");
  54. background-repeat: no-repeat;
  55. background-position: 50% 10px;
  56. background-size: 25px;
  57. opacity: 0.5;
  58. content: '';
  59. .uppy-size--md & {
  60. background-position: 50% 50%;
  61. background-size: 40px;
  62. }
  63. }
  64. .uppy-Dashboard-Item-preview {
  65. // for the FileProgress.js icons
  66. position: relative;
  67. // @media only mobile
  68. .uppy-Dashboard:not(.uppy-size--md) & {
  69. flex-grow: 0;
  70. flex-shrink: 0;
  71. width: 50px;
  72. height: 50px;
  73. }
  74. // @media bigger than .md
  75. .uppy-size--md & {
  76. width: 100%;
  77. height: 140px;
  78. }
  79. .uppy-size--lg & {
  80. height: 120px;
  81. }
  82. .uppy-size--xl & {
  83. height: 140px;
  84. }
  85. }
  86. .uppy-Dashboard-Item-fileInfoAndButtons {
  87. display: flex;
  88. flex-grow: 1;
  89. align-items: center;
  90. justify-content: space-between;
  91. padding-inline-end: 8px;
  92. padding-inline-start: 12px;
  93. .uppy-size--md & {
  94. align-items: flex-start;
  95. width: 100%;
  96. padding: 0;
  97. padding-top: 9px;
  98. }
  99. }
  100. .uppy-Dashboard-Item-fileInfo {
  101. flex-grow: 1;
  102. flex-shrink: 1;
  103. }
  104. .uppy-Dashboard-Item-actionWrapper {
  105. flex-grow: 0;
  106. flex-shrink: 0;
  107. }
  108. // ...uppy-Dashboard-Item-fileInfoAndButtons|
  109. // ...uppy-Dashboard-Item|
  110. // CSS that depends on status of the file (could be logic in js instead?)
  111. .uppy-Dashboard-Item.is-inprogress,
  112. .uppy-Dashboard-Item.is-error {
  113. .uppy-Dashboard-Item-previewInnerWrap::after {
  114. display: block;
  115. }
  116. }
  117. .uppy-Dashboard-Item.is-inprogress:not(.is-resumable) {
  118. .uppy-Dashboard-Item-action--remove {
  119. display: none;
  120. }
  121. }
  122. .uppy-Dashboard-Item-errorDetails {
  123. position: relative;
  124. top: -1px;
  125. display: inline-block;
  126. width: 12px;
  127. height: 12px;
  128. color: $white;
  129. font-weight: 600;
  130. font-size: 8px;
  131. line-height: 12px;
  132. text-align: center;
  133. vertical-align: middle;
  134. background-color: $gray-500;
  135. border-radius: 50%;
  136. cursor: help;
  137. appearance: none;
  138. inset-inline-start: 6px;
  139. }
  140. .uppy-Dashboard-Item-errorDetails::after {
  141. line-height: 1.3;
  142. word-wrap: break-word;
  143. }