From: Mark Otto Date: Sat, 21 Mar 2026 16:03:17 +0000 (-0700) Subject: Nav & Tab docs updates, plus add Chip Input to JS bundle (#42214) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cee9d6dc0b48d3856f5dba769787f0a84d394b66;p=thirdparty%2Fbootstrap.git Nav & Tab docs updates, plus add Chip Input to JS bundle (#42214) * Document data attributes * Split nav and tab docs * Fix v6 todo: reduce selectors in JS tab plugin * fix css lint * bump bw * fix ids --- diff --git a/.bundlewatch.config.json b/.bundlewatch.config.json index f3919c52c7..305ddefb56 100644 --- a/.bundlewatch.config.json +++ b/.bundlewatch.config.json @@ -34,19 +34,19 @@ }, { "path": "./dist/js/bootstrap.bundle.js", - "maxSize": "70.0 kB" + "maxSize": "72.5 kB" }, { "path": "./dist/js/bootstrap.bundle.min.js", - "maxSize": "49.25 kB" + "maxSize": "51.0 kB" }, { "path": "./dist/js/bootstrap.js", - "maxSize": "41.0 kB" + "maxSize": "43.5 kB" }, { "path": "./dist/js/bootstrap.min.js", - "maxSize": "27.0 kB" + "maxSize": "28.75 kB" } ], "ci": { diff --git a/js/index.js b/js/index.js index 45bd3086ef..abba7cd17f 100644 --- a/js/index.js +++ b/js/index.js @@ -17,6 +17,7 @@ export { default as NavOverflow } from './src/nav-overflow.js' export { default as Offcanvas } from './src/offcanvas.js' export { default as Strength } from './src/strength.js' export { default as OtpInput } from './src/otp-input.js' +export { default as ChipInput } from './src/chip-input.js' export { default as Popover } from './src/popover.js' export { default as ScrollSpy } from './src/scrollspy.js' export { default as Tab } from './src/tab.js' diff --git a/js/src/tab.js b/js/src/tab.js index b32e08236f..f02519eb97 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -43,10 +43,10 @@ const NOT_SELECTOR_MENU_TOGGLE = `:not(${SELECTOR_MENU_TOGGLE})` const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]' const SELECTOR_OUTER = '.nav-item, .list-group-item' const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_MENU_TOGGLE}, .list-group-item${NOT_SELECTOR_MENU_TOGGLE}, [role="tab"]${NOT_SELECTOR_MENU_TOGGLE}` -const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]' // TODO: could only be `tab` in v6 +const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"]' const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}` -const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]` +const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"]` /** * Class definition diff --git a/site/data/plugins.yml b/site/data/plugins.yml index 191740aaf0..7333ce4d4d 100644 --- a/site/data/plugins.yml +++ b/site/data/plugins.yml @@ -40,7 +40,7 @@ - name: Tab description: Allow Bootstrap nav components to toggle contents. - link: components/navs-tabs/ + link: components/tab/ - name: Toast description: Show and hide notifications to your visitors. diff --git a/site/data/sidebar.yml b/site/data/sidebar.yml index 0a17e0f361..143693eb72 100644 --- a/site/data/sidebar.yml +++ b/site/data/sidebar.yml @@ -109,7 +109,8 @@ pages: - title: Breadcrumb - title: Menu - - title: Navs & tabs + - title: Nav + - title: Tab - title: Nav overflow - title: Navbar - title: Pagination diff --git a/site/src/assets/examples/cheatsheet/index.astro b/site/src/assets/examples/cheatsheet/index.astro index c4cc275804..19387f1dc7 100644 --- a/site/src/assets/examples/cheatsheet/index.astro +++ b/site/src/assets/examples/cheatsheet/index.astro @@ -1118,7 +1118,7 @@ export const body_class = 'bg-body-tertiary'