@@ -130,7 +130,6 @@ body.ea-dark-scheme .form-widget .form-select {
130130.form-widget input .form-control : focus ,
131131.form-widget textarea .form-control : focus ,
132132.form-widget .form-select : focus ,
133- .form-widget .custom-file-input : focus ~ .custom-file-label ,
134133.form-widget input .form-check-input : focus {
135134 border-color : var (--form-input-hover-border-color );
136135 box-shadow : var (--form-input-hover-shadow );
@@ -190,31 +189,6 @@ label.form-check-label {
190189 margin-inline-start : 15px ;
191190}
192191
193- /* in Bootstrap custom file widgets, the label is used to simulate the file input */
194- .field-file .custom-file ,
195- .field-file .custom-file-input {
196- block-size : 30px ;
197- }
198- .field-file .custom-file label .custom-file-label {
199- block-size : 30px ;
200- margin : 0 ;
201- max-inline-size : 350px ;
202- overflow : hidden;
203- padding : 3px 7px 5px ;
204- text-align : left;
205- }
206- .field-file .custom-file label .custom-file-label : after {
207- color : var (--text-color );
208- content : "\f07c" ;
209- display : inline-block;
210- font-family : "Font Awesome 6 Free" , sans-serif;
211- font-size : 17px ;
212- block-size : 28px ;
213- line-height : 28px ;
214- padding : 0 8px ;
215- vertical-align : middle;
216- }
217-
218192/* Date-time widgets */
219193.field-date .form-widget ,
220194.field-time .form-widget ,
@@ -624,104 +598,145 @@ form .invalid-feedback > .d-block + .d-block {
624598}
625599
626600/* fileupload widgets */
627- .ea-fileupload .custom-file {
628- block-size : 30px ;
629- }
630- .ea-fileupload .input-group {
631- flex-wrap : nowrap;
601+ .ea-fileupload {
602+ display : flex;
603+ flex-direction : column;
604+ gap : 0.5rem ;
632605}
633- .ea-fileupload .input-group .btn ,
634- .ea-fileupload .input-group .btn : hover {
635- background : var (--form-input-group-text-bg );
636- box-shadow : none !important ;
637- border-radius : 0 ;
638- color : var (--text-color );
639- font-size : 17px ;
640- block-size : 28px ;
641- line-height : 28px ;
642- margin : 0 ;
643- padding : 0 8px ;
644- vertical-align : middle;
606+
607+ /* File Upload - Toolbar (Add button + Clear All) */
608+ .ea-fileupload-toolbar {
609+ display : flex;
610+ align-items : center;
611+ gap : 0.75rem ;
645612}
646- .ea-fileupload .input-group .btn : first-child ,
647- .ea-fileupload .input-group .btn : hover : first-child {
648- margin-inline-start : 5px ;
613+ .ea-fileupload-add-btn {
614+ display : inline-flex;
615+ align-items : center;
616+ gap : 0.375rem ;
617+ font-size : 0.875rem ;
618+ font-weight : 500 ;
619+ padding : 0.375rem 0.875rem ;
649620}
650- .ea-fileupload .input-group .btn : last-child ,
651- .ea-fileupload .input-group .btn : hover : last-child {
652- border-start-end-radius : var (--border-radius );
653- border-end-end-radius : var (--border-radius );
621+ .ea-fileupload-add-btn .btn-icon {
622+ inline-size : 0.875rem ;
623+ block-size : 0.875rem ;
654624}
655-
656- .ea-fileupload .custom-file-input {
625+ .ea-fileupload-clear-all-btn {
626+ margin-inline-start : auto;
627+ background : none;
628+ border : none;
629+ color : var (--text-color );
630+ font-size : 0.875rem ;
631+ font-weight : 500 ;
657632 cursor : pointer;
658- block-size : calc (1.5em + .75rem + 2px );
659- margin : 0 ;
660- overflow : hidden;
661- opacity : 0 ;
662- position : relative;
663- inline-size : 100% ;
664- z-index : 2 ;
633+ padding : 0.375rem 0 ;
634+ }
635+ .ea-fileupload-clear-all-btn : hover {
636+ text-decoration : underline;
665637}
666638
667- .ea-fileupload .custom-file-label {
668- background : var (--form-control-bg );
669- border-radius : var (--border-radius );
670- border : 1px solid var (--form-input-border-color );
671- box-shadow : var (--form-input-shadow );
672- color : var (--form-input-text-color );
673- block-size : 30px ;
674- inset-inline-start : 0 ;
675- margin : 0 !important ;
676- overflow : hidden;
677- padding : 3px 40px 3px 7px !important ;
678- position : absolute;
679- text-align : left !important ;
680- text-overflow : ellipsis;
681- inset-block-start : 0 ;
682- white-space : nowrap;
683- inline-size : 100% !important ;
639+ /* File Upload - Cards container */
640+ .ea-fileupload-cards {
641+ display : flex;
642+ flex-direction : column;
643+ gap : 0.375rem ;
684644}
685- .ea-fileupload . custom-file-label :: after {
645+ .ea-fileupload-cards : empty {
686646 display : none;
687647}
688648
689- .ea-fileupload .input-group-text {
690- background : var (--form-input-group-text-bg );
691- border : 1px solid var (--form-input-border-color );
692- box-shadow : none;
693- color : var (--text-muted );
694- block-size : 30px ;
695- padding : 7px 0 7px 7px ;
696- position : absolute;
697- inset-inline-end : 0 ;
698- z-index : 3 ;
649+ /* File Upload - Individual card */
650+ .ea-fileupload-card {
651+ display : flex;
652+ align-items : center;
653+ gap : 0.625rem ;
654+ border : 1px solid var (--border-tertiary-color );
655+ border-radius : var (--border-radius );
656+ padding : 0.5rem 0.75rem ;
699657}
700658
701- .ea-fileupload .fileupload-list {
702- block-size : auto;
703- margin-block-start : 7px ;
704- padding : 0 ;
705- border-color : var (--form-input-border-color );
659+ /* File Upload - Card preview (left side: icon or thumbnail) */
660+ .ea-fileupload-card-preview {
661+ flex-shrink : 0 ;
662+ display : flex;
663+ align-items : center;
664+ justify-content : center;
665+ inline-size : 2.25rem ;
666+ block-size : 2.25rem ;
667+ }
668+ .ea-fileupload-card-thumbnail {
669+ inline-size : 2.25rem ;
670+ block-size : 2.25rem ;
671+ object-fit : cover;
672+ border-radius : calc (var (--border-radius ) * 0.5 );
706673}
707- .ea-fileupload .fileupload-list .fileupload-table {
674+ .ea-fileupload-card .ea-fileupload-card-icon {
675+ inline-size : 2rem ;
676+ block-size : 2rem ;
677+ }
678+ .ea-fileupload-card .ea-fileupload-card-icon svg {
708679 inline-size : 100% ;
680+ block-size : 100% ;
681+ max-inline-size : unset;
682+ max-block-size : unset;
709683}
710- .ea-fileupload .fileupload-list .fileupload-table td {
711- padding : 3px 7px ;
712- border-radius : 3px ;
684+
685+ /* File Upload - Card info (center: name + size) */
686+ .ea-fileupload-card-info {
687+ flex : 1 ;
688+ min-inline-size : 0 ;
689+ display : flex;
690+ flex-direction : column;
713691}
714- .ea-fileupload .fileupload-list .fileupload-table td : first-child {
692+ .ea-fileupload-card-name {
693+ font-weight : 600 ;
694+ font-size : 0.875rem ;
695+ line-height : 1.3 ;
715696 overflow : hidden;
716697 text-overflow : ellipsis;
717698 white-space : nowrap;
718- max-inline-size : 300 px ;
699+ color : var ( --text-color ) ;
719700}
720- .ea-fileupload .fileupload-list .fileupload-table tr : nth-child (odd) td {
721- background-color : var (--form-control-bg );
701+ .ea-fileupload-card-size {
702+ font-size : 0.75rem ;
703+ line-height : 1.3 ;
704+ color : var (--text-secondary-color );
722705}
723- .ea-fileupload .fileupload-list .fileupload-table td .file-size {
724- color : var (--text-muted );
706+
707+ /* File Upload - Card actions (right side) */
708+ .ea-fileupload-card-actions {
709+ flex-shrink : 0 ;
710+ display : flex;
711+ align-items : center;
712+ gap : 0.5em ;
713+ }
714+ .ea-fileupload-card-actions .ea-fileupload-action-btn {
715+ display : inline-flex;
716+ align-items : center;
717+ justify-content : center;
718+ background : none;
719+ border : none;
720+ color : var (--text-secondary-color );
721+ cursor : pointer;
722+ padding : 0.5em ;
723+ border-radius : var (--border-radius );
724+ text-decoration : none;
725+ line-height : 1 ;
726+ }
727+ .ea-fileupload-card-actions .ea-fileupload-action-btn : hover {
728+ color : var (--text-color );
729+ background-color : var (--secondary-bg );
730+ }
731+ .ea-fileupload-card-actions .ea-fileupload-action-btn .icon {
732+ inline-size : 1.125em ;
733+ block-size : 1.125em ;
734+ }
735+ .ea-fileupload-card-actions .ea-fileupload-action-btn svg {
736+ inline-size : 100% ;
737+ block-size : 100% ;
738+ max-inline-size : unset;
739+ max-block-size : unset;
725740}
726741
727742/* Image/file vich uploads */
@@ -786,17 +801,3 @@ form .invalid-feedback > .d-block + .d-block {
786801 text-align : right;
787802 inset-block-start : 0 ;
788803}
789-
790- /* Fix "Browse" button for regular file inputs */
791- .form-control ::file-selector-button ,
792- .form-control ::-webkit-file-upload-button {
793- color : var (--button-secondary-color );
794- background-color : var (--button-secondary-bg );
795- box-shadow : var (--button-shadow );
796- }
797-
798- .form-control : hover : not (: disabled ): not ([readonly ])::file-selector-button ,
799- .form-control : hover : not (: disabled ): not ([readonly ])::-webkit-file-upload-button {
800- background-color : var (--button-secondary-bg );
801- box-shadow : var (--button-hover-shadow );
802- }
0 commit comments