Remove fomantic dimmer module (#30723)
Tested extensively using modal which is the only dependant.
This commit is contained in:
parent
e80466f734
commit
a21ca9b5a5
@ -680,10 +680,6 @@ input:-webkit-autofill:active,
|
||||
box-shadow: 0 6px 18px var(--color-shadow) !important;
|
||||
}
|
||||
|
||||
.ui.dimmer {
|
||||
background: var(--color-overlay-backdrop);
|
||||
}
|
||||
|
||||
.ui.dropdown .menu > .header {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
@import "./modules/table.css";
|
||||
@import "./modules/card.css";
|
||||
@import "./modules/checkbox.css";
|
||||
@import "./modules/dimmer.css";
|
||||
@import "./modules/modal.css";
|
||||
|
||||
@import "./modules/select.css";
|
||||
|
30
web_src/css/modules/dimmer.css
Normal file
30
web_src/css/modules/dimmer.css
Normal file
@ -0,0 +1,30 @@
|
||||
/* These are the remnants of the fomantic dimmer module */
|
||||
|
||||
.ui.dimmer {
|
||||
position: fixed;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: var(--color-overlay-backdrop);
|
||||
opacity: 0;
|
||||
z-index: 1000;
|
||||
overflow-y: auto;
|
||||
justify-content: center;
|
||||
padding: 8px 0;
|
||||
animation-name: fadein;
|
||||
animation-duration: .2s;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.ui.active.dimmer {
|
||||
display: flex;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.ui.dimmer > * {
|
||||
position: static;
|
||||
margin-top: auto !important;
|
||||
margin-bottom: auto !important;
|
||||
}
|
357
web_src/fomantic/build/semantic.css
generated
357
web_src/fomantic/build/semantic.css
generated
File diff suppressed because it is too large
Load Diff
754
web_src/fomantic/build/semantic.js
generated
754
web_src/fomantic/build/semantic.js
generated
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,6 @@
|
||||
"admin": false,
|
||||
"components": [
|
||||
"api",
|
||||
"dimmer",
|
||||
"dropdown",
|
||||
"form",
|
||||
"modal",
|
||||
|
@ -5,6 +5,7 @@ import {initAriaFormFieldPatch} from './fomantic/form.js';
|
||||
import {initAriaDropdownPatch} from './fomantic/dropdown.js';
|
||||
import {initAriaModalPatch} from './fomantic/modal.js';
|
||||
import {initFomanticTransition} from './fomantic/transition.js';
|
||||
import {initFomanticDimmer} from './fomantic/dimmer.js';
|
||||
import {svg} from '../svg.js';
|
||||
|
||||
export const fomanticMobileScreen = window.matchMedia('only screen and (max-width: 767.98px)');
|
||||
@ -24,6 +25,7 @@ export function initGiteaFomantic() {
|
||||
};
|
||||
|
||||
initFomanticTransition();
|
||||
initFomanticDimmer();
|
||||
initFomanticApiPatch();
|
||||
|
||||
// Use the patches to improve accessibility, these patches are designed to be as independent as possible, make it easy to modify or remove in the future.
|
||||
|
29
web_src/js/modules/fomantic/dimmer.js
Normal file
29
web_src/js/modules/fomantic/dimmer.js
Normal file
@ -0,0 +1,29 @@
|
||||
import $ from 'jquery';
|
||||
import {queryElemChildren} from '../../utils/dom.js';
|
||||
|
||||
export function initFomanticDimmer() {
|
||||
// stand-in for removed dimmer module
|
||||
$.fn.dimmer = function (arg0, $el) {
|
||||
if (arg0 === 'add content') {
|
||||
const existingDimmer = document.querySelector('body > .ui.dimmer');
|
||||
if (existingDimmer) {
|
||||
queryElemChildren(existingDimmer, '*', (el) => el.remove());
|
||||
this._dimmer = existingDimmer;
|
||||
} else {
|
||||
this._dimmer = document.createElement('div');
|
||||
this._dimmer.classList.add('ui', 'dimmer');
|
||||
document.body.append(this._dimmer);
|
||||
}
|
||||
this._dimmer.append($el[0]);
|
||||
} else if (arg0 === 'get dimmer') {
|
||||
return $(this._dimmer);
|
||||
} else if (arg0 === 'show') {
|
||||
this._dimmer.classList.add('active');
|
||||
document.body.classList.add('tw-overflow-hidden');
|
||||
} else if (arg0 === 'hide') {
|
||||
this._dimmer.classList.remove('active');
|
||||
document.body.classList.remove('tw-overflow-hidden');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user