first commit

This commit is contained in:
dev-chiefworks
2022-05-31 16:21:53 -04:00
commit f76abffdcd
5978 changed files with 1078901 additions and 0 deletions
@@ -0,0 +1,331 @@
/* ------------------------------------------------------------------------------
*
* # Dropzone file uploader
*
* Styles for dropzone.min.js - open source library that provides dragndrop file uploads with image previews
*
* ---------------------------------------------------------------------------- */
// Check if component is enabled
@if $enable-dropzone {
// Base
.dropzone {
position: relative;
border: $dropzone-border-width $dropzone-border-style $card-border-color;
min-height: $dropzone-min-height;
background-color: $card-bg;
padding: $dropzone-spacer;
@include border-radius($border-radius);
// If inside panel, give it grey background
.card & {
background-color: $dropzone-bg;
border-color: $dropzone-border-color;
}
// Message
.dz-message {
opacity: 1;
}
&.dz-started .dz-message {
display: none;
}
// Drag hover border and bg color
&.dz-drag-hover {
border-color: $dropzone-drag-border-color;
background-color: $dropzone-drag-bg;
color: $dropzone-drag-color;
}
// Inside sidebar
.sidebar & {
text-align: center;
// Message
.dz-default.dz-message {
&:before {
font-size: ($icon-font-size * 4);
width: ($icon-font-size * 4);
height: ($icon-font-size * 4);
margin-left: -($icon-font-size * 2);
top: 50%;
transform: translateY(-50%);
}
// Message text
span {
font-size: $h6-font-size;
}
}
}
}
//
// Messages
//
.dropzone {
// Default styles
.dz-default {
&.dz-message {
height: $dropzone-min-height;
width: 100%;
position: absolute;
top: 0;
left: 0;
text-align: center;
opacity: 1;
@include border-radius($border-radius);
@include transition(opacity ease-in-out $component-transition-timer);
// Icon
&:before {
content: $icon-uploader-placeholder;
font-family: $icon-font-family;
font-size: $dropzone-placeholder-icon-size;
display: inline-block;
position: absolute;
top: ($dropzone-min-height / 2) - $dropzone-placeholder-icon-size;
left: 50%;
transform: translateX(-50%);
line-height: 1;
z-index: 2;
color: $dropzone-placeholder-icon-color;
@include ll-font-smoothing();
}
// Text label
> span {
font-size: $h5-font-size;
color: $dropzone-placeholder-text-color;
display: block;
margin-top: ($dropzone-min-height / 2) + $spacer;
// Subtext
span {
display: block;
color: lighten($dropzone-placeholder-text-color, 15%);
font-size: $h6-font-size;
}
}
}
}
// On files drag
&.dz-drag-hover .dz-message {
opacity: 0.75;
}
&.dz-started .dz-message {
display: block;
opacity: 0;
}
}
//
// Preview
//
.dropzone,
.dropzone-previews {
.dz-preview {
background-color: $card-bg;
position: relative;
display: inline-block;
margin: $dropzone-preview-spacer;
min-width: $dropzone-preview-width;
border: $card-border-width solid $card-border-color;
padding: $dropzone-preview-spacer;
@include border-radius($border-radius);
@include box-shadow($card-box-shadow);
// Hide thumbnail in file preview
&.dz-file-preview [data-dz-thumbnail] {
display: none;
}
// Details
.dz-details {
position: relative;
// File name
.dz-filename {
overflow: hidden;
margin-top: map-get($spacers, 2);
}
// Image
img {
position: absolute;
top: 0;
left: 0;
}
// Size
.dz-size {
margin-top: map-get($spacers, 2);
}
}
// Hover state
@include hover {
.dz-details img {
display: none;
}
}
// Marks
.dz-error-mark,
.dz-success-mark {
display: none;
position: absolute;
z-index: 9;
top: 0;
right: 0;
padding: ($dropzone-preview-spacer / 2);
background-color: $card-bg;
border-left: $card-border-width solid $card-border-color;
border-bottom: $card-border-width solid $card-border-color;
@include border-radius(0 0 0 $card-border-radius);
// Icon base
&:after {
font-family: $icon-font-family;
display: block;
font-size: $font-size-base;
line-height: 1;
@include ll-font-smoothing();
}
// Hide default things
span,
svg {
display: none;
}
}
.dz-error-mark {
color: theme-color('danger');
&:after {
content: $icon-validation-error;
}
}
.dz-success-mark {
color: theme-color('success');
&:after {
content: $icon-validation-success;
}
}
// Error and success marks
&.dz-error .dz-error-mark,
&.dz-success .dz-success-mark {
display: block;
opacity: 1;
}
// Uploading progress
.dz-progress {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: ($dropzone-preview-spacer / 2);
display: none;
// Upload progress
.dz-upload {
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 0%;
height: 100%;
background-color: theme-color('success');
@include transition(width ease-in-out $component-transition-timer);
@include border-bottom-radius($card-border-radius - rem-calc($card-border-width));
}
}
&.dz-processing .dz-progress {
display: block;
}
&.dz-success {
.dz-progress {
display: block;
opacity: 0;
@include transition(opacity ease-in-out $component-transition-timer);
}
}
// Error message
.dz-error-message {
display: block;
position: absolute;
top: 0;
left: 0;
background-color: rgba($card-bg, 0.9);
margin: $dropzone-preview-spacer;
padding: $dropzone-preview-spacer;
color: theme-color('danger');
max-width: 100%;
z-index: 5;
opacity: 0;
@include transition(opacity ease-in-out $component-transition-timer);
}
&.dz-error {
@include hover {
.dz-error-message {
display: block;
opacity: 1;
}
}
.dz-progress .dz-upload {
background: theme-color('danger');
}
}
// Image preview
&.dz-image-preview:hover {
.dz-details img {
display: block;
opacity: 0.1;
}
}
// Image thumb
.dz-image {
img {
width: 100%;
}
}
// Remove button
a.dz-remove {
background-color: $btn-light-bg;
border: $btn-border-width solid $btn-light-border-color;
display: block;
padding: $btn-padding-y-sm $btn-padding-x-sm;
text-align: center;
color: $btn-light-color;
margin-top: map-get($spacers, 2);
cursor: pointer;
@include border-radius($border-radius);
@include transition(all ease-in-out $component-transition-timer);
// Hover state
@include hover {
color: $btn-light-hover-color;
background-color: $btn-light-hover-bg;
border-color: $btn-light-hover-border-color;
}
}
}
}
}
@@ -0,0 +1,553 @@
/* ------------------------------------------------------------------------------
*
* # Bootstrap file input
*
* Styles for fileinput.min.js - an enhanced HTML 5 file input for Bootstrap
*
* ---------------------------------------------------------------------------- */
// Check if component is enabled
@if $enable-fileinput {
// File input styling
// ------------------------------
// Browse button
.btn-file {
position: relative;
overflow: hidden;
// Hide original input
input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
text-align: right;
opacity: 0;
background: none repeat scroll 0 0 transparent;
cursor: inherit;
display: block;
visibility: visible;
}
}
// Caption name
.file-caption-name {
display: inline-block;
overflow: hidden;
word-break: break-all;
font-family: $font-family-sans-serif;
width: 100%;
margin: 0;
padding: 0;
box-shadow: none;
border: 0;
background: none;
outline: 0;
pointer-events: none;
// Display empty caption text as a placeholder
.file-input-new &,
.file-input-ajax-new & {
color: $input-placeholder-color;
}
}
// Error message
.file-error-message {
position: relative;
background-color: $color-danger-50;
color: $color-danger-800;
text-align: center;
padding: $input-padding-y $input-padding-x;
margin: $fileinput-preview-spacer;
margin-top: 0;
@include border-radius($border-radius);
// Top spacing correction if inside drop zone
.file-drop-zone & {
margin-top: $input-padding-y;
}
// Close button
.close {
color: $color-danger-800;
}
// List of errors
pre {
background-color: $card-bg;
margin-top: $input-padding-y;
text-align: left;
}
// List
ul {
list-style: none;
padding: 0;
margin: 0;
}
}
// Disabled caption
.file-caption-disabled {
background-color: $input-disabled-bg;
cursor: $cursor-disabled;
}
//
// Preview
//
// Preview modal
.file-preview-detail-modal {
text-align: left;
}
// File preview container
.file-preview {
border: $border-width solid $border-color;
width: 100%;
margin-bottom: $spacer;
position: relative;
text-align: center;
@include border-radius($border-radius);
// Close button
.close {
font-size: $close-font-size;
font-weight: $close-font-weight;
position: absolute;
top: 0;
right: 0;
padding: $fileinput-preview-spacer;
line-height: 1;
color: $close-color;
text-shadow: $close-text-shadow;
opacity: 0.75;
@include border-radius($border-radius);
// Hover state
@include hover-focus {
color: $close-color;
text-decoration: none;
opacity: 1;
}
}
}
// Thumbnails
.file-preview-thumbnails {
display: flex;
flex-wrap: wrap;
position: relative;
// Center thumbs on mobile
@include media-breakpoint-down(sm) {
justify-content: center;
}
}
// Thumbnail frame
.file-preview-frame {
margin: $fileinput-preview-spacer;
margin-right: 0;
border: $fileinput-preview-frame-border-width solid $fileinput-preview-frame-border-color;
background-color: $fileinput-preview-frame-bg;
@include border-radius($border-radius);
// Thumb
.kv-file-content {
position: relative;
height: $fileinput-preview-thumb-height;
}
}
// Thumbnail image
.file-preview-image {
@include border-top-radius($border-radius - rem-calc($border-width));
}
// Thumbnail footer
.file-thumbnail-footer {
position: relative;
background-color: $fileinput-preview-footer-bg;
border-top: $border-width solid $border-color;
}
// Preview text
.file-preview-text {
color: $link-color;
border: 0;
overflow-x: hidden;
}
// Other files preview
.file-preview-other {
width: $fileinput-preview-thumb-width;
// Override for preview icon, use Icomoon instead
&:after {
content: $icon-uploader-placeholder;
font-family: $icon-font-family;
line-height: 1;
position: absolute;
top: 50%;
left: 50%;
font-size: ($icon-font-size * 4);
transform: translate(-50%, -50%);
@include ll-font-smoothing();
}
}
// Status
.file-preview-status {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
background-color: $fileinput-preview-footer-bg;
border-top: $border-width solid $border-color;
font-size: $font-size-sm;
line-height: $line-height-sm;
padding: $input-padding-y $input-padding-x;
z-index: $zindex-tooltip;
@include border-bottom-radius($border-radius);
// Collapse if empty
&:empty {
padding: 0;
background-color: transparent;
border: 0;
}
}
//
// Loading indicator
//
// Give it minimum height
.file-thumb-loading {
min-height: ($icon-font-size * 2) + ($spacer * 2) + (($input-padding-y * 2) + $line-height-computed);
}
// Loading icon
.file-thumb-loading,
.file-uploading {
// Background
&:before {
content: '';
display: inline-block;
background-color: $color-slate-900;
position: absolute;
top: 50%;
left: 50%;
z-index: $zindex-tooltip - 1;
margin-top: -((($icon-font-size * 2) + (($input-padding-y * 2) + $line-height-computed)) / 2);
margin-left: -($icon-font-size);
@include size($icon-font-size * 2);
@include border-radius($border-radius);
}
// Icon itself
&:after {
content: $icon-loading-spinner;
font-family: $icon-font-family;
display: inline-block;
position: absolute;
color: $white;
top: 50%;
left: 50%;
margin-top: -(($icon-font-size + (($input-padding-y * 2) + $line-height-computed)) / 2);
margin-left: -($icon-font-size / 2);
font-size: $icon-font-size;
line-height: 1;
z-index: $zindex-tooltip;
animation: rotation 1s linear infinite;
@include ll-font-smoothing();
}
}
// Indicator
.file-upload-indicator {
cursor: default;
float: left;
padding: map-get($spacers, 2);
line-height: 1;
// Icon
i {
top: 0;
}
}
//
// Default elements visibility
//
// Standard upload
.file-input-new {
.file-preview,
.close,
.glyphicon-file,
.fileinput-remove-button,
.fileinput-upload-button {
display: none;
}
}
// Ajax upload
.file-input-ajax-new {
.fileinput-remove-button,
.fileinput-upload-button,
.close {
display: none;
}
}
// Other
.kv-hidden,
.file-caption-icon,
.file-zoom-dialog .modal-header:before,
.file-zoom-dialog .modal-header:after,
.hide-content .kv-file-content {
display: none;
}
// AJAX upload styling
// ------------------------------
// Buttons position
.file-footer-buttons {
float: right;
// Button base
button {
padding: map-get($spacers, 2);
background-color: transparent;
border: 0;
line-height: 1;
cursor: pointer;
opacity: 0.6;
outline: 0;
@include transition(opacity ease-in-out $component-transition-timer);
// Hover state
@include hover {
opacity: 1;
}
// Make icon centered vertically
i {
top: 0;
}
}
}
// Caption
.file-footer-caption {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
padding: $fileinput-preview-thumb-caption-spacer;
background-color: $card-bg;
border-bottom: $border-width solid $border-color;
margin-left: auto;
margin-right: auto;
}
// Size information
.file-size-info {
samp {
font-size: $font-size-xs;
}
}
//
// Dropzone
//
// Base
.file-drop-zone {
border: $border-width dashed $border-color;
height: 100%;
vertical-align: middle;
margin: $fileinput-preview-spacer;
padding: $fileinput-preview-spacer;
@include border-radius($border-radius);
}
// Text title
.file-drop-zone-title {
font-size: $h4-font-size;
font-weight: $font-weight-light;
padding: 5rem;
opacity: 0.5;
}
// Progress bar
.kv-upload-progress {
margin-bottom: $spacer;
}
//
// Progress
//
// Thumbnail progress
.file-thumb-progress {
position: absolute;
top: -$fileinput-preview-progress-height;
left: 0;
right: 0;
// Progress bars
.progress,
.progress-bar {
height: $fileinput-preview-progress-height;
border-radius: 0;
font-size: 0;
}
}
// IE 10 fix
.btn-file ::-ms-browse {
width: 100%;
height: 100%;
}
//
// Fullscreen modal
//
.file-zoom-fullscreen {
// Base
.modal-dialog {
position: fixed;
margin: 0;
width: 100%;
height: 100%;
padding: 0;
max-width: 100%;
}
// Content
.modal-content {
@include border-radius(0);
}
// Body
.modal-body {
overflow-y: auto;
}
}
//
// Zoom
//
// Dialog
.file-zoom-dialog {
// Navigate buttons
.btn-navigate {
position: absolute;
top: 50%;
padding: 0;
border: 0;
background-color: transparent;
outline: none;
color: $white;
opacity: 0.7;
transform: translateY(-50%);
@include transition(opacity ease-in-out $component-transition-timer);
// Icons
> i {
display: block;
font-size: ($icon-font-size * 2);
}
// Hover state
&:not([disabled]):hover,
&:not([disabled]):focus {
outline: none;
box-shadow: none!important;
opacity: 1;
}
// Disabled state
&[disabled] {
opacity: 0.3;
}
}
// Left button
.btn-prev {
left: -(($icon-font-size * 2) + $grid-gutter-width);
}
// Right button
.btn-next {
right: -(($icon-font-size * 2) + $grid-gutter-width);
}
// Floating buttons
.floating-buttons {
position: absolute;
top: $modal-header-padding;
right: $modal-header-padding;
background-color: $modal-content-bg;
}
// Title
.kv-zoom-title {
color: $text-muted;
margin-left: map-get($spacers, 2);
}
}
// Content
.file-zoom-content {
text-align: center;
}
//
// Drag
//
.file-drag-handle {
cursor: move;
float: left;
line-height: 1;
opacity: 0.6;
@include transition(opacity ease-in-out $component-transition-timer);
// Hover state
@include hover {
opacity: 1;
}
// Center icon vertically
i {
top: 0;
}
}
}
@@ -0,0 +1,410 @@
/* ------------------------------------------------------------------------------
*
* # Plupload multiple file uploader
*
* Styles for plupload.min.js - multi runtime single and multiple file uploader
*
* ---------------------------------------------------------------------------- */
// Check if component is enabled
@if $enable-plupload {
// Layout
// ------------------------------
// Wrapper
.plupload_wrapper {
background-color: $plupload-bg;
border: $plupload-border-width $plupload-border-style $plupload-border-color;
@include border-radius($border-radius);
}
// Common icon styles
.plupload_header:after,
.plupload_filelist:empty:before,
.plupload_filelist li.plupload_droptext:before,
.plupload_file_action:after,
.plupload_delete a:after,
.plupload_failed a:after,
.plupload_done a:after {
font-family: $icon-font-family;
display: block;
font-size: $icon-font-size;
line-height: 1;
@include ll-font-smoothing();
}
// Header (hidden by default)
.plupload_header {
display: none;
position: relative;
background-color: $plupload-header-bg;
color: $plupload-header-color;
margin: -($plupload-border-width) -($plupload-border-width) 0 -($plupload-border-width);
@include border-top-radius($border-radius);
// Icon
&:after {
content: $icon-uploader-placeholder;
font-size: ($icon-font-size * 2);
position: absolute;
top: 50%;
left: $card-spacer-x;
margin-top: -($icon-font-size);
}
}
.plupload_header_content {
padding: $card-spacer-y $card-spacer-x;
padding-left: (($card-spacer-x * 2) + ($icon-font-size * 2));
}
.plupload_header_title {
font-size: $h6-font-size;
font-weight: $font-weight-semibold;
}
.plupload_header_text {
font-size: $font-size-sm;
line-height: $line-height-sm;
}
// Helpers
.plupload_clear,
.plupload_clearer {
clear: both;
}
.plupload_clearer,
.plupload_progress_bar {
display: block;
font-size: 0;
line-height: 0;
}
// Buttons
// ------------------------------
// Buttons base
.plupload_button {
display: inline-block;
border: $btn-border-width solid transparent;
font-weight: $btn-font-weight;
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
@include transition($btn-transition);
// Button spacer
&:not(:last-child) {
margin-right: $element-spacer-x;
}
}
// Add files button
.plupload_add {
color: $btn-light-color;
background-color: $btn-light-bg;
border-color: $btn-light-border-color;
// Hover state
@include hover {
color: $btn-light-hover-color;
background-color: $btn-light-hover-bg;
border-color: $btn-light-hover-border-color;
}
}
// Start upload button
.plupload_start {
color: $plupload-btn-start-color;
background-color: $plupload-btn-start-bg;
border-color: $plupload-btn-start-border-color;
// Hover state
@include hover {
color: $plupload-btn-start-color;
box-shadow: $btn-dark-hover-box-shadow;
}
}
// Disabled button
a.plupload_disabled {
cursor: default;
opacity: $btn-disabled-opacity;
// Hover state
@include hover {
box-shadow: none;
}
}
// File list
// ------------------------------
// Itself
.plupload_filelist {
position: relative;
margin: 0;
padding: 0;
list-style: none;
// Scrollable area
.plupload_scroll & {
height: $plupload-max-height;
overflow-y: auto;
}
// List item
li {
display: flex;
align-items: center;
padding: $dropdown-item-padding-y $card-spacer-x;
@include transition(all ease-in-out $component-transition-timer);
// Hover state
@include hover {
background-color: $dropdown-link-hover-bg;
}
// File info
.plupload_file_name {
margin-right: auto;
}
// Ordering
.plupload_file_action {
order: 12;
}
.plupload_file_status {
order: 11;
}
.plupload_file_size {
order: 10;
}
}
// Add background icon with text
&:empty,
li.plupload_droptext {
background-color: transparent;
font-size: 0;
// Icon
&:before {
content: $icon-uploader-placeholder;
font-size: ($icon-font-size * 5);
position: absolute;
top: 50%;
left: 50%;
margin-top: -($spacer);
z-index: 2;
color: $plupload-placeholder-icon-color;
text-indent: 0;
font-weight: normal;
transform: translate(-50%, -50%);
@include ll-font-smoothing();
}
// Text label
&:after {
content: 'Drag files to upload';
font-size: $h5-font-size;
position: absolute;
top: 50%;
left: 50%;
margin-top: ($icon-font-size * 2.5) + $spacer;
color: $plupload-placeholder-text-color;
text-indent: 0;
transform: translate(-50%, -50%);
}
}
&:empty:after {
content: 'Add files to upload';
}
// On small screens
@include media-breakpoint-down(sm) {
padding: ($spacer / 2) 0;
// File size
li {
.plupload_file_size {
display: none;
}
}
}
}
// Header
.plupload_filelist_header {
padding: $card-spacer-y $card-spacer-x;
// File info
.plupload_file_name,
.plupload_file_size,
.plupload_file_status,
.plupload_file_action {
font-weight: $font-weight-semibold;
}
// Hide on small screen
@include media-breakpoint-down(sm) {
display: none;
}
}
// Footer
.plupload_filelist_footer {
padding: $card-spacer-y $card-spacer-x;
// File info
.plupload_file_size,
.plupload_file_status,
.plupload_upload_status {
padding: $btn-padding-y 0;
font-weight: $font-weight-semibold;
}
// On small screen
@include media-breakpoint-down(sm) {
text-align: center;
// Hide all file info
.plupload_file_action,
.plupload_file_status,
.plupload_file_size {
display: none;
}
// Center progress bar
.plupload_progress {
margin: auto;
}
}
}
// Header and footer
.plupload_filelist_header,
.plupload_filelist_footer {
@include media-breakpoint-up(sm) {
display: flex;
align-items: center;
// File name
.plupload_file_name {
margin-right: auto;
}
// File info
.plupload_file_action {
order: 12;
}
.plupload_file_status {
order: 11;
}
.plupload_file_size {
order: 10;
}
}
}
// Indicators
// ------------------------------
// File action indicator
.plupload_file_action {
margin-left: map-get($spacers, 4);
line-height: 1;
font-size: 0;
text-align: right;
// Hide all children by default
* {
display: none;
}
// Add icon to the header and footer
&:after {
content: $icon-uploader-placeholder-actions;
}
// Remove icons in the file list
.plupload_filelist &:after {
content: none;
}
// Delete button
.plupload_delete & {
> a {
color: $body-color;
line-height: 1;
opacity: 0.5;
@include transition(opacity ease-in-out $component-transition-timer);
// Hover state
@include hover {
opacity: 1;
}
}
}
}
// Uploading indicator
.plupload_uploading {
background-color: $color-success-50;
}
// Delete button
.plupload_delete a:after {
content: $icon-action-cross-sm;
}
// Failed indicator
.plupload_failed a {
color: theme-color('danger');
cursor: default;
// Icon
&:after {
content: $icon-validation-error;
}
}
// Done indicator
.plupload_done {
color: $gray-600;
// Link
a {
color: theme-color('success');
cursor: default;
// Icon
&:after {
content: $icon-validation-success;
}
}
}
// Progress indicators
.plupload_progress,
.plupload_upload_status {
display: none;
}
.plupload_progress_container {
background-color: rgba($black, 0.1);
@include border-radius($border-radius);
}
.plupload_progress_bar {
width: 0;
height: 0.25rem;
background: theme-color('success');
@include border-radius($border-radius);
}
// File info
.plupload_file_size,
.plupload_file_status,
.plupload_progress {
width: 5rem;
text-align: right;
}
}