mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
fix: refactor Bootstrap exports for consistency (#2545)
This commit is contained in:
5
.changeset/bootstrap-exports-cleanup.md
Normal file
5
.changeset/bootstrap-exports-cleanup.md
Normal file
@@ -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.
|
||||||
19
core/js/src/bootstrap.js
vendored
19
core/js/src/bootstrap.js
vendored
@@ -1,3 +1,20 @@
|
|||||||
export * as Popper from '@popperjs/core'
|
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'
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ import './src/tab'
|
|||||||
import './src/toast'
|
import './src/toast'
|
||||||
import './src/sortable'
|
import './src/sortable'
|
||||||
|
|
||||||
export * as bootstrap from 'bootstrap'
|
// Re-export everything from bootstrap.js (single source of truth)
|
||||||
export * as tabler from './src/tabler'
|
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'
|
||||||
|
|||||||
Reference in New Issue
Block a user