Add select2 bootstrap 5 theme

This commit is contained in:
Deon George 2025-01-15 22:39:20 +11:00
parent 026b3f5a20
commit 8b922b2e8b
6 changed files with 40 additions and 3 deletions

12
package-lock.json generated
View File

@ -20,7 +20,8 @@
"resolve-url-loader": "^5.0.0", "resolve-url-loader": "^5.0.0",
"sass": "^1.58.3", "sass": "^1.58.3",
"sass-loader": "^13.2.0", "sass-loader": "^13.2.0",
"select2": "^4.1.0-rc.0" "select2": "^4.1.0-rc.0",
"select2-bootstrap-5-theme": "^1.3.0"
} }
}, },
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
@ -7644,6 +7645,15 @@
"resolved": "https://registry.npmjs.org/select2/-/select2-4.1.0-rc.0.tgz", "resolved": "https://registry.npmjs.org/select2/-/select2-4.1.0-rc.0.tgz",
"integrity": "sha512-Hr9TdhyHCZUtwznEH2CBf7967mEM0idtJ5nMtjvk3Up5tPukOLXbHUNmh10oRfeNIhj+3GD3niu+g6sVK+gK0A==" "integrity": "sha512-Hr9TdhyHCZUtwznEH2CBf7967mEM0idtJ5nMtjvk3Up5tPukOLXbHUNmh10oRfeNIhj+3GD3niu+g6sVK+gK0A=="
}, },
"node_modules/select2-bootstrap-5-theme": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/select2-bootstrap-5-theme/-/select2-bootstrap-5-theme-1.3.0.tgz",
"integrity": "sha512-uEJDruP4tmwyKcs3V0oP7CIsyC45PGF5ddo8unwTp8OucJ1PSuTOBr+xbWaHTQPGnvp7N96psVQ5UBMQvFCcHA==",
"license": "MIT",
"dependencies": {
"bootstrap": "^5.1.3"
}
},
"node_modules/selfsigned": { "node_modules/selfsigned": {
"version": "2.4.1", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz",

View File

@ -25,6 +25,7 @@
"resolve-url-loader": "^5.0.0", "resolve-url-loader": "^5.0.0",
"sass": "^1.58.3", "sass": "^1.58.3",
"sass-loader": "^13.2.0", "sass-loader": "^13.2.0",
"select2": "^4.1.0-rc.0" "select2": "^4.1.0-rc.0",
"select2-bootstrap-5-theme": "^1.3.0"
} }
} }

22
public/css/fixes.css vendored
View File

@ -269,3 +269,25 @@ pre code .line::before {
display: inline-block; display: inline-block;
border-right: 1px solid rgba(0, 0, 0, .5); border-right: 1px solid rgba(0, 0, 0, .5);
} }
/** select2 rendering fixes */
/* The opened input box */
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
line-height: 1.0;
border: 1px solid #aaa;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
padding: 0.3rem 0.2rem 0.3rem 0.4rem;
font-size: 95%;
}
select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear, .select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
width: 0.5rem;
height: 0.5rem;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder {
line-height: 1.0;
font-size: 90%;
}

View File

@ -6,3 +6,4 @@
// Select2 // Select2
@import "select2/dist/css/select2"; @import "select2/dist/css/select2";
@import "select2-bootstrap-5-theme/dist/select2-bootstrap-5-theme";

View File

@ -33,6 +33,8 @@
<link rel="stylesheet" href="{{ asset('/css/custom.css') }}"> <link rel="stylesheet" href="{{ asset('/css/custom.css') }}">
@endif @endif
<!-- Page Styles -->
@yield('page-styles')
{{-- {{--
@if(file_exists('css/print.css')) @if(file_exists('css/print.css'))
<!-- Printing Modifications --> <!-- Printing Modifications -->

View File

@ -12,3 +12,4 @@
@yield('page-modals') @yield('page-modals')
@yield('page-scripts') @yield('page-scripts')
@yield('page-styles')