-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
402 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
205 changes: 132 additions & 73 deletions
205
src/sections/shared/file-uploader/FileUploader.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,144 @@ | ||
@use 'sass:color'; | ||
@import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; | ||
|
||
.file_uploader { | ||
min-height: 5em; | ||
} | ||
|
||
.files { | ||
display: grid; | ||
grid-template-columns: repeat(4, auto); | ||
} | ||
|
||
.uploaded_files { | ||
.file_uploader_drop_zone { | ||
display: grid; | ||
grid-template-columns: 4rem repeat(3, auto) 3.5rem; | ||
} | ||
|
||
.selected_file > div { | ||
margin-bottom: 0.5rem; | ||
padding: 0.5rem; | ||
background-color: #ffc !important; | ||
} | ||
place-items: center; | ||
min-height: 80px; | ||
background-color: $dv-primary-text-color; | ||
transition: background-color 0.3s ease-in-out; | ||
|
||
.file:nth-of-type(even) > div { | ||
margin-bottom: 0.5rem; | ||
padding: 0.5rem; | ||
background-color: #f8f9fc; | ||
&.is_dragging { | ||
background-color: $dv-info-box-color; | ||
border: dashed 2px color.adjust($dv-info-box-color, $lightness: -55%); | ||
} | ||
} | ||
|
||
.file:nth-of-type(odd) > div { | ||
margin-bottom: 0.5rem; | ||
padding: 0.5rem; | ||
background-color: white; | ||
} | ||
|
||
.file { | ||
display: contents; | ||
} | ||
|
||
.selected_file { | ||
display: contents; | ||
} | ||
|
||
.file_name { | ||
padding: 0.25em; | ||
} | ||
|
||
.failed { | ||
padding: 0.25em; | ||
color: $dv-danger-color; | ||
text-decoration: line-through; | ||
} | ||
|
||
.file_size { | ||
padding: 0.25em; | ||
} | ||
|
||
.cancel_upload { | ||
padding-block: 0.1rem; | ||
} | ||
|
||
.upload_progress { | ||
min-width: 10em; | ||
} | ||
|
||
.icon { | ||
display: inline-block; | ||
} | ||
|
||
.info { | ||
padding: 0.5em; | ||
.drag_drop_msg { | ||
margin: 0; | ||
color: $dv-subtext-color; | ||
font-size: 1.3em; | ||
text-align: center; | ||
} | ||
|
||
.selected_files_checkbox { | ||
display: inline-flex; | ||
align-items: center; | ||
} | ||
|
||
.save_btn { | ||
.uploading_files_list { | ||
display: flex; | ||
justify-content: flex-end; | ||
padding-top: 1rem; | ||
} | ||
flex-direction: column; | ||
gap: 1rem; | ||
width: 100%; | ||
margin-bottom: 0; | ||
padding-left: 0; | ||
list-style-type: none; | ||
|
||
.uploading_file { | ||
display: grid; | ||
grid-template-columns: repeat(2, 1fr); | ||
gap: 1.5rem; | ||
align-items: center; | ||
padding: 0.5rem 1rem; | ||
background-color: color.adjust($dv-secondary-color, $alpha: -0.8); | ||
border-radius: 8px; | ||
|
||
.info_progress_wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.25rem; | ||
|
||
.info_wrapper { | ||
display: flex; | ||
gap: 1rem; | ||
align-items: baseline; | ||
color: $dv-subtext-color; | ||
text-wrap: nowrap; | ||
} | ||
|
||
.upload_progress { | ||
width: 125px; | ||
} | ||
} | ||
|
||
.cancel_upload { | ||
button { | ||
// background-color: color.adjust($dv-secondary-color, $lightness: -15%); | ||
} | ||
} | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.uploading_file { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1rem; | ||
|
||
.info_progress_wrapper { | ||
flex-direction: row; | ||
gap: 1rem; | ||
align-items: center; | ||
} | ||
|
||
.info_wrapper { | ||
min-width: 200px; | ||
} | ||
|
||
.upload_progress { | ||
width: 150px; | ||
} | ||
} | ||
} | ||
} | ||
|
||
// .uploaded_files { | ||
// display: grid; | ||
// grid-template-columns: 4rem repeat(3, auto) 3.5rem; | ||
// } | ||
|
||
// .selected_file > div { | ||
// margin-bottom: 0.5rem; | ||
// padding: 0.5rem; | ||
// background-color: #ffc !important; | ||
// } | ||
|
||
// .file:nth-of-type(even) > div { | ||
// margin-bottom: 0.5rem; | ||
// padding: 0.5rem; | ||
// background-color: #f8f9fc; | ||
// } | ||
|
||
// .file:nth-of-type(odd) > div { | ||
// margin-bottom: 0.5rem; | ||
// padding: 0.5rem; | ||
// background-color: white; | ||
// } | ||
|
||
// .file { | ||
// display: contents; | ||
// } | ||
|
||
// .selected_file { | ||
// display: contents; | ||
// } | ||
|
||
// .failed { | ||
// padding: 0.25em; | ||
// color: $dv-danger-color; | ||
// text-decoration: line-through; | ||
// } | ||
|
||
// .cancel_upload { | ||
// padding-block: 0.1rem; | ||
// } | ||
|
||
// .icon { | ||
// display: inline-block; | ||
// } | ||
|
||
// .selected_files_checkbox { | ||
// display: inline-flex; | ||
// align-items: center; | ||
// } | ||
|
||
// .save_btn { | ||
// display: flex; | ||
// justify-content: flex-end; | ||
// padding-top: 1rem; | ||
// } |
Oops, something went wrong.