BUILD BEFORE CHANGE NEW COMPONENTS WITH UI FUNCTION
This commit is contained in:
47
index.js
47
index.js
@@ -1,40 +1,25 @@
|
||||
/**
|
||||
* SigproUI - Entry Point
|
||||
*/
|
||||
|
||||
// index.js
|
||||
import 'sigpro';
|
||||
// import './src/css/sigpro.css'; // No importes CSS en JS
|
||||
import * as Components from './src/components/index.js';
|
||||
|
||||
import * as Icons from './src/core/icons.js';
|
||||
// import * as Icons from './src/core/icons.js'; // ELIMINAR
|
||||
import * as Utils from './src/core/utils.js';
|
||||
import { tt } from './src/core/i18n.js';
|
||||
|
||||
|
||||
export * from './src/components/index.js';
|
||||
export * from './src/core/icons.js';
|
||||
// export * from './src/core/icons.js'; // ELIMINAR
|
||||
export * from './src/core/utils.js';
|
||||
export { tt };
|
||||
|
||||
const SigproUI = {
|
||||
...Components,
|
||||
Icons,
|
||||
Utils,
|
||||
tt,
|
||||
|
||||
install: (target = (typeof window !== 'undefined' ? window : {})) => {
|
||||
Object.entries(Components).forEach(([name, component]) => {
|
||||
target[name] = component;
|
||||
});
|
||||
|
||||
target.Icons = Icons;
|
||||
target.Utils = Utils;
|
||||
target.tt = tt;
|
||||
|
||||
console.log("🌟 SigproUI");
|
||||
}
|
||||
};
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
SigproUI.install(window);
|
||||
}
|
||||
|
||||
export default SigproUI;
|
||||
Object.entries(Components).forEach(([name, component]) => {
|
||||
window[name] = component;
|
||||
});
|
||||
|
||||
// window.Icons = Icons; // ELIMINAR
|
||||
window.Utils = Utils;
|
||||
window.tt = tt;
|
||||
window.SigProUI = { ...Components, Utils, tt };
|
||||
|
||||
console.log("🎨 SigProUI ready");
|
||||
}
|
||||
Reference in New Issue
Block a user