feat: theme toasts and move elements styling to their js

This commit is contained in:
Herculino Trotta
2025-11-22 03:04:00 -03:00
parent 605ece705e
commit 1eeb0b0f5e
5 changed files with 117 additions and 17 deletions

View File

@@ -1,21 +1,11 @@
import { delegate } from 'tippy.js';
import {delegate} from 'tippy.js';
import 'tippy.js/dist/tippy.css';
import 'tippy.js/themes/light-border.css';
import '../styles/_toasts.scss'
function initiateTooltips() {
const currentDataTheme = document.documentElement.getAttribute('data-theme') || '';
let theme;
if (currentDataTheme.endsWith('_dark')) {
theme = 'light-border';
} else if (currentDataTheme.endsWith('_light')) {
theme = 'dark';
}
delegate(document.body, {
target: '[data-tippy-content]',
theme: theme,
theme: "wygiwyh",
zIndex: 1089,
content(reference) {
return reference.getAttribute('data-tippy-content');

View File

@@ -1,5 +1,6 @@
import AirDatepicker from 'air-datepicker';
import {createPopper} from '@popperjs/core';
import '../styles/_datepicker.scss'
// --- Static Locale Imports ---
// We import all locales statically to ensure Vite transforms them correctly.

View File

@@ -1,7 +1,6 @@
// import 'tom-select/dist/css/tom-select.default.min.css';
import TomSelect from "tom-select";
import * as Popper from "@popperjs/core";
import '../styles/_tom-select.scss'
window.TomSelect = function createDynamicTomSelect(element) {