diff --git a/.changeset/bootstrap-exports-cleanup.md b/.changeset/bootstrap-exports-cleanup.md new file mode 100644 index 000000000..2e54533d2 --- /dev/null +++ b/.changeset/bootstrap-exports-cleanup.md @@ -0,0 +1,5 @@ +--- +"@tabler/core": patch +--- + +Refactored Bootstrap exports to use single source of truth in `bootstrap.js` and removed duplicate exports from `tabler.js` for better maintainability. diff --git a/core/js/src/bootstrap.js b/core/js/src/bootstrap.js index 5d2d8ff3f..531c212dd 100644 --- a/core/js/src/bootstrap.js +++ b/core/js/src/bootstrap.js @@ -1,3 +1,20 @@ export * as Popper from '@popperjs/core' -export { Dropdown, Tooltip, Popover, Tab, Toast } from 'bootstrap' +// Export all Bootstrap components directly for consistent usage +export { + Alert, + Button, + Carousel, + Collapse, + Dropdown, + Modal, + Offcanvas, + Popover, + ScrollSpy, + Tab, + Toast, + Tooltip +} from 'bootstrap' + +// Re-export everything as namespace for backward compatibility +export * as bootstrap from 'bootstrap' diff --git a/core/js/tabler.js b/core/js/tabler.js index 2983123e3..1c2a4288a 100644 --- a/core/js/tabler.js +++ b/core/js/tabler.js @@ -9,7 +9,8 @@ import './src/tab' import './src/toast' import './src/sortable' -export * as bootstrap from 'bootstrap' -export * as tabler from './src/tabler' +// Re-export everything from bootstrap.js (single source of truth) +export * from './src/bootstrap' -export { Alert, Modal, Toast, Tooltip, Tab, Button, Carousel, Collapse, Dropdown, Popover, ScrollSpy, Offcanvas } from 'bootstrap' +// Re-export tabler namespace +export * as tabler from './src/tabler'