Apply theme to 5.3.8

This commit is contained in:
ThePetrovich 2026-08-17 22:24:19 +08:00
parent f203f0c103
commit be164cfe0a
930 changed files with 53160 additions and 42297 deletions

12
.babelrc.js Normal file
View file

@ -0,0 +1,12 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
loose: true,
bugfixes: true,
modules: false
}
]
]
};

12
.browserslistrc Normal file
View file

@ -0,0 +1,12 @@
# https://github.com/browserslist/browserslist#readme
>= 0.5%
last 2 major versions
not dead
Chrome >= 60
Firefox >= 60
Firefox ESR
iOS >= 12
Safari >= 12
not Explorer <= 11
not kaios <= 2.5 # fix floating label issues in Firefox (see https://github.com/postcss/autoprefixer/issues/1533)

45
.gitignore vendored Normal file
View file

@ -0,0 +1,45 @@
# Ignore docs files
/_site/
# Numerous always-ignore extensions
*.diff
*.err
*.log
*.orig
*.rej
*.swo
*.swp
*.vi
*.zip
*~
# OS or Editor folders
._*
.cache
.DS_Store
.idea
.project
.settings
.tmproj
*.esproj
*.sublime-project
*.sublime-workspace
nbproject
Thumbs.db
# Local Netlify folder
.netlify
# Komodo
.komodotools
*.komodoproject
# Folders to ignore
/dist-sass/
/js/coverage/
/node_modules/
# Site
/site/dist
/site/node_modules
/site/.astro
/site/public

View file

@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our Examples of behavior that contributes to a positive environment for our
community include: community include:
* Demonstrating empathy and kindness toward other people - Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences - Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback - Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, - Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall - Focusing on what is best not just for us as individuals, but for the overall
community community
Examples of unacceptable behavior include: Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of - The use of sexualized language or imagery, and sexual attention or advances of
any kind any kind
* Trolling, insulting or derogatory comments, and personal or political attacks - Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment - Public or private harassment
* Publishing others' private information, such as a physical or email address, - Publishing others private information, such as a physical or email address,
without their explicit permission without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a - Other conduct which could reasonably be considered inappropriate in a
professional setting professional setting
## Enforcement Responsibilities ## Enforcement Responsibilities

View file

@ -1,7 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2011-2022 Twitter, Inc. Copyright (c) 2011-2025 The Bootstrap Authors
Copyright (c) 2011-2022 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -1,6 +1,6 @@
<p align="center"> <p align="center">
<a href="https://getbootstrap.com/"> <a href="https://getbootstrap.com/">
<img src="https://getbootstrap.com/docs/5.2/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165"> <img src="https://getbootstrap.com/docs/5.3/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
</a> </a>
</p> </p>
@ -9,15 +9,13 @@
<p align="center"> <p align="center">
Sleek, intuitive, and powerful front-end framework for faster and easier web development. Sleek, intuitive, and powerful front-end framework for faster and easier web development.
<br> <br>
<a href="https://getbootstrap.com/docs/5.2/"><strong>Explore Bootstrap docs »</strong></a> <a href="https://getbootstrap.com/docs/5.3/"><strong>Explore Bootstrap docs »</strong></a>
<br> <br>
<br> <br>
<a href="https://github.com/twbs/bootstrap/issues/new?assignees=-&labels=bug&template=bug_report.yml">Report bug</a> <a href="https://github.com/twbs/bootstrap/issues/new?assignees=-&labels=bug&template=bug_report.yml">Report bug</a>
· ·
<a href="https://github.com/twbs/bootstrap/issues/new?assignees=&labels=feature&template=feature_request.yml">Request feature</a> <a href="https://github.com/twbs/bootstrap/issues/new?assignees=&labels=feature&template=feature_request.yml">Request feature</a>
· ·
<a href="https://themes.getbootstrap.com/">Themes</a>
·
<a href="https://blog.getbootstrap.com/">Blog</a> <a href="https://blog.getbootstrap.com/">Blog</a>
</p> </p>
@ -31,7 +29,7 @@ Our default branch is for development of our Bootstrap 5 release. Head to the [`
- [Quick start](#quick-start) - [Quick start](#quick-start)
- [Status](#status) - [Status](#status)
- [What's included](#whats-included) - [Whats included](#whats-included)
- [Bugs and feature requests](#bugs-and-feature-requests) - [Bugs and feature requests](#bugs-and-feature-requests)
- [Documentation](#documentation) - [Documentation](#documentation)
- [Contributing](#contributing) - [Contributing](#contributing)
@ -46,37 +44,38 @@ Our default branch is for development of our Bootstrap 5 release. Head to the [`
Several quick start options are available: Several quick start options are available:
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.2.3.zip) - [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.3.8.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` - Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@v5.2.3` - Install with [npm](https://www.npmjs.com/): `npm install bootstrap@v5.3.8`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@v5.2.3` - Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@v5.3.8`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.2.3` - Install with [Bun](https://bun.sh/): `bun add bootstrap@v5.3.8`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.3.8`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass` - Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
Read the [Getting started page](https://getbootstrap.com/docs/5.2/getting-started/introduction/) for information on the framework contents, templates, examples, and more. Read the [Getting started page](https://getbootstrap.com/docs/5.3/getting-started/introduction/) for information on the framework contents, templates, examples, and more.
## Status ## Status
[![Build Status](https://img.shields.io/github/workflow/status/twbs/bootstrap/JS%20Tests/main?label=JS%20Tests&logo=github)](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Amain) [![Build Status](https://img.shields.io/github/actions/workflow/status/twbs/bootstrap/js.yml?branch=main&label=JS%20Tests&logo=github)](https://github.com/twbs/bootstrap/actions/workflows/js.yml?query=workflow%3AJS+branch%3Amain)
[![npm version](https://img.shields.io/npm/v/bootstrap)](https://www.npmjs.com/package/bootstrap) [![npm version](https://img.shields.io/npm/v/bootstrap?logo=npm&logoColor=fff)](https://www.npmjs.com/package/bootstrap)
[![Gem version](https://img.shields.io/gem/v/bootstrap)](https://rubygems.org/gems/bootstrap) [![Gem version](https://img.shields.io/gem/v/bootstrap?logo=rubygems&logoColor=fff)](https://rubygems.org/gems/bootstrap)
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue)](https://atmospherejs.com/twbs/bootstrap) [![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue?logo=meteor&logoColor=fff)](https://atmospherejs.com/twbs/bootstrap)
[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap)](https://packagist.org/packages/twbs/bootstrap) [![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap?logo=packagist&logoColor=fff)](https://packagist.org/packages/twbs/bootstrap)
[![NuGet](https://img.shields.io/nuget/vpre/bootstrap)](https://www.nuget.org/packages/bootstrap/absoluteLatest) [![NuGet](https://img.shields.io/nuget/vpre/bootstrap?logo=nuget&logoColor=fff)](https://www.nuget.org/packages/bootstrap/absoluteLatest)
[![Coverage Status](https://img.shields.io/coveralls/github/twbs/bootstrap/main)](https://coveralls.io/github/twbs/bootstrap?branch=main) [![Coverage Status](https://img.shields.io/coveralls/github/twbs/bootstrap/main?logo=coveralls&logoColor=fff)](https://coveralls.io/github/twbs/bootstrap?branch=main)
[![CSS gzip size](https://img.badgesize.io/twbs/bootstrap/main/dist/css/bootstrap.min.css?compression=gzip&label=CSS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css) [![CSS gzip size](https://img.badgesize.io/twbs/bootstrap/main/dist/css/bootstrap.min.css?compression=gzip&label=CSS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css)
[![CSS Brotli size](https://img.badgesize.io/twbs/bootstrap/main/dist/css/bootstrap.min.css?compression=brotli&label=CSS%20Brotli%20size)](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css) [![CSS Brotli size](https://img.badgesize.io/twbs/bootstrap/main/dist/css/bootstrap.min.css?compression=brotli&label=CSS%20Brotli%20size)](https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.min.css)
[![JS gzip size](https://img.badgesize.io/twbs/bootstrap/main/dist/js/bootstrap.min.js?compression=gzip&label=JS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js) [![JS gzip size](https://img.badgesize.io/twbs/bootstrap/main/dist/js/bootstrap.min.js?compression=gzip&label=JS%20gzip%20size)](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js)
[![JS Brotli size](https://img.badgesize.io/twbs/bootstrap/main/dist/js/bootstrap.min.js?compression=brotli&label=JS%20Brotli%20size)](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js) [![JS Brotli size](https://img.badgesize.io/twbs/bootstrap/main/dist/js/bootstrap.min.js?compression=brotli&label=JS%20Brotli%20size)](https://github.com/twbs/bootstrap/blob/main/dist/js/bootstrap.min.js)
[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229) ![Open Source Security Foundation Scorecard](https://img.shields.io/ossf-scorecard/github.com/twbs/bootstrap)
[![Backers on Open Collective](https://img.shields.io/opencollective/backers/bootstrap)](#backers) [![Backers on Open Collective](https://img.shields.io/opencollective/backers/bootstrap?logo=opencollective&logoColor=fff)](#backers)
[![Sponsors on Open Collective](https://img.shields.io/opencollective/sponsors/bootstrap)](#sponsors) [![Sponsors on Open Collective](https://img.shields.io/opencollective/sponsors/bootstrap?logo=opencollective&logoColor=fff)](#sponsors)
## What's included ## Whats included
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. Within the download youll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.
<details> <details>
<summary>Download contents</summary> <summary>Download contents</summary>
@ -132,7 +131,7 @@ Within the download you'll find the following directories and files, logically g
``` ```
</details> </details>
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/). We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [Source maps](https://web.dev/articles/source-maps) (`bootstrap.*.map`) are available for use with certain browsers developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/docs/v2/).
## Bugs and feature requests ## Bugs and feature requests
@ -142,18 +141,18 @@ Have a bug or a feature request? Please first read the [issue guidelines](https:
## Documentation ## Documentation
Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally. Bootstraps documentation, included in this repo in the root directory, is built with [Astro](https://astro.build/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
Documentation search is powered by [Algolia's DocSearch](https://docsearch.algolia.com/). Working on our search? Be sure to set `debug: true` in `site/assets/js/search.js`. Documentation search is powered by [Algolia's DocSearch](https://docsearch.algolia.com/).
### Running documentation locally ### Running documentation locally
1. Run `npm install` to install the Node.js dependencies, including Hugo (the site builder). 1. Run `npm install` to install the Node.js dependencies, including Astro (the site builder).
2. Run `npm run test` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets. 2. Run `npm run test` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
3. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line. 3. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line.
4. Open `http://localhost:9001/` in your browser, and voilà. 4. Open <http://localhost:9001> in your browser, and voilà.
Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/). Learn more about using Astro by reading its [documentation](https://docs.astro.build/en/getting-started/).
### Documentation for previous releases ### Documentation for previous releases
@ -173,11 +172,12 @@ Editor preferences are available in the [editor config](https://github.com/twbs/
## Community ## Community
Get updates on Bootstrap's development and chat with the project maintainers and community members. Get updates on Bootstraps development and chat with the project maintainers and community members.
- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap). - Follow [@getbootstrap on X](https://x.com/getbootstrap).
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/). - Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
- Ask and explore [our GitHub Discussions](https://github.com/twbs/bootstrap/discussions). - Ask questions and explore [our GitHub Discussions](https://github.com/twbs/bootstrap/discussions).
- Discuss, ask questions, and more on [the community Discord](https://discord.gg/bZUvakRU3M) or [Bootstrap subreddit](https://www.reddit.com/r/bootstrap/).
- Chat with fellow Bootstrappers in IRC. On the `irc.libera.chat` server, in the `#bootstrap` channel. - Chat with fellow Bootstrappers in IRC. On the `irc.libera.chat` server, in the `#bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)). - Implementation help may be found at Stack Overflow (tagged [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5)).
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability. - Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
@ -194,12 +194,12 @@ See [the Releases section of our GitHub project](https://github.com/twbs/bootstr
**Mark Otto** **Mark Otto**
- <https://twitter.com/mdo> - <https://x.com/mdo>
- <https://github.com/mdo> - <https://github.com/mdo>
**Jacob Thornton** **Jacob Thornton**
- <https://twitter.com/fat> - <https://x.com/fat>
- <https://github.com/fat> - <https://github.com/fat>
@ -243,4 +243,4 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
## Copyright and license ## Copyright and license
Code and documentation copyright 20112022 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/). Code and documentation copyright 2011-2025 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors). Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).

View file

@ -1,15 +0,0 @@
{
"env": {
"browser": false,
"node": true
},
"parserOptions": {
"sourceType": "script"
},
"extends": "../.eslintrc.json",
"rules": {
"no-console": "off",
"strict": "error",
"unicorn/prefer-top-level-await": "off"
}
}

View file

@ -1,6 +1,12 @@
'use strict' import fs from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const pkgJson = path.join(__dirname, '../package.json')
const pkg = JSON.parse(await fs.readFile(pkgJson, 'utf8'))
const pkg = require('../package.json')
const year = new Date().getFullYear() const year = new Date().getFullYear()
function getBanner(pluginFilename) { function getBanner(pluginFilename) {
@ -11,4 +17,4 @@ function getBanner(pluginFilename) {
*/` */`
} }
module.exports = getBanner export default getBanner

View file

@ -2,21 +2,22 @@
/*! /*!
* Script to build our plugins to use them separately. * Script to build our plugins to use them separately.
* Copyright 2020-2022 The Bootstrap Authors * Copyright 2020-2025 The Bootstrap Authors
* Copyright 2020-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
'use strict' import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { babel } from '@rollup/plugin-babel'
import { globby } from 'globby'
import { rollup } from 'rollup'
import banner from './banner.mjs'
const path = require('node:path') const __filename = fileURLToPath(import.meta.url)
const rollup = require('rollup') const __dirname = path.dirname(fileURLToPath(import.meta.url))
const globby = require('globby')
const { babel } = require('@rollup/plugin-babel')
const banner = require('./banner.js')
const sourcePath = path.resolve(__dirname, '../js/src/').replace(/\\/g, '/') const sourcePath = path.resolve(__dirname, '../js/src/').replace(/\\/g, '/')
const jsFiles = globby.sync(sourcePath + '/**/*.js') const jsFiles = await globby(`${sourcePath}/**/*.js`)
// Array which holds the resolved plugins // Array which holds the resolved plugins
const resolvedPlugins = [] const resolvedPlugins = []
@ -27,7 +28,7 @@ const filenameToEntity = filename => filename.replace('.js', '')
for (const file of jsFiles) { for (const file of jsFiles) {
resolvedPlugins.push({ resolvedPlugins.push({
src: file.replace('.js', ''), src: file,
dist: file.replace('src', 'dist'), dist: file.replace('src', 'dist'),
fileName: path.basename(file), fileName: path.basename(file),
className: filenameToEntity(path.basename(file)) className: filenameToEntity(path.basename(file))
@ -36,9 +37,12 @@ for (const file of jsFiles) {
} }
const build = async plugin => { const build = async plugin => {
/**
* @type {import('rollup').GlobalsOption}
*/
const globals = {} const globals = {}
const bundle = await rollup.rollup({ const bundle = await rollup({
input: plugin.src, input: plugin.src,
plugins: [ plugins: [
babel({ babel({

View file

@ -1,81 +0,0 @@
#!/usr/bin/env node
/*!
* Script to update version number references in the project.
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
'use strict'
const fs = require('node:fs').promises
const path = require('node:path')
const globby = require('globby')
const VERBOSE = process.argv.includes('--verbose')
const DRY_RUN = process.argv.includes('--dry') || process.argv.includes('--dry-run')
// These are the filetypes we only care about replacing the version
const GLOB = [
'**/*.{css,html,js,json,md,scss,txt,yml}'
]
const GLOBBY_OPTIONS = {
cwd: path.join(__dirname, '..'),
gitignore: true
}
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
function regExpQuote(string) {
return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&')
}
function regExpQuoteReplacement(string) {
return string.replace(/\$/g, '$$')
}
async function replaceRecursively(file, oldVersion, newVersion) {
const originalString = await fs.readFile(file, 'utf8')
const newString = originalString.replace(
new RegExp(regExpQuote(oldVersion), 'g'), regExpQuoteReplacement(newVersion)
)
// No need to move any further if the strings are identical
if (originalString === newString) {
return
}
if (VERBOSE) {
console.log(`FILE: ${file}`)
}
if (DRY_RUN) {
return
}
await fs.writeFile(file, newString, 'utf8')
}
async function main(args) {
let [oldVersion, newVersion] = args
if (!oldVersion || !newVersion) {
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
console.error('Got arguments:', args)
process.exit(1)
}
// Strip any leading `v` from arguments because otherwise we will end up with duplicate `v`s
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)
try {
const files = await globby(GLOB, GLOBBY_OPTIONS)
await Promise.all(files.map(file => replaceRecursively(file, oldVersion, newVersion)))
} catch (error) {
console.error(error)
process.exit(1)
}
}
main(process.argv.slice(2))

113
build/change-version.mjs Normal file
View file

@ -0,0 +1,113 @@
#!/usr/bin/env node
/*!
* Script to update version number references in the project.
* Copyright 2017-2025 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
import { execFile } from 'node:child_process'
import fs from 'node:fs/promises'
import process from 'node:process'
const VERBOSE = process.argv.includes('--verbose')
const DRY_RUN = process.argv.includes('--dry') || process.argv.includes('--dry-run')
// These are the files we only care about replacing the version
const FILES = [
'README.md',
'config.yml',
'js/src/base-component.js',
'package.js',
'scss/mixins/_banner.scss',
'site/data/docs-versions.yml'
]
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
function regExpQuote(string) {
return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&')
}
function regExpQuoteReplacement(string) {
return string.replace(/\$/g, '$$')
}
async function replaceRecursively(file, oldVersion, newVersion) {
const originalString = await fs.readFile(file, 'utf8')
const newString = originalString
.replace(
new RegExp(regExpQuote(oldVersion), 'g'),
regExpQuoteReplacement(newVersion)
)
// Also replace the version used by the rubygem,
// which is using periods (`.`) instead of hyphens (`-`)
.replace(
new RegExp(regExpQuote(oldVersion.replace(/-/g, '.')), 'g'),
regExpQuoteReplacement(newVersion.replace(/-/g, '.'))
)
// No need to move any further if the strings are identical
if (originalString === newString) {
return
}
if (VERBOSE) {
console.log(`Found ${oldVersion} in ${file}`)
}
if (DRY_RUN) {
return
}
await fs.writeFile(file, newString, 'utf8')
}
function bumpNpmVersion(newVersion) {
if (DRY_RUN) {
return
}
execFile('npm', ['version', newVersion, '--no-git-tag'], { shell: true }, error => {
if (error) {
console.error(error)
process.exit(1)
}
})
}
function showUsage(args) {
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
console.error('Got arguments:', args)
process.exit(1)
}
async function main(args) {
let [oldVersion, newVersion] = args
if (!oldVersion || !newVersion) {
showUsage(args)
}
// Strip any leading `v` from arguments because
// otherwise we will end up with duplicate `v`s
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => {
return arg.startsWith('v') ? arg.slice(1) : arg
})
if (oldVersion === newVersion) {
showUsage(args)
}
bumpNpmVersion(newVersion)
try {
await Promise.all(
FILES.map(file => replaceRecursively(file, oldVersion, newVersion))
)
} catch (error) {
console.error(error)
process.exit(1)
}
}
main(process.argv.slice(2))

157
build/docs-prep.sh Executable file
View file

@ -0,0 +1,157 @@
#!/bin/bash
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Default branch suffix
BRANCH_SUFFIX="release"
# Check if a custom version parameter was provided
if [ $# -eq 1 ]; then
BRANCH_SUFFIX="$1"
fi
# Branch name to create
NEW_BRANCH="gh-pages-${BRANCH_SUFFIX}"
# Get the current docs version from config
DOCS_VERSION=$(node -p "require('js-yaml').load(require('fs').readFileSync('config.yml', 'utf8')).docs_version")
# Function to print colored messages
print_success() {
echo -e "${GREEN}$1${NC}"
}
print_error() {
echo -e "${RED}$1${NC}"
exit 1
}
print_info() {
echo -e "${BLUE} $1${NC}"
}
print_warning() {
echo -e "${YELLOW}$1${NC}"
}
# Function to execute command with error handling
execute() {
print_info "Running: $1"
eval $1
if [ $? -ne 0 ]; then
print_error "Failed to execute: $1"
else
print_success "Successfully executed: $1"
fi
}
# Check if /tmp/_site directory exists from a previous run
if [ -d "/tmp/_site" ]; then
print_warning "Found existing /tmp/_site directory. Removing it…"
rm -rf /tmp/_site
fi
# Main process
print_info "Starting documentation deployment process…"
# Step 1: Build documentation
print_info "Building documentation with npm run docs…"
npm run docs
if [ $? -ne 0 ]; then
print_error "Documentation build failed!"
fi
print_success "Documentation built successfully"
# Step 2: Move _site to /tmp/
print_info "Moving _site to temporary location…"
execute "mv _site /tmp/"
# Step 3: Switch to gh-pages branch
print_info "Checking out gh-pages branch…"
git checkout gh-pages
if [ $? -ne 0 ]; then
print_error "Failed to checkout gh-pages branch. Make sure it exists."
fi
print_success "Switched to gh-pages branch"
git reset --hard origin/gh-pages
if [ $? -ne 0 ]; then
print_error "Failed to reset to origin/gh-pages. Check your git configuration."
fi
print_success "Reset to origin/gh-pages"
git pull origin gh-pages
if [ $? -ne 0 ]; then
print_error "Failed to pull from origin/gh-pages. Check your network connection and git configuration."
fi
print_success "Pulled latest changes from origin/gh-pages"
# Step 4: Create a new branch for the update
print_info "Checking if branch ${NEW_BRANCH} exists and deleting it if it does…"
if git show-ref --verify --quiet refs/heads/${NEW_BRANCH}; then
execute "git branch -D ${NEW_BRANCH}"
else
print_info "Branch ${NEW_BRANCH} does not exist, proceeding with creation…"
fi
print_info "Creating new branch ${NEW_BRANCH}"
execute "git checkout -b ${NEW_BRANCH}"
# Step 5: Move all root-level files from Astro build
find /tmp/_site -maxdepth 1 -type f -exec mv {} . \;
# Step 6: Move all top-level directories except 'docs' (which needs special handling)
find /tmp/_site -maxdepth 1 -type d ! -name "_site" ! -name "docs" -exec sh -c 'dir=$(basename "$1"); rm -rf "$dir"; mv "$1" .' _ {} \;
# Step 7: Handle docs directory specially
if [ -d "/tmp/_site/docs" ]; then
# Replace only the current version's docs
if [ -d "docs/$DOCS_VERSION" ]; then
rm -rf "docs/$DOCS_VERSION"
fi
mv "/tmp/_site/docs/$DOCS_VERSION" "docs/"
# Handle docs root files
find /tmp/_site/docs -maxdepth 1 -type f -exec mv {} docs/ \;
# Handle special docs directories (getting-started, versions)
for special_dir in getting-started versions; do
if [ -d "/tmp/_site/docs/$special_dir" ]; then
rm -rf "docs/$special_dir"
mv "/tmp/_site/docs/$special_dir" "docs/"
fi
done
fi
# Clean up remaining files in /tmp/_site if any
if [ -d "/tmp/_site" ]; then
remaining_files=$(find /tmp/_site -type f | wc -l)
remaining_dirs=$(find /tmp/_site -type d | wc -l)
if [ $remaining_files -gt 0 ] || [ $remaining_dirs -gt 1 ]; then
print_warning "There are still some files or directories in /tmp/_site that weren't moved."
print_warning "You may want to inspect /tmp/_site to see if anything important was missed."
else
print_info "Cleaning up temporary directory…"
rm -rf /tmp/_site
print_success "Temporary directory cleaned up"
fi
fi
# Step 10: Remove empty site directory if it exists
if [ -d "site" ]; then
print_info "Removing empty site directory…"
execute "rm -rf site"
fi
print_success "Docs prep complete!"
print_info "Review changes before committing and pushing."
print_info "Next steps:"
print_info " 1. Run a local server to review changes"
print_info " 2. Check browser and web inspector for any errors"
print_info " 3. git add ."
print_info " 4. git commit -m \"Update documentation\""
print_info " 5. git push origin ${NEW_BRANCH}"

View file

@ -5,17 +5,17 @@
* Remember to use the same vendor files as the CDN ones, * Remember to use the same vendor files as the CDN ones,
* otherwise the hashes won't match! * otherwise the hashes won't match!
* *
* Copyright 2017-2022 The Bootstrap Authors * Copyright 2017-2025 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
'use strict' import crypto from 'node:crypto'
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import sh from 'shelljs'
const crypto = require('node:crypto') const __dirname = path.dirname(fileURLToPath(import.meta.url))
const fs = require('node:fs')
const path = require('node:path')
const sh = require('shelljs')
sh.config.fatal = true sh.config.fatal = true
@ -47,18 +47,18 @@ const files = [
} }
] ]
for (const file of files) { for (const { file, configPropertyName } of files) {
fs.readFile(file.file, 'utf8', (error, data) => { fs.readFile(file, 'utf8', (error, data) => {
if (error) { if (error) {
throw error throw error
} }
const algo = 'sha384' const algorithm = 'sha384'
const hash = crypto.createHash(algo).update(data, 'utf8').digest('base64') const hash = crypto.createHash(algorithm).update(data, 'utf8').digest('base64')
const integrity = `${algo}-${hash}` const integrity = `${algorithm}-${hash}`
console.log(`${file.configPropertyName}: ${integrity}`) console.log(`${configPropertyName}: ${integrity}`)
sh.sed('-i', new RegExp(`^(\\s+${file.configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile) sh.sed('-i', new RegExp(`^(\\s+${configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
}) })
} }

View file

@ -1,12 +1,10 @@
'use strict'
const mapConfig = { const mapConfig = {
inline: false, inline: false,
annotation: true, annotation: true,
sourcesContent: true sourcesContent: true
} }
module.exports = context => { export default context => {
return { return {
map: context.file.dirname.includes('examples') ? false : mapConfig, map: context.file.dirname.includes('examples') ? false : mapConfig,
plugins: { plugins: {

View file

@ -1,15 +1,17 @@
'use strict' import path from 'node:path'
import process from 'node:process'
import { fileURLToPath } from 'node:url'
import { babel } from '@rollup/plugin-babel'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import replace from '@rollup/plugin-replace'
import banner from './banner.mjs'
const path = require('node:path') const __dirname = path.dirname(fileURLToPath(import.meta.url))
const { babel } = require('@rollup/plugin-babel')
const { nodeResolve } = require('@rollup/plugin-node-resolve')
const replace = require('@rollup/plugin-replace')
const banner = require('./banner.js')
const BUNDLE = process.env.BUNDLE === 'true' const BUNDLE = process.env.BUNDLE === 'true'
const ESM = process.env.ESM === 'true' const ESM = process.env.ESM === 'true'
let fileDestination = `bootstrap${ESM ? '.esm' : ''}` let destinationFile = `bootstrap${ESM ? '.esm' : ''}`
const external = ['@popperjs/core'] const external = ['@popperjs/core']
const plugins = [ const plugins = [
babel({ babel({
@ -24,7 +26,7 @@ const globals = {
} }
if (BUNDLE) { if (BUNDLE) {
fileDestination += '.bundle' destinationFile += '.bundle'
// Remove last entry in external array to bundle Popper // Remove last entry in external array to bundle Popper
external.pop() external.pop()
delete globals['@popperjs/core'] delete globals['@popperjs/core']
@ -40,8 +42,8 @@ if (BUNDLE) {
const rollupConfig = { const rollupConfig = {
input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`), input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`),
output: { output: {
banner, banner: banner(),
file: path.resolve(__dirname, `../dist/js/${fileDestination}.js`), file: path.resolve(__dirname, `../dist/js/${destinationFile}.js`),
format: ESM ? 'esm' : 'umd', format: ESM ? 'esm' : 'umd',
globals, globals,
generatedCode: 'es2015' generatedCode: 'es2015'
@ -54,4 +56,4 @@ if (!ESM) {
rollupConfig.output.name = 'bootstrap' rollupConfig.output.name = 'bootstrap'
} }
module.exports = rollupConfig export default rollupConfig

View file

@ -2,22 +2,22 @@
/*! /*!
* Script to run vnu-jar if Java is available. * Script to run vnu-jar if Java is available.
* Copyright 2017-2022 The Bootstrap Authors * Copyright 2017-2025 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
'use strict' import { execFile, spawn } from 'node:child_process'
import vnu from 'vnu-jar'
const { execFile, spawn } = require('node:child_process')
const vnu = require('vnu-jar')
execFile('java', ['-version'], (error, stdout, stderr) => { execFile('java', ['-version'], (error, stdout, stderr) => {
if (error) { if (error) {
console.error('Skipping vnu-jar test; Java is missing.') console.error('Skipping vnu-jar test; Java is probably missing.')
console.error(error)
return return
} }
console.log('Running vnu-jar validation...')
const is32bitJava = !/64-Bit/.test(stderr) const is32bitJava = !/64-Bit/.test(stderr)
// vnu-jar accepts multiple ignores joined with a `|`. // vnu-jar accepts multiple ignores joined with a `|`.
@ -30,7 +30,14 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
// Per https://www.w3.org/TR/html-aria/#docconformance having "aria-disabled" on a link is // Per https://www.w3.org/TR/html-aria/#docconformance having "aria-disabled" on a link is
// NOT RECOMMENDED, but it's still valid - we explain in the docs that it's not ideal, // NOT RECOMMENDED, but it's still valid - we explain in the docs that it's not ideal,
// and offer more robust alternatives, but also need to show a less-than-ideal example // and offer more robust alternatives, but also need to show a less-than-ideal example
'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.' 'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.',
// A `code` element with the `is:raw` attribute coming from remark-prismjs (Astro upstream possible bug)
'Attribute “is:raw” is not serializable as XML 1.0.',
'Attribute “is:raw” not allowed on element “code” at this point.',
// Astro's expecting trailing slashes on HTML tags such as <br />
'Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.',
// Allow `switch` attribute.
'Attribute “switch” not allowed on element “input” at this point.'
].join('|') ].join('|')
const args = [ const args = [
@ -49,6 +56,8 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
args.splice(0, 0, '-Xss512k') args.splice(0, 0, '-Xss512k')
} }
console.log(`command used: java ${args.join(' ')}`)
return spawn('java', args, { return spawn('java', args, {
shell: true, shell: true,
stdio: 'inherit' stdio: 'inherit'

View file

@ -3,16 +3,20 @@
/*! /*!
* Script to create the built examples zip archive; * Script to create the built examples zip archive;
* requires the `zip` command to be present! * requires the `zip` command to be present!
* Copyright 2020-2022 The Bootstrap Authors * Copyright 2020-2025 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
'use strict' import fs from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import sh from 'shelljs'
import { format } from 'prettier'
const path = require('node:path') const __dirname = path.dirname(fileURLToPath(import.meta.url))
const sh = require('shelljs')
const pkg = require('../package.json') const pkgJson = path.join(__dirname, '../package.json')
const pkg = JSON.parse(await fs.readFile(pkgJson, 'utf8'))
const versionShort = pkg.config.version_short const versionShort = pkg.config.version_short
const distFolder = `bootstrap-${pkg.version}-examples` const distFolder = `bootstrap-${pkg.version}-examples`
@ -34,6 +38,9 @@ const imgFiles = [
'bootstrap-logo.svg', 'bootstrap-logo.svg',
'bootstrap-logo-white.svg' 'bootstrap-logo-white.svg'
] ]
const staticJsFiles = [
'color-modes.js'
]
sh.config.fatal = true sh.config.fatal = true
@ -52,7 +59,8 @@ sh.mkdir('-p', [
distFolder, distFolder,
`${distFolder}/assets/brand/`, `${distFolder}/assets/brand/`,
`${distFolder}/assets/dist/css/`, `${distFolder}/assets/dist/css/`,
`${distFolder}/assets/dist/js/` `${distFolder}/assets/dist/js/`,
`${distFolder}/assets/js/`
]) ])
sh.cp('-Rf', `${docsDir}/examples/*`, distFolder) sh.cp('-Rf', `${docsDir}/examples/*`, distFolder)
@ -69,22 +77,44 @@ for (const file of imgFiles) {
sh.cp('-f', `${docsDir}/assets/brand/${file}`, `${distFolder}/assets/brand/`) sh.cp('-f', `${docsDir}/assets/brand/${file}`, `${distFolder}/assets/brand/`)
} }
for (const file of staticJsFiles) {
sh.cp('-f', `${docsDir}/assets/js/${file}`, `${distFolder}/assets/js/`)
}
sh.rm(`${distFolder}/index.html`) sh.rm(`${distFolder}/index.html`)
// get all examples' HTML files // get all examples' HTML files
for (const file of sh.find(`${distFolder}/**/*.html`)) { const htmlFiles = sh.find(`${distFolder}/**/*.html`)
const formatPromises = htmlFiles.map(async file => {
const fileContents = sh.cat(file) const fileContents = sh.cat(file)
.toString() .toString()
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../') .replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
.replace(/"..\/dist\//g, '"../assets/dist/') .replace(/"..\/dist\//g, '"../assets/dist/')
.replace(/(<link href="\.\.\/.*) integrity=".*>/g, '$1>') .replace(/(<link href="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1')
.replace(/(<script src="\.\.\/.*) integrity=".*>/g, '$1></script>') .replace(/<link[^>]*href="\.\.\/assets\/img\/favicons\/[^"]*"[^>]*>/g, '')
.replace(/( +)<!-- favicons(.|\n)+<style>/i, ' <style>') .replace(/(<script src="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1')
new sh.ShellString(fileContents).to(file)
let formattedHTML
try {
formattedHTML = await format(fileContents, {
parser: 'html',
filepath: file
})
} catch (error) {
console.error(`\nError formatting ${file}:`)
console.error(`Message: ${error.message}`)
console.error('\nSkipping formatting for this file...\n')
formattedHTML = fileContents
} }
new sh.ShellString(formattedHTML).to(file)
})
await Promise.all(formatPromises)
// create the zip file // create the zip file
sh.exec(`zip -r9 "${distFolder}.zip" "${distFolder}"`) sh.exec(`zip -qr9 "${distFolder}.zip" "${distFolder}"`)
// remove the folder we created // remove the folder we created
sh.rm('-rf', distFolder) sh.rm('-rf', distFolder)

View file

@ -1,88 +1,55 @@
languageCode: "en"
title: "Bootstrap" title: "Bootstrap"
baseURL: "https://getbootstrap.com" baseURL: "https://getbootstrap.com"
security: docsDir: "site"
enableInlineShortcodes: true
funcs:
getenv:
- ^HUGO_
- NETLIFY
markup:
goldmark:
renderer:
unsafe: true
highlight:
noClasses: false
tableOfContents:
startLevel: 2
endLevel: 6
buildDrafts: true
buildFuture: true
enableRobotsTXT: true
metaDataFormat: "yaml"
disableKinds: ["404", "taxonomy", "term", "RSS"]
publishDir: "_site"
module:
mounts:
- source: dist
target: static/docs/5.2/dist
- source: site/assets
target: assets
- source: site/content
target: content
- source: site/data
target: data
- source: site/layouts
target: layouts
- source: site/static
target: static
- source: site/static/docs/5.2/assets/img/favicons/apple-touch-icon.png
target: static/apple-touch-icon.png
- source: site/static/docs/5.2/assets/img/favicons/favicon.ico
target: static/favicon.ico
params:
subtitle: "The most popular HTML, CSS, and JS library in the world." subtitle: "The most popular HTML, CSS, and JS library in the world."
description: "Powerful, extensible, and feature-packed frontend toolkit. Build and customize with Sass, utilize prebuilt grid system and components, and bring projects to life with powerful JavaScript plugins." description: "Powerful, extensible, and feature-packed frontend toolkit. Build and customize with Sass, utilize prebuilt grid system and components, and bring projects to life with powerful JavaScript plugins."
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors" authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
current_version: "5.2.3" current_version: "5.3.8"
current_ruby_version: "5.2.3" current_ruby_version: "5.3.8"
docs_version: "5.2" docs_version: "5.3"
rfs_version: "v9.0.6" rfs_version: "v10.0.0"
github_org: "https://github.com/twbs" github_org: "https://github.com/twbs"
repo: "https://github.com/twbs/bootstrap" repo: "https://github.com/twbs/bootstrap"
twitter: "getbootstrap" x: "getbootstrap"
opencollective: "https://opencollective.com/bootstrap" opencollective: "https://opencollective.com/bootstrap"
blog: "https://blog.getbootstrap.com/" blog: "https://blog.getbootstrap.com/"
themes: "https://themes.getbootstrap.com/"
icons: "https://icons.getbootstrap.com/" icons: "https://icons.getbootstrap.com/"
swag: "https://cottonbureau.com/people/bootstrap" swag: "https://cottonbureau.com/people/bootstrap"
analytics:
fathom_site: "ITUSEYJG"
algolia:
app_id: "AK7KMZKZHQ"
api_key: "3151f502c7b9e9dafd5e6372b691a24e"
index_name: "bootstrap"
download: download:
source: "https://github.com/twbs/bootstrap/archive/v5.2.3.zip" source: "https://github.com/twbs/bootstrap/archive/v5.3.8.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v5.2.3/bootstrap-5.2.3-dist.zip" dist: "https://github.com/twbs/bootstrap/releases/download/v5.3.8/bootstrap-5.3.8-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.2.3/bootstrap-5.2.3-examples.zip" dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.3.8/bootstrap-5.3.8-examples.zip"
cdn: cdn:
# See https://www.srihash.org for info on how to generate the hashes # See https://www.srihash.org for info on how to generate the hashes
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" css: "https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css"
css_hash: "sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" css_hash: "sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB"
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.rtl.min.css" css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.rtl.min.css"
css_rtl_hash: "sha384-DOXMLfHhQkvFFp+rWTZwVlPVqdIhpDVYT9csOnHSgWQWPX0v5MCGtjCJbY6ERspU" css_rtl_hash: "sha384-CfCrinSRH2IR6a4e6fy2q6ioOX7O6Mtm1L9vRvFZ1trBncWmMePhzvafv7oIcWiW"
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" js: "https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.min.js"
js_hash: "sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" js_hash: "sha384-G/EV+4j2dNv+tEPo3++6LCgdCROaejBqfUeNjuKAiuXbjrxilcCdDz6ZAVfHWe1Y"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" js_bundle_hash: "sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"
popper_hash: "sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" popper_hash: "sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
popper_esm: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/esm/popper.min.js"
anchors: anchors:
min: 2 min: 2
max: 5 max: 5
toc:
min: 2
max: 6

View file

@ -1,78 +1,8 @@
/*! /*!
* Bootstrap Grid v5.2.3 (https://getbootstrap.com/) * Bootstrap Grid v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors * Copyright 2011-2025 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
:root {
--bs-blue: #457aab;
--bs-indigo: #285580;
--bs-purple: #8d5fbf;
--bs-pink: #d63384;
--bs-red: #c42526;
--bs-orange: #ff9100;
--bs-yellow: #ffc107;
--bs-green: #2a8256;
--bs-teal: #009691;
--bs-cyan: #0068b3;
--bs-black: #222;
--bs-white: #fff;
--bs-gray: #a1a3a9;
--bs-gray-dark: #454545;
--bs-gray-100: #f2f2f2;
--bs-gray-200: #e2e2e3;
--bs-gray-300: #d4d4d4;
--bs-gray-400: #cdcdcd;
--bs-gray-500: #abb3bb;
--bs-gray-600: #a1a3a9;
--bs-gray-700: #5d6d75;
--bs-gray-800: #454545;
--bs-gray-900: #2a2a2a;
--bs-primary: #457aab;
--bs-secondary: #5d6d75;
--bs-success: #2a8256;
--bs-info: #0068b3;
--bs-warning: #ffc107;
--bs-danger: #c42526;
--bs-light: #f2f2f2;
--bs-dark: #2a2a2a;
--bs-primary-rgb: 69, 122, 171;
--bs-secondary-rgb: 93, 109, 117;
--bs-success-rgb: 42, 130, 86;
--bs-info-rgb: 0, 104, 179;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 196, 37, 38;
--bs-light-rgb: 242, 242, 242;
--bs-dark-rgb: 42, 42, 42;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 34, 34, 34;
--bs-body-color-rgb: 42, 42, 42;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: Arial, sans-serif, "Helvetica Neue", "Liberation Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: Consolas, "Liberation Mono", "Courier New", monospace, SFMono-Regular, Menlo, Monaco;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #2a2a2a;
--bs-body-bg: #fff;
--bs-border-width: 1px;
--bs-border-style: solid;
--bs-border-color: #d4d4d4;
--bs-border-color-translucent: rgba(34, 34, 34, 0.175);
--bs-border-radius: 0;
--bs-border-radius-sm: 0;
--bs-border-radius-lg: 0;
--bs-border-radius-xl: 0;
--bs-border-radius-2xl: 0;
--bs-border-radius-pill: 0;
--bs-link-color: #457aab;
--bs-link-hover-color: #233d56;
--bs-code-color: #d63384;
--bs-highlight-bg: #fff3cd;
}
.container, .container,
.container-fluid, .container-fluid,
.container-xxl, .container-xxl,
@ -114,6 +44,15 @@
max-width: 1320px; max-width: 1320px;
} }
} }
:root {
--bs-breakpoint-xs: 0;
--bs-breakpoint-sm: 576px;
--bs-breakpoint-md: 768px;
--bs-breakpoint-lg: 992px;
--bs-breakpoint-xl: 1200px;
--bs-breakpoint-xxl: 1400px;
}
.row { .row {
--bs-gutter-x: 1.5rem; --bs-gutter-x: 1.5rem;
--bs-gutter-y: 0; --bs-gutter-y: 0;
@ -134,7 +73,7 @@
} }
.col { .col {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-auto > * { .row-cols-auto > * {
@ -154,7 +93,7 @@
.row-cols-3 > * { .row-cols-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-4 > * { .row-cols-4 > * {
@ -169,7 +108,7 @@
.row-cols-6 > * { .row-cols-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-auto { .col-auto {
@ -343,7 +282,7 @@
@media (min-width: 576px) { @media (min-width: 576px) {
.col-sm { .col-sm {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-sm-auto > * { .row-cols-sm-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -359,7 +298,7 @@
} }
.row-cols-sm-3 > * { .row-cols-sm-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-sm-4 > * { .row-cols-sm-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -371,7 +310,7 @@
} }
.row-cols-sm-6 > * { .row-cols-sm-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-sm-auto { .col-sm-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -512,7 +451,7 @@
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.col-md { .col-md {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-md-auto > * { .row-cols-md-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -528,7 +467,7 @@
} }
.row-cols-md-3 > * { .row-cols-md-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-md-4 > * { .row-cols-md-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -540,7 +479,7 @@
} }
.row-cols-md-6 > * { .row-cols-md-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-md-auto { .col-md-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -681,7 +620,7 @@
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.col-lg { .col-lg {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-lg-auto > * { .row-cols-lg-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -697,7 +636,7 @@
} }
.row-cols-lg-3 > * { .row-cols-lg-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-lg-4 > * { .row-cols-lg-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -709,7 +648,7 @@
} }
.row-cols-lg-6 > * { .row-cols-lg-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-lg-auto { .col-lg-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -850,7 +789,7 @@
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.col-xl { .col-xl {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-xl-auto > * { .row-cols-xl-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -866,7 +805,7 @@
} }
.row-cols-xl-3 > * { .row-cols-xl-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-xl-4 > * { .row-cols-xl-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -878,7 +817,7 @@
} }
.row-cols-xl-6 > * { .row-cols-xl-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-xl-auto { .col-xl-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -1019,7 +958,7 @@
} }
@media (min-width: 1400px) { @media (min-width: 1400px) {
.col-xxl { .col-xxl {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-xxl-auto > * { .row-cols-xxl-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -1035,7 +974,7 @@
} }
.row-cols-xxl-3 > * { .row-cols-xxl-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-xxl-4 > * { .row-cols-xxl-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -1047,7 +986,7 @@
} }
.row-cols-xxl-6 > * { .row-cols-xxl-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-xxl-auto { .col-xxl-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -1202,6 +1141,10 @@
display: grid !important; display: grid !important;
} }
.d-inline-grid {
display: inline-grid !important;
}
.d-table { .d-table {
display: table !important; display: table !important;
} }
@ -1951,6 +1894,9 @@
.d-sm-grid { .d-sm-grid {
display: grid !important; display: grid !important;
} }
.d-sm-inline-grid {
display: inline-grid !important;
}
.d-sm-table { .d-sm-table {
display: table !important; display: table !important;
} }
@ -2526,6 +2472,9 @@
.d-md-grid { .d-md-grid {
display: grid !important; display: grid !important;
} }
.d-md-inline-grid {
display: inline-grid !important;
}
.d-md-table { .d-md-table {
display: table !important; display: table !important;
} }
@ -3101,6 +3050,9 @@
.d-lg-grid { .d-lg-grid {
display: grid !important; display: grid !important;
} }
.d-lg-inline-grid {
display: inline-grid !important;
}
.d-lg-table { .d-lg-table {
display: table !important; display: table !important;
} }
@ -3676,6 +3628,9 @@
.d-xl-grid { .d-xl-grid {
display: grid !important; display: grid !important;
} }
.d-xl-inline-grid {
display: inline-grid !important;
}
.d-xl-table { .d-xl-table {
display: table !important; display: table !important;
} }
@ -4251,6 +4206,9 @@
.d-xxl-grid { .d-xxl-grid {
display: grid !important; display: grid !important;
} }
.d-xxl-inline-grid {
display: inline-grid !important;
}
.d-xxl-table { .d-xxl-table {
display: table !important; display: table !important;
} }
@ -4826,6 +4784,9 @@
.d-print-grid { .d-print-grid {
display: grid !important; display: grid !important;
} }
.d-print-inline-grid {
display: inline-grid !important;
}
.d-print-table { .d-print-table {
display: table !important; display: table !important;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,78 +1,8 @@
/*! /*!
* Bootstrap Grid v5.2.3 (https://getbootstrap.com/) * Bootstrap Grid v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors * Copyright 2011-2025 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
:root {
--bs-blue: #457aab;
--bs-indigo: #285580;
--bs-purple: #8d5fbf;
--bs-pink: #d63384;
--bs-red: #c42526;
--bs-orange: #ff9100;
--bs-yellow: #ffc107;
--bs-green: #2a8256;
--bs-teal: #009691;
--bs-cyan: #0068b3;
--bs-black: #222;
--bs-white: #fff;
--bs-gray: #a1a3a9;
--bs-gray-dark: #454545;
--bs-gray-100: #f2f2f2;
--bs-gray-200: #e2e2e3;
--bs-gray-300: #d4d4d4;
--bs-gray-400: #cdcdcd;
--bs-gray-500: #abb3bb;
--bs-gray-600: #a1a3a9;
--bs-gray-700: #5d6d75;
--bs-gray-800: #454545;
--bs-gray-900: #2a2a2a;
--bs-primary: #457aab;
--bs-secondary: #5d6d75;
--bs-success: #2a8256;
--bs-info: #0068b3;
--bs-warning: #ffc107;
--bs-danger: #c42526;
--bs-light: #f2f2f2;
--bs-dark: #2a2a2a;
--bs-primary-rgb: 69, 122, 171;
--bs-secondary-rgb: 93, 109, 117;
--bs-success-rgb: 42, 130, 86;
--bs-info-rgb: 0, 104, 179;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 196, 37, 38;
--bs-light-rgb: 242, 242, 242;
--bs-dark-rgb: 42, 42, 42;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 34, 34, 34;
--bs-body-color-rgb: 42, 42, 42;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: Arial, sans-serif, "Helvetica Neue", "Liberation Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: Consolas, "Liberation Mono", "Courier New", monospace, SFMono-Regular, Menlo, Monaco;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #2a2a2a;
--bs-body-bg: #fff;
--bs-border-width: 1px;
--bs-border-style: solid;
--bs-border-color: #d4d4d4;
--bs-border-color-translucent: rgba(34, 34, 34, 0.175);
--bs-border-radius: 0;
--bs-border-radius-sm: 0;
--bs-border-radius-lg: 0;
--bs-border-radius-xl: 0;
--bs-border-radius-2xl: 0;
--bs-border-radius-pill: 0;
--bs-link-color: #457aab;
--bs-link-hover-color: #233d56;
--bs-code-color: #d63384;
--bs-highlight-bg: #fff3cd;
}
.container, .container,
.container-fluid, .container-fluid,
.container-xxl, .container-xxl,
@ -114,6 +44,15 @@
max-width: 1320px; max-width: 1320px;
} }
} }
:root {
--bs-breakpoint-xs: 0;
--bs-breakpoint-sm: 576px;
--bs-breakpoint-md: 768px;
--bs-breakpoint-lg: 992px;
--bs-breakpoint-xl: 1200px;
--bs-breakpoint-xxl: 1400px;
}
.row { .row {
--bs-gutter-x: 1.5rem; --bs-gutter-x: 1.5rem;
--bs-gutter-y: 0; --bs-gutter-y: 0;
@ -134,7 +73,7 @@
} }
.col { .col {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-auto > * { .row-cols-auto > * {
@ -154,7 +93,7 @@
.row-cols-3 > * { .row-cols-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-4 > * { .row-cols-4 > * {
@ -169,7 +108,7 @@
.row-cols-6 > * { .row-cols-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-auto { .col-auto {
@ -343,7 +282,7 @@
@media (min-width: 576px) { @media (min-width: 576px) {
.col-sm { .col-sm {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-sm-auto > * { .row-cols-sm-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -359,7 +298,7 @@
} }
.row-cols-sm-3 > * { .row-cols-sm-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-sm-4 > * { .row-cols-sm-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -371,7 +310,7 @@
} }
.row-cols-sm-6 > * { .row-cols-sm-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-sm-auto { .col-sm-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -512,7 +451,7 @@
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.col-md { .col-md {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-md-auto > * { .row-cols-md-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -528,7 +467,7 @@
} }
.row-cols-md-3 > * { .row-cols-md-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-md-4 > * { .row-cols-md-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -540,7 +479,7 @@
} }
.row-cols-md-6 > * { .row-cols-md-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-md-auto { .col-md-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -681,7 +620,7 @@
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.col-lg { .col-lg {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-lg-auto > * { .row-cols-lg-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -697,7 +636,7 @@
} }
.row-cols-lg-3 > * { .row-cols-lg-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-lg-4 > * { .row-cols-lg-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -709,7 +648,7 @@
} }
.row-cols-lg-6 > * { .row-cols-lg-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-lg-auto { .col-lg-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -850,7 +789,7 @@
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.col-xl { .col-xl {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-xl-auto > * { .row-cols-xl-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -866,7 +805,7 @@
} }
.row-cols-xl-3 > * { .row-cols-xl-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-xl-4 > * { .row-cols-xl-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -878,7 +817,7 @@
} }
.row-cols-xl-6 > * { .row-cols-xl-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-xl-auto { .col-xl-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -1019,7 +958,7 @@
} }
@media (min-width: 1400px) { @media (min-width: 1400px) {
.col-xxl { .col-xxl {
flex: 1 0 0%; flex: 1 0 0;
} }
.row-cols-xxl-auto > * { .row-cols-xxl-auto > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -1035,7 +974,7 @@
} }
.row-cols-xxl-3 > * { .row-cols-xxl-3 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 33.3333333333%; width: 33.33333333%;
} }
.row-cols-xxl-4 > * { .row-cols-xxl-4 > * {
flex: 0 0 auto; flex: 0 0 auto;
@ -1047,7 +986,7 @@
} }
.row-cols-xxl-6 > * { .row-cols-xxl-6 > * {
flex: 0 0 auto; flex: 0 0 auto;
width: 16.6666666667%; width: 16.66666667%;
} }
.col-xxl-auto { .col-xxl-auto {
flex: 0 0 auto; flex: 0 0 auto;
@ -1202,6 +1141,10 @@
display: grid !important; display: grid !important;
} }
.d-inline-grid {
display: inline-grid !important;
}
.d-table { .d-table {
display: table !important; display: table !important;
} }
@ -1951,6 +1894,9 @@
.d-sm-grid { .d-sm-grid {
display: grid !important; display: grid !important;
} }
.d-sm-inline-grid {
display: inline-grid !important;
}
.d-sm-table { .d-sm-table {
display: table !important; display: table !important;
} }
@ -2526,6 +2472,9 @@
.d-md-grid { .d-md-grid {
display: grid !important; display: grid !important;
} }
.d-md-inline-grid {
display: inline-grid !important;
}
.d-md-table { .d-md-table {
display: table !important; display: table !important;
} }
@ -3101,6 +3050,9 @@
.d-lg-grid { .d-lg-grid {
display: grid !important; display: grid !important;
} }
.d-lg-inline-grid {
display: inline-grid !important;
}
.d-lg-table { .d-lg-table {
display: table !important; display: table !important;
} }
@ -3676,6 +3628,9 @@
.d-xl-grid { .d-xl-grid {
display: grid !important; display: grid !important;
} }
.d-xl-inline-grid {
display: inline-grid !important;
}
.d-xl-table { .d-xl-table {
display: table !important; display: table !important;
} }
@ -4251,6 +4206,9 @@
.d-xxl-grid { .d-xxl-grid {
display: grid !important; display: grid !important;
} }
.d-xxl-inline-grid {
display: inline-grid !important;
}
.d-xxl-table { .d-xxl-table {
display: table !important; display: table !important;
} }
@ -4826,6 +4784,9 @@
.d-print-grid { .d-print-grid {
display: grid !important; display: grid !important;
} }
.d-print-inline-grid {
display: inline-grid !important;
}
.d-print-table { .d-print-table {
display: table !important; display: table !important;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,10 +1,10 @@
/*! /*!
* Bootstrap Reboot v5.2.3 (https://getbootstrap.com/) * Bootstrap Reboot v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors * Copyright 2011-2025 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
:root { :root,
[data-bs-theme=light] {
--bs-blue: #457aab; --bs-blue: #457aab;
--bs-indigo: #285580; --bs-indigo: #285580;
--bs-purple: #8d5fbf; --bs-purple: #8d5fbf;
@ -44,10 +44,32 @@
--bs-danger-rgb: 196, 37, 38; --bs-danger-rgb: 196, 37, 38;
--bs-light-rgb: 242, 242, 242; --bs-light-rgb: 242, 242, 242;
--bs-dark-rgb: 42, 42, 42; --bs-dark-rgb: 42, 42, 42;
--bs-primary-text-emphasis: #1c3144;
--bs-secondary-text-emphasis: #252c2f;
--bs-success-text-emphasis: #113422;
--bs-info-text-emphasis: #002a48;
--bs-warning-text-emphasis: #664d03;
--bs-danger-text-emphasis: #4e0f0f;
--bs-light-text-emphasis: #5d6d75;
--bs-dark-text-emphasis: #5d6d75;
--bs-primary-bg-subtle: #dae4ee;
--bs-secondary-bg-subtle: #dfe2e3;
--bs-success-bg-subtle: #d4e6dd;
--bs-info-bg-subtle: #cce1f0;
--bs-warning-bg-subtle: #fff3cd;
--bs-danger-bg-subtle: #f3d3d4;
--bs-light-bg-subtle: #f9f9f9;
--bs-dark-bg-subtle: #cdcdcd;
--bs-primary-border-subtle: #b5cadd;
--bs-secondary-border-subtle: #bec5c8;
--bs-success-border-subtle: #aacdbb;
--bs-info-border-subtle: #99c3e1;
--bs-warning-border-subtle: #ffe69c;
--bs-danger-border-subtle: #e7a8a8;
--bs-light-border-subtle: #e2e2e3;
--bs-dark-border-subtle: #abb3bb;
--bs-white-rgb: 255, 255, 255; --bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 34, 34, 34; --bs-black-rgb: 34, 34, 34;
--bs-body-color-rgb: 42, 42, 42;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: Arial, sans-serif, "Helvetica Neue", "Liberation Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --bs-font-sans-serif: Arial, sans-serif, "Helvetica Neue", "Liberation Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: Consolas, "Liberation Mono", "Courier New", monospace, SFMono-Regular, Menlo, Monaco; --bs-font-monospace: Consolas, "Liberation Mono", "Courier New", monospace, SFMono-Regular, Menlo, Monaco;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
@ -56,7 +78,28 @@
--bs-body-font-weight: 400; --bs-body-font-weight: 400;
--bs-body-line-height: 1.5; --bs-body-line-height: 1.5;
--bs-body-color: #2a2a2a; --bs-body-color: #2a2a2a;
--bs-body-color-rgb: 42, 42, 42;
--bs-body-bg: #fff; --bs-body-bg: #fff;
--bs-body-bg-rgb: 255, 255, 255;
--bs-emphasis-color: #222;
--bs-emphasis-color-rgb: 34, 34, 34;
--bs-secondary-color: rgba(42, 42, 42, 0.75);
--bs-secondary-color-rgb: 42, 42, 42;
--bs-secondary-bg: #e2e2e3;
--bs-secondary-bg-rgb: 226, 226, 227;
--bs-tertiary-color: rgba(42, 42, 42, 0.5);
--bs-tertiary-color-rgb: 42, 42, 42;
--bs-tertiary-bg: #f2f2f2;
--bs-tertiary-bg-rgb: 242, 242, 242;
--bs-heading-color: inherit;
--bs-link-color: #457aab;
--bs-link-color-rgb: 69, 122, 171;
--bs-link-decoration: underline;
--bs-link-hover-color: #233d56;
--bs-link-hover-color-rgb: 35, 61, 86;
--bs-code-color: #d63384;
--bs-highlight-color: #2a2a2a;
--bs-highlight-bg: #fff3cd;
--bs-border-width: 1px; --bs-border-width: 1px;
--bs-border-style: solid; --bs-border-style: solid;
--bs-border-color: #d4d4d4; --bs-border-color: #d4d4d4;
@ -65,12 +108,76 @@
--bs-border-radius-sm: 0; --bs-border-radius-sm: 0;
--bs-border-radius-lg: 0; --bs-border-radius-lg: 0;
--bs-border-radius-xl: 0; --bs-border-radius-xl: 0;
--bs-border-radius-2xl: 0; --bs-border-radius-xxl: 0;
--bs-border-radius-2xl: var(--bs-border-radius-xxl);
--bs-border-radius-pill: 0; --bs-border-radius-pill: 0;
--bs-link-color: #457aab; --bs-box-shadow: 0 0.5rem 1rem rgba(34, 34, 34, 0.15);
--bs-link-hover-color: #233d56; --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(34, 34, 34, 0.075);
--bs-code-color: #d63384; --bs-box-shadow-lg: 0 1rem 3rem rgba(34, 34, 34, 0.175);
--bs-highlight-bg: #fff3cd; --bs-box-shadow-inset: inset 0 1px 2px rgba(34, 34, 34, 0.075);
--bs-focus-ring-width: 0.25rem;
--bs-focus-ring-opacity: 0.25;
--bs-focus-ring-color: rgba(69, 122, 171, 0.25);
--bs-form-valid-color: #2a8256;
--bs-form-valid-border-color: #2a8256;
--bs-form-invalid-color: #c42526;
--bs-form-invalid-border-color: #c42526;
}
[data-bs-theme=dark] {
color-scheme: dark;
--bs-body-color: #d4d4d4;
--bs-body-color-rgb: 212, 212, 212;
--bs-body-bg: #2a2a2a;
--bs-body-bg-rgb: 42, 42, 42;
--bs-emphasis-color: #fff;
--bs-emphasis-color-rgb: 255, 255, 255;
--bs-secondary-color: rgba(212, 212, 212, 0.75);
--bs-secondary-color-rgb: 212, 212, 212;
--bs-secondary-bg: #454545;
--bs-secondary-bg-rgb: 69, 69, 69;
--bs-tertiary-color: rgba(212, 212, 212, 0.5);
--bs-tertiary-color-rgb: 212, 212, 212;
--bs-tertiary-bg: #383838;
--bs-tertiary-bg-rgb: 56, 56, 56;
--bs-primary-text-emphasis: #8fafcd;
--bs-secondary-text-emphasis: #9ea7ac;
--bs-success-text-emphasis: #7fb49a;
--bs-info-text-emphasis: #66a4d1;
--bs-warning-text-emphasis: #ffda6a;
--bs-danger-text-emphasis: #dc7c7d;
--bs-light-text-emphasis: #f2f2f2;
--bs-dark-text-emphasis: #d4d4d4;
--bs-primary-bg-subtle: #0e1822;
--bs-secondary-bg-subtle: #131617;
--bs-success-bg-subtle: #081a11;
--bs-info-bg-subtle: #001524;
--bs-warning-bg-subtle: #332701;
--bs-danger-bg-subtle: #270708;
--bs-light-bg-subtle: #454545;
--bs-dark-bg-subtle: #343434;
--bs-primary-border-subtle: #294967;
--bs-secondary-border-subtle: #384146;
--bs-success-border-subtle: #194e34;
--bs-info-border-subtle: #003e6b;
--bs-warning-border-subtle: #997404;
--bs-danger-border-subtle: #761617;
--bs-light-border-subtle: #5d6d75;
--bs-dark-border-subtle: #454545;
--bs-heading-color: inherit;
--bs-link-color: #8fafcd;
--bs-link-hover-color: #c7d7e6;
--bs-link-color-rgb: 143, 175, 205;
--bs-link-hover-color-rgb: 199, 215, 230;
--bs-code-color: #e685b5;
--bs-highlight-color: #d4d4d4;
--bs-highlight-bg: #664d03;
--bs-border-color: #5d6d75;
--bs-border-color-translucent: rgba(255, 255, 255, 0.15);
--bs-form-valid-color: #7fb49a;
--bs-form-valid-border-color: #7fb49a;
--bs-form-invalid-color: #dc7c7d;
--bs-form-invalid-border-color: #dc7c7d;
} }
*, *,
@ -102,7 +209,7 @@ hr {
margin: 1rem 0; margin: 1rem 0;
color: inherit; color: inherit;
border: 0; border: 0;
border-top: 1px solid; border-top: var(--bs-border-width) solid;
opacity: 0.25; opacity: 0.25;
} }
@ -111,6 +218,7 @@ h6, h5, h4, h3, h2, h1 {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
font-weight: 600; font-weight: 600;
line-height: 1.2; line-height: 1.2;
color: var(--bs-heading-color);
} }
h1 { h1 {
@ -214,6 +322,7 @@ small {
mark { mark {
padding: 0.1875em; padding: 0.1875em;
color: var(--bs-highlight-color);
background-color: var(--bs-highlight-bg); background-color: var(--bs-highlight-bg);
} }
@ -234,11 +343,11 @@ sup {
} }
a { a {
color: var(--bs-link-color); color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));
text-decoration: underline; text-decoration: underline;
} }
a:hover { a:hover {
color: var(--bs-link-hover-color); --bs-link-color-rgb: var(--bs-link-hover-color-rgb);
} }
a:not([href]):not([class]), a:not([href]):not([class]):hover { a:not([href]):not([class]), a:not([href]):not([class]):hover {
@ -304,7 +413,7 @@ table {
caption { caption {
padding-top: 0.25rem; padding-top: 0.25rem;
padding-bottom: 0.25rem; padding-bottom: 0.25rem;
color: #a1a3a9; color: var(--bs-secondary-color);
text-align: left; text-align: left;
} }
@ -401,8 +510,8 @@ legend {
width: 100%; width: 100%;
padding: 0; padding: 0;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit; line-height: inherit;
font-size: calc(1.275rem + 0.3vw);
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
legend { legend {
@ -428,8 +537,12 @@ legend + * {
} }
[type=search] { [type=search] {
outline-offset: -2px;
-webkit-appearance: textfield; -webkit-appearance: textfield;
outline-offset: -2px;
}
[type=search]::-webkit-search-cancel-button {
cursor: pointer;
filter: grayscale(1);
} }
/* rtl:raw: /* rtl:raw:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,10 +1,10 @@
/*! /*!
* Bootstrap Reboot v5.2.3 (https://getbootstrap.com/) * Bootstrap Reboot v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors * Copyright 2011-2025 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
:root { :root,
[data-bs-theme=light] {
--bs-blue: #457aab; --bs-blue: #457aab;
--bs-indigo: #285580; --bs-indigo: #285580;
--bs-purple: #8d5fbf; --bs-purple: #8d5fbf;
@ -44,10 +44,32 @@
--bs-danger-rgb: 196, 37, 38; --bs-danger-rgb: 196, 37, 38;
--bs-light-rgb: 242, 242, 242; --bs-light-rgb: 242, 242, 242;
--bs-dark-rgb: 42, 42, 42; --bs-dark-rgb: 42, 42, 42;
--bs-primary-text-emphasis: #1c3144;
--bs-secondary-text-emphasis: #252c2f;
--bs-success-text-emphasis: #113422;
--bs-info-text-emphasis: #002a48;
--bs-warning-text-emphasis: #664d03;
--bs-danger-text-emphasis: #4e0f0f;
--bs-light-text-emphasis: #5d6d75;
--bs-dark-text-emphasis: #5d6d75;
--bs-primary-bg-subtle: #dae4ee;
--bs-secondary-bg-subtle: #dfe2e3;
--bs-success-bg-subtle: #d4e6dd;
--bs-info-bg-subtle: #cce1f0;
--bs-warning-bg-subtle: #fff3cd;
--bs-danger-bg-subtle: #f3d3d4;
--bs-light-bg-subtle: #f9f9f9;
--bs-dark-bg-subtle: #cdcdcd;
--bs-primary-border-subtle: #b5cadd;
--bs-secondary-border-subtle: #bec5c8;
--bs-success-border-subtle: #aacdbb;
--bs-info-border-subtle: #99c3e1;
--bs-warning-border-subtle: #ffe69c;
--bs-danger-border-subtle: #e7a8a8;
--bs-light-border-subtle: #e2e2e3;
--bs-dark-border-subtle: #abb3bb;
--bs-white-rgb: 255, 255, 255; --bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 34, 34, 34; --bs-black-rgb: 34, 34, 34;
--bs-body-color-rgb: 42, 42, 42;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: Arial, sans-serif, "Helvetica Neue", "Liberation Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --bs-font-sans-serif: Arial, sans-serif, "Helvetica Neue", "Liberation Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: Consolas, "Liberation Mono", "Courier New", monospace, SFMono-Regular, Menlo, Monaco; --bs-font-monospace: Consolas, "Liberation Mono", "Courier New", monospace, SFMono-Regular, Menlo, Monaco;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
@ -56,7 +78,28 @@
--bs-body-font-weight: 400; --bs-body-font-weight: 400;
--bs-body-line-height: 1.5; --bs-body-line-height: 1.5;
--bs-body-color: #2a2a2a; --bs-body-color: #2a2a2a;
--bs-body-color-rgb: 42, 42, 42;
--bs-body-bg: #fff; --bs-body-bg: #fff;
--bs-body-bg-rgb: 255, 255, 255;
--bs-emphasis-color: #222;
--bs-emphasis-color-rgb: 34, 34, 34;
--bs-secondary-color: rgba(42, 42, 42, 0.75);
--bs-secondary-color-rgb: 42, 42, 42;
--bs-secondary-bg: #e2e2e3;
--bs-secondary-bg-rgb: 226, 226, 227;
--bs-tertiary-color: rgba(42, 42, 42, 0.5);
--bs-tertiary-color-rgb: 42, 42, 42;
--bs-tertiary-bg: #f2f2f2;
--bs-tertiary-bg-rgb: 242, 242, 242;
--bs-heading-color: inherit;
--bs-link-color: #457aab;
--bs-link-color-rgb: 69, 122, 171;
--bs-link-decoration: underline;
--bs-link-hover-color: #233d56;
--bs-link-hover-color-rgb: 35, 61, 86;
--bs-code-color: #d63384;
--bs-highlight-color: #2a2a2a;
--bs-highlight-bg: #fff3cd;
--bs-border-width: 1px; --bs-border-width: 1px;
--bs-border-style: solid; --bs-border-style: solid;
--bs-border-color: #d4d4d4; --bs-border-color: #d4d4d4;
@ -65,12 +108,76 @@
--bs-border-radius-sm: 0; --bs-border-radius-sm: 0;
--bs-border-radius-lg: 0; --bs-border-radius-lg: 0;
--bs-border-radius-xl: 0; --bs-border-radius-xl: 0;
--bs-border-radius-2xl: 0; --bs-border-radius-xxl: 0;
--bs-border-radius-2xl: var(--bs-border-radius-xxl);
--bs-border-radius-pill: 0; --bs-border-radius-pill: 0;
--bs-link-color: #457aab; --bs-box-shadow: 0 0.5rem 1rem rgba(34, 34, 34, 0.15);
--bs-link-hover-color: #233d56; --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(34, 34, 34, 0.075);
--bs-code-color: #d63384; --bs-box-shadow-lg: 0 1rem 3rem rgba(34, 34, 34, 0.175);
--bs-highlight-bg: #fff3cd; --bs-box-shadow-inset: inset 0 1px 2px rgba(34, 34, 34, 0.075);
--bs-focus-ring-width: 0.25rem;
--bs-focus-ring-opacity: 0.25;
--bs-focus-ring-color: rgba(69, 122, 171, 0.25);
--bs-form-valid-color: #2a8256;
--bs-form-valid-border-color: #2a8256;
--bs-form-invalid-color: #c42526;
--bs-form-invalid-border-color: #c42526;
}
[data-bs-theme=dark] {
color-scheme: dark;
--bs-body-color: #d4d4d4;
--bs-body-color-rgb: 212, 212, 212;
--bs-body-bg: #2a2a2a;
--bs-body-bg-rgb: 42, 42, 42;
--bs-emphasis-color: #fff;
--bs-emphasis-color-rgb: 255, 255, 255;
--bs-secondary-color: rgba(212, 212, 212, 0.75);
--bs-secondary-color-rgb: 212, 212, 212;
--bs-secondary-bg: #454545;
--bs-secondary-bg-rgb: 69, 69, 69;
--bs-tertiary-color: rgba(212, 212, 212, 0.5);
--bs-tertiary-color-rgb: 212, 212, 212;
--bs-tertiary-bg: #383838;
--bs-tertiary-bg-rgb: 56, 56, 56;
--bs-primary-text-emphasis: #8fafcd;
--bs-secondary-text-emphasis: #9ea7ac;
--bs-success-text-emphasis: #7fb49a;
--bs-info-text-emphasis: #66a4d1;
--bs-warning-text-emphasis: #ffda6a;
--bs-danger-text-emphasis: #dc7c7d;
--bs-light-text-emphasis: #f2f2f2;
--bs-dark-text-emphasis: #d4d4d4;
--bs-primary-bg-subtle: #0e1822;
--bs-secondary-bg-subtle: #131617;
--bs-success-bg-subtle: #081a11;
--bs-info-bg-subtle: #001524;
--bs-warning-bg-subtle: #332701;
--bs-danger-bg-subtle: #270708;
--bs-light-bg-subtle: #454545;
--bs-dark-bg-subtle: #343434;
--bs-primary-border-subtle: #294967;
--bs-secondary-border-subtle: #384146;
--bs-success-border-subtle: #194e34;
--bs-info-border-subtle: #003e6b;
--bs-warning-border-subtle: #997404;
--bs-danger-border-subtle: #761617;
--bs-light-border-subtle: #5d6d75;
--bs-dark-border-subtle: #454545;
--bs-heading-color: inherit;
--bs-link-color: #8fafcd;
--bs-link-hover-color: #c7d7e6;
--bs-link-color-rgb: 143, 175, 205;
--bs-link-hover-color-rgb: 199, 215, 230;
--bs-code-color: #e685b5;
--bs-highlight-color: #d4d4d4;
--bs-highlight-bg: #664d03;
--bs-border-color: #5d6d75;
--bs-border-color-translucent: rgba(255, 255, 255, 0.15);
--bs-form-valid-color: #7fb49a;
--bs-form-valid-border-color: #7fb49a;
--bs-form-invalid-color: #dc7c7d;
--bs-form-invalid-border-color: #dc7c7d;
} }
*, *,
@ -102,7 +209,7 @@ hr {
margin: 1rem 0; margin: 1rem 0;
color: inherit; color: inherit;
border: 0; border: 0;
border-top: 1px solid; border-top: var(--bs-border-width) solid;
opacity: 0.25; opacity: 0.25;
} }
@ -111,6 +218,7 @@ h6, h5, h4, h3, h2, h1 {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
font-weight: 600; font-weight: 600;
line-height: 1.2; line-height: 1.2;
color: var(--bs-heading-color);
} }
h1 { h1 {
@ -214,6 +322,7 @@ small {
mark { mark {
padding: 0.1875em; padding: 0.1875em;
color: var(--bs-highlight-color);
background-color: var(--bs-highlight-bg); background-color: var(--bs-highlight-bg);
} }
@ -234,11 +343,11 @@ sup {
} }
a { a {
color: var(--bs-link-color); color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 1));
text-decoration: underline; text-decoration: underline;
} }
a:hover { a:hover {
color: var(--bs-link-hover-color); --bs-link-color-rgb: var(--bs-link-hover-color-rgb);
} }
a:not([href]):not([class]), a:not([href]):not([class]):hover { a:not([href]):not([class]), a:not([href]):not([class]):hover {
@ -304,7 +413,7 @@ table {
caption { caption {
padding-top: 0.25rem; padding-top: 0.25rem;
padding-bottom: 0.25rem; padding-bottom: 0.25rem;
color: #a1a3a9; color: var(--bs-secondary-color);
text-align: right; text-align: right;
} }
@ -401,8 +510,8 @@ legend {
width: 100%; width: 100%;
padding: 0; padding: 0;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit; line-height: inherit;
font-size: calc(1.275rem + 0.3vw);
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
legend { legend {
@ -428,8 +537,12 @@ legend + * {
} }
[type=search] { [type=search] {
outline-offset: -2px;
-webkit-appearance: textfield; -webkit-appearance: textfield;
outline-offset: -2px;
}
[type=search]::-webkit-search-cancel-button {
cursor: pointer;
filter: grayscale(1);
} }
[type="tel"], [type="tel"],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2300
dist/css/bootstrap.css vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2115
dist/js/bootstrap.esm.js vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2123
dist/js/bootstrap.js vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

52
js/dist/alert.js vendored
View file

@ -1,25 +1,22 @@
/*! /*!
* Bootstrap alert.js v5.2.3 (https://getbootstrap.com/) * Bootstrap alert.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./base-component'), require('./util/component-functions')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./util/component-functions.js'), require('./util/index.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './base-component', './util/component-functions'], factory) : typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './util/component-functions', './util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Index, global.EventHandler, global.BaseComponent, global.ComponentFunctions)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.BaseComponent, global.EventHandler, global.ComponentFunctions, global.Index));
})(this, (function (index, EventHandler, BaseComponent, componentFunctions) { 'use strict'; })(this, (function (BaseComponent, EventHandler, componentFunctions_js, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): alert.js * Bootstrap alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -31,68 +28,61 @@
const EVENT_CLOSED = `closed${EVENT_KEY}`; const EVENT_CLOSED = `closed${EVENT_KEY}`;
const CLASS_NAME_FADE = 'fade'; const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_SHOW = 'show'; const CLASS_NAME_SHOW = 'show';
/** /**
* Class definition * Class definition
*/ */
class Alert extends BaseComponent__default.default { class Alert extends BaseComponent {
// Getters // Getters
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
close() { close() {
const closeEvent = EventHandler__default.default.trigger(this._element, EVENT_CLOSE); const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
if (closeEvent.defaultPrevented) { if (closeEvent.defaultPrevented) {
return; return;
} }
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
const isAnimated = this._element.classList.contains(CLASS_NAME_FADE); const isAnimated = this._element.classList.contains(CLASS_NAME_FADE);
this._queueCallback(() => this._destroyElement(), this._element, isAnimated); this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
} // Private }
// Private
_destroyElement() { _destroyElement() {
this._element.remove(); this._element.remove();
EventHandler.trigger(this._element, EVENT_CLOSED);
EventHandler__default.default.trigger(this._element, EVENT_CLOSED);
this.dispose(); this.dispose();
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = Alert.getOrCreateInstance(this); const data = Alert.getOrCreateInstance(this);
if (typeof config !== 'string') { if (typeof config !== 'string') {
return; return;
} }
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](this); data[config](this);
}); });
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
componentFunctions_js.enableDismissTrigger(Alert, 'close');
componentFunctions.enableDismissTrigger(Alert, 'close');
/** /**
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(Alert); index_js.defineJQueryPlugin(Alert);
return Alert; return Alert;

View file

@ -1 +1 @@
{"version":3,"file":"alert.js","sources":["../src/alert.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\nimport { enableDismissTrigger } from './util/component-functions'\n\n/**\n * Constants\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE)\n\n if (closeEvent.defaultPrevented) {\n return\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated)\n }\n\n // Private\n _destroyElement() {\n this._element.remove()\n EventHandler.trigger(this._element, EVENT_CLOSED)\n this.dispose()\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Alert, 'close')\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n"],"names":["NAME","DATA_KEY","EVENT_KEY","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_FADE","CLASS_NAME_SHOW","Alert","BaseComponent","close","closeEvent","EventHandler","trigger","_element","defaultPrevented","classList","remove","isAnimated","contains","_queueCallback","_destroyElement","dispose","jQueryInterface","config","each","data","getOrCreateInstance","undefined","startsWith","TypeError","enableDismissTrigger","defineJQueryPlugin"],"mappings":";;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAOA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,OAAb,CAAA;EACA,MAAMC,QAAQ,GAAG,UAAjB,CAAA;EACA,MAAMC,SAAS,GAAI,CAAGD,CAAAA,EAAAA,QAAS,CAA/B,CAAA,CAAA;EAEA,MAAME,WAAW,GAAI,CAAOD,KAAAA,EAAAA,SAAU,CAAtC,CAAA,CAAA;EACA,MAAME,YAAY,GAAI,CAAQF,MAAAA,EAAAA,SAAU,CAAxC,CAAA,CAAA;EACA,MAAMG,eAAe,GAAG,MAAxB,CAAA;EACA,MAAMC,eAAe,GAAG,MAAxB,CAAA;EAEA;EACA;EACA;;EAEA,MAAMC,KAAN,SAAoBC,8BAApB,CAAkC;EAChC;EACe,EAAA,WAAJR,IAAI,GAAG;EAChB,IAAA,OAAOA,IAAP,CAAA;EACD,GAJ+B;;;EAOhCS,EAAAA,KAAK,GAAG;MACN,MAAMC,UAAU,GAAGC,6BAAY,CAACC,OAAb,CAAqB,IAAKC,CAAAA,QAA1B,EAAoCV,WAApC,CAAnB,CAAA;;MAEA,IAAIO,UAAU,CAACI,gBAAf,EAAiC;EAC/B,MAAA,OAAA;EACD,KAAA;;EAED,IAAA,IAAA,CAAKD,QAAL,CAAcE,SAAd,CAAwBC,MAAxB,CAA+BV,eAA/B,CAAA,CAAA;;MAEA,MAAMW,UAAU,GAAG,IAAA,CAAKJ,QAAL,CAAcE,SAAd,CAAwBG,QAAxB,CAAiCb,eAAjC,CAAnB,CAAA;;MACA,IAAKc,CAAAA,cAAL,CAAoB,MAAM,IAAKC,CAAAA,eAAL,EAA1B,EAAkD,IAAA,CAAKP,QAAvD,EAAiEI,UAAjE,CAAA,CAAA;EACD,GAlB+B;;;EAqBhCG,EAAAA,eAAe,GAAG;MAChB,IAAKP,CAAAA,QAAL,CAAcG,MAAd,EAAA,CAAA;;EACAL,IAAAA,6BAAY,CAACC,OAAb,CAAqB,IAAKC,CAAAA,QAA1B,EAAoCT,YAApC,CAAA,CAAA;EACA,IAAA,IAAA,CAAKiB,OAAL,EAAA,CAAA;EACD,GAzB+B;;;IA4BV,OAAfC,eAAe,CAACC,MAAD,EAAS;MAC7B,OAAO,IAAA,CAAKC,IAAL,CAAU,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGlB,KAAK,CAACmB,mBAAN,CAA0B,IAA1B,CAAb,CAAA;;EAEA,MAAA,IAAI,OAAOH,MAAP,KAAkB,QAAtB,EAAgC;EAC9B,QAAA,OAAA;EACD,OAAA;;EAED,MAAA,IAAIE,IAAI,CAACF,MAAD,CAAJ,KAAiBI,SAAjB,IAA8BJ,MAAM,CAACK,UAAP,CAAkB,GAAlB,CAA9B,IAAwDL,MAAM,KAAK,aAAvE,EAAsF;EACpF,QAAA,MAAM,IAAIM,SAAJ,CAAe,CAAmBN,iBAAAA,EAAAA,MAAO,GAAzC,CAAN,CAAA;EACD,OAAA;;EAEDE,MAAAA,IAAI,CAACF,MAAD,CAAJ,CAAa,IAAb,CAAA,CAAA;EACD,KAZM,CAAP,CAAA;EAaD,GAAA;;EA1C+B,CAAA;EA6ClC;EACA;EACA;;;AAEAO,yCAAoB,CAACvB,KAAD,EAAQ,OAAR,CAApB,CAAA;EAEA;EACA;EACA;;AAEAwB,0BAAkB,CAACxB,KAAD,CAAlB;;;;;;;;"} {"version":3,"file":"alert.js","sources":["../src/alert.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE)\n\n if (closeEvent.defaultPrevented) {\n return\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated)\n }\n\n // Private\n _destroyElement() {\n this._element.remove()\n EventHandler.trigger(this._element, EVENT_CLOSED)\n this.dispose()\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Alert, 'close')\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n"],"names":["NAME","DATA_KEY","EVENT_KEY","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_FADE","CLASS_NAME_SHOW","Alert","BaseComponent","close","closeEvent","EventHandler","trigger","_element","defaultPrevented","classList","remove","isAnimated","contains","_queueCallback","_destroyElement","dispose","jQueryInterface","config","each","data","getOrCreateInstance","undefined","startsWith","TypeError","enableDismissTrigger","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAOA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,OAAO;EACpB,MAAMC,QAAQ,GAAG,UAAU;EAC3B,MAAMC,SAAS,GAAG,CAAA,CAAA,EAAID,QAAQ,CAAA,CAAE;EAEhC,MAAME,WAAW,GAAG,CAAA,KAAA,EAAQD,SAAS,CAAA,CAAE;EACvC,MAAME,YAAY,GAAG,CAAA,MAAA,EAASF,SAAS,CAAA,CAAE;EACzC,MAAMG,eAAe,GAAG,MAAM;EAC9B,MAAMC,eAAe,GAAG,MAAM;;EAE9B;EACA;EACA;;EAEA,MAAMC,KAAK,SAASC,aAAa,CAAC;EAChC;IACA,WAAWR,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI;EACb,EAAA;;EAEA;EACAS,EAAAA,KAAKA,GAAG;MACN,MAAMC,UAAU,GAAGC,YAAY,CAACC,OAAO,CAAC,IAAI,CAACC,QAAQ,EAAEV,WAAW,CAAC;MAEnE,IAAIO,UAAU,CAACI,gBAAgB,EAAE;EAC/B,MAAA;EACF,IAAA;MAEA,IAAI,CAACD,QAAQ,CAACE,SAAS,CAACC,MAAM,CAACV,eAAe,CAAC;MAE/C,MAAMW,UAAU,GAAG,IAAI,CAACJ,QAAQ,CAACE,SAAS,CAACG,QAAQ,CAACb,eAAe,CAAC;EACpE,IAAA,IAAI,CAACc,cAAc,CAAC,MAAM,IAAI,CAACC,eAAe,EAAE,EAAE,IAAI,CAACP,QAAQ,EAAEI,UAAU,CAAC;EAC9E,EAAA;;EAEA;EACAG,EAAAA,eAAeA,GAAG;EAChB,IAAA,IAAI,CAACP,QAAQ,CAACG,MAAM,EAAE;MACtBL,YAAY,CAACC,OAAO,CAAC,IAAI,CAACC,QAAQ,EAAET,YAAY,CAAC;MACjD,IAAI,CAACiB,OAAO,EAAE;EAChB,EAAA;;EAEA;IACA,OAAOC,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGlB,KAAK,CAACmB,mBAAmB,CAAC,IAAI,CAAC;EAE5C,MAAA,IAAI,OAAOH,MAAM,KAAK,QAAQ,EAAE;EAC9B,QAAA;EACF,MAAA;EAEA,MAAA,IAAIE,IAAI,CAACF,MAAM,CAAC,KAAKI,SAAS,IAAIJ,MAAM,CAACK,UAAU,CAAC,GAAG,CAAC,IAAIL,MAAM,KAAK,aAAa,EAAE;EACpF,QAAA,MAAM,IAAIM,SAAS,CAAC,CAAA,iBAAA,EAAoBN,MAAM,GAAG,CAAC;EACpD,MAAA;EAEAE,MAAAA,IAAI,CAACF,MAAM,CAAC,CAAC,IAAI,CAAC;EACpB,IAAA,CAAC,CAAC;EACJ,EAAA;EACF;;EAEA;EACA;EACA;;AAEAO,4CAAoB,CAACvB,KAAK,EAAE,OAAO,CAAC;;EAEpC;EACA;EACA;;AAEAwB,6BAAkB,CAACxB,KAAK,CAAC;;;;;;;;"}

View file

@ -1,97 +1,83 @@
/*! /*!
* Bootstrap base-component.js v5.2.3 (https://getbootstrap.com/) * Bootstrap base-component.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data'), require('./util/index'), require('./dom/event-handler'), require('./util/config')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./util/config.js'), require('./util/index.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './util/index', './dom/event-handler', './util/config'], factory) : typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './util/config', './util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BaseComponent = factory(global.Data, global.Index, global.EventHandler, global.Config)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BaseComponent = factory(global.Data, global.EventHandler, global.Config, global.Index));
})(this, (function (Data, index, EventHandler, Config) { 'use strict'; })(this, (function (Data, EventHandler, Config, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const Config__default = /*#__PURE__*/_interopDefaultLegacy(Config);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): base-component.js * Bootstrap base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
const VERSION = '5.2.3'; const VERSION = '5.3.8';
/** /**
* Class definition * Class definition
*/ */
class BaseComponent extends Config__default.default { class BaseComponent extends Config {
constructor(element, config) { constructor(element, config) {
super(); super();
element = index.getElement(element); element = index_js.getElement(element);
if (!element) { if (!element) {
return; return;
} }
this._element = element; this._element = element;
this._config = this._getConfig(config); this._config = this._getConfig(config);
Data__default.default.set(this._element, this.constructor.DATA_KEY, this); Data.set(this._element, this.constructor.DATA_KEY, this);
} // Public }
// Public
dispose() { dispose() {
Data__default.default.remove(this._element, this.constructor.DATA_KEY); Data.remove(this._element, this.constructor.DATA_KEY);
EventHandler__default.default.off(this._element, this.constructor.EVENT_KEY); EventHandler.off(this._element, this.constructor.EVENT_KEY);
for (const propertyName of Object.getOwnPropertyNames(this)) { for (const propertyName of Object.getOwnPropertyNames(this)) {
this[propertyName] = null; this[propertyName] = null;
} }
} }
// Private
_queueCallback(callback, element, isAnimated = true) { _queueCallback(callback, element, isAnimated = true) {
index.executeAfterTransition(callback, element, isAnimated); index_js.executeAfterTransition(callback, element, isAnimated);
} }
_getConfig(config) { _getConfig(config) {
config = this._mergeConfigObj(config, this._element); config = this._mergeConfigObj(config, this._element);
config = this._configAfterMerge(config); config = this._configAfterMerge(config);
this._typeCheckConfig(config); this._typeCheckConfig(config);
return config; return config;
} // Static
static getInstance(element) {
return Data__default.default.get(index.getElement(element), this.DATA_KEY);
} }
// Static
static getInstance(element) {
return Data.get(index_js.getElement(element), this.DATA_KEY);
}
static getOrCreateInstance(element, config = {}) { static getOrCreateInstance(element, config = {}) {
return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null); return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
} }
static get VERSION() { static get VERSION() {
return VERSION; return VERSION;
} }
static get DATA_KEY() { static get DATA_KEY() {
return `bs.${this.NAME}`; return `bs.${this.NAME}`;
} }
static get EVENT_KEY() { static get EVENT_KEY() {
return `.${this.DATA_KEY}`; return `.${this.DATA_KEY}`;
} }
static eventName(name) { static eventName(name) {
return `${name}${this.EVENT_KEY}`; return `${name}${this.EVENT_KEY}`;
} }
} }
return BaseComponent; return BaseComponent;

View file

@ -1 +1 @@
{"version":3,"file":"base-component.js","sources":["../src/base-component.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\nimport { executeAfterTransition, getElement } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Config from './util/config'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.2.3'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super()\n\n element = getElement(element)\n if (!element) {\n return\n }\n\n this._element = element\n this._config = this._getConfig(config)\n\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`\n }\n}\n\nexport default BaseComponent\n"],"names":["VERSION","BaseComponent","Config","constructor","element","config","getElement","_element","_config","_getConfig","Data","set","DATA_KEY","dispose","remove","EventHandler","off","EVENT_KEY","propertyName","Object","getOwnPropertyNames","_queueCallback","callback","isAnimated","executeAfterTransition","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","getInstance","get","getOrCreateInstance","NAME","eventName","name"],"mappings":";;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAOA;EACA;EACA;;EAEA,MAAMA,OAAO,GAAG,OAAhB,CAAA;EAEA;EACA;EACA;;EAEA,MAAMC,aAAN,SAA4BC,uBAA5B,CAAmC;EACjCC,EAAAA,WAAW,CAACC,OAAD,EAAUC,MAAV,EAAkB;EAC3B,IAAA,KAAA,EAAA,CAAA;EAEAD,IAAAA,OAAO,GAAGE,gBAAU,CAACF,OAAD,CAApB,CAAA;;MACA,IAAI,CAACA,OAAL,EAAc;EACZ,MAAA,OAAA;EACD,KAAA;;MAED,IAAKG,CAAAA,QAAL,GAAgBH,OAAhB,CAAA;EACA,IAAA,IAAA,CAAKI,OAAL,GAAe,IAAA,CAAKC,UAAL,CAAgBJ,MAAhB,CAAf,CAAA;MAEAK,qBAAI,CAACC,GAAL,CAAS,IAAKJ,CAAAA,QAAd,EAAwB,IAAA,CAAKJ,WAAL,CAAiBS,QAAzC,EAAmD,IAAnD,CAAA,CAAA;EACD,GAbgC;;;EAgBjCC,EAAAA,OAAO,GAAG;MACRH,qBAAI,CAACI,MAAL,CAAY,IAAA,CAAKP,QAAjB,EAA2B,IAAA,CAAKJ,WAAL,CAAiBS,QAA5C,CAAA,CAAA;MACAG,6BAAY,CAACC,GAAb,CAAiB,IAAA,CAAKT,QAAtB,EAAgC,IAAA,CAAKJ,WAAL,CAAiBc,SAAjD,CAAA,CAAA;;MAEA,KAAK,MAAMC,YAAX,IAA2BC,MAAM,CAACC,mBAAP,CAA2B,IAA3B,CAA3B,EAA6D;QAC3D,IAAKF,CAAAA,YAAL,IAAqB,IAArB,CAAA;EACD,KAAA;EACF,GAAA;;IAEDG,cAAc,CAACC,QAAD,EAAWlB,OAAX,EAAoBmB,UAAU,GAAG,IAAjC,EAAuC;EACnDC,IAAAA,4BAAsB,CAACF,QAAD,EAAWlB,OAAX,EAAoBmB,UAApB,CAAtB,CAAA;EACD,GAAA;;IAEDd,UAAU,CAACJ,MAAD,EAAS;MACjBA,MAAM,GAAG,KAAKoB,eAAL,CAAqBpB,MAArB,EAA6B,IAAA,CAAKE,QAAlC,CAAT,CAAA;EACAF,IAAAA,MAAM,GAAG,IAAA,CAAKqB,iBAAL,CAAuBrB,MAAvB,CAAT,CAAA;;MACA,IAAKsB,CAAAA,gBAAL,CAAsBtB,MAAtB,CAAA,CAAA;;EACA,IAAA,OAAOA,MAAP,CAAA;EACD,GAlCgC;;;IAqCf,OAAXuB,WAAW,CAACxB,OAAD,EAAU;MAC1B,OAAOM,qBAAI,CAACmB,GAAL,CAASvB,gBAAU,CAACF,OAAD,CAAnB,EAA8B,IAAKQ,CAAAA,QAAnC,CAAP,CAAA;EACD,GAAA;;EAEyB,EAAA,OAAnBkB,mBAAmB,CAAC1B,OAAD,EAAUC,MAAM,GAAG,EAAnB,EAAuB;EAC/C,IAAA,OAAO,KAAKuB,WAAL,CAAiBxB,OAAjB,CAA6B,IAAA,IAAI,IAAJ,CAASA,OAAT,EAAkB,OAAOC,MAAP,KAAkB,QAAlB,GAA6BA,MAA7B,GAAsC,IAAxD,CAApC,CAAA;EACD,GAAA;;EAEiB,EAAA,WAAPL,OAAO,GAAG;EACnB,IAAA,OAAOA,OAAP,CAAA;EACD,GAAA;;EAEkB,EAAA,WAARY,QAAQ,GAAG;MACpB,OAAQ,CAAA,GAAA,EAAK,IAAKmB,CAAAA,IAAK,CAAvB,CAAA,CAAA;EACD,GAAA;;EAEmB,EAAA,WAATd,SAAS,GAAG;MACrB,OAAQ,CAAA,CAAA,EAAG,IAAKL,CAAAA,QAAS,CAAzB,CAAA,CAAA;EACD,GAAA;;IAEe,OAAToB,SAAS,CAACC,IAAD,EAAO;EACrB,IAAA,OAAQ,CAAEA,EAAAA,IAAK,CAAE,EAAA,IAAA,CAAKhB,SAAU,CAAhC,CAAA,CAAA;EACD,GAAA;;EA3DgC;;;;;;;;"} {"version":3,"file":"base-component.js","sources":["../src/base-component.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data.js'\nimport EventHandler from './dom/event-handler.js'\nimport Config from './util/config.js'\nimport { executeAfterTransition, getElement } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.3.8'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super()\n\n element = getElement(element)\n if (!element) {\n return\n }\n\n this._element = element\n this._config = this._getConfig(config)\n\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null\n }\n }\n\n // Private\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`\n }\n}\n\nexport default BaseComponent\n"],"names":["VERSION","BaseComponent","Config","constructor","element","config","getElement","_element","_config","_getConfig","Data","set","DATA_KEY","dispose","remove","EventHandler","off","EVENT_KEY","propertyName","Object","getOwnPropertyNames","_queueCallback","callback","isAnimated","executeAfterTransition","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","getInstance","get","getOrCreateInstance","NAME","eventName","name"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAOA;EACA;EACA;;EAEA,MAAMA,OAAO,GAAG,OAAO;;EAEvB;EACA;EACA;;EAEA,MAAMC,aAAa,SAASC,MAAM,CAAC;EACjCC,EAAAA,WAAWA,CAACC,OAAO,EAAEC,MAAM,EAAE;EAC3B,IAAA,KAAK,EAAE;EAEPD,IAAAA,OAAO,GAAGE,mBAAU,CAACF,OAAO,CAAC;MAC7B,IAAI,CAACA,OAAO,EAAE;EACZ,MAAA;EACF,IAAA;MAEA,IAAI,CAACG,QAAQ,GAAGH,OAAO;MACvB,IAAI,CAACI,OAAO,GAAG,IAAI,CAACC,UAAU,CAACJ,MAAM,CAAC;EAEtCK,IAAAA,IAAI,CAACC,GAAG,CAAC,IAAI,CAACJ,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACS,QAAQ,EAAE,IAAI,CAAC;EAC1D,EAAA;;EAEA;EACAC,EAAAA,OAAOA,GAAG;EACRH,IAAAA,IAAI,CAACI,MAAM,CAAC,IAAI,CAACP,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACS,QAAQ,CAAC;EACrDG,IAAAA,YAAY,CAACC,GAAG,CAAC,IAAI,CAACT,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACc,SAAS,CAAC;MAE3D,KAAK,MAAMC,YAAY,IAAIC,MAAM,CAACC,mBAAmB,CAAC,IAAI,CAAC,EAAE;EAC3D,MAAA,IAAI,CAACF,YAAY,CAAC,GAAG,IAAI;EAC3B,IAAA;EACF,EAAA;;EAEA;IACAG,cAAcA,CAACC,QAAQ,EAAElB,OAAO,EAAEmB,UAAU,GAAG,IAAI,EAAE;EACnDC,IAAAA,+BAAsB,CAACF,QAAQ,EAAElB,OAAO,EAAEmB,UAAU,CAAC;EACvD,EAAA;IAEAd,UAAUA,CAACJ,MAAM,EAAE;MACjBA,MAAM,GAAG,IAAI,CAACoB,eAAe,CAACpB,MAAM,EAAE,IAAI,CAACE,QAAQ,CAAC;EACpDF,IAAAA,MAAM,GAAG,IAAI,CAACqB,iBAAiB,CAACrB,MAAM,CAAC;EACvC,IAAA,IAAI,CAACsB,gBAAgB,CAACtB,MAAM,CAAC;EAC7B,IAAA,OAAOA,MAAM;EACf,EAAA;;EAEA;IACA,OAAOuB,WAAWA,CAACxB,OAAO,EAAE;EAC1B,IAAA,OAAOM,IAAI,CAACmB,GAAG,CAACvB,mBAAU,CAACF,OAAO,CAAC,EAAE,IAAI,CAACQ,QAAQ,CAAC;EACrD,EAAA;IAEA,OAAOkB,mBAAmBA,CAAC1B,OAAO,EAAEC,MAAM,GAAG,EAAE,EAAE;MAC/C,OAAO,IAAI,CAACuB,WAAW,CAACxB,OAAO,CAAC,IAAI,IAAI,IAAI,CAACA,OAAO,EAAE,OAAOC,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAG,IAAI,CAAC;EACnG,EAAA;IAEA,WAAWL,OAAOA,GAAG;EACnB,IAAA,OAAOA,OAAO;EAChB,EAAA;IAEA,WAAWY,QAAQA,GAAG;EACpB,IAAA,OAAO,CAAA,GAAA,EAAM,IAAI,CAACmB,IAAI,CAAA,CAAE;EAC1B,EAAA;IAEA,WAAWd,SAASA,GAAG;EACrB,IAAA,OAAO,CAAA,CAAA,EAAI,IAAI,CAACL,QAAQ,CAAA,CAAE;EAC5B,EAAA;IAEA,OAAOoB,SAASA,CAACC,IAAI,EAAE;EACrB,IAAA,OAAO,GAAGA,IAAI,CAAA,EAAG,IAAI,CAAChB,SAAS,CAAA,CAAE;EACnC,EAAA;EACF;;;;;;;;"}

39
js/dist/button.js vendored
View file

@ -1,25 +1,22 @@
/*! /*!
* Bootstrap button.js v5.2.3 (https://getbootstrap.com/) * Bootstrap button.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./base-component')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./util/index.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Index, global.EventHandler, global.BaseComponent)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.BaseComponent, global.EventHandler, global.Index));
})(this, (function (index, EventHandler, BaseComponent) { 'use strict'; })(this, (function (BaseComponent, EventHandler, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): button.js * Bootstrap button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -31,50 +28,50 @@
const CLASS_NAME_ACTIVE = 'active'; const CLASS_NAME_ACTIVE = 'active';
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]'; const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
/** /**
* Class definition * Class definition
*/ */
class Button extends BaseComponent__default.default { class Button extends BaseComponent {
// Getters // Getters
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
toggle() { toggle() {
// Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE)); this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = Button.getOrCreateInstance(this); const data = Button.getOrCreateInstance(this);
if (config === 'toggle') { if (config === 'toggle') {
data[config](); data[config]();
} }
}); });
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
event.preventDefault(); event.preventDefault();
const button = event.target.closest(SELECTOR_DATA_TOGGLE); const button = event.target.closest(SELECTOR_DATA_TOGGLE);
const data = Button.getOrCreateInstance(button); const data = Button.getOrCreateInstance(button);
data.toggle(); data.toggle();
}); });
/** /**
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(Button); index_js.defineJQueryPlugin(Button);
return Button; return Button;

View file

@ -1 +1 @@
{"version":3,"file":"button.js","sources":["../src/button.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * Constants\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this)\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n const data = Button.getOrCreateInstance(button)\n\n data.toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n"],"names":["NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","Button","BaseComponent","toggle","_element","setAttribute","classList","jQueryInterface","config","each","data","getOrCreateInstance","EventHandler","on","document","event","preventDefault","button","target","closest","defineJQueryPlugin"],"mappings":";;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAMA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,QAAb,CAAA;EACA,MAAMC,QAAQ,GAAG,WAAjB,CAAA;EACA,MAAMC,SAAS,GAAI,CAAGD,CAAAA,EAAAA,QAAS,CAA/B,CAAA,CAAA;EACA,MAAME,YAAY,GAAG,WAArB,CAAA;EAEA,MAAMC,iBAAiB,GAAG,QAA1B,CAAA;EACA,MAAMC,oBAAoB,GAAG,2BAA7B,CAAA;EACA,MAAMC,oBAAoB,GAAI,CAAA,KAAA,EAAOJ,SAAU,CAAA,EAAEC,YAAa,CAA9D,CAAA,CAAA;EAEA;EACA;EACA;;EAEA,MAAMI,MAAN,SAAqBC,8BAArB,CAAmC;EACjC;EACe,EAAA,WAAJR,IAAI,GAAG;EAChB,IAAA,OAAOA,IAAP,CAAA;EACD,GAJgC;;;EAOjCS,EAAAA,MAAM,GAAG;EACP;EACA,IAAA,IAAA,CAAKC,QAAL,CAAcC,YAAd,CAA2B,cAA3B,EAA2C,IAAA,CAAKD,QAAL,CAAcE,SAAd,CAAwBH,MAAxB,CAA+BL,iBAA/B,CAA3C,CAAA,CAAA;EACD,GAVgC;;;IAaX,OAAfS,eAAe,CAACC,MAAD,EAAS;MAC7B,OAAO,IAAA,CAAKC,IAAL,CAAU,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGT,MAAM,CAACU,mBAAP,CAA2B,IAA3B,CAAb,CAAA;;QAEA,IAAIH,MAAM,KAAK,QAAf,EAAyB;UACvBE,IAAI,CAACF,MAAD,CAAJ,EAAA,CAAA;EACD,OAAA;EACF,KANM,CAAP,CAAA;EAOD,GAAA;;EArBgC,CAAA;EAwBnC;EACA;EACA;;;AAEAI,+BAAY,CAACC,EAAb,CAAgBC,QAAhB,EAA0Bd,oBAA1B,EAAgDD,oBAAhD,EAAsEgB,KAAK,IAAI;EAC7EA,EAAAA,KAAK,CAACC,cAAN,EAAA,CAAA;IAEA,MAAMC,MAAM,GAAGF,KAAK,CAACG,MAAN,CAAaC,OAAb,CAAqBpB,oBAArB,CAAf,CAAA;EACA,EAAA,MAAMW,IAAI,GAAGT,MAAM,CAACU,mBAAP,CAA2BM,MAA3B,CAAb,CAAA;EAEAP,EAAAA,IAAI,CAACP,MAAL,EAAA,CAAA;EACD,CAPD,CAAA,CAAA;EASA;EACA;EACA;;AAEAiB,0BAAkB,CAACnB,MAAD,CAAlB;;;;;;;;"} {"version":3,"file":"button.js","sources":["../src/button.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this)\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n const data = Button.getOrCreateInstance(button)\n\n data.toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n"],"names":["NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","Button","BaseComponent","toggle","_element","setAttribute","classList","jQueryInterface","config","each","data","getOrCreateInstance","EventHandler","on","document","event","preventDefault","button","target","closest","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAMA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,QAAQ;EACrB,MAAMC,QAAQ,GAAG,WAAW;EAC5B,MAAMC,SAAS,GAAG,CAAA,CAAA,EAAID,QAAQ,CAAA,CAAE;EAChC,MAAME,YAAY,GAAG,WAAW;EAEhC,MAAMC,iBAAiB,GAAG,QAAQ;EAClC,MAAMC,oBAAoB,GAAG,2BAA2B;EACxD,MAAMC,oBAAoB,GAAG,CAAA,KAAA,EAAQJ,SAAS,CAAA,EAAGC,YAAY,CAAA,CAAE;;EAE/D;EACA;EACA;;EAEA,MAAMI,MAAM,SAASC,aAAa,CAAC;EACjC;IACA,WAAWR,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI;EACb,EAAA;;EAEA;EACAS,EAAAA,MAAMA,GAAG;EACP;EACA,IAAA,IAAI,CAACC,QAAQ,CAACC,YAAY,CAAC,cAAc,EAAE,IAAI,CAACD,QAAQ,CAACE,SAAS,CAACH,MAAM,CAACL,iBAAiB,CAAC,CAAC;EAC/F,EAAA;;EAEA;IACA,OAAOS,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGT,MAAM,CAACU,mBAAmB,CAAC,IAAI,CAAC;QAE7C,IAAIH,MAAM,KAAK,QAAQ,EAAE;EACvBE,QAAAA,IAAI,CAACF,MAAM,CAAC,EAAE;EAChB,MAAA;EACF,IAAA,CAAC,CAAC;EACJ,EAAA;EACF;;EAEA;EACA;EACA;;EAEAI,YAAY,CAACC,EAAE,CAACC,QAAQ,EAAEd,oBAAoB,EAAED,oBAAoB,EAAEgB,KAAK,IAAI;IAC7EA,KAAK,CAACC,cAAc,EAAE;IAEtB,MAAMC,MAAM,GAAGF,KAAK,CAACG,MAAM,CAACC,OAAO,CAACpB,oBAAoB,CAAC;EACzD,EAAA,MAAMW,IAAI,GAAGT,MAAM,CAACU,mBAAmB,CAACM,MAAM,CAAC;IAE/CP,IAAI,CAACP,MAAM,EAAE;EACf,CAAC,CAAC;;EAEF;EACA;EACA;;AAEAiB,6BAAkB,CAACnB,MAAM,CAAC;;;;;;;;"}

185
js/dist/carousel.js vendored
View file

@ -1,28 +1,22 @@
/*! /*!
* Bootstrap carousel.js v5.2.3 (https://getbootstrap.com/) * Bootstrap carousel.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/manipulator'), require('./dom/selector-engine'), require('./util/swipe'), require('./base-component')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./util/index.js'), require('./util/swipe.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './util/swipe', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './util/index', './util/swipe'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Index, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Swipe, global.BaseComponent)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.BaseComponent, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Index, global.Swipe));
})(this, (function (index, EventHandler, Manipulator, SelectorEngine, Swipe, BaseComponent) { 'use strict'; })(this, (function (BaseComponent, EventHandler, Manipulator, SelectorEngine, index_js, Swipe) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
const Swipe__default = /*#__PURE__*/_interopDefaultLegacy(Swipe);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): carousel.js * Bootstrap carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -82,11 +76,12 @@
touch: 'boolean', touch: 'boolean',
wrap: 'boolean' wrap: 'boolean'
}; };
/** /**
* Class definition * Class definition
*/ */
class Carousel extends BaseComponent__default.default { class Carousel extends BaseComponent {
constructor(element, config) { constructor(element, config) {
super(element, config); super(element, config);
this._interval = null; this._interval = null;
@ -94,136 +89,110 @@
this._isSliding = false; this._isSliding = false;
this.touchTimeout = null; this.touchTimeout = null;
this._swipeHelper = null; this._swipeHelper = null;
this._indicatorsElement = SelectorEngine__default.default.findOne(SELECTOR_INDICATORS, this._element); this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
this._addEventListeners(); this._addEventListeners();
if (this._config.ride === CLASS_NAME_CAROUSEL) { if (this._config.ride === CLASS_NAME_CAROUSEL) {
this.cycle(); this.cycle();
} }
} // Getters }
// Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
next() { next() {
this._slide(ORDER_NEXT); this._slide(ORDER_NEXT);
} }
nextWhenVisible() { nextWhenVisible() {
// FIXME TODO use `document.visibilityState` // FIXME TODO use `document.visibilityState`
// Don't call next when the page isn't visible // Don't call next when the page isn't visible
// or the carousel or its parent isn't visible // or the carousel or its parent isn't visible
if (!document.hidden && index.isVisible(this._element)) { if (!document.hidden && index_js.isVisible(this._element)) {
this.next(); this.next();
} }
} }
prev() { prev() {
this._slide(ORDER_PREV); this._slide(ORDER_PREV);
} }
pause() { pause() {
if (this._isSliding) { if (this._isSliding) {
index.triggerTransitionEnd(this._element); index_js.triggerTransitionEnd(this._element);
} }
this._clearInterval(); this._clearInterval();
} }
cycle() { cycle() {
this._clearInterval(); this._clearInterval();
this._updateInterval(); this._updateInterval();
this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval); this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);
} }
_maybeEnableCycle() { _maybeEnableCycle() {
if (!this._config.ride) { if (!this._config.ride) {
return; return;
} }
if (this._isSliding) { if (this._isSliding) {
EventHandler__default.default.one(this._element, EVENT_SLID, () => this.cycle()); EventHandler.one(this._element, EVENT_SLID, () => this.cycle());
return; return;
} }
this.cycle(); this.cycle();
} }
to(index) { to(index) {
const items = this._getItems(); const items = this._getItems();
if (index > items.length - 1 || index < 0) { if (index > items.length - 1 || index < 0) {
return; return;
} }
if (this._isSliding) { if (this._isSliding) {
EventHandler__default.default.one(this._element, EVENT_SLID, () => this.to(index)); EventHandler.one(this._element, EVENT_SLID, () => this.to(index));
return; return;
} }
const activeIndex = this._getItemIndex(this._getActive()); const activeIndex = this._getItemIndex(this._getActive());
if (activeIndex === index) { if (activeIndex === index) {
return; return;
} }
const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV; const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
this._slide(order, items[index]); this._slide(order, items[index]);
} }
dispose() { dispose() {
if (this._swipeHelper) { if (this._swipeHelper) {
this._swipeHelper.dispose(); this._swipeHelper.dispose();
} }
super.dispose(); super.dispose();
} // Private }
// Private
_configAfterMerge(config) { _configAfterMerge(config) {
config.defaultInterval = config.interval; config.defaultInterval = config.interval;
return config; return config;
} }
_addEventListeners() { _addEventListeners() {
if (this._config.keyboard) { if (this._config.keyboard) {
EventHandler__default.default.on(this._element, EVENT_KEYDOWN, event => this._keydown(event)); EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
} }
if (this._config.pause === 'hover') { if (this._config.pause === 'hover') {
EventHandler__default.default.on(this._element, EVENT_MOUSEENTER, () => this.pause()); EventHandler.on(this._element, EVENT_MOUSEENTER, () => this.pause());
EventHandler__default.default.on(this._element, EVENT_MOUSELEAVE, () => this._maybeEnableCycle()); EventHandler.on(this._element, EVENT_MOUSELEAVE, () => this._maybeEnableCycle());
} }
if (this._config.touch && Swipe.isSupported()) {
if (this._config.touch && Swipe__default.default.isSupported()) {
this._addTouchEventListeners(); this._addTouchEventListeners();
} }
} }
_addTouchEventListeners() { _addTouchEventListeners() {
for (const img of SelectorEngine__default.default.find(SELECTOR_ITEM_IMG, this._element)) { for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {
EventHandler__default.default.on(img, EVENT_DRAG_START, event => event.preventDefault()); EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());
} }
const endCallBack = () => { const endCallBack = () => {
if (this._config.pause !== 'hover') { if (this._config.pause !== 'hover') {
return; return;
} // If it's a touch-enabled device, mouseenter/leave are fired as }
// If it's a touch-enabled device, mouseenter/leave are fired as
// part of the mouse compatibility events on first tap - the carousel // part of the mouse compatibility events on first tap - the carousel
// would stop cycling until user tapped out of it; // would stop cycling until user tapped out of it;
// here, we listen for touchend, explicitly pause the carousel // here, we listen for touchend, explicitly pause the carousel
@ -231,120 +200,92 @@
// is NOT fired) and after a timeout (to allow for mouse compatibility // is NOT fired) and after a timeout (to allow for mouse compatibility
// events to fire) we explicitly restart cycling // events to fire) we explicitly restart cycling
this.pause(); this.pause();
if (this.touchTimeout) { if (this.touchTimeout) {
clearTimeout(this.touchTimeout); clearTimeout(this.touchTimeout);
} }
this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval); this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
}; };
const swipeConfig = { const swipeConfig = {
leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)), leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),
rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)), rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),
endCallback: endCallBack endCallback: endCallBack
}; };
this._swipeHelper = new Swipe__default.default(this._element, swipeConfig); this._swipeHelper = new Swipe(this._element, swipeConfig);
} }
_keydown(event) { _keydown(event) {
if (/input|textarea/i.test(event.target.tagName)) { if (/input|textarea/i.test(event.target.tagName)) {
return; return;
} }
const direction = KEY_TO_DIRECTION[event.key]; const direction = KEY_TO_DIRECTION[event.key];
if (direction) { if (direction) {
event.preventDefault(); event.preventDefault();
this._slide(this._directionToOrder(direction)); this._slide(this._directionToOrder(direction));
} }
} }
_getItemIndex(element) { _getItemIndex(element) {
return this._getItems().indexOf(element); return this._getItems().indexOf(element);
} }
_setActiveIndicatorElement(index) { _setActiveIndicatorElement(index) {
if (!this._indicatorsElement) { if (!this._indicatorsElement) {
return; return;
} }
const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
const activeIndicator = SelectorEngine__default.default.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
activeIndicator.classList.remove(CLASS_NAME_ACTIVE); activeIndicator.classList.remove(CLASS_NAME_ACTIVE);
activeIndicator.removeAttribute('aria-current'); activeIndicator.removeAttribute('aria-current');
const newActiveIndicator = SelectorEngine__default.default.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement); const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement);
if (newActiveIndicator) { if (newActiveIndicator) {
newActiveIndicator.classList.add(CLASS_NAME_ACTIVE); newActiveIndicator.classList.add(CLASS_NAME_ACTIVE);
newActiveIndicator.setAttribute('aria-current', 'true'); newActiveIndicator.setAttribute('aria-current', 'true');
} }
} }
_updateInterval() { _updateInterval() {
const element = this._activeElement || this._getActive(); const element = this._activeElement || this._getActive();
if (!element) { if (!element) {
return; return;
} }
const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10); const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
this._config.interval = elementInterval || this._config.defaultInterval; this._config.interval = elementInterval || this._config.defaultInterval;
} }
_slide(order, element = null) { _slide(order, element = null) {
if (this._isSliding) { if (this._isSliding) {
return; return;
} }
const activeElement = this._getActive(); const activeElement = this._getActive();
const isNext = order === ORDER_NEXT; const isNext = order === ORDER_NEXT;
const nextElement = element || index.getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap); const nextElement = element || index_js.getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);
if (nextElement === activeElement) { if (nextElement === activeElement) {
return; return;
} }
const nextElementIndex = this._getItemIndex(nextElement); const nextElementIndex = this._getItemIndex(nextElement);
const triggerEvent = eventName => { const triggerEvent = eventName => {
return EventHandler__default.default.trigger(this._element, eventName, { return EventHandler.trigger(this._element, eventName, {
relatedTarget: nextElement, relatedTarget: nextElement,
direction: this._orderToDirection(order), direction: this._orderToDirection(order),
from: this._getItemIndex(activeElement), from: this._getItemIndex(activeElement),
to: nextElementIndex to: nextElementIndex
}); });
}; };
const slideEvent = triggerEvent(EVENT_SLIDE); const slideEvent = triggerEvent(EVENT_SLIDE);
if (slideEvent.defaultPrevented) { if (slideEvent.defaultPrevented) {
return; return;
} }
if (!activeElement || !nextElement) { if (!activeElement || !nextElement) {
// Some weirdness is happening, so we bail // Some weirdness is happening, so we bail
// todo: change tests that use empty divs to avoid this check // TODO: change tests that use empty divs to avoid this check
return; return;
} }
const isCycling = Boolean(this._interval); const isCycling = Boolean(this._interval);
this.pause(); this.pause();
this._isSliding = true; this._isSliding = true;
this._setActiveIndicatorElement(nextElementIndex); this._setActiveIndicatorElement(nextElementIndex);
this._activeElement = nextElement; this._activeElement = nextElement;
const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END; const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV; const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
nextElement.classList.add(orderClassName); nextElement.classList.add(orderClassName);
index.reflow(nextElement); index_js.reflow(nextElement);
activeElement.classList.add(directionalClassName); activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName); nextElement.classList.add(directionalClassName);
const completeCallBack = () => { const completeCallBack = () => {
nextElement.classList.remove(directionalClassName, orderClassName); nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE); nextElement.classList.add(CLASS_NAME_ACTIVE);
@ -352,118 +293,94 @@
this._isSliding = false; this._isSliding = false;
triggerEvent(EVENT_SLID); triggerEvent(EVENT_SLID);
}; };
this._queueCallback(completeCallBack, activeElement, this._isAnimated()); this._queueCallback(completeCallBack, activeElement, this._isAnimated());
if (isCycling) { if (isCycling) {
this.cycle(); this.cycle();
} }
} }
_isAnimated() { _isAnimated() {
return this._element.classList.contains(CLASS_NAME_SLIDE); return this._element.classList.contains(CLASS_NAME_SLIDE);
} }
_getActive() { _getActive() {
return SelectorEngine__default.default.findOne(SELECTOR_ACTIVE_ITEM, this._element); return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
} }
_getItems() { _getItems() {
return SelectorEngine__default.default.find(SELECTOR_ITEM, this._element); return SelectorEngine.find(SELECTOR_ITEM, this._element);
} }
_clearInterval() { _clearInterval() {
if (this._interval) { if (this._interval) {
clearInterval(this._interval); clearInterval(this._interval);
this._interval = null; this._interval = null;
} }
} }
_directionToOrder(direction) { _directionToOrder(direction) {
if (index.isRTL()) { if (index_js.isRTL()) {
return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT; return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
} }
return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV; return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
} }
_orderToDirection(order) { _orderToDirection(order) {
if (index.isRTL()) { if (index_js.isRTL()) {
return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT; return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
} }
return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT; return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = Carousel.getOrCreateInstance(this, config); const data = Carousel.getOrCreateInstance(this, config);
if (typeof config === 'number') { if (typeof config === 'number') {
data.to(config); data.to(config);
return; return;
} }
if (typeof config === 'string') { if (typeof config === 'string') {
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
} }
}); });
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, function (event) {
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, function (event) { const target = SelectorEngine.getElementFromSelector(this);
const target = index.getElementFromSelector(this);
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) { if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
return; return;
} }
event.preventDefault(); event.preventDefault();
const carousel = Carousel.getOrCreateInstance(target); const carousel = Carousel.getOrCreateInstance(target);
const slideIndex = this.getAttribute('data-bs-slide-to'); const slideIndex = this.getAttribute('data-bs-slide-to');
if (slideIndex) { if (slideIndex) {
carousel.to(slideIndex); carousel.to(slideIndex);
carousel._maybeEnableCycle(); carousel._maybeEnableCycle();
return; return;
} }
if (Manipulator.getDataAttribute(this, 'slide') === 'next') {
if (Manipulator__default.default.getDataAttribute(this, 'slide') === 'next') {
carousel.next(); carousel.next();
carousel._maybeEnableCycle(); carousel._maybeEnableCycle();
return; return;
} }
carousel.prev(); carousel.prev();
carousel._maybeEnableCycle(); carousel._maybeEnableCycle();
}); });
EventHandler__default.default.on(window, EVENT_LOAD_DATA_API, () => { EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
const carousels = SelectorEngine__default.default.find(SELECTOR_DATA_RIDE); const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
for (const carousel of carousels) { for (const carousel of carousels) {
Carousel.getOrCreateInstance(carousel); Carousel.getOrCreateInstance(carousel);
} }
}); });
/** /**
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(Carousel); index_js.defineJQueryPlugin(Carousel);
return Carousel; return Carousel;

File diff suppressed because one or more lines are too long

140
js/dist/collapse.js vendored
View file

@ -1,26 +1,22 @@
/*! /*!
* Bootstrap collapse.js v5.2.3 (https://getbootstrap.com/) * Bootstrap collapse.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/selector-engine'), require('./base-component')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./util/index.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './dom/selector-engine', './util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Index, global.EventHandler, global.SelectorEngine, global.BaseComponent)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.BaseComponent, global.EventHandler, global.SelectorEngine, global.Index));
})(this, (function (index, EventHandler, SelectorEngine, BaseComponent) { 'use strict'; })(this, (function (BaseComponent, EventHandler, SelectorEngine, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): collapse.js * Bootstrap collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -52,51 +48,45 @@
parent: '(null|element)', parent: '(null|element)',
toggle: 'boolean' toggle: 'boolean'
}; };
/** /**
* Class definition * Class definition
*/ */
class Collapse extends BaseComponent__default.default { class Collapse extends BaseComponent {
constructor(element, config) { constructor(element, config) {
super(element, config); super(element, config);
this._isTransitioning = false; this._isTransitioning = false;
this._triggerArray = []; this._triggerArray = [];
const toggleList = SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE); const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE);
for (const elem of toggleList) { for (const elem of toggleList) {
const selector = index.getSelectorFromElement(elem); const selector = SelectorEngine.getSelectorFromElement(elem);
const filterElement = SelectorEngine__default.default.find(selector).filter(foundElement => foundElement === this._element); const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);
if (selector !== null && filterElement.length) { if (selector !== null && filterElement.length) {
this._triggerArray.push(elem); this._triggerArray.push(elem);
} }
} }
this._initializeChildren(); this._initializeChildren();
if (!this._config.parent) { if (!this._config.parent) {
this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()); this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
} }
if (this._config.toggle) { if (this._config.toggle) {
this.toggle(); this.toggle();
} }
} // Getters }
// Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
toggle() { toggle() {
if (this._isShown()) { if (this._isShown()) {
this.hide(); this.hide();
@ -104,206 +94,154 @@
this.show(); this.show();
} }
} }
show() { show() {
if (this._isTransitioning || this._isShown()) { if (this._isTransitioning || this._isShown()) {
return; return;
} }
let activeChildren = [];
let activeChildren = []; // find active children // find active children
if (this._config.parent) { if (this._config.parent) {
activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, { activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {
toggle: false toggle: false
})); }));
} }
if (activeChildren.length && activeChildren[0]._isTransitioning) { if (activeChildren.length && activeChildren[0]._isTransitioning) {
return; return;
} }
const startEvent = EventHandler.trigger(this._element, EVENT_SHOW);
const startEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW);
if (startEvent.defaultPrevented) { if (startEvent.defaultPrevented) {
return; return;
} }
for (const activeInstance of activeChildren) { for (const activeInstance of activeChildren) {
activeInstance.hide(); activeInstance.hide();
} }
const dimension = this._getDimension(); const dimension = this._getDimension();
this._element.classList.remove(CLASS_NAME_COLLAPSE); this._element.classList.remove(CLASS_NAME_COLLAPSE);
this._element.classList.add(CLASS_NAME_COLLAPSING); this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.style[dimension] = 0; this._element.style[dimension] = 0;
this._addAriaAndCollapsedClass(this._triggerArray, true); this._addAriaAndCollapsedClass(this._triggerArray, true);
this._isTransitioning = true; this._isTransitioning = true;
const complete = () => { const complete = () => {
this._isTransitioning = false; this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
this._element.style[dimension] = ''; this._element.style[dimension] = '';
EventHandler__default.default.trigger(this._element, EVENT_SHOWN); EventHandler.trigger(this._element, EVENT_SHOWN);
}; };
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
const scrollSize = `scroll${capitalizedDimension}`; const scrollSize = `scroll${capitalizedDimension}`;
this._queueCallback(complete, this._element, true); this._queueCallback(complete, this._element, true);
this._element.style[dimension] = `${this._element[scrollSize]}px`; this._element.style[dimension] = `${this._element[scrollSize]}px`;
} }
hide() { hide() {
if (this._isTransitioning || !this._isShown()) { if (this._isTransitioning || !this._isShown()) {
return; return;
} }
const startEvent = EventHandler.trigger(this._element, EVENT_HIDE);
const startEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);
if (startEvent.defaultPrevented) { if (startEvent.defaultPrevented) {
return; return;
} }
const dimension = this._getDimension(); const dimension = this._getDimension();
this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`; this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
index.reflow(this._element); index_js.reflow(this._element);
this._element.classList.add(CLASS_NAME_COLLAPSING); this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
for (const trigger of this._triggerArray) { for (const trigger of this._triggerArray) {
const element = index.getElementFromSelector(trigger); const element = SelectorEngine.getElementFromSelector(trigger);
if (element && !this._isShown(element)) { if (element && !this._isShown(element)) {
this._addAriaAndCollapsedClass([trigger], false); this._addAriaAndCollapsedClass([trigger], false);
} }
} }
this._isTransitioning = true; this._isTransitioning = true;
const complete = () => { const complete = () => {
this._isTransitioning = false; this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE); this._element.classList.add(CLASS_NAME_COLLAPSE);
EventHandler.trigger(this._element, EVENT_HIDDEN);
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);
}; };
this._element.style[dimension] = ''; this._element.style[dimension] = '';
this._queueCallback(complete, this._element, true); this._queueCallback(complete, this._element, true);
} }
// Private
_isShown(element = this._element) { _isShown(element = this._element) {
return element.classList.contains(CLASS_NAME_SHOW); return element.classList.contains(CLASS_NAME_SHOW);
} // Private }
_configAfterMerge(config) { _configAfterMerge(config) {
config.toggle = Boolean(config.toggle); // Coerce string values config.toggle = Boolean(config.toggle); // Coerce string values
config.parent = index_js.getElement(config.parent);
config.parent = index.getElement(config.parent);
return config; return config;
} }
_getDimension() { _getDimension() {
return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
} }
_initializeChildren() { _initializeChildren() {
if (!this._config.parent) { if (!this._config.parent) {
return; return;
} }
const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE); const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE);
for (const element of children) { for (const element of children) {
const selected = index.getElementFromSelector(element); const selected = SelectorEngine.getElementFromSelector(element);
if (selected) { if (selected) {
this._addAriaAndCollapsedClass([element], this._isShown(selected)); this._addAriaAndCollapsedClass([element], this._isShown(selected));
} }
} }
} }
_getFirstLevelChildren(selector) { _getFirstLevelChildren(selector) {
const children = SelectorEngine__default.default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); // remove children if greater depth const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
// remove children if greater depth
return SelectorEngine__default.default.find(selector, this._config.parent).filter(element => !children.includes(element)); return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element));
} }
_addAriaAndCollapsedClass(triggerArray, isOpen) { _addAriaAndCollapsedClass(triggerArray, isOpen) {
if (!triggerArray.length) { if (!triggerArray.length) {
return; return;
} }
for (const element of triggerArray) { for (const element of triggerArray) {
element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen); element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);
element.setAttribute('aria-expanded', isOpen); element.setAttribute('aria-expanded', isOpen);
} }
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
const _config = {}; const _config = {};
if (typeof config === 'string' && /show|hide/.test(config)) { if (typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false; _config.toggle = false;
} }
return this.each(function () { return this.each(function () {
const data = Collapse.getOrCreateInstance(this, _config); const data = Collapse.getOrCreateInstance(this, _config);
if (typeof config === 'string') { if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
} }
}); });
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') { if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
event.preventDefault(); event.preventDefault();
} }
for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {
const selector = index.getSelectorFromElement(this);
const selectorElements = SelectorEngine__default.default.find(selector);
for (const element of selectorElements) {
Collapse.getOrCreateInstance(element, { Collapse.getOrCreateInstance(element, {
toggle: false toggle: false
}).toggle(); }).toggle();
} }
}); });
/** /**
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(Collapse); index_js.defineJQueryPlugin(Collapse);
return Collapse; return Collapse;

File diff suppressed because one or more lines are too long

18
js/dist/dom/data.js vendored
View file

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap data.js v5.2.3 (https://getbootstrap.com/) * Bootstrap data.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,7 +11,7 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): dom/data.js * Bootstrap dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -19,46 +19,42 @@
/** /**
* Constants * Constants
*/ */
const elementMap = new Map(); const elementMap = new Map();
const data = { const data = {
set(element, key, instance) { set(element, key, instance) {
if (!elementMap.has(element)) { if (!elementMap.has(element)) {
elementMap.set(element, new Map()); elementMap.set(element, new Map());
} }
const instanceMap = elementMap.get(element);
const instanceMap = elementMap.get(element); // make it clear we only want one instance per element // make it clear we only want one instance per element
// can be removed later when multiple key/instances are fine to be used // can be removed later when multiple key/instances are fine to be used
if (!instanceMap.has(key) && instanceMap.size !== 0) { if (!instanceMap.has(key) && instanceMap.size !== 0) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`); console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
return; return;
} }
instanceMap.set(key, instance); instanceMap.set(key, instance);
}, },
get(element, key) { get(element, key) {
if (elementMap.has(element)) { if (elementMap.has(element)) {
return elementMap.get(element).get(key) || null; return elementMap.get(element).get(key) || null;
} }
return null; return null;
}, },
remove(element, key) { remove(element, key) {
if (!elementMap.has(element)) { if (!elementMap.has(element)) {
return; return;
} }
const instanceMap = elementMap.get(element); const instanceMap = elementMap.get(element);
instanceMap.delete(key); // free up element references if there are no instances left for an element instanceMap.delete(key);
// free up element references if there are no instances left for an element
if (instanceMap.size === 0) { if (instanceMap.size === 0) {
elementMap.delete(element); elementMap.delete(element);
} }
} }
}; };
return data; return data;

View file

@ -1 +1 @@
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAJ,EAAnB,CAAA;AAEA,eAAe;EACbC,EAAAA,GAAG,CAACC,OAAD,EAAUC,GAAV,EAAeC,QAAf,EAAyB;EAC1B,IAAA,IAAI,CAACL,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5BH,MAAAA,UAAU,CAACE,GAAX,CAAeC,OAAf,EAAwB,IAAIF,GAAJ,EAAxB,CAAA,CAAA;EACD,KAAA;;MAED,MAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAL0B;EAQ1B;;EACA,IAAA,IAAI,CAACI,WAAW,CAACD,GAAZ,CAAgBF,GAAhB,CAAD,IAAyBG,WAAW,CAACE,IAAZ,KAAqB,CAAlD,EAAqD;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAR,CAAe,CAAA,4EAAA,EAA8EC,KAAK,CAACC,IAAN,CAAWN,WAAW,CAACO,IAAZ,EAAX,CAA+B,CAAA,CAA/B,CAAkC,CAA/H,CAAA,CAAA,CAAA,CAAA;EACA,MAAA,OAAA;EACD,KAAA;;EAEDP,IAAAA,WAAW,CAACL,GAAZ,CAAgBE,GAAhB,EAAqBC,QAArB,CAAA,CAAA;KAhBW;;EAmBbG,EAAAA,GAAG,CAACL,OAAD,EAAUC,GAAV,EAAe;EAChB,IAAA,IAAIJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAJ,EAA6B;QAC3B,OAAOH,UAAU,CAACQ,GAAX,CAAeL,OAAf,EAAwBK,GAAxB,CAA4BJ,GAA5B,CAAA,IAAoC,IAA3C,CAAA;EACD,KAAA;;EAED,IAAA,OAAO,IAAP,CAAA;KAxBW;;EA2BbW,EAAAA,MAAM,CAACZ,OAAD,EAAUC,GAAV,EAAe;EACnB,IAAA,IAAI,CAACJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5B,MAAA,OAAA;EACD,KAAA;;EAED,IAAA,MAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAAA;EAEAI,IAAAA,WAAW,CAACS,MAAZ,CAAmBZ,GAAnB,EAPmB;;EAUnB,IAAA,IAAIG,WAAW,CAACE,IAAZ,KAAqB,CAAzB,EAA4B;QAC1BT,UAAU,CAACgB,MAAX,CAAkBb,OAAlB,CAAA,CAAA;EACD,KAAA;EACF,GAAA;;EAxCY,CAAf;;;;;;;;"} {"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAG,EAAE;AAE5B,eAAe;EACbC,EAAAA,GAAGA,CAACC,OAAO,EAAEC,GAAG,EAAEC,QAAQ,EAAE;EAC1B,IAAA,IAAI,CAACL,UAAU,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;QAC5BH,UAAU,CAACE,GAAG,CAACC,OAAO,EAAE,IAAIF,GAAG,EAAE,CAAC;EACpC,IAAA;EAEA,IAAA,MAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAG,CAACL,OAAO,CAAC;;EAE3C;EACA;EACA,IAAA,IAAI,CAACI,WAAW,CAACD,GAAG,CAACF,GAAG,CAAC,IAAIG,WAAW,CAACE,IAAI,KAAK,CAAC,EAAE;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAK,CAAC,+EAA+EC,KAAK,CAACC,IAAI,CAACN,WAAW,CAACO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;EAClI,MAAA;EACF,IAAA;EAEAP,IAAAA,WAAW,CAACL,GAAG,CAACE,GAAG,EAAEC,QAAQ,CAAC;IAChC,CAAC;EAEDG,EAAAA,GAAGA,CAACL,OAAO,EAAEC,GAAG,EAAE;EAChB,IAAA,IAAIJ,UAAU,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;EAC3B,MAAA,OAAOH,UAAU,CAACQ,GAAG,CAACL,OAAO,CAAC,CAACK,GAAG,CAACJ,GAAG,CAAC,IAAI,IAAI;EACjD,IAAA;EAEA,IAAA,OAAO,IAAI;IACb,CAAC;EAEDW,EAAAA,MAAMA,CAACZ,OAAO,EAAEC,GAAG,EAAE;EACnB,IAAA,IAAI,CAACJ,UAAU,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;EAC5B,MAAA;EACF,IAAA;EAEA,IAAA,MAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAG,CAACL,OAAO,CAAC;EAE3CI,IAAAA,WAAW,CAACS,MAAM,CAACZ,GAAG,CAAC;;EAEvB;EACA,IAAA,IAAIG,WAAW,CAACE,IAAI,KAAK,CAAC,EAAE;EAC1BT,MAAAA,UAAU,CAACgB,MAAM,CAACb,OAAO,CAAC;EAC5B,IAAA;EACF,EAAA;EACF,CAAC;;;;;;;;"}

View file

@ -1,20 +1,22 @@
/*! /*!
* Bootstrap event-handler.js v5.2.3 (https://getbootstrap.com/) * Bootstrap event-handler.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../util/index')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../util/index.js')) :
typeof define === 'function' && define.amd ? define(['../util/index'], factory) : typeof define === 'function' && define.amd ? define(['../util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory(global.Index)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory(global.Index));
})(this, (function (index) { 'use strict'; })(this, (function (index_js) { 'use strict';
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): dom/event-handler.js * Bootstrap dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -23,13 +25,13 @@
const stripNameRegex = /\..*/; const stripNameRegex = /\..*/;
const stripUidRegex = /::\d+$/; const stripUidRegex = /::\d+$/;
const eventRegistry = {}; // Events storage const eventRegistry = {}; // Events storage
let uidEvent = 1; let uidEvent = 1;
const customEvents = { const customEvents = {
mouseenter: 'mouseover', mouseenter: 'mouseover',
mouseleave: 'mouseout' mouseleave: 'mouseout'
}; };
const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']); const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
/** /**
* Private methods * Private methods
*/ */
@ -37,32 +39,26 @@
function makeEventUid(element, uid) { function makeEventUid(element, uid) {
return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++; return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
} }
function getElementEvents(element) { function getElementEvents(element) {
const uid = makeEventUid(element); const uid = makeEventUid(element);
element.uidEvent = uid; element.uidEvent = uid;
eventRegistry[uid] = eventRegistry[uid] || {}; eventRegistry[uid] = eventRegistry[uid] || {};
return eventRegistry[uid]; return eventRegistry[uid];
} }
function bootstrapHandler(element, fn) { function bootstrapHandler(element, fn) {
return function handler(event) { return function handler(event) {
hydrateObj(event, { hydrateObj(event, {
delegateTarget: element delegateTarget: element
}); });
if (handler.oneOff) { if (handler.oneOff) {
EventHandler.off(element, event.type, fn); EventHandler.off(element, event.type, fn);
} }
return fn.apply(element, [event]); return fn.apply(element, [event]);
}; };
} }
function bootstrapDelegationHandler(element, selector, fn) { function bootstrapDelegationHandler(element, selector, fn) {
return function handler(event) { return function handler(event) {
const domElements = element.querySelectorAll(selector); const domElements = element.querySelectorAll(selector);
for (let { for (let {
target target
} = event; target && target !== this; target = target.parentNode) { } = event; target && target !== this; target = target.parentNode) {
@ -70,46 +66,38 @@
if (domElement !== target) { if (domElement !== target) {
continue; continue;
} }
hydrateObj(event, { hydrateObj(event, {
delegateTarget: target delegateTarget: target
}); });
if (handler.oneOff) { if (handler.oneOff) {
EventHandler.off(element, event.type, selector, fn); EventHandler.off(element, event.type, selector, fn);
} }
return fn.apply(target, [event]); return fn.apply(target, [event]);
} }
} }
}; };
} }
function findHandler(events, callable, delegationSelector = null) { function findHandler(events, callable, delegationSelector = null) {
return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector); return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);
} }
function normalizeParameters(originalTypeEvent, handler, delegationFunction) { function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
const isDelegated = typeof handler === 'string'; // todo: tooltip passes `false` instead of selector, so we need to check const isDelegated = typeof handler === 'string';
// TODO: tooltip passes `false` instead of selector, so we need to check
const callable = isDelegated ? delegationFunction : handler || delegationFunction; const callable = isDelegated ? delegationFunction : handler || delegationFunction;
let typeEvent = getTypeEvent(originalTypeEvent); let typeEvent = getTypeEvent(originalTypeEvent);
if (!nativeEvents.has(typeEvent)) { if (!nativeEvents.has(typeEvent)) {
typeEvent = originalTypeEvent; typeEvent = originalTypeEvent;
} }
return [isDelegated, callable, typeEvent]; return [isDelegated, callable, typeEvent];
} }
function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) { function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {
if (typeof originalTypeEvent !== 'string' || !element) { if (typeof originalTypeEvent !== 'string' || !element) {
return; return;
} }
let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
// this prevents the handler from being dispatched the same way as mouseover or mouseout does // this prevents the handler from being dispatched the same way as mouseover or mouseout does
if (originalTypeEvent in customEvents) { if (originalTypeEvent in customEvents) {
const wrapFunction = fn => { const wrapFunction = fn => {
return function (event) { return function (event) {
@ -118,19 +106,15 @@
} }
}; };
}; };
callable = wrapFunction(callable); callable = wrapFunction(callable);
} }
const events = getElementEvents(element); const events = getElementEvents(element);
const handlers = events[typeEvent] || (events[typeEvent] = {}); const handlers = events[typeEvent] || (events[typeEvent] = {});
const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null); const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);
if (previousFunction) { if (previousFunction) {
previousFunction.oneOff = previousFunction.oneOff && oneOff; previousFunction.oneOff = previousFunction.oneOff && oneOff;
return; return;
} }
const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, '')); const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));
const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable); const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);
fn.delegationSelector = isDelegated ? handler : null; fn.delegationSelector = isDelegated ? handler : null;
@ -140,94 +124,74 @@
handlers[uid] = fn; handlers[uid] = fn;
element.addEventListener(typeEvent, fn, isDelegated); element.addEventListener(typeEvent, fn, isDelegated);
} }
function removeHandler(element, events, typeEvent, handler, delegationSelector) { function removeHandler(element, events, typeEvent, handler, delegationSelector) {
const fn = findHandler(events[typeEvent], handler, delegationSelector); const fn = findHandler(events[typeEvent], handler, delegationSelector);
if (!fn) { if (!fn) {
return; return;
} }
element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
delete events[typeEvent][fn.uidEvent]; delete events[typeEvent][fn.uidEvent];
} }
function removeNamespacedHandlers(element, events, typeEvent, namespace) { function removeNamespacedHandlers(element, events, typeEvent, namespace) {
const storeElementEvent = events[typeEvent] || {}; const storeElementEvent = events[typeEvent] || {};
for (const [handlerKey, event] of Object.entries(storeElementEvent)) {
for (const handlerKey of Object.keys(storeElementEvent)) {
if (handlerKey.includes(namespace)) { if (handlerKey.includes(namespace)) {
const event = storeElementEvent[handlerKey];
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
} }
} }
} }
function getTypeEvent(event) { function getTypeEvent(event) {
// allow to get the native events from namespaced events ('click.bs.button' --> 'click') // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
event = event.replace(stripNameRegex, ''); event = event.replace(stripNameRegex, '');
return customEvents[event] || event; return customEvents[event] || event;
} }
const EventHandler = { const EventHandler = {
on(element, event, handler, delegationFunction) { on(element, event, handler, delegationFunction) {
addHandler(element, event, handler, delegationFunction, false); addHandler(element, event, handler, delegationFunction, false);
}, },
one(element, event, handler, delegationFunction) { one(element, event, handler, delegationFunction) {
addHandler(element, event, handler, delegationFunction, true); addHandler(element, event, handler, delegationFunction, true);
}, },
off(element, originalTypeEvent, handler, delegationFunction) { off(element, originalTypeEvent, handler, delegationFunction) {
if (typeof originalTypeEvent !== 'string' || !element) { if (typeof originalTypeEvent !== 'string' || !element) {
return; return;
} }
const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
const inNamespace = typeEvent !== originalTypeEvent; const inNamespace = typeEvent !== originalTypeEvent;
const events = getElementEvents(element); const events = getElementEvents(element);
const storeElementEvent = events[typeEvent] || {}; const storeElementEvent = events[typeEvent] || {};
const isNamespace = originalTypeEvent.startsWith('.'); const isNamespace = originalTypeEvent.startsWith('.');
if (typeof callable !== 'undefined') { if (typeof callable !== 'undefined') {
// Simplest case: handler is passed, remove that listener ONLY. // Simplest case: handler is passed, remove that listener ONLY.
if (!Object.keys(storeElementEvent).length) { if (!Object.keys(storeElementEvent).length) {
return; return;
} }
removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null); removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);
return; return;
} }
if (isNamespace) { if (isNamespace) {
for (const elementEvent of Object.keys(events)) { for (const elementEvent of Object.keys(events)) {
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
} }
} }
for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {
for (const keyHandlers of Object.keys(storeElementEvent)) {
const handlerKey = keyHandlers.replace(stripUidRegex, ''); const handlerKey = keyHandlers.replace(stripUidRegex, '');
if (!inNamespace || originalTypeEvent.includes(handlerKey)) { if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
const event = storeElementEvent[keyHandlers];
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
} }
} }
}, },
trigger(element, event, args) { trigger(element, event, args) {
if (typeof event !== 'string' || !element) { if (typeof event !== 'string' || !element) {
return null; return null;
} }
const $ = index_js.getjQuery();
const $ = index.getjQuery();
const typeEvent = getTypeEvent(event); const typeEvent = getTypeEvent(event);
const inNamespace = event !== typeEvent; const inNamespace = event !== typeEvent;
let jQueryEvent = null; let jQueryEvent = null;
let bubbles = true; let bubbles = true;
let nativeDispatch = true; let nativeDispatch = true;
let defaultPrevented = false; let defaultPrevented = false;
if (inNamespace && $) { if (inNamespace && $) {
jQueryEvent = $.Event(event, args); jQueryEvent = $.Event(event, args);
$(element).trigger(jQueryEvent); $(element).trigger(jQueryEvent);
@ -235,46 +199,35 @@
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
defaultPrevented = jQueryEvent.isDefaultPrevented(); defaultPrevented = jQueryEvent.isDefaultPrevented();
} }
const evt = hydrateObj(new Event(event, {
let evt = new Event(event, {
bubbles, bubbles,
cancelable: true cancelable: true
}); }), args);
evt = hydrateObj(evt, args);
if (defaultPrevented) { if (defaultPrevented) {
evt.preventDefault(); evt.preventDefault();
} }
if (nativeDispatch) { if (nativeDispatch) {
element.dispatchEvent(evt); element.dispatchEvent(evt);
} }
if (evt.defaultPrevented && jQueryEvent) { if (evt.defaultPrevented && jQueryEvent) {
jQueryEvent.preventDefault(); jQueryEvent.preventDefault();
} }
return evt; return evt;
} }
}; };
function hydrateObj(obj, meta = {}) {
function hydrateObj(obj, meta) { for (const [key, value] of Object.entries(meta)) {
for (const [key, value] of Object.entries(meta || {})) {
try { try {
obj[key] = value; obj[key] = value;
} catch (_unused) { } catch (_unused) {
Object.defineProperty(obj, key, { Object.defineProperty(obj, key, {
configurable: true, configurable: true,
get() { get() {
return value; return value;
} }
}); });
} }
} }
return obj; return obj;
} }

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! /*!
* Bootstrap manipulator.js v5.2.3 (https://getbootstrap.com/) * Bootstrap manipulator.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
@ -11,72 +11,59 @@
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): dom/manipulator.js * Bootstrap dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
function normalizeData(value) { function normalizeData(value) {
if (value === 'true') { if (value === 'true') {
return true; return true;
} }
if (value === 'false') { if (value === 'false') {
return false; return false;
} }
if (value === Number(value).toString()) { if (value === Number(value).toString()) {
return Number(value); return Number(value);
} }
if (value === '' || value === 'null') { if (value === '' || value === 'null') {
return null; return null;
} }
if (typeof value !== 'string') { if (typeof value !== 'string') {
return value; return value;
} }
try { try {
return JSON.parse(decodeURIComponent(value)); return JSON.parse(decodeURIComponent(value));
} catch (_unused) { } catch (_unused) {
return value; return value;
} }
} }
function normalizeDataKey(key) { function normalizeDataKey(key) {
return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`); return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
} }
const Manipulator = { const Manipulator = {
setDataAttribute(element, key, value) { setDataAttribute(element, key, value) {
element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value); element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
}, },
removeDataAttribute(element, key) { removeDataAttribute(element, key) {
element.removeAttribute(`data-bs-${normalizeDataKey(key)}`); element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
}, },
getDataAttributes(element) { getDataAttributes(element) {
if (!element) { if (!element) {
return {}; return {};
} }
const attributes = {}; const attributes = {};
const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig')); const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));
for (const key of bsKeys) { for (const key of bsKeys) {
let pureKey = key.replace(/^bs/, ''); let pureKey = key.replace(/^bs/, '');
pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length); pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1);
attributes[pureKey] = normalizeData(element.dataset[key]); attributes[pureKey] = normalizeData(element.dataset[key]);
} }
return attributes; return attributes;
}, },
getDataAttribute(element, key) { getDataAttribute(element, key) {
return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)); return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
} }
}; };
return Manipulator; return Manipulator;

View file

@ -1 +1 @@
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n if (value === Number(value).toString()) {\n return Number(value)\n }\n\n if (value === '' || value === 'null') {\n return null\n }\n\n if (typeof value !== 'string') {\n return value\n }\n\n try {\n return JSON.parse(decodeURIComponent(value))\n } catch {\n return value\n }\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n }\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","value","Number","toString","JSON","parse","decodeURIComponent","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","bsKeys","Object","keys","dataset","filter","startsWith","pureKey","charAt","slice","length","getDataAttribute","getAttribute"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;IAC5B,IAAIA,KAAK,KAAK,MAAd,EAAsB;EACpB,IAAA,OAAO,IAAP,CAAA;EACD,GAAA;;IAED,IAAIA,KAAK,KAAK,OAAd,EAAuB;EACrB,IAAA,OAAO,KAAP,CAAA;EACD,GAAA;;IAED,IAAIA,KAAK,KAAKC,MAAM,CAACD,KAAD,CAAN,CAAcE,QAAd,EAAd,EAAwC;MACtC,OAAOD,MAAM,CAACD,KAAD,CAAb,CAAA;EACD,GAAA;;EAED,EAAA,IAAIA,KAAK,KAAK,EAAV,IAAgBA,KAAK,KAAK,MAA9B,EAAsC;EACpC,IAAA,OAAO,IAAP,CAAA;EACD,GAAA;;EAED,EAAA,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;EAC7B,IAAA,OAAOA,KAAP,CAAA;EACD,GAAA;;IAED,IAAI;MACF,OAAOG,IAAI,CAACC,KAAL,CAAWC,kBAAkB,CAACL,KAAD,CAA7B,CAAP,CAAA;EACD,GAFD,CAEE,OAAM,OAAA,EAAA;EACN,IAAA,OAAOA,KAAP,CAAA;EACD,GAAA;EACF,CAAA;;EAED,SAASM,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,EAAA,OAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsBC,GAAG,IAAK,CAAA,CAAA,EAAGA,GAAG,CAACC,WAAJ,EAAkB,EAAnD,CAAP,CAAA;EACD,CAAA;;AAED,QAAMC,WAAW,GAAG;EAClBC,EAAAA,gBAAgB,CAACC,OAAD,EAAUN,GAAV,EAAeP,KAAf,EAAsB;MACpCa,OAAO,CAACC,YAAR,CAAsB,CAAUR,QAAAA,EAAAA,gBAAgB,CAACC,GAAD,CAAM,CAAtD,CAAA,EAAyDP,KAAzD,CAAA,CAAA;KAFgB;;EAKlBe,EAAAA,mBAAmB,CAACF,OAAD,EAAUN,GAAV,EAAe;MAChCM,OAAO,CAACG,eAAR,CAAyB,CAAA,QAAA,EAAUV,gBAAgB,CAACC,GAAD,CAAM,CAAzD,CAAA,CAAA,CAAA;KANgB;;IASlBU,iBAAiB,CAACJ,OAAD,EAAU;MACzB,IAAI,CAACA,OAAL,EAAc;EACZ,MAAA,OAAO,EAAP,CAAA;EACD,KAAA;;MAED,MAAMK,UAAU,GAAG,EAAnB,CAAA;MACA,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAP,CAAYR,OAAO,CAACS,OAApB,CAA6BC,CAAAA,MAA7B,CAAoChB,GAAG,IAAIA,GAAG,CAACiB,UAAJ,CAAe,IAAf,CAAwB,IAAA,CAACjB,GAAG,CAACiB,UAAJ,CAAe,UAAf,CAApE,CAAf,CAAA;;EAEA,IAAA,KAAK,MAAMjB,GAAX,IAAkBY,MAAlB,EAA0B;QACxB,IAAIM,OAAO,GAAGlB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd,CAAA;EACAiB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBhB,WAAlB,EAAA,GAAkCe,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C,CAAA;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsB1B,aAAa,CAACc,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC,CAAA;EACD,KAAA;;EAED,IAAA,OAAOW,UAAP,CAAA;KAvBgB;;EA0BlBW,EAAAA,gBAAgB,CAAChB,OAAD,EAAUN,GAAV,EAAe;EAC7B,IAAA,OAAOR,aAAa,CAACc,OAAO,CAACiB,YAAR,CAAsB,CAAUxB,QAAAA,EAAAA,gBAAgB,CAACC,GAAD,CAAM,CAAA,CAAtD,CAAD,CAApB,CAAA;EACD,GAAA;;EA5BiB;;;;;;;;"} {"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n if (value === Number(value).toString()) {\n return Number(value)\n }\n\n if (value === '' || value === 'null') {\n return null\n }\n\n if (typeof value !== 'string') {\n return value\n }\n\n try {\n return JSON.parse(decodeURIComponent(value))\n } catch {\n return value\n }\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1)\n attributes[pureKey] = normalizeData(element.dataset[key])\n }\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","value","Number","toString","JSON","parse","decodeURIComponent","_unused","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","bsKeys","Object","keys","dataset","filter","startsWith","pureKey","charAt","slice","getDataAttribute","getAttribute"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA,SAASA,aAAaA,CAACC,KAAK,EAAE;IAC5B,IAAIA,KAAK,KAAK,MAAM,EAAE;EACpB,IAAA,OAAO,IAAI;EACb,EAAA;IAEA,IAAIA,KAAK,KAAK,OAAO,EAAE;EACrB,IAAA,OAAO,KAAK;EACd,EAAA;IAEA,IAAIA,KAAK,KAAKC,MAAM,CAACD,KAAK,CAAC,CAACE,QAAQ,EAAE,EAAE;MACtC,OAAOD,MAAM,CAACD,KAAK,CAAC;EACtB,EAAA;EAEA,EAAA,IAAIA,KAAK,KAAK,EAAE,IAAIA,KAAK,KAAK,MAAM,EAAE;EACpC,IAAA,OAAO,IAAI;EACb,EAAA;EAEA,EAAA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;EAC7B,IAAA,OAAOA,KAAK;EACd,EAAA;IAEA,IAAI;MACF,OAAOG,IAAI,CAACC,KAAK,CAACC,kBAAkB,CAACL,KAAK,CAAC,CAAC;IAC9C,CAAC,CAAC,OAAAM,OAAA,EAAM;EACN,IAAA,OAAON,KAAK;EACd,EAAA;EACF;EAEA,SAASO,gBAAgBA,CAACC,GAAG,EAAE;EAC7B,EAAA,OAAOA,GAAG,CAACC,OAAO,CAAC,QAAQ,EAAEC,GAAG,IAAI,CAAA,CAAA,EAAIA,GAAG,CAACC,WAAW,EAAE,EAAE,CAAC;EAC9D;AAEA,QAAMC,WAAW,GAAG;EAClBC,EAAAA,gBAAgBA,CAACC,OAAO,EAAEN,GAAG,EAAER,KAAK,EAAE;MACpCc,OAAO,CAACC,YAAY,CAAC,CAAA,QAAA,EAAWR,gBAAgB,CAACC,GAAG,CAAC,CAAA,CAAE,EAAER,KAAK,CAAC;IACjE,CAAC;EAEDgB,EAAAA,mBAAmBA,CAACF,OAAO,EAAEN,GAAG,EAAE;MAChCM,OAAO,CAACG,eAAe,CAAC,CAAA,QAAA,EAAWV,gBAAgB,CAACC,GAAG,CAAC,CAAA,CAAE,CAAC;IAC7D,CAAC;IAEDU,iBAAiBA,CAACJ,OAAO,EAAE;MACzB,IAAI,CAACA,OAAO,EAAE;EACZ,MAAA,OAAO,EAAE;EACX,IAAA;MAEA,MAAMK,UAAU,GAAG,EAAE;EACrB,IAAA,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACR,OAAO,CAACS,OAAO,CAAC,CAACC,MAAM,CAAChB,GAAG,IAAIA,GAAG,CAACiB,UAAU,CAAC,IAAI,CAAC,IAAI,CAACjB,GAAG,CAACiB,UAAU,CAAC,UAAU,CAAC,CAAC;EAE9G,IAAA,KAAK,MAAMjB,GAAG,IAAIY,MAAM,EAAE;QACxB,IAAIM,OAAO,GAAGlB,GAAG,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;EACpCiB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAAChB,WAAW,EAAE,GAAGe,OAAO,CAACE,KAAK,CAAC,CAAC,CAAC;EAC5DT,MAAAA,UAAU,CAACO,OAAO,CAAC,GAAG3B,aAAa,CAACe,OAAO,CAACS,OAAO,CAACf,GAAG,CAAC,CAAC;EAC3D,IAAA;EAEA,IAAA,OAAOW,UAAU;IACnB,CAAC;EAEDU,EAAAA,gBAAgBA,CAACf,OAAO,EAAEN,GAAG,EAAE;EAC7B,IAAA,OAAOT,aAAa,CAACe,OAAO,CAACgB,YAAY,CAAC,CAAA,QAAA,EAAWvB,gBAAgB,CAACC,GAAG,CAAC,CAAA,CAAE,CAAC,CAAC;EAChF,EAAA;EACF;;;;;;;;"}

View file

@ -1,83 +1,101 @@
/*! /*!
* Bootstrap selector-engine.js v5.2.3 (https://getbootstrap.com/) * Bootstrap selector-engine.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../util/index')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../util/index.js')) :
typeof define === 'function' && define.amd ? define(['../util/index'], factory) : typeof define === 'function' && define.amd ? define(['../util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory(global.Index)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory(global.Index));
})(this, (function (index) { 'use strict'; })(this, (function (index_js) { 'use strict';
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): dom/selector-engine.js * Bootstrap dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/**
* Constants
*/
const getSelector = element => {
let selector = element.getAttribute('data-bs-target');
if (!selector || selector === '#') {
let hrefAttribute = element.getAttribute('href');
// The only valid content that could double as a selector are IDs or classes,
// so everything starting with `#` or `.`. If a "real" URL is used as the selector,
// `document.querySelector` will rightfully complain it is invalid.
// See https://github.com/twbs/bootstrap/issues/32273
if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
return null;
}
// Just in case some CMS puts out a full URL with the anchor appended
if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
}
selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
}
return selector ? selector.split(',').map(sel => index_js.parseSelector(sel)).join(',') : null;
};
const SelectorEngine = { const SelectorEngine = {
find(selector, element = document.documentElement) { find(selector, element = document.documentElement) {
return [].concat(...Element.prototype.querySelectorAll.call(element, selector)); return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
}, },
findOne(selector, element = document.documentElement) { findOne(selector, element = document.documentElement) {
return Element.prototype.querySelector.call(element, selector); return Element.prototype.querySelector.call(element, selector);
}, },
children(element, selector) { children(element, selector) {
return [].concat(...element.children).filter(child => child.matches(selector)); return [].concat(...element.children).filter(child => child.matches(selector));
}, },
parents(element, selector) { parents(element, selector) {
const parents = []; const parents = [];
let ancestor = element.parentNode.closest(selector); let ancestor = element.parentNode.closest(selector);
while (ancestor) { while (ancestor) {
parents.push(ancestor); parents.push(ancestor);
ancestor = ancestor.parentNode.closest(selector); ancestor = ancestor.parentNode.closest(selector);
} }
return parents; return parents;
}, },
prev(element, selector) { prev(element, selector) {
let previous = element.previousElementSibling; let previous = element.previousElementSibling;
while (previous) { while (previous) {
if (previous.matches(selector)) { if (previous.matches(selector)) {
return [previous]; return [previous];
} }
previous = previous.previousElementSibling; previous = previous.previousElementSibling;
} }
return []; return [];
}, },
// TODO: this is now unused; remove later along with prev() // TODO: this is now unused; remove later along with prev()
next(element, selector) { next(element, selector) {
let next = element.nextElementSibling; let next = element.nextElementSibling;
while (next) { while (next) {
if (next.matches(selector)) { if (next.matches(selector)) {
return [next]; return [next];
} }
next = next.nextElementSibling; next = next.nextElementSibling;
} }
return []; return [];
}, },
focusableChildren(element) { focusableChildren(element) {
const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(','); const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
return this.find(focusables, element).filter(el => !index.isDisabled(el) && index.isVisible(el)); return this.find(focusables, element).filter(el => !index_js.isDisabled(el) && index_js.isVisible(el));
},
getSelectorFromElement(element) {
const selector = getSelector(element);
if (selector) {
return SelectorEngine.findOne(selector) ? selector : null;
}
return null;
},
getElementFromSelector(element) {
const selector = getSelector(element);
return selector ? SelectorEngine.findOne(selector) : null;
},
getMultipleElementsFromSelector(element) {
const selector = getSelector(element);
return selector ? SelectorEngine.find(selector) : [];
} }
}; };
return SelectorEngine; return SelectorEngine;

File diff suppressed because one or more lines are too long

219
js/dist/dropdown.js vendored
View file

@ -1,18 +1,15 @@
/*! /*!
* Bootstrap dropdown.js v5.2.3 (https://getbootstrap.com/) * Bootstrap dropdown.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./util/index'), require('./dom/event-handler'), require('./dom/manipulator'), require('./dom/selector-engine'), require('./base-component')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./util/index.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './util/index', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['@popperjs/core', './base-component', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global["@popperjs/core"], global.Index, global.EventHandler, global.Manipulator, global.SelectorEngine, global.BaseComponent)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global["@popperjs/core"], global.BaseComponent, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Index));
})(this, (function (Popper, index, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict'; })(this, (function (Popper, BaseComponent, EventHandler, Manipulator, SelectorEngine, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e }; function _interopNamespaceDefault(e) {
function _interopNamespace(e) {
if (e && e.__esModule) return e;
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } }); const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
if (e) { if (e) {
for (const k in e) { for (const k in e) {
@ -29,18 +26,16 @@
return Object.freeze(n); return Object.freeze(n);
} }
const Popper__namespace = /*#__PURE__*/_interopNamespace(Popper); const Popper__namespace = /*#__PURE__*/_interopNamespaceDefault(Popper);
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): dropdown.js * Bootstrap dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -74,12 +69,12 @@
const SELECTOR_NAVBAR = '.navbar'; const SELECTOR_NAVBAR = '.navbar';
const SELECTOR_NAVBAR_NAV = '.navbar-nav'; const SELECTOR_NAVBAR_NAV = '.navbar-nav';
const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'; const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
const PLACEMENT_TOP = index.isRTL() ? 'top-end' : 'top-start'; const PLACEMENT_TOP = index_js.isRTL() ? 'top-end' : 'top-start';
const PLACEMENT_TOPEND = index.isRTL() ? 'top-start' : 'top-end'; const PLACEMENT_TOPEND = index_js.isRTL() ? 'top-start' : 'top-end';
const PLACEMENT_BOTTOM = index.isRTL() ? 'bottom-end' : 'bottom-start'; const PLACEMENT_BOTTOM = index_js.isRTL() ? 'bottom-end' : 'bottom-start';
const PLACEMENT_BOTTOMEND = index.isRTL() ? 'bottom-start' : 'bottom-end'; const PLACEMENT_BOTTOMEND = index_js.isRTL() ? 'bottom-start' : 'bottom-end';
const PLACEMENT_RIGHT = index.isRTL() ? 'left-start' : 'right-start'; const PLACEMENT_RIGHT = index_js.isRTL() ? 'left-start' : 'right-start';
const PLACEMENT_LEFT = index.isRTL() ? 'right-start' : 'left-start'; const PLACEMENT_LEFT = index_js.isRTL() ? 'right-start' : 'left-start';
const PLACEMENT_TOPCENTER = 'top'; const PLACEMENT_TOPCENTER = 'top';
const PLACEMENT_BOTTOMCENTER = 'bottom'; const PLACEMENT_BOTTOMCENTER = 'bottom';
const Default = { const Default = {
@ -98,218 +93,172 @@
popperConfig: '(null|object|function)', popperConfig: '(null|object|function)',
reference: '(string|element|object)' reference: '(string|element|object)'
}; };
/** /**
* Class definition * Class definition
*/ */
class Dropdown extends BaseComponent__default.default { class Dropdown extends BaseComponent {
constructor(element, config) { constructor(element, config) {
super(element, config); super(element, config);
this._popper = null; this._popper = null;
this._parent = this._element.parentNode; // dropdown wrapper this._parent = this._element.parentNode; // dropdown wrapper
// todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
this._menu = SelectorEngine__default.default.next(this._element, SELECTOR_MENU)[0] || SelectorEngine__default.default.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine__default.default.findOne(SELECTOR_MENU, this._parent);
this._inNavbar = this._detectNavbar(); this._inNavbar = this._detectNavbar();
} // Getters }
// Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
toggle() { toggle() {
return this._isShown() ? this.hide() : this.show(); return this._isShown() ? this.hide() : this.show();
} }
show() { show() {
if (index.isDisabled(this._element) || this._isShown()) { if (index_js.isDisabled(this._element) || this._isShown()) {
return; return;
} }
const relatedTarget = { const relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW, relatedTarget); const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget);
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
} }
this._createPopper();
this._createPopper(); // If this is a touch-enabled device we add extra // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children; // empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS // only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) { if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {
for (const element of [].concat(...document.body.children)) { for (const element of [].concat(...document.body.children)) {
EventHandler__default.default.on(element, 'mouseover', index.noop); EventHandler.on(element, 'mouseover', index_js.noop);
} }
} }
this._element.focus(); this._element.focus();
this._element.setAttribute('aria-expanded', true); this._element.setAttribute('aria-expanded', true);
this._menu.classList.add(CLASS_NAME_SHOW); this._menu.classList.add(CLASS_NAME_SHOW);
this._element.classList.add(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOW);
EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget);
EventHandler__default.default.trigger(this._element, EVENT_SHOWN, relatedTarget);
} }
hide() { hide() {
if (index.isDisabled(this._element) || !this._isShown()) { if (index_js.isDisabled(this._element) || !this._isShown()) {
return; return;
} }
const relatedTarget = { const relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
this._completeHide(relatedTarget); this._completeHide(relatedTarget);
} }
dispose() { dispose() {
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
} }
super.dispose(); super.dispose();
} }
update() { update() {
this._inNavbar = this._detectNavbar(); this._inNavbar = this._detectNavbar();
if (this._popper) { if (this._popper) {
this._popper.update(); this._popper.update();
} }
} // Private }
// Private
_completeHide(relatedTarget) { _completeHide(relatedTarget) {
const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE, relatedTarget); const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
} // If this is a touch-enabled device we remove the extra }
// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support // empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
for (const element of [].concat(...document.body.children)) { for (const element of [].concat(...document.body.children)) {
EventHandler__default.default.off(element, 'mouseover', index.noop); EventHandler.off(element, 'mouseover', index_js.noop);
} }
} }
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
} }
this._menu.classList.remove(CLASS_NAME_SHOW); this._menu.classList.remove(CLASS_NAME_SHOW);
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
this._element.setAttribute('aria-expanded', 'false'); this._element.setAttribute('aria-expanded', 'false');
Manipulator.removeDataAttribute(this._menu, 'popper');
Manipulator__default.default.removeDataAttribute(this._menu, 'popper'); EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget);
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN, relatedTarget);
} }
_getConfig(config) { _getConfig(config) {
config = super._getConfig(config); config = super._getConfig(config);
if (typeof config.reference === 'object' && !index_js.isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
if (typeof config.reference === 'object' && !index.isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
// Popper virtual elements require a getBoundingClientRect method // Popper virtual elements require a getBoundingClientRect method
throw new TypeError(`${NAME.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`); throw new TypeError(`${NAME.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
} }
return config; return config;
} }
_createPopper() { _createPopper() {
if (typeof Popper__namespace === 'undefined') { if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)');
} }
let referenceElement = this._element; let referenceElement = this._element;
if (this._config.reference === 'parent') { if (this._config.reference === 'parent') {
referenceElement = this._parent; referenceElement = this._parent;
} else if (index.isElement(this._config.reference)) { } else if (index_js.isElement(this._config.reference)) {
referenceElement = index.getElement(this._config.reference); referenceElement = index_js.getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') { } else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference; referenceElement = this._config.reference;
} }
const popperConfig = this._getPopperConfig(); const popperConfig = this._getPopperConfig();
this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig); this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
} }
_isShown() { _isShown() {
return this._menu.classList.contains(CLASS_NAME_SHOW); return this._menu.classList.contains(CLASS_NAME_SHOW);
} }
_getPlacement() { _getPlacement() {
const parentDropdown = this._parent; const parentDropdown = this._parent;
if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) { if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
return PLACEMENT_RIGHT; return PLACEMENT_RIGHT;
} }
if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) { if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
return PLACEMENT_LEFT; return PLACEMENT_LEFT;
} }
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) { if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {
return PLACEMENT_TOPCENTER; return PLACEMENT_TOPCENTER;
} }
if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) { if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {
return PLACEMENT_BOTTOMCENTER; return PLACEMENT_BOTTOMCENTER;
} // We need to trim the value because custom properties can also include spaces }
// We need to trim the value because custom properties can also include spaces
const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'; const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) { if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP; return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
} }
return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM; return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
} }
_detectNavbar() { _detectNavbar() {
return this._element.closest(SELECTOR_NAVBAR) !== null; return this._element.closest(SELECTOR_NAVBAR) !== null;
} }
_getOffset() { _getOffset() {
const { const {
offset offset
} = this._config; } = this._config;
if (typeof offset === 'string') { if (typeof offset === 'string') {
return offset.split(',').map(value => Number.parseInt(value, 10)); return offset.split(',').map(value => Number.parseInt(value, 10));
} }
if (typeof offset === 'function') { if (typeof offset === 'function') {
return popperData => offset(popperData, this._element); return popperData => offset(popperData, this._element);
} }
return offset; return offset;
} }
_getPopperConfig() { _getPopperConfig() {
const defaultBsPopperConfig = { const defaultBsPopperConfig = {
placement: this._getPlacement(), placement: this._getPlacement(),
@ -324,121 +273,101 @@
offset: this._getOffset() offset: this._getOffset()
} }
}] }]
}; // Disable Popper if we have a static display or Dropdown is in Navbar };
// Disable Popper if we have a static display or Dropdown is in Navbar
if (this._inNavbar || this._config.display === 'static') { if (this._inNavbar || this._config.display === 'static') {
Manipulator__default.default.setDataAttribute(this._menu, 'popper', 'static'); // todo:v6 remove Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
defaultBsPopperConfig.modifiers = [{ defaultBsPopperConfig.modifiers = [{
name: 'applyStyles', name: 'applyStyles',
enabled: false enabled: false
}]; }];
} }
return {
return { ...defaultBsPopperConfig, ...defaultBsPopperConfig,
...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig) ...index_js.execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
}; };
} }
_selectMenuItem({ _selectMenuItem({
key, key,
target target
}) { }) {
const items = SelectorEngine__default.default.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => index.isVisible(element)); const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => index_js.isVisible(element));
if (!items.length) { if (!items.length) {
return; return;
} // if target isn't included in items (e.g. when expanding the dropdown) }
// if target isn't included in items (e.g. when expanding the dropdown)
// allow cycling to get the last item in case key equals ARROW_UP_KEY // allow cycling to get the last item in case key equals ARROW_UP_KEY
index_js.getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus();
}
// Static
index.getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus();
} // Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = Dropdown.getOrCreateInstance(this, config); const data = Dropdown.getOrCreateInstance(this, config);
if (typeof config !== 'string') { if (typeof config !== 'string') {
return; return;
} }
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
}); });
} }
static clearMenus(event) { static clearMenus(event) {
if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) { if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) {
return; return;
} }
const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);
const openToggles = SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE_SHOWN);
for (const toggle of openToggles) { for (const toggle of openToggles) {
const context = Dropdown.getInstance(toggle); const context = Dropdown.getInstance(toggle);
if (!context || context._config.autoClose === false) { if (!context || context._config.autoClose === false) {
continue; continue;
} }
const composedPath = event.composedPath(); const composedPath = event.composedPath();
const isMenuTarget = composedPath.includes(context._menu); const isMenuTarget = composedPath.includes(context._menu);
if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) { if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
continue; continue;
} // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu }
// Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) { if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
continue; continue;
} }
const relatedTarget = { const relatedTarget = {
relatedTarget: context._element relatedTarget: context._element
}; };
if (event.type === 'click') { if (event.type === 'click') {
relatedTarget.clickEvent = event; relatedTarget.clickEvent = event;
} }
context._completeHide(relatedTarget); context._completeHide(relatedTarget);
} }
} }
static dataApiKeydownHandler(event) { static dataApiKeydownHandler(event) {
// If not an UP | DOWN | ESCAPE key => not a dropdown command // If not an UP | DOWN | ESCAPE key => not a dropdown command
// If input/textarea && if key is other than ESCAPE => not a dropdown command // If input/textarea && if key is other than ESCAPE => not a dropdown command
const isInput = /input|textarea/i.test(event.target.tagName); const isInput = /input|textarea/i.test(event.target.tagName);
const isEscapeEvent = event.key === ESCAPE_KEY; const isEscapeEvent = event.key === ESCAPE_KEY;
const isUpOrDownEvent = [ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key); const isUpOrDownEvent = [ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key);
if (!isUpOrDownEvent && !isEscapeEvent) { if (!isUpOrDownEvent && !isEscapeEvent) {
return; return;
} }
if (isInput && !isEscapeEvent) { if (isInput && !isEscapeEvent) {
return; return;
} }
event.preventDefault();
event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode);
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default.default.prev(this, SELECTOR_DATA_TOGGLE)[0] || SelectorEngine__default.default.next(this, SELECTOR_DATA_TOGGLE)[0] || SelectorEngine__default.default.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode);
const instance = Dropdown.getOrCreateInstance(getToggleButton); const instance = Dropdown.getOrCreateInstance(getToggleButton);
if (isUpOrDownEvent) { if (isUpOrDownEvent) {
event.stopPropagation(); event.stopPropagation();
instance.show(); instance.show();
instance._selectMenuItem(event); instance._selectMenuItem(event);
return; return;
} }
if (instance._isShown()) { if (instance._isShown()) {
// else is escape and we check if it is shown // else is escape and we check if it is shown
event.stopPropagation(); event.stopPropagation();
@ -446,26 +375,26 @@
getToggleButton.focus(); getToggleButton.focus();
} }
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler);
EventHandler__default.default.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler); EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
EventHandler__default.default.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler); EventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus); EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler__default.default.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus); EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault(); event.preventDefault();
Dropdown.getOrCreateInstance(this).toggle(); Dropdown.getOrCreateInstance(this).toggle();
}); });
/** /**
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(Dropdown); index_js.defineJQueryPlugin(Dropdown);
return Dropdown; return Dropdown;

File diff suppressed because one or more lines are too long

184
js/dist/modal.js vendored
View file

@ -1,29 +1,22 @@
/*! /*!
* Bootstrap modal.js v5.2.3 (https://getbootstrap.com/) * Bootstrap modal.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/selector-engine'), require('./util/scrollbar'), require('./base-component'), require('./util/backdrop'), require('./util/focustrap'), require('./util/component-functions')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./util/backdrop.js'), require('./util/component-functions.js'), require('./util/focustrap.js'), require('./util/index.js'), require('./util/scrollbar.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/selector-engine', './util/scrollbar', './base-component', './util/backdrop', './util/focustrap', './util/component-functions'], factory) : typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './dom/selector-engine', './util/backdrop', './util/component-functions', './util/focustrap', './util/index', './util/scrollbar'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.Index, global.EventHandler, global.SelectorEngine, global.Scrollbar, global.BaseComponent, global.Backdrop, global.Focustrap, global.ComponentFunctions)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.BaseComponent, global.EventHandler, global.SelectorEngine, global.Backdrop, global.ComponentFunctions, global.Focustrap, global.Index, global.Scrollbar));
})(this, (function (index, EventHandler, SelectorEngine, ScrollBarHelper, BaseComponent, Backdrop, FocusTrap, componentFunctions) { 'use strict'; })(this, (function (BaseComponent, EventHandler, SelectorEngine, Backdrop, componentFunctions_js, FocusTrap, index_js, ScrollBarHelper) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
const ScrollBarHelper__default = /*#__PURE__*/_interopDefaultLegacy(ScrollBarHelper);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
const Backdrop__default = /*#__PURE__*/_interopDefaultLegacy(Backdrop);
const FocusTrap__default = /*#__PURE__*/_interopDefaultLegacy(FocusTrap);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): modal.js * Bootstrap modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -61,338 +54,265 @@
focus: 'boolean', focus: 'boolean',
keyboard: 'boolean' keyboard: 'boolean'
}; };
/** /**
* Class definition * Class definition
*/ */
class Modal extends BaseComponent__default.default { class Modal extends BaseComponent {
constructor(element, config) { constructor(element, config) {
super(element, config); super(element, config);
this._dialog = SelectorEngine__default.default.findOne(SELECTOR_DIALOG, this._element); this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap(); this._focustrap = this._initializeFocusTrap();
this._isShown = false; this._isShown = false;
this._isTransitioning = false; this._isTransitioning = false;
this._scrollBar = new ScrollBarHelper__default.default(); this._scrollBar = new ScrollBarHelper();
this._addEventListeners(); this._addEventListeners();
} // Getters }
// Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
toggle(relatedTarget) { toggle(relatedTarget) {
return this._isShown ? this.hide() : this.show(relatedTarget); return this._isShown ? this.hide() : this.show(relatedTarget);
} }
show(relatedTarget) { show(relatedTarget) {
if (this._isShown || this._isTransitioning) { if (this._isShown || this._isTransitioning) {
return; return;
} }
const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW, {
relatedTarget relatedTarget
}); });
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
} }
this._isShown = true; this._isShown = true;
this._isTransitioning = true; this._isTransitioning = true;
this._scrollBar.hide(); this._scrollBar.hide();
document.body.classList.add(CLASS_NAME_OPEN); document.body.classList.add(CLASS_NAME_OPEN);
this._adjustDialog(); this._adjustDialog();
this._backdrop.show(() => this._showElement(relatedTarget)); this._backdrop.show(() => this._showElement(relatedTarget));
} }
hide() { hide() {
if (!this._isShown || this._isTransitioning) { if (!this._isShown || this._isTransitioning) {
return; return;
} }
const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
} }
this._isShown = false; this._isShown = false;
this._isTransitioning = true; this._isTransitioning = true;
this._focustrap.deactivate(); this._focustrap.deactivate();
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
this._queueCallback(() => this._hideModal(), this._element, this._isAnimated()); this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
} }
dispose() { dispose() {
for (const htmlElement of [window, this._dialog]) { EventHandler.off(window, EVENT_KEY);
EventHandler__default.default.off(htmlElement, EVENT_KEY); EventHandler.off(this._dialog, EVENT_KEY);
}
this._backdrop.dispose(); this._backdrop.dispose();
this._focustrap.deactivate(); this._focustrap.deactivate();
super.dispose(); super.dispose();
} }
handleUpdate() { handleUpdate() {
this._adjustDialog(); this._adjustDialog();
} // Private }
// Private
_initializeBackDrop() { _initializeBackDrop() {
return new Backdrop__default.default({ return new Backdrop({
isVisible: Boolean(this._config.backdrop), isVisible: Boolean(this._config.backdrop),
// 'static' option will be translated to true, and booleans will keep their value, // 'static' option will be translated to true, and booleans will keep their value,
isAnimated: this._isAnimated() isAnimated: this._isAnimated()
}); });
} }
_initializeFocusTrap() { _initializeFocusTrap() {
return new FocusTrap__default.default({ return new FocusTrap({
trapElement: this._element trapElement: this._element
}); });
} }
_showElement(relatedTarget) { _showElement(relatedTarget) {
// try to append dynamic modal // try to append dynamic modal
if (!document.body.contains(this._element)) { if (!document.body.contains(this._element)) {
document.body.append(this._element); document.body.append(this._element);
} }
this._element.style.display = 'block'; this._element.style.display = 'block';
this._element.removeAttribute('aria-hidden'); this._element.removeAttribute('aria-hidden');
this._element.setAttribute('aria-modal', true); this._element.setAttribute('aria-modal', true);
this._element.setAttribute('role', 'dialog'); this._element.setAttribute('role', 'dialog');
this._element.scrollTop = 0; this._element.scrollTop = 0;
const modalBody = SelectorEngine__default.default.findOne(SELECTOR_MODAL_BODY, this._dialog); const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
if (modalBody) { if (modalBody) {
modalBody.scrollTop = 0; modalBody.scrollTop = 0;
} }
index_js.reflow(this._element);
index.reflow(this._element);
this._element.classList.add(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOW);
const transitionComplete = () => { const transitionComplete = () => {
if (this._config.focus) { if (this._config.focus) {
this._focustrap.activate(); this._focustrap.activate();
} }
this._isTransitioning = false; this._isTransitioning = false;
EventHandler__default.default.trigger(this._element, EVENT_SHOWN, { EventHandler.trigger(this._element, EVENT_SHOWN, {
relatedTarget relatedTarget
}); });
}; };
this._queueCallback(transitionComplete, this._dialog, this._isAnimated()); this._queueCallback(transitionComplete, this._dialog, this._isAnimated());
} }
_addEventListeners() { _addEventListeners() {
EventHandler__default.default.on(this._element, EVENT_KEYDOWN_DISMISS, event => { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
if (event.key !== ESCAPE_KEY) { if (event.key !== ESCAPE_KEY) {
return; return;
} }
if (this._config.keyboard) { if (this._config.keyboard) {
event.preventDefault();
this.hide(); this.hide();
return; return;
} }
this._triggerBackdropTransition(); this._triggerBackdropTransition();
}); });
EventHandler__default.default.on(window, EVENT_RESIZE, () => { EventHandler.on(window, EVENT_RESIZE, () => {
if (this._isShown && !this._isTransitioning) { if (this._isShown && !this._isTransitioning) {
this._adjustDialog(); this._adjustDialog();
} }
}); });
EventHandler__default.default.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => { EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
EventHandler__default.default.one(this._element, EVENT_CLICK_DISMISS, event2 => { EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
if (this._element !== event.target || this._element !== event2.target) { if (this._element !== event.target || this._element !== event2.target) {
return; return;
} }
if (this._config.backdrop === 'static') { if (this._config.backdrop === 'static') {
this._triggerBackdropTransition(); this._triggerBackdropTransition();
return; return;
} }
if (this._config.backdrop) { if (this._config.backdrop) {
this.hide(); this.hide();
} }
}); });
}); });
} }
_hideModal() { _hideModal() {
this._element.style.display = 'none'; this._element.style.display = 'none';
this._element.setAttribute('aria-hidden', true); this._element.setAttribute('aria-hidden', true);
this._element.removeAttribute('aria-modal'); this._element.removeAttribute('aria-modal');
this._element.removeAttribute('role'); this._element.removeAttribute('role');
this._isTransitioning = false; this._isTransitioning = false;
this._backdrop.hide(() => { this._backdrop.hide(() => {
document.body.classList.remove(CLASS_NAME_OPEN); document.body.classList.remove(CLASS_NAME_OPEN);
this._resetAdjustments(); this._resetAdjustments();
this._scrollBar.reset(); this._scrollBar.reset();
EventHandler.trigger(this._element, EVENT_HIDDEN);
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);
}); });
} }
_isAnimated() { _isAnimated() {
return this._element.classList.contains(CLASS_NAME_FADE); return this._element.classList.contains(CLASS_NAME_FADE);
} }
_triggerBackdropTransition() { _triggerBackdropTransition() {
const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE_PREVENTED); const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
} }
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
const initialOverflowY = this._element.style.overflowY; // return if the following background transition hasn't yet completed const initialOverflowY = this._element.style.overflowY;
// return if the following background transition hasn't yet completed
if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) { if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {
return; return;
} }
if (!isModalOverflowing) { if (!isModalOverflowing) {
this._element.style.overflowY = 'hidden'; this._element.style.overflowY = 'hidden';
} }
this._element.classList.add(CLASS_NAME_STATIC); this._element.classList.add(CLASS_NAME_STATIC);
this._queueCallback(() => { this._queueCallback(() => {
this._element.classList.remove(CLASS_NAME_STATIC); this._element.classList.remove(CLASS_NAME_STATIC);
this._queueCallback(() => { this._queueCallback(() => {
this._element.style.overflowY = initialOverflowY; this._element.style.overflowY = initialOverflowY;
}, this._dialog); }, this._dialog);
}, this._dialog); }, this._dialog);
this._element.focus(); this._element.focus();
} }
/** /**
* The following methods are used to handle overflowing modals * The following methods are used to handle overflowing modals
*/ */
_adjustDialog() { _adjustDialog() {
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
const scrollbarWidth = this._scrollBar.getWidth(); const scrollbarWidth = this._scrollBar.getWidth();
const isBodyOverflowing = scrollbarWidth > 0; const isBodyOverflowing = scrollbarWidth > 0;
if (isBodyOverflowing && !isModalOverflowing) { if (isBodyOverflowing && !isModalOverflowing) {
const property = index.isRTL() ? 'paddingLeft' : 'paddingRight'; const property = index_js.isRTL() ? 'paddingLeft' : 'paddingRight';
this._element.style[property] = `${scrollbarWidth}px`; this._element.style[property] = `${scrollbarWidth}px`;
} }
if (!isBodyOverflowing && isModalOverflowing) { if (!isBodyOverflowing && isModalOverflowing) {
const property = index.isRTL() ? 'paddingRight' : 'paddingLeft'; const property = index_js.isRTL() ? 'paddingRight' : 'paddingLeft';
this._element.style[property] = `${scrollbarWidth}px`; this._element.style[property] = `${scrollbarWidth}px`;
} }
} }
_resetAdjustments() { _resetAdjustments() {
this._element.style.paddingLeft = ''; this._element.style.paddingLeft = '';
this._element.style.paddingRight = ''; this._element.style.paddingRight = '';
} // Static }
// Static
static jQueryInterface(config, relatedTarget) { static jQueryInterface(config, relatedTarget) {
return this.each(function () { return this.each(function () {
const data = Modal.getOrCreateInstance(this, config); const data = Modal.getOrCreateInstance(this, config);
if (typeof config !== 'string') { if (typeof config !== 'string') {
return; return;
} }
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](relatedTarget); data[config](relatedTarget);
}); });
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { const target = SelectorEngine.getElementFromSelector(this);
const target = index.getElementFromSelector(this);
if (['A', 'AREA'].includes(this.tagName)) { if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault(); event.preventDefault();
} }
EventHandler.one(target, EVENT_SHOW, showEvent => {
EventHandler__default.default.one(target, EVENT_SHOW, showEvent => {
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
// only register focus restorer if modal will actually get shown // only register focus restorer if modal will actually get shown
return; return;
} }
EventHandler.one(target, EVENT_HIDDEN, () => {
EventHandler__default.default.one(target, EVENT_HIDDEN, () => { if (index_js.isVisible(this)) {
if (index.isVisible(this)) {
this.focus(); this.focus();
} }
}); });
}); // avoid conflict when clicking modal toggler while another one is open });
const alreadyOpen = SelectorEngine__default.default.findOne(OPEN_SELECTOR);
// avoid conflict when clicking modal toggler while another one is open
const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
if (alreadyOpen) { if (alreadyOpen) {
Modal.getInstance(alreadyOpen).hide(); Modal.getInstance(alreadyOpen).hide();
} }
const data = Modal.getOrCreateInstance(target); const data = Modal.getOrCreateInstance(target);
data.toggle(this); data.toggle(this);
}); });
componentFunctions.enableDismissTrigger(Modal); componentFunctions_js.enableDismissTrigger(Modal);
/** /**
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(Modal); index_js.defineJQueryPlugin(Modal);
return Modal; return Modal;

File diff suppressed because one or more lines are too long

150
js/dist/offcanvas.js vendored
View file

@ -1,29 +1,22 @@
/*! /*!
* Bootstrap offcanvas.js v5.2.3 (https://getbootstrap.com/) * Bootstrap offcanvas.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./util/scrollbar'), require('./dom/event-handler'), require('./base-component'), require('./dom/selector-engine'), require('./util/backdrop'), require('./util/focustrap'), require('./util/component-functions')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./util/backdrop.js'), require('./util/component-functions.js'), require('./util/focustrap.js'), require('./util/index.js'), require('./util/scrollbar.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './util/scrollbar', './dom/event-handler', './base-component', './dom/selector-engine', './util/backdrop', './util/focustrap', './util/component-functions'], factory) : typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './dom/selector-engine', './util/backdrop', './util/component-functions', './util/focustrap', './util/index', './util/scrollbar'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Offcanvas = factory(global.Index, global.Scrollbar, global.EventHandler, global.BaseComponent, global.SelectorEngine, global.Backdrop, global.Focustrap, global.ComponentFunctions)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Offcanvas = factory(global.BaseComponent, global.EventHandler, global.SelectorEngine, global.Backdrop, global.ComponentFunctions, global.Focustrap, global.Index, global.Scrollbar));
})(this, (function (index, ScrollBarHelper, EventHandler, BaseComponent, SelectorEngine, Backdrop, FocusTrap, componentFunctions) { 'use strict'; })(this, (function (BaseComponent, EventHandler, SelectorEngine, Backdrop, componentFunctions_js, FocusTrap, index_js, ScrollBarHelper) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const ScrollBarHelper__default = /*#__PURE__*/_interopDefaultLegacy(ScrollBarHelper);
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
const Backdrop__default = /*#__PURE__*/_interopDefaultLegacy(Backdrop);
const FocusTrap__default = /*#__PURE__*/_interopDefaultLegacy(FocusTrap);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): offcanvas.js * Bootstrap offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -58,142 +51,108 @@
keyboard: 'boolean', keyboard: 'boolean',
scroll: 'boolean' scroll: 'boolean'
}; };
/** /**
* Class definition * Class definition
*/ */
class Offcanvas extends BaseComponent__default.default { class Offcanvas extends BaseComponent {
constructor(element, config) { constructor(element, config) {
super(element, config); super(element, config);
this._isShown = false; this._isShown = false;
this._backdrop = this._initializeBackDrop(); this._backdrop = this._initializeBackDrop();
this._focustrap = this._initializeFocusTrap(); this._focustrap = this._initializeFocusTrap();
this._addEventListeners(); this._addEventListeners();
} // Getters }
// Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
toggle(relatedTarget) { toggle(relatedTarget) {
return this._isShown ? this.hide() : this.show(relatedTarget); return this._isShown ? this.hide() : this.show(relatedTarget);
} }
show(relatedTarget) { show(relatedTarget) {
if (this._isShown) { if (this._isShown) {
return; return;
} }
const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW, {
relatedTarget relatedTarget
}); });
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
} }
this._isShown = true; this._isShown = true;
this._backdrop.show(); this._backdrop.show();
if (!this._config.scroll) { if (!this._config.scroll) {
new ScrollBarHelper__default.default().hide(); new ScrollBarHelper().hide();
} }
this._element.setAttribute('aria-modal', true); this._element.setAttribute('aria-modal', true);
this._element.setAttribute('role', 'dialog'); this._element.setAttribute('role', 'dialog');
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
const completeCallBack = () => { const completeCallBack = () => {
if (!this._config.scroll || this._config.backdrop) { if (!this._config.scroll || this._config.backdrop) {
this._focustrap.activate(); this._focustrap.activate();
} }
this._element.classList.add(CLASS_NAME_SHOW); this._element.classList.add(CLASS_NAME_SHOW);
this._element.classList.remove(CLASS_NAME_SHOWING); this._element.classList.remove(CLASS_NAME_SHOWING);
EventHandler.trigger(this._element, EVENT_SHOWN, {
EventHandler__default.default.trigger(this._element, EVENT_SHOWN, {
relatedTarget relatedTarget
}); });
}; };
this._queueCallback(completeCallBack, this._element, true); this._queueCallback(completeCallBack, this._element, true);
} }
hide() { hide() {
if (!this._isShown) { if (!this._isShown) {
return; return;
} }
const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
} }
this._focustrap.deactivate(); this._focustrap.deactivate();
this._element.blur(); this._element.blur();
this._isShown = false; this._isShown = false;
this._element.classList.add(CLASS_NAME_HIDING); this._element.classList.add(CLASS_NAME_HIDING);
this._backdrop.hide(); this._backdrop.hide();
const completeCallback = () => { const completeCallback = () => {
this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_HIDING); this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_HIDING);
this._element.removeAttribute('aria-modal'); this._element.removeAttribute('aria-modal');
this._element.removeAttribute('role'); this._element.removeAttribute('role');
if (!this._config.scroll) { if (!this._config.scroll) {
new ScrollBarHelper__default.default().reset(); new ScrollBarHelper().reset();
} }
EventHandler.trigger(this._element, EVENT_HIDDEN);
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);
}; };
this._queueCallback(completeCallback, this._element, true); this._queueCallback(completeCallback, this._element, true);
} }
dispose() { dispose() {
this._backdrop.dispose(); this._backdrop.dispose();
this._focustrap.deactivate(); this._focustrap.deactivate();
super.dispose(); super.dispose();
} // Private }
// Private
_initializeBackDrop() { _initializeBackDrop() {
const clickCallback = () => { const clickCallback = () => {
if (this._config.backdrop === 'static') { if (this._config.backdrop === 'static') {
EventHandler__default.default.trigger(this._element, EVENT_HIDE_PREVENTED); EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
return; return;
} }
this.hide(); this.hide();
}; // 'static' option will be translated to true, and booleans will keep their value };
// 'static' option will be translated to true, and booleans will keep their value
const isVisible = Boolean(this._config.backdrop); const isVisible = Boolean(this._config.backdrop);
return new Backdrop__default.default({ return new Backdrop({
className: CLASS_NAME_BACKDROP, className: CLASS_NAME_BACKDROP,
isVisible, isVisible,
isAnimated: true, isAnimated: true,
@ -201,96 +160,85 @@
clickCallback: isVisible ? clickCallback : null clickCallback: isVisible ? clickCallback : null
}); });
} }
_initializeFocusTrap() { _initializeFocusTrap() {
return new FocusTrap__default.default({ return new FocusTrap({
trapElement: this._element trapElement: this._element
}); });
} }
_addEventListeners() { _addEventListeners() {
EventHandler__default.default.on(this._element, EVENT_KEYDOWN_DISMISS, event => { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
if (event.key !== ESCAPE_KEY) { if (event.key !== ESCAPE_KEY) {
return; return;
} }
if (this._config.keyboard) {
if (!this._config.keyboard) { this.hide();
EventHandler__default.default.trigger(this._element, EVENT_HIDE_PREVENTED);
return; return;
} }
EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
this.hide();
}); });
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = Offcanvas.getOrCreateInstance(this, config); const data = Offcanvas.getOrCreateInstance(this, config);
if (typeof config !== 'string') { if (typeof config !== 'string') {
return; return;
} }
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](this); data[config](this);
}); });
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { const target = SelectorEngine.getElementFromSelector(this);
const target = index.getElementFromSelector(this);
if (['A', 'AREA'].includes(this.tagName)) { if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault(); event.preventDefault();
} }
if (index_js.isDisabled(this)) {
if (index.isDisabled(this)) {
return; return;
} }
EventHandler.one(target, EVENT_HIDDEN, () => {
EventHandler__default.default.one(target, EVENT_HIDDEN, () => {
// focus on trigger when it is closed // focus on trigger when it is closed
if (index.isVisible(this)) { if (index_js.isVisible(this)) {
this.focus(); this.focus();
} }
}); // avoid conflict when clicking a toggler of an offcanvas, while another is open });
const alreadyOpen = SelectorEngine__default.default.findOne(OPEN_SELECTOR);
// avoid conflict when clicking a toggler of an offcanvas, while another is open
const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
if (alreadyOpen && alreadyOpen !== target) { if (alreadyOpen && alreadyOpen !== target) {
Offcanvas.getInstance(alreadyOpen).hide(); Offcanvas.getInstance(alreadyOpen).hide();
} }
const data = Offcanvas.getOrCreateInstance(target); const data = Offcanvas.getOrCreateInstance(target);
data.toggle(this); data.toggle(this);
}); });
EventHandler__default.default.on(window, EVENT_LOAD_DATA_API, () => { EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
for (const selector of SelectorEngine__default.default.find(OPEN_SELECTOR)) { for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {
Offcanvas.getOrCreateInstance(selector).show(); Offcanvas.getOrCreateInstance(selector).show();
} }
}); });
EventHandler__default.default.on(window, EVENT_RESIZE, () => { EventHandler.on(window, EVENT_RESIZE, () => {
for (const element of SelectorEngine__default.default.find('[aria-modal][class*=show][class*=offcanvas-]')) { for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {
if (getComputedStyle(element).position !== 'fixed') { if (getComputedStyle(element).position !== 'fixed') {
Offcanvas.getOrCreateInstance(element).hide(); Offcanvas.getOrCreateInstance(element).hide();
} }
} }
}); });
componentFunctions.enableDismissTrigger(Offcanvas); componentFunctions_js.enableDismissTrigger(Offcanvas);
/** /**
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(Offcanvas); index_js.defineJQueryPlugin(Offcanvas);
return Offcanvas; return Offcanvas;

File diff suppressed because one or more lines are too long

50
js/dist/popover.js vendored
View file

@ -1,24 +1,22 @@
/*! /*!
* Bootstrap popover.js v5.2.3 (https://getbootstrap.com/) * Bootstrap popover.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./tooltip')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./tooltip.js'), require('./util/index.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './tooltip'], factory) : typeof define === 'function' && define.amd ? define(['./tooltip', './util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Index, global.Tooltip)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Tooltip, global.Index));
})(this, (function (index, Tooltip) { 'use strict'; })(this, (function (Tooltip, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): popover.js * Bootstrap popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -26,75 +24,71 @@
const NAME = 'popover'; const NAME = 'popover';
const SELECTOR_TITLE = '.popover-header'; const SELECTOR_TITLE = '.popover-header';
const SELECTOR_CONTENT = '.popover-body'; const SELECTOR_CONTENT = '.popover-body';
const Default = { ...Tooltip__default.default.Default, const Default = {
...Tooltip.Default,
content: '', content: '',
offset: [0, 8], offset: [0, 8],
placement: 'right', placement: 'right',
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>', template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>',
trigger: 'click' trigger: 'click'
}; };
const DefaultType = { ...Tooltip__default.default.DefaultType, const DefaultType = {
...Tooltip.DefaultType,
content: '(null|string|element|function)' content: '(null|string|element|function)'
}; };
/** /**
* Class definition * Class definition
*/ */
class Popover extends Tooltip__default.default { class Popover extends Tooltip {
// Getters // Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Overrides }
// Overrides
_isWithContent() { _isWithContent() {
return this._getTitle() || this._getContent(); return this._getTitle() || this._getContent();
} // Private }
// Private
_getContentForTemplate() { _getContentForTemplate() {
return { return {
[SELECTOR_TITLE]: this._getTitle(), [SELECTOR_TITLE]: this._getTitle(),
[SELECTOR_CONTENT]: this._getContent() [SELECTOR_CONTENT]: this._getContent()
}; };
} }
_getContent() { _getContent() {
return this._resolvePossibleFunction(this._config.content); return this._resolvePossibleFunction(this._config.content);
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = Popover.getOrCreateInstance(this, config); const data = Popover.getOrCreateInstance(this, config);
if (typeof config !== 'string') { if (typeof config !== 'string') {
return; return;
} }
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
}); });
} }
} }
/** /**
* jQuery * jQuery
*/ */
index_js.defineJQueryPlugin(Popover);
index.defineJQueryPlugin(Popover);
return Popover; return Popover;

View file

@ -1 +1 @@
{"version":3,"file":"popover.js","sources":["../src/popover.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport Tooltip from './tooltip'\n\n/**\n * Constants\n */\n\nconst NAME = 'popover'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Default = {\n ...Tooltip.Default,\n content: '',\n offset: [0, 8],\n placement: 'right',\n template: '<div class=\"popover\" role=\"tooltip\">' +\n '<div class=\"popover-arrow\"></div>' +\n '<h3 class=\"popover-header\"></h3>' +\n '<div class=\"popover-body\"></div>' +\n '</div>',\n trigger: 'click'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n}\n\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Overrides\n _isWithContent() {\n return this._getTitle() || this._getContent()\n }\n\n // Private\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n }\n }\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content)\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n })\n }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Popover)\n\nexport default Popover\n"],"names":["NAME","SELECTOR_TITLE","SELECTOR_CONTENT","Default","Tooltip","content","offset","placement","template","trigger","DefaultType","Popover","_isWithContent","_getTitle","_getContent","_getContentForTemplate","_resolvePossibleFunction","_config","jQueryInterface","config","each","data","getOrCreateInstance","TypeError","defineJQueryPlugin"],"mappings":";;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAKA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,SAAb,CAAA;EAEA,MAAMC,cAAc,GAAG,iBAAvB,CAAA;EACA,MAAMC,gBAAgB,GAAG,eAAzB,CAAA;EAEA,MAAMC,OAAO,GAAG,EACd,GAAGC,wBAAO,CAACD,OADG;EAEdE,EAAAA,OAAO,EAAE,EAFK;EAGdC,EAAAA,MAAM,EAAE,CAAC,CAAD,EAAI,CAAJ,CAHM;EAIdC,EAAAA,SAAS,EAAE,OAJG;IAKdC,QAAQ,EAAE,yCACR,mCADQ,GAER,kCAFQ,GAGR,kCAHQ,GAIR,QATY;EAUdC,EAAAA,OAAO,EAAE,OAAA;EAVK,CAAhB,CAAA;EAaA,MAAMC,WAAW,GAAG,EAClB,GAAGN,wBAAO,CAACM,WADO;EAElBL,EAAAA,OAAO,EAAE,gCAAA;EAFS,CAApB,CAAA;EAKA;EACA;EACA;;EAEA,MAAMM,OAAN,SAAsBP,wBAAtB,CAA8B;EAC5B;EACkB,EAAA,WAAPD,OAAO,GAAG;EACnB,IAAA,OAAOA,OAAP,CAAA;EACD,GAAA;;EAEqB,EAAA,WAAXO,WAAW,GAAG;EACvB,IAAA,OAAOA,WAAP,CAAA;EACD,GAAA;;EAEc,EAAA,WAAJV,IAAI,GAAG;EAChB,IAAA,OAAOA,IAAP,CAAA;EACD,GAZ2B;;;EAe5BY,EAAAA,cAAc,GAAG;EACf,IAAA,OAAO,IAAKC,CAAAA,SAAL,EAAoB,IAAA,IAAA,CAAKC,WAAL,EAA3B,CAAA;EACD,GAjB2B;;;EAoB5BC,EAAAA,sBAAsB,GAAG;MACvB,OAAO;EACL,MAAA,CAACd,cAAD,GAAkB,IAAKY,CAAAA,SAAL,EADb;QAEL,CAACX,gBAAD,GAAoB,IAAA,CAAKY,WAAL,EAAA;OAFtB,CAAA;EAID,GAAA;;EAEDA,EAAAA,WAAW,GAAG;EACZ,IAAA,OAAO,KAAKE,wBAAL,CAA8B,KAAKC,OAAL,CAAaZ,OAA3C,CAAP,CAAA;EACD,GA7B2B;;;IAgCN,OAAfa,eAAe,CAACC,MAAD,EAAS;MAC7B,OAAO,IAAA,CAAKC,IAAL,CAAU,YAAY;QAC3B,MAAMC,IAAI,GAAGV,OAAO,CAACW,mBAAR,CAA4B,IAA5B,EAAkCH,MAAlC,CAAb,CAAA;;EAEA,MAAA,IAAI,OAAOA,MAAP,KAAkB,QAAtB,EAAgC;EAC9B,QAAA,OAAA;EACD,OAAA;;EAED,MAAA,IAAI,OAAOE,IAAI,CAACF,MAAD,CAAX,KAAwB,WAA5B,EAAyC;EACvC,QAAA,MAAM,IAAII,SAAJ,CAAe,CAAmBJ,iBAAAA,EAAAA,MAAO,GAAzC,CAAN,CAAA;EACD,OAAA;;QAEDE,IAAI,CAACF,MAAD,CAAJ,EAAA,CAAA;EACD,KAZM,CAAP,CAAA;EAaD,GAAA;;EA9C2B,CAAA;EAiD9B;EACA;EACA;;;AAEAK,0BAAkB,CAACb,OAAD,CAAlB;;;;;;;;"} {"version":3,"file":"popover.js","sources":["../src/popover.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Tooltip from './tooltip.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'popover'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Default = {\n ...Tooltip.Default,\n content: '',\n offset: [0, 8],\n placement: 'right',\n template: '<div class=\"popover\" role=\"tooltip\">' +\n '<div class=\"popover-arrow\"></div>' +\n '<h3 class=\"popover-header\"></h3>' +\n '<div class=\"popover-body\"></div>' +\n '</div>',\n trigger: 'click'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n}\n\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Overrides\n _isWithContent() {\n return this._getTitle() || this._getContent()\n }\n\n // Private\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n }\n }\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content)\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n })\n }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Popover)\n\nexport default Popover\n"],"names":["NAME","SELECTOR_TITLE","SELECTOR_CONTENT","Default","Tooltip","content","offset","placement","template","trigger","DefaultType","Popover","_isWithContent","_getTitle","_getContent","_getContentForTemplate","_resolvePossibleFunction","_config","jQueryInterface","config","each","data","getOrCreateInstance","TypeError","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAKA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,SAAS;EAEtB,MAAMC,cAAc,GAAG,iBAAiB;EACxC,MAAMC,gBAAgB,GAAG,eAAe;EAExC,MAAMC,OAAO,GAAG;IACd,GAAGC,OAAO,CAACD,OAAO;EAClBE,EAAAA,OAAO,EAAE,EAAE;EACXC,EAAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;EACdC,EAAAA,SAAS,EAAE,OAAO;IAClBC,QAAQ,EAAE,sCAAsC,GAC9C,mCAAmC,GACnC,kCAAkC,GAClC,kCAAkC,GAClC,QAAQ;EACVC,EAAAA,OAAO,EAAE;EACX,CAAC;EAED,MAAMC,WAAW,GAAG;IAClB,GAAGN,OAAO,CAACM,WAAW;EACtBL,EAAAA,OAAO,EAAE;EACX,CAAC;;EAED;EACA;EACA;;EAEA,MAAMM,OAAO,SAASP,OAAO,CAAC;EAC5B;IACA,WAAWD,OAAOA,GAAG;EACnB,IAAA,OAAOA,OAAO;EAChB,EAAA;IAEA,WAAWO,WAAWA,GAAG;EACvB,IAAA,OAAOA,WAAW;EACpB,EAAA;IAEA,WAAWV,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI;EACb,EAAA;;EAEA;EACAY,EAAAA,cAAcA,GAAG;MACf,OAAO,IAAI,CAACC,SAAS,EAAE,IAAI,IAAI,CAACC,WAAW,EAAE;EAC/C,EAAA;;EAEA;EACAC,EAAAA,sBAAsBA,GAAG;MACvB,OAAO;EACL,MAAA,CAACd,cAAc,GAAG,IAAI,CAACY,SAAS,EAAE;EAClC,MAAA,CAACX,gBAAgB,GAAG,IAAI,CAACY,WAAW;OACrC;EACH,EAAA;EAEAA,EAAAA,WAAWA,GAAG;MACZ,OAAO,IAAI,CAACE,wBAAwB,CAAC,IAAI,CAACC,OAAO,CAACZ,OAAO,CAAC;EAC5D,EAAA;;EAEA;IACA,OAAOa,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;QAC3B,MAAMC,IAAI,GAAGV,OAAO,CAACW,mBAAmB,CAAC,IAAI,EAAEH,MAAM,CAAC;EAEtD,MAAA,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;EAC9B,QAAA;EACF,MAAA;EAEA,MAAA,IAAI,OAAOE,IAAI,CAACF,MAAM,CAAC,KAAK,WAAW,EAAE;EACvC,QAAA,MAAM,IAAII,SAAS,CAAC,CAAA,iBAAA,EAAoBJ,MAAM,GAAG,CAAC;EACpD,MAAA;EAEAE,MAAAA,IAAI,CAACF,MAAM,CAAC,EAAE;EAChB,IAAA,CAAC,CAAC;EACJ,EAAA;EACF;;EAEA;EACA;EACA;;AAEAK,6BAAkB,CAACb,OAAO,CAAC;;;;;;;;"}

141
js/dist/scrollspy.js vendored
View file

@ -1,26 +1,22 @@
/*! /*!
* Bootstrap scrollspy.js v5.2.3 (https://getbootstrap.com/) * Bootstrap scrollspy.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/selector-engine'), require('./base-component')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./util/index.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './dom/selector-engine', './util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Scrollspy = factory(global.Index, global.EventHandler, global.SelectorEngine, global.BaseComponent)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Scrollspy = factory(global.BaseComponent, global.EventHandler, global.SelectorEngine, global.Index));
})(this, (function (index, EventHandler, SelectorEngine, BaseComponent) { 'use strict'; })(this, (function (BaseComponent, EventHandler, SelectorEngine, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): scrollspy.js * Bootstrap scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -59,14 +55,16 @@
target: 'element', target: 'element',
threshold: 'array' threshold: 'array'
}; };
/** /**
* Class definition * Class definition
*/ */
class ScrollSpy extends BaseComponent__default.default { class ScrollSpy extends BaseComponent {
constructor(element, config) { constructor(element, config) {
super(element, config); // this._element is the observablesContainer and config.target the menu links wrapper super(element, config);
// this._element is the observablesContainer and config.target the menu links wrapper
this._targetLinks = new Map(); this._targetLinks = new Map();
this._observableSections = new Map(); this._observableSections = new Map();
this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element; this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element;
@ -77,87 +75,75 @@
parentScrollTop: 0 parentScrollTop: 0
}; };
this.refresh(); // initialize this.refresh(); // initialize
} // Getters }
// Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
refresh() { refresh() {
this._initializeTargetsAndObservables(); this._initializeTargetsAndObservables();
this._maybeEnableSmoothScroll(); this._maybeEnableSmoothScroll();
if (this._observer) { if (this._observer) {
this._observer.disconnect(); this._observer.disconnect();
} else { } else {
this._observer = this._getNewObserver(); this._observer = this._getNewObserver();
} }
for (const section of this._observableSections.values()) { for (const section of this._observableSections.values()) {
this._observer.observe(section); this._observer.observe(section);
} }
} }
dispose() { dispose() {
this._observer.disconnect(); this._observer.disconnect();
super.dispose(); super.dispose();
} // Private }
// Private
_configAfterMerge(config) { _configAfterMerge(config) {
// TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
config.target = index.getElement(config.target) || document.body; // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only config.target = index_js.getElement(config.target) || document.body;
// TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin; config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
if (typeof config.threshold === 'string') { if (typeof config.threshold === 'string') {
config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value)); config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));
} }
return config; return config;
} }
_maybeEnableSmoothScroll() { _maybeEnableSmoothScroll() {
if (!this._config.smoothScroll) { if (!this._config.smoothScroll) {
return; return;
} // unregister any previous listeners }
// unregister any previous listeners
EventHandler__default.default.off(this._config.target, EVENT_CLICK); EventHandler.off(this._config.target, EVENT_CLICK);
EventHandler__default.default.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => { EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {
const observableSection = this._observableSections.get(event.target.hash); const observableSection = this._observableSections.get(event.target.hash);
if (observableSection) { if (observableSection) {
event.preventDefault(); event.preventDefault();
const root = this._rootElement || window; const root = this._rootElement || window;
const height = observableSection.offsetTop - this._element.offsetTop; const height = observableSection.offsetTop - this._element.offsetTop;
if (root.scrollTo) { if (root.scrollTo) {
root.scrollTo({ root.scrollTo({
top: height, top: height,
behavior: 'smooth' behavior: 'smooth'
}); });
return; return;
} // Chrome 60 doesn't support `scrollTo` }
// Chrome 60 doesn't support `scrollTo`
root.scrollTop = height; root.scrollTop = height;
} }
}); });
} }
_getNewObserver() { _getNewObserver() {
const options = { const options = {
root: this._rootElement, root: this._rootElement,
@ -165,146 +151,123 @@
rootMargin: this._config.rootMargin rootMargin: this._config.rootMargin
}; };
return new IntersectionObserver(entries => this._observerCallback(entries), options); return new IntersectionObserver(entries => this._observerCallback(entries), options);
} // The logic of selection }
// The logic of selection
_observerCallback(entries) { _observerCallback(entries) {
const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`); const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`);
const activate = entry => { const activate = entry => {
this._previousScrollData.visibleEntryTop = entry.target.offsetTop; this._previousScrollData.visibleEntryTop = entry.target.offsetTop;
this._process(targetElement(entry)); this._process(targetElement(entry));
}; };
const parentScrollTop = (this._rootElement || document.documentElement).scrollTop; const parentScrollTop = (this._rootElement || document.documentElement).scrollTop;
const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop; const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;
this._previousScrollData.parentScrollTop = parentScrollTop; this._previousScrollData.parentScrollTop = parentScrollTop;
for (const entry of entries) { for (const entry of entries) {
if (!entry.isIntersecting) { if (!entry.isIntersecting) {
this._activeTarget = null; this._activeTarget = null;
this._clearActiveClass(targetElement(entry)); this._clearActiveClass(targetElement(entry));
continue; continue;
} }
const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop;
const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop; // if we are scrolling down, pick the bigger offsetTop // if we are scrolling down, pick the bigger offsetTop
if (userScrollsDown && entryIsLowerThanPrevious) { if (userScrollsDown && entryIsLowerThanPrevious) {
activate(entry); // if parent isn't scrolled, let's keep the first visible item, breaking the iteration activate(entry);
// if parent isn't scrolled, let's keep the first visible item, breaking the iteration
if (!parentScrollTop) { if (!parentScrollTop) {
return; return;
} }
continue; continue;
} // if we are scrolling up, pick the smallest offsetTop }
// if we are scrolling up, pick the smallest offsetTop
if (!userScrollsDown && !entryIsLowerThanPrevious) { if (!userScrollsDown && !entryIsLowerThanPrevious) {
activate(entry); activate(entry);
} }
} }
} }
_initializeTargetsAndObservables() { _initializeTargetsAndObservables() {
this._targetLinks = new Map(); this._targetLinks = new Map();
this._observableSections = new Map(); this._observableSections = new Map();
const targetLinks = SelectorEngine__default.default.find(SELECTOR_TARGET_LINKS, this._config.target); const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);
for (const anchor of targetLinks) { for (const anchor of targetLinks) {
// ensure that the anchor has an id and is not disabled // ensure that the anchor has an id and is not disabled
if (!anchor.hash || index.isDisabled(anchor)) { if (!anchor.hash || index_js.isDisabled(anchor)) {
continue; continue;
} }
const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element);
const observableSection = SelectorEngine__default.default.findOne(anchor.hash, this._element); // ensure that the observableSection exists & is visible // ensure that the observableSection exists & is visible
if (index_js.isVisible(observableSection)) {
if (index.isVisible(observableSection)) { this._targetLinks.set(decodeURI(anchor.hash), anchor);
this._targetLinks.set(anchor.hash, anchor);
this._observableSections.set(anchor.hash, observableSection); this._observableSections.set(anchor.hash, observableSection);
} }
} }
} }
_process(target) { _process(target) {
if (this._activeTarget === target) { if (this._activeTarget === target) {
return; return;
} }
this._clearActiveClass(this._config.target); this._clearActiveClass(this._config.target);
this._activeTarget = target; this._activeTarget = target;
target.classList.add(CLASS_NAME_ACTIVE); target.classList.add(CLASS_NAME_ACTIVE);
this._activateParents(target); this._activateParents(target);
EventHandler.trigger(this._element, EVENT_ACTIVATE, {
EventHandler__default.default.trigger(this._element, EVENT_ACTIVATE, {
relatedTarget: target relatedTarget: target
}); });
} }
_activateParents(target) { _activateParents(target) {
// Activate dropdown parents // Activate dropdown parents
if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
SelectorEngine__default.default.findOne(SELECTOR_DROPDOWN_TOGGLE, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE); SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE);
return; return;
} }
for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {
for (const listGroup of SelectorEngine__default.default.parents(target, SELECTOR_NAV_LIST_GROUP)) {
// Set triggered links parents as active // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
for (const item of SelectorEngine__default.default.prev(listGroup, SELECTOR_LINK_ITEMS)) { for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) {
item.classList.add(CLASS_NAME_ACTIVE); item.classList.add(CLASS_NAME_ACTIVE);
} }
} }
} }
_clearActiveClass(parent) { _clearActiveClass(parent) {
parent.classList.remove(CLASS_NAME_ACTIVE); parent.classList.remove(CLASS_NAME_ACTIVE);
const activeNodes = SelectorEngine__default.default.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE}`, parent); const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE}`, parent);
for (const node of activeNodes) { for (const node of activeNodes) {
node.classList.remove(CLASS_NAME_ACTIVE); node.classList.remove(CLASS_NAME_ACTIVE);
} }
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = ScrollSpy.getOrCreateInstance(this, config); const data = ScrollSpy.getOrCreateInstance(this, config);
if (typeof config !== 'string') { if (typeof config !== 'string') {
return; return;
} }
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
}); });
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
EventHandler__default.default.on(window, EVENT_LOAD_DATA_API, () => { for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) {
for (const spy of SelectorEngine__default.default.find(SELECTOR_DATA_SPY)) {
ScrollSpy.getOrCreateInstance(spy); ScrollSpy.getOrCreateInstance(spy);
} }
}); });
/** /**
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(ScrollSpy); index_js.defineJQueryPlugin(ScrollSpy);
return ScrollSpy; return ScrollSpy;

File diff suppressed because one or more lines are too long

185
js/dist/tab.js vendored
View file

@ -1,26 +1,22 @@
/*! /*!
* Bootstrap tab.js v5.2.3 (https://getbootstrap.com/) * Bootstrap tab.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/selector-engine'), require('./base-component')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js'), require('./util/index.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/selector-engine', './base-component'], factory) : typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './dom/selector-engine', './util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Index, global.EventHandler, global.SelectorEngine, global.BaseComponent)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.BaseComponent, global.EventHandler, global.SelectorEngine, global.Index));
})(this, (function (index, EventHandler, SelectorEngine, BaseComponent) { 'use strict'; })(this, (function (BaseComponent, EventHandler, SelectorEngine, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): tab.js * Bootstrap tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -39,144 +35,127 @@
const ARROW_RIGHT_KEY = 'ArrowRight'; const ARROW_RIGHT_KEY = 'ArrowRight';
const ARROW_UP_KEY = 'ArrowUp'; const ARROW_UP_KEY = 'ArrowUp';
const ARROW_DOWN_KEY = 'ArrowDown'; const ARROW_DOWN_KEY = 'ArrowDown';
const HOME_KEY = 'Home';
const END_KEY = 'End';
const CLASS_NAME_ACTIVE = 'active'; const CLASS_NAME_ACTIVE = 'active';
const CLASS_NAME_FADE = 'fade'; const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_SHOW = 'show'; const CLASS_NAME_SHOW = 'show';
const CLASS_DROPDOWN = 'dropdown'; const CLASS_DROPDOWN = 'dropdown';
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
const SELECTOR_DROPDOWN_MENU = '.dropdown-menu'; const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)'; const NOT_SELECTOR_DROPDOWN_TOGGLE = `:not(${SELECTOR_DROPDOWN_TOGGLE})`;
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]'; const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
const SELECTOR_OUTER = '.nav-item, .list-group-item'; const SELECTOR_OUTER = '.nav-item, .list-group-item';
const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`; const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // todo:v6: could be only `tab` 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_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`; 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_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`;
/** /**
* Class definition * Class definition
*/ */
class Tab extends BaseComponent__default.default { class Tab extends BaseComponent {
constructor(element) { constructor(element) {
super(element); super(element);
this._parent = this._element.closest(SELECTOR_TAB_PANEL); this._parent = this._element.closest(SELECTOR_TAB_PANEL);
if (!this._parent) { if (!this._parent) {
return; // todo: should Throw exception on v6 return;
// TODO: should throw exception in v6
// throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`) // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
} // Set up initial aria attributes }
// Set up initial aria attributes
this._setInitialAttributes(this._parent, this._getChildren()); this._setInitialAttributes(this._parent, this._getChildren());
EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
}
EventHandler__default.default.on(this._element, EVENT_KEYDOWN, event => this._keydown(event)); // Getters
} // Getters
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
show() { show() {
// Shows this elem and deactivate the active sibling if exists // Shows this elem and deactivate the active sibling if exists
const innerElem = this._element; const innerElem = this._element;
if (this._elemIsActive(innerElem)) { if (this._elemIsActive(innerElem)) {
return; return;
} // Search for active tab on same parent to deactivate it
const active = this._getActiveElem();
const hideEvent = active ? EventHandler__default.default.trigger(active, EVENT_HIDE, {
relatedTarget: innerElem
}) : null;
const showEvent = EventHandler__default.default.trigger(innerElem, EVENT_SHOW, {
relatedTarget: active
});
if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {
return;
} }
// Search for active tab on same parent to deactivate it
const active = this._getActiveElem();
const hideEvent = active ? EventHandler.trigger(active, EVENT_HIDE, {
relatedTarget: innerElem
}) : null;
const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW, {
relatedTarget: active
});
if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {
return;
}
this._deactivate(active, innerElem); this._deactivate(active, innerElem);
this._activate(innerElem, active); this._activate(innerElem, active);
} // Private }
// Private
_activate(element, relatedElem) { _activate(element, relatedElem) {
if (!element) { if (!element) {
return; return;
} }
element.classList.add(CLASS_NAME_ACTIVE); element.classList.add(CLASS_NAME_ACTIVE);
this._activate(SelectorEngine.getElementFromSelector(element)); // Search and activate/show the proper section
this._activate(index.getElementFromSelector(element)); // Search and activate/show the proper section
const complete = () => { const complete = () => {
if (element.getAttribute('role') !== 'tab') { if (element.getAttribute('role') !== 'tab') {
element.classList.add(CLASS_NAME_SHOW); element.classList.add(CLASS_NAME_SHOW);
return; return;
} }
element.removeAttribute('tabindex'); element.removeAttribute('tabindex');
element.setAttribute('aria-selected', true); element.setAttribute('aria-selected', true);
this._toggleDropDown(element, true); this._toggleDropDown(element, true);
EventHandler.trigger(element, EVENT_SHOWN, {
EventHandler__default.default.trigger(element, EVENT_SHOWN, {
relatedTarget: relatedElem relatedTarget: relatedElem
}); });
}; };
this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE)); this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE));
} }
_deactivate(element, relatedElem) { _deactivate(element, relatedElem) {
if (!element) { if (!element) {
return; return;
} }
element.classList.remove(CLASS_NAME_ACTIVE); element.classList.remove(CLASS_NAME_ACTIVE);
element.blur(); element.blur();
this._deactivate(SelectorEngine.getElementFromSelector(element)); // Search and deactivate the shown section too
this._deactivate(index.getElementFromSelector(element)); // Search and deactivate the shown section too
const complete = () => { const complete = () => {
if (element.getAttribute('role') !== 'tab') { if (element.getAttribute('role') !== 'tab') {
element.classList.remove(CLASS_NAME_SHOW); element.classList.remove(CLASS_NAME_SHOW);
return; return;
} }
element.setAttribute('aria-selected', false); element.setAttribute('aria-selected', false);
element.setAttribute('tabindex', '-1'); element.setAttribute('tabindex', '-1');
this._toggleDropDown(element, false); this._toggleDropDown(element, false);
EventHandler.trigger(element, EVENT_HIDDEN, {
EventHandler__default.default.trigger(element, EVENT_HIDDEN, {
relatedTarget: relatedElem relatedTarget: relatedElem
}); });
}; };
this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE)); this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE));
} }
_keydown(event) { _keydown(event) {
if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) { if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key)) {
return; return;
} }
event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page
event.preventDefault(); event.preventDefault();
const children = this._getChildren().filter(element => !index_js.isDisabled(element));
let nextActiveElement;
if ([HOME_KEY, END_KEY].includes(event.key)) {
nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1];
} else {
const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key); const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
const nextActiveElement = index.getNextActiveElement(this._getChildren().filter(element => !index.isDisabled(element)), event.target, isNext, true); nextActiveElement = index_js.getNextActiveElement(children, event.target, isNext, true);
}
if (nextActiveElement) { if (nextActiveElement) {
nextActiveElement.focus({ nextActiveElement.focus({
preventScroll: true preventScroll: true
@ -184,141 +163,113 @@
Tab.getOrCreateInstance(nextActiveElement).show(); Tab.getOrCreateInstance(nextActiveElement).show();
} }
} }
_getChildren() { _getChildren() {
// collection of inner elements // collection of inner elements
return SelectorEngine__default.default.find(SELECTOR_INNER_ELEM, this._parent); return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent);
} }
_getActiveElem() { _getActiveElem() {
return this._getChildren().find(child => this._elemIsActive(child)) || null; return this._getChildren().find(child => this._elemIsActive(child)) || null;
} }
_setInitialAttributes(parent, children) { _setInitialAttributes(parent, children) {
this._setAttributeIfNotExists(parent, 'role', 'tablist'); this._setAttributeIfNotExists(parent, 'role', 'tablist');
for (const child of children) { for (const child of children) {
this._setInitialAttributesOnChild(child); this._setInitialAttributesOnChild(child);
} }
} }
_setInitialAttributesOnChild(child) { _setInitialAttributesOnChild(child) {
child = this._getInnerElement(child); child = this._getInnerElement(child);
const isActive = this._elemIsActive(child); const isActive = this._elemIsActive(child);
const outerElem = this._getOuterElement(child); const outerElem = this._getOuterElement(child);
child.setAttribute('aria-selected', isActive); child.setAttribute('aria-selected', isActive);
if (outerElem !== child) { if (outerElem !== child) {
this._setAttributeIfNotExists(outerElem, 'role', 'presentation'); this._setAttributeIfNotExists(outerElem, 'role', 'presentation');
} }
if (!isActive) { if (!isActive) {
child.setAttribute('tabindex', '-1'); child.setAttribute('tabindex', '-1');
} }
this._setAttributeIfNotExists(child, 'role', 'tab');
this._setAttributeIfNotExists(child, 'role', 'tab'); // set attributes to the related panel too // set attributes to the related panel too
this._setInitialAttributesOnTargetPanel(child); this._setInitialAttributesOnTargetPanel(child);
} }
_setInitialAttributesOnTargetPanel(child) { _setInitialAttributesOnTargetPanel(child) {
const target = index.getElementFromSelector(child); const target = SelectorEngine.getElementFromSelector(child);
if (!target) { if (!target) {
return; return;
} }
this._setAttributeIfNotExists(target, 'role', 'tabpanel'); this._setAttributeIfNotExists(target, 'role', 'tabpanel');
if (child.id) { if (child.id) {
this._setAttributeIfNotExists(target, 'aria-labelledby', `#${child.id}`); this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`);
} }
} }
_toggleDropDown(element, open) { _toggleDropDown(element, open) {
const outerElem = this._getOuterElement(element); const outerElem = this._getOuterElement(element);
if (!outerElem.classList.contains(CLASS_DROPDOWN)) { if (!outerElem.classList.contains(CLASS_DROPDOWN)) {
return; return;
} }
const toggle = (selector, className) => { const toggle = (selector, className) => {
const element = SelectorEngine__default.default.findOne(selector, outerElem); const element = SelectorEngine.findOne(selector, outerElem);
if (element) { if (element) {
element.classList.toggle(className, open); element.classList.toggle(className, open);
} }
}; };
toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE); toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW); toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW);
outerElem.setAttribute('aria-expanded', open); outerElem.setAttribute('aria-expanded', open);
} }
_setAttributeIfNotExists(element, attribute, value) { _setAttributeIfNotExists(element, attribute, value) {
if (!element.hasAttribute(attribute)) { if (!element.hasAttribute(attribute)) {
element.setAttribute(attribute, value); element.setAttribute(attribute, value);
} }
} }
_elemIsActive(elem) { _elemIsActive(elem) {
return elem.classList.contains(CLASS_NAME_ACTIVE); return elem.classList.contains(CLASS_NAME_ACTIVE);
} // Try to get the inner element (usually the .nav-link) }
// Try to get the inner element (usually the .nav-link)
_getInnerElement(elem) { _getInnerElement(elem) {
return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine__default.default.findOne(SELECTOR_INNER_ELEM, elem); return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem);
} // Try to get the outer element (usually the .nav-item) }
// Try to get the outer element (usually the .nav-item)
_getOuterElement(elem) { _getOuterElement(elem) {
return elem.closest(SELECTOR_OUTER) || elem; return elem.closest(SELECTOR_OUTER) || elem;
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = Tab.getOrCreateInstance(this); const data = Tab.getOrCreateInstance(this);
if (typeof config !== 'string') { if (typeof config !== 'string') {
return; return;
} }
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
}); });
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
if (['A', 'AREA'].includes(this.tagName)) { if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault(); event.preventDefault();
} }
if (index_js.isDisabled(this)) {
if (index.isDisabled(this)) {
return; return;
} }
Tab.getOrCreateInstance(this).show(); Tab.getOrCreateInstance(this).show();
}); });
/** /**
* Initialize on focus * Initialize on focus
*/ */
EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
EventHandler__default.default.on(window, EVENT_LOAD_DATA_API, () => { for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {
for (const element of SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {
Tab.getOrCreateInstance(element); Tab.getOrCreateInstance(element);
} }
}); });
@ -326,7 +277,7 @@
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(Tab); index_js.defineJQueryPlugin(Tab);
return Tab; return Tab;

2
js/dist/tab.js.map vendored

File diff suppressed because one or more lines are too long

103
js/dist/toast.js vendored
View file

@ -1,25 +1,22 @@
/*! /*!
* Bootstrap toast.js v5.2.3 (https://getbootstrap.com/) * Bootstrap toast.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./base-component'), require('./util/component-functions')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./util/component-functions.js'), require('./util/index.js')) :
typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './base-component', './util/component-functions'], factory) : typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './util/component-functions', './util/index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.Index, global.EventHandler, global.BaseComponent, global.ComponentFunctions)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.BaseComponent, global.EventHandler, global.ComponentFunctions, global.Index));
})(this, (function (index, EventHandler, BaseComponent, componentFunctions) { 'use strict'; })(this, (function (BaseComponent, EventHandler, componentFunctions_js, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): toast.js * Bootstrap toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -37,7 +34,6 @@
const EVENT_SHOWN = `shown${EVENT_KEY}`; const EVENT_SHOWN = `shown${EVENT_KEY}`;
const CLASS_NAME_FADE = 'fade'; const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
const CLASS_NAME_SHOW = 'show'; const CLASS_NAME_SHOW = 'show';
const CLASS_NAME_SHOWING = 'showing'; const CLASS_NAME_SHOWING = 'showing';
const DefaultType = { const DefaultType = {
@ -50,119 +46,90 @@
autohide: true, autohide: true,
delay: 5000 delay: 5000
}; };
/** /**
* Class definition * Class definition
*/ */
class Toast extends BaseComponent__default.default { class Toast extends BaseComponent {
constructor(element, config) { constructor(element, config) {
super(element, config); super(element, config);
this._timeout = null; this._timeout = null;
this._hasMouseInteraction = false; this._hasMouseInteraction = false;
this._hasKeyboardInteraction = false; this._hasKeyboardInteraction = false;
this._setListeners(); this._setListeners();
} // Getters }
// Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
show() { show() {
const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW); const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
} }
this._clearTimeout(); this._clearTimeout();
if (this._config.animation) { if (this._config.animation) {
this._element.classList.add(CLASS_NAME_FADE); this._element.classList.add(CLASS_NAME_FADE);
} }
const complete = () => { const complete = () => {
this._element.classList.remove(CLASS_NAME_SHOWING); this._element.classList.remove(CLASS_NAME_SHOWING);
EventHandler.trigger(this._element, EVENT_SHOWN);
EventHandler__default.default.trigger(this._element, EVENT_SHOWN);
this._maybeScheduleHide(); this._maybeScheduleHide();
}; };
this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
index_js.reflow(this._element);
index.reflow(this._element);
this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
} }
hide() { hide() {
if (!this.isShown()) { if (!this.isShown()) {
return; return;
} }
const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
} }
const complete = () => { const complete = () => {
this._element.classList.add(CLASS_NAME_HIDE); // @deprecated this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW);
EventHandler.trigger(this._element, EVENT_HIDDEN);
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);
}; };
this._element.classList.add(CLASS_NAME_SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
this._queueCallback(complete, this._element, this._config.animation); this._queueCallback(complete, this._element, this._config.animation);
} }
dispose() { dispose() {
this._clearTimeout(); this._clearTimeout();
if (this.isShown()) { if (this.isShown()) {
this._element.classList.remove(CLASS_NAME_SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
} }
super.dispose(); super.dispose();
} }
isShown() { isShown() {
return this._element.classList.contains(CLASS_NAME_SHOW); return this._element.classList.contains(CLASS_NAME_SHOW);
} // Private }
// Private
_maybeScheduleHide() { _maybeScheduleHide() {
if (!this._config.autohide) { if (!this._config.autohide) {
return; return;
} }
if (this._hasMouseInteraction || this._hasKeyboardInteraction) { if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
return; return;
} }
this._timeout = setTimeout(() => { this._timeout = setTimeout(() => {
this.hide(); this.hide();
}, this._config.delay); }, this._config.delay);
} }
_onInteraction(event, isInteracting) { _onInteraction(event, isInteracting) {
switch (event.type) { switch (event.type) {
case 'mouseover': case 'mouseover':
@ -171,7 +138,6 @@
this._hasMouseInteraction = isInteracting; this._hasMouseInteraction = isInteracting;
break; break;
} }
case 'focusin': case 'focusin':
case 'focusout': case 'focusout':
{ {
@ -179,61 +145,52 @@
break; break;
} }
} }
if (isInteracting) { if (isInteracting) {
this._clearTimeout(); this._clearTimeout();
return; return;
} }
const nextElement = event.relatedTarget; const nextElement = event.relatedTarget;
if (this._element === nextElement || this._element.contains(nextElement)) { if (this._element === nextElement || this._element.contains(nextElement)) {
return; return;
} }
this._maybeScheduleHide(); this._maybeScheduleHide();
} }
_setListeners() { _setListeners() {
EventHandler__default.default.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true)); EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
EventHandler__default.default.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false)); EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
EventHandler__default.default.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true)); EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
EventHandler__default.default.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false)); EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
} }
_clearTimeout() { _clearTimeout() {
clearTimeout(this._timeout); clearTimeout(this._timeout);
this._timeout = null; this._timeout = null;
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = Toast.getOrCreateInstance(this, config); const data = Toast.getOrCreateInstance(this, config);
if (typeof config === 'string') { if (typeof config === 'string') {
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](this); data[config](this);
} }
}); });
} }
} }
/** /**
* Data API implementation * Data API implementation
*/ */
componentFunctions_js.enableDismissTrigger(Toast);
componentFunctions.enableDismissTrigger(Toast);
/** /**
* jQuery * jQuery
*/ */
index.defineJQueryPlugin(Toast); index_js.defineJQueryPlugin(Toast);
return Toast; return Toast;

File diff suppressed because one or more lines are too long

254
js/dist/tooltip.js vendored
View file

@ -1,18 +1,15 @@
/*! /*!
* Bootstrap tooltip.js v5.2.3 (https://getbootstrap.com/) * Bootstrap tooltip.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./util/index'), require('./util/sanitizer'), require('./dom/event-handler'), require('./dom/manipulator'), require('./base-component'), require('./util/template-factory')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./util/index.js'), require('./util/sanitizer.js'), require('./util/template-factory.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './util/index', './util/sanitizer', './dom/event-handler', './dom/manipulator', './base-component', './util/template-factory'], factory) : typeof define === 'function' && define.amd ? define(['@popperjs/core', './base-component', './dom/event-handler', './dom/manipulator', './util/index', './util/sanitizer', './util/template-factory'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global["@popperjs/core"], global.Index, global.Sanitizer, global.EventHandler, global.Manipulator, global.BaseComponent, global.TemplateFactory)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global["@popperjs/core"], global.BaseComponent, global.EventHandler, global.Manipulator, global.Index, global.Sanitizer, global.TemplateFactory));
})(this, (function (Popper, index, sanitizer, EventHandler, Manipulator, BaseComponent, TemplateFactory) { 'use strict'; })(this, (function (Popper, BaseComponent, EventHandler, Manipulator, index_js, sanitizer_js, TemplateFactory) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e }; function _interopNamespaceDefault(e) {
function _interopNamespace(e) {
if (e && e.__esModule) return e;
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } }); const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
if (e) { if (e) {
for (const k in e) { for (const k in e) {
@ -29,18 +26,16 @@
return Object.freeze(n); return Object.freeze(n);
} }
const Popper__namespace = /*#__PURE__*/_interopNamespace(Popper); const Popper__namespace = /*#__PURE__*/_interopNamespaceDefault(Popper);
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
const TemplateFactory__default = /*#__PURE__*/_interopDefaultLegacy(TemplateFactory);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): tooltip.js * Bootstrap tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -70,12 +65,12 @@
const AttachmentMap = { const AttachmentMap = {
AUTO: 'auto', AUTO: 'auto',
TOP: 'top', TOP: 'top',
RIGHT: index.isRTL() ? 'left' : 'right', RIGHT: index_js.isRTL() ? 'left' : 'right',
BOTTOM: 'bottom', BOTTOM: 'bottom',
LEFT: index.isRTL() ? 'right' : 'left' LEFT: index_js.isRTL() ? 'right' : 'left'
}; };
const Default = { const Default = {
allowList: sanitizer.DefaultAllowlist, allowList: sanitizer_js.DefaultAllowlist,
animation: true, animation: true,
boundary: 'clippingParents', boundary: 'clippingParents',
container: false, container: false,
@ -83,7 +78,7 @@
delay: 0, delay: 0,
fallbackPlacements: ['top', 'right', 'bottom', 'left'], fallbackPlacements: ['top', 'right', 'bottom', 'left'],
html: false, html: false,
offset: [0, 0], offset: [0, 6],
placement: 'top', placement: 'top',
popperConfig: null, popperConfig: null,
sanitize: true, sanitize: true,
@ -112,171 +107,139 @@
title: '(string|element|function)', title: '(string|element|function)',
trigger: 'string' trigger: 'string'
}; };
/** /**
* Class definition * Class definition
*/ */
class Tooltip extends BaseComponent__default.default { class Tooltip extends BaseComponent {
constructor(element, config) { constructor(element, config) {
if (typeof Popper__namespace === 'undefined') { if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)'); throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org/docs/v2/)');
} }
super(element, config);
super(element, config); // Private // Private
this._isEnabled = true; this._isEnabled = true;
this._timeout = 0; this._timeout = 0;
this._isHovered = null; this._isHovered = null;
this._activeTrigger = {}; this._activeTrigger = {};
this._popper = null; this._popper = null;
this._templateFactory = null; this._templateFactory = null;
this._newContent = null; // Protected this._newContent = null;
// Protected
this.tip = null; this.tip = null;
this._setListeners(); this._setListeners();
if (!this._config.selector) { if (!this._config.selector) {
this._fixTitle(); this._fixTitle();
} }
} // Getters }
// Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
enable() { enable() {
this._isEnabled = true; this._isEnabled = true;
} }
disable() { disable() {
this._isEnabled = false; this._isEnabled = false;
} }
toggleEnabled() { toggleEnabled() {
this._isEnabled = !this._isEnabled; this._isEnabled = !this._isEnabled;
} }
toggle() { toggle() {
if (!this._isEnabled) { if (!this._isEnabled) {
return; return;
} }
this._activeTrigger.click = !this._activeTrigger.click;
if (this._isShown()) { if (this._isShown()) {
this._leave(); this._leave();
return; return;
} }
this._enter(); this._enter();
} }
dispose() { dispose() {
clearTimeout(this._timeout); clearTimeout(this._timeout);
EventHandler__default.default.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
if (this._element.getAttribute('data-bs-original-title')) { if (this._element.getAttribute('data-bs-original-title')) {
this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title')); this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
} }
this._disposePopper(); this._disposePopper();
super.dispose(); super.dispose();
} }
show() { show() {
if (this._element.style.display === 'none') { if (this._element.style.display === 'none') {
throw new Error('Please use show on visible elements'); throw new Error('Please use show on visible elements');
} }
if (!(this._isWithContent() && this._isEnabled)) { if (!(this._isWithContent() && this._isEnabled)) {
return; return;
} }
const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW));
const showEvent = EventHandler__default.default.trigger(this._element, this.constructor.eventName(EVENT_SHOW)); const shadowRoot = index_js.findShadowRoot(this._element);
const shadowRoot = index.findShadowRoot(this._element);
const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element); const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);
if (showEvent.defaultPrevented || !isInTheDom) { if (showEvent.defaultPrevented || !isInTheDom) {
return; return;
} // todo v6 remove this OR make it optional }
// TODO: v6 remove this or make it optional
this._disposePopper(); this._disposePopper();
const tip = this._getTipElement(); const tip = this._getTipElement();
this._element.setAttribute('aria-describedby', tip.getAttribute('id')); this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
const { const {
container container
} = this._config; } = this._config;
if (!this._element.ownerDocument.documentElement.contains(this.tip)) { if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
container.append(tip); container.append(tip);
EventHandler__default.default.trigger(this._element, this.constructor.eventName(EVENT_INSERTED)); EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));
} }
this._popper = this._createPopper(tip); this._popper = this._createPopper(tip);
tip.classList.add(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra tip.classList.add(CLASS_NAME_SHOW);
// If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children; // empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS // only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
for (const element of [].concat(...document.body.children)) { for (const element of [].concat(...document.body.children)) {
EventHandler__default.default.on(element, 'mouseover', index.noop); EventHandler.on(element, 'mouseover', index_js.noop);
} }
} }
const complete = () => { const complete = () => {
EventHandler__default.default.trigger(this._element, this.constructor.eventName(EVENT_SHOWN)); EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN));
if (this._isHovered === false) { if (this._isHovered === false) {
this._leave(); this._leave();
} }
this._isHovered = false; this._isHovered = false;
}; };
this._queueCallback(complete, this.tip, this._isAnimated()); this._queueCallback(complete, this.tip, this._isAnimated());
} }
hide() { hide() {
if (!this._isShown()) { if (!this._isShown()) {
return; return;
} }
const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE));
const hideEvent = EventHandler__default.default.trigger(this._element, this.constructor.eventName(EVENT_HIDE));
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
} }
const tip = this._getTipElement(); const tip = this._getTipElement();
tip.classList.remove(CLASS_NAME_SHOW);
tip.classList.remove(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support // empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
for (const element of [].concat(...document.body.children)) { for (const element of [].concat(...document.body.children)) {
EventHandler__default.default.off(element, 'mouseover', index.noop); EventHandler.off(element, 'mouseover', index_js.noop);
} }
} }
this._activeTrigger[TRIGGER_CLICK] = false; this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false; this._activeTrigger[TRIGGER_HOVER] = false;
@ -286,133 +249,107 @@
if (this._isWithActiveTrigger()) { if (this._isWithActiveTrigger()) {
return; return;
} }
if (!this._isHovered) { if (!this._isHovered) {
this._disposePopper(); this._disposePopper();
} }
this._element.removeAttribute('aria-describedby'); this._element.removeAttribute('aria-describedby');
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN));
EventHandler__default.default.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN));
}; };
this._queueCallback(complete, this.tip, this._isAnimated()); this._queueCallback(complete, this.tip, this._isAnimated());
} }
update() { update() {
if (this._popper) { if (this._popper) {
this._popper.update(); this._popper.update();
} }
} // Protected }
// Protected
_isWithContent() { _isWithContent() {
return Boolean(this._getTitle()); return Boolean(this._getTitle());
} }
_getTipElement() { _getTipElement() {
if (!this.tip) { if (!this.tip) {
this.tip = this._createTipElement(this._newContent || this._getContentForTemplate()); this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());
} }
return this.tip; return this.tip;
} }
_createTipElement(content) { _createTipElement(content) {
const tip = this._getTemplateFactory(content).toHtml(); // todo: remove this check on v6 const tip = this._getTemplateFactory(content).toHtml();
// TODO: remove this check in v6
if (!tip) { if (!tip) {
return null; return null;
} }
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW); // todo: on v6 the following can be achieved with CSS only // TODO: v6 the following can be achieved with CSS only
tip.classList.add(`bs-${this.constructor.NAME}-auto`); tip.classList.add(`bs-${this.constructor.NAME}-auto`);
const tipId = index.getUID(this.constructor.NAME).toString(); const tipId = index_js.getUID(this.constructor.NAME).toString();
tip.setAttribute('id', tipId); tip.setAttribute('id', tipId);
if (this._isAnimated()) { if (this._isAnimated()) {
tip.classList.add(CLASS_NAME_FADE); tip.classList.add(CLASS_NAME_FADE);
} }
return tip; return tip;
} }
setContent(content) { setContent(content) {
this._newContent = content; this._newContent = content;
if (this._isShown()) { if (this._isShown()) {
this._disposePopper(); this._disposePopper();
this.show(); this.show();
} }
} }
_getTemplateFactory(content) { _getTemplateFactory(content) {
if (this._templateFactory) { if (this._templateFactory) {
this._templateFactory.changeContent(content); this._templateFactory.changeContent(content);
} else { } else {
this._templateFactory = new TemplateFactory__default.default({ ...this._config, this._templateFactory = new TemplateFactory({
...this._config,
// the `content` var has to be after `this._config` // the `content` var has to be after `this._config`
// to override config.content in case of popover // to override config.content in case of popover
content, content,
extraClass: this._resolvePossibleFunction(this._config.customClass) extraClass: this._resolvePossibleFunction(this._config.customClass)
}); });
} }
return this._templateFactory; return this._templateFactory;
} }
_getContentForTemplate() { _getContentForTemplate() {
return { return {
[SELECTOR_TOOLTIP_INNER]: this._getTitle() [SELECTOR_TOOLTIP_INNER]: this._getTitle()
}; };
} }
_getTitle() { _getTitle() {
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title'); return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
} // Private }
// Private
_initializeOnDelegatedTarget(event) { _initializeOnDelegatedTarget(event) {
return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
} }
_isAnimated() { _isAnimated() {
return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE); return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE);
} }
_isShown() { _isShown() {
return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW); return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW);
} }
_createPopper(tip) { _createPopper(tip) {
const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement; const placement = index_js.execute(this._config.placement, [this, tip, this._element]);
const attachment = AttachmentMap[placement.toUpperCase()]; const attachment = AttachmentMap[placement.toUpperCase()];
return Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment)); return Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
} }
_getOffset() { _getOffset() {
const { const {
offset offset
} = this._config; } = this._config;
if (typeof offset === 'string') { if (typeof offset === 'string') {
return offset.split(',').map(value => Number.parseInt(value, 10)); return offset.split(',').map(value => Number.parseInt(value, 10));
} }
if (typeof offset === 'function') { if (typeof offset === 'function') {
return popperData => offset(popperData, this._element); return popperData => offset(popperData, this._element);
} }
return offset; return offset;
} }
_resolvePossibleFunction(arg) { _resolvePossibleFunction(arg) {
return typeof arg === 'function' ? arg.call(this._element) : arg; return index_js.execute(arg, [this._element, this._element]);
} }
_getPopperConfig(attachment) { _getPopperConfig(attachment) {
const defaultBsPopperConfig = { const defaultBsPopperConfig = {
placement: attachment, placement: attachment,
@ -447,200 +384,161 @@
} }
}] }]
}; };
return { ...defaultBsPopperConfig, return {
...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig) ...defaultBsPopperConfig,
...index_js.execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
}; };
} }
_setListeners() { _setListeners() {
const triggers = this._config.trigger.split(' '); const triggers = this._config.trigger.split(' ');
for (const trigger of triggers) { for (const trigger of triggers) {
if (trigger === 'click') { if (trigger === 'click') {
EventHandler__default.default.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, event => { EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, event => {
const context = this._initializeOnDelegatedTarget(event); const context = this._initializeOnDelegatedTarget(event);
context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]);
context.toggle(); context.toggle();
}); });
} else if (trigger !== TRIGGER_MANUAL) { } else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN); const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN);
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT); const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT);
EventHandler__default.default.on(this._element, eventIn, this._config.selector, event => { EventHandler.on(this._element, eventIn, this._config.selector, event => {
const context = this._initializeOnDelegatedTarget(event); const context = this._initializeOnDelegatedTarget(event);
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
context._enter(); context._enter();
}); });
EventHandler__default.default.on(this._element, eventOut, this._config.selector, event => { EventHandler.on(this._element, eventOut, this._config.selector, event => {
const context = this._initializeOnDelegatedTarget(event); const context = this._initializeOnDelegatedTarget(event);
context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
context._leave(); context._leave();
}); });
} }
} }
this._hideModalHandler = () => { this._hideModalHandler = () => {
if (this._element) { if (this._element) {
this.hide(); this.hide();
} }
}; };
EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
EventHandler__default.default.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
} }
_fixTitle() { _fixTitle() {
const title = this._element.getAttribute('title'); const title = this._element.getAttribute('title');
if (!title) { if (!title) {
return; return;
} }
if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) { if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
this._element.setAttribute('aria-label', title); this._element.setAttribute('aria-label', title);
} }
this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
this._element.removeAttribute('title'); this._element.removeAttribute('title');
} }
_enter() { _enter() {
if (this._isShown() || this._isHovered) { if (this._isShown() || this._isHovered) {
this._isHovered = true; this._isHovered = true;
return; return;
} }
this._isHovered = true; this._isHovered = true;
this._setTimeout(() => { this._setTimeout(() => {
if (this._isHovered) { if (this._isHovered) {
this.show(); this.show();
} }
}, this._config.delay.show); }, this._config.delay.show);
} }
_leave() { _leave() {
if (this._isWithActiveTrigger()) { if (this._isWithActiveTrigger()) {
return; return;
} }
this._isHovered = false; this._isHovered = false;
this._setTimeout(() => { this._setTimeout(() => {
if (!this._isHovered) { if (!this._isHovered) {
this.hide(); this.hide();
} }
}, this._config.delay.hide); }, this._config.delay.hide);
} }
_setTimeout(handler, timeout) { _setTimeout(handler, timeout) {
clearTimeout(this._timeout); clearTimeout(this._timeout);
this._timeout = setTimeout(handler, timeout); this._timeout = setTimeout(handler, timeout);
} }
_isWithActiveTrigger() { _isWithActiveTrigger() {
return Object.values(this._activeTrigger).includes(true); return Object.values(this._activeTrigger).includes(true);
} }
_getConfig(config) { _getConfig(config) {
const dataAttributes = Manipulator__default.default.getDataAttributes(this._element); const dataAttributes = Manipulator.getDataAttributes(this._element);
for (const dataAttribute of Object.keys(dataAttributes)) { for (const dataAttribute of Object.keys(dataAttributes)) {
if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) { if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {
delete dataAttributes[dataAttribute]; delete dataAttributes[dataAttribute];
} }
} }
config = {
config = { ...dataAttributes, ...dataAttributes,
...(typeof config === 'object' && config ? config : {}) ...(typeof config === 'object' && config ? config : {})
}; };
config = this._mergeConfigObj(config); config = this._mergeConfigObj(config);
config = this._configAfterMerge(config); config = this._configAfterMerge(config);
this._typeCheckConfig(config); this._typeCheckConfig(config);
return config; return config;
} }
_configAfterMerge(config) { _configAfterMerge(config) {
config.container = config.container === false ? document.body : index.getElement(config.container); config.container = config.container === false ? document.body : index_js.getElement(config.container);
if (typeof config.delay === 'number') { if (typeof config.delay === 'number') {
config.delay = { config.delay = {
show: config.delay, show: config.delay,
hide: config.delay hide: config.delay
}; };
} }
if (typeof config.title === 'number') { if (typeof config.title === 'number') {
config.title = config.title.toString(); config.title = config.title.toString();
} }
if (typeof config.content === 'number') { if (typeof config.content === 'number') {
config.content = config.content.toString(); config.content = config.content.toString();
} }
return config; return config;
} }
_getDelegateConfig() { _getDelegateConfig() {
const config = {}; const config = {};
for (const [key, value] of Object.entries(this._config)) {
for (const key in this._config) { if (this.constructor.Default[key] !== value) {
if (this.constructor.Default[key] !== this._config[key]) { config[key] = value;
config[key] = this._config[key];
} }
} }
config.selector = false; config.selector = false;
config.trigger = 'manual'; // In the future can be replaced with: config.trigger = 'manual';
// In the future can be replaced with:
// const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]]) // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
// `Object.fromEntries(keysWithDifferentValues)` // `Object.fromEntries(keysWithDifferentValues)`
return config; return config;
} }
_disposePopper() { _disposePopper() {
if (this._popper) { if (this._popper) {
this._popper.destroy(); this._popper.destroy();
this._popper = null; this._popper = null;
} }
if (this.tip) { if (this.tip) {
this.tip.remove(); this.tip.remove();
this.tip = null; this.tip = null;
} }
} // Static }
// Static
static jQueryInterface(config) { static jQueryInterface(config) {
return this.each(function () { return this.each(function () {
const data = Tooltip.getOrCreateInstance(this, config); const data = Tooltip.getOrCreateInstance(this, config);
if (typeof config !== 'string') { if (typeof config !== 'string') {
return; return;
} }
if (typeof data[config] === 'undefined') { if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`); throw new TypeError(`No method named "${config}"`);
} }
data[config](); data[config]();
}); });
} }
} }
/** /**
* jQuery * jQuery
*/ */
index_js.defineJQueryPlugin(Tooltip);
index.defineJQueryPlugin(Tooltip);
return Tooltip; return Tooltip;

File diff suppressed because one or more lines are too long

View file

@ -1,25 +1,22 @@
/*! /*!
* Bootstrap backdrop.js v5.2.3 (https://getbootstrap.com/) * Bootstrap backdrop.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/event-handler'), require('./index'), require('./config')) : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/event-handler.js'), require('./config.js'), require('./index.js')) :
typeof define === 'function' && define.amd ? define(['../dom/event-handler', './index', './config'], factory) : typeof define === 'function' && define.amd ? define(['../dom/event-handler', './config', './index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Backdrop = factory(global.EventHandler, global.Index, global.Config)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Backdrop = factory(global.EventHandler, global.Config, global.Index));
})(this, (function (EventHandler, index, Config) { 'use strict'; })(this, (function (EventHandler, Config, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const Config__default = /*#__PURE__*/_interopDefaultLegacy(Config);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): util/backdrop.js * Bootstrap util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
/** /**
* Constants * Constants
*/ */
@ -35,7 +32,6 @@
isVisible: true, isVisible: true,
// if false, we use the backdrop helper without adding any element to the dom // if false, we use the backdrop helper without adding any element to the dom
rootElement: 'body' // give the choice to place backdrop under different elements rootElement: 'body' // give the choice to place backdrop under different elements
}; };
const DefaultType = { const DefaultType = {
className: 'string', className: 'string',
@ -44,120 +40,97 @@
isVisible: 'boolean', isVisible: 'boolean',
rootElement: '(element|string)' rootElement: '(element|string)'
}; };
/** /**
* Class definition * Class definition
*/ */
class Backdrop extends Config__default.default { class Backdrop extends Config {
constructor(config) { constructor(config) {
super(); super();
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._isAppended = false; this._isAppended = false;
this._element = null; this._element = null;
} // Getters }
// Getters
static get Default() { static get Default() {
return Default; return Default;
} }
static get DefaultType() { static get DefaultType() {
return DefaultType; return DefaultType;
} }
static get NAME() { static get NAME() {
return NAME; return NAME;
} // Public }
// Public
show(callback) { show(callback) {
if (!this._config.isVisible) { if (!this._config.isVisible) {
index.execute(callback); index_js.execute(callback);
return; return;
} }
this._append(); this._append();
const element = this._getElement(); const element = this._getElement();
if (this._config.isAnimated) { if (this._config.isAnimated) {
index.reflow(element); index_js.reflow(element);
} }
element.classList.add(CLASS_NAME_SHOW); element.classList.add(CLASS_NAME_SHOW);
this._emulateAnimation(() => { this._emulateAnimation(() => {
index.execute(callback); index_js.execute(callback);
}); });
} }
hide(callback) { hide(callback) {
if (!this._config.isVisible) { if (!this._config.isVisible) {
index.execute(callback); index_js.execute(callback);
return; return;
} }
this._getElement().classList.remove(CLASS_NAME_SHOW); this._getElement().classList.remove(CLASS_NAME_SHOW);
this._emulateAnimation(() => { this._emulateAnimation(() => {
this.dispose(); this.dispose();
index.execute(callback); index_js.execute(callback);
}); });
} }
dispose() { dispose() {
if (!this._isAppended) { if (!this._isAppended) {
return; return;
} }
EventHandler.off(this._element, EVENT_MOUSEDOWN);
EventHandler__default.default.off(this._element, EVENT_MOUSEDOWN);
this._element.remove(); this._element.remove();
this._isAppended = false; this._isAppended = false;
} // Private }
// Private
_getElement() { _getElement() {
if (!this._element) { if (!this._element) {
const backdrop = document.createElement('div'); const backdrop = document.createElement('div');
backdrop.className = this._config.className; backdrop.className = this._config.className;
if (this._config.isAnimated) { if (this._config.isAnimated) {
backdrop.classList.add(CLASS_NAME_FADE); backdrop.classList.add(CLASS_NAME_FADE);
} }
this._element = backdrop; this._element = backdrop;
} }
return this._element; return this._element;
} }
_configAfterMerge(config) { _configAfterMerge(config) {
// use getElement() with the default "body" to get a fresh Element on each instantiation // use getElement() with the default "body" to get a fresh Element on each instantiation
config.rootElement = index.getElement(config.rootElement); config.rootElement = index_js.getElement(config.rootElement);
return config; return config;
} }
_append() { _append() {
if (this._isAppended) { if (this._isAppended) {
return; return;
} }
const element = this._getElement(); const element = this._getElement();
this._config.rootElement.append(element); this._config.rootElement.append(element);
EventHandler.on(element, EVENT_MOUSEDOWN, () => {
EventHandler__default.default.on(element, EVENT_MOUSEDOWN, () => { index_js.execute(this._config.clickCallback);
index.execute(this._config.clickCallback);
}); });
this._isAppended = true; this._isAppended = true;
} }
_emulateAnimation(callback) { _emulateAnimation(callback) {
index.executeAfterTransition(callback, this._getElement(), this._config.isAnimated); index_js.executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
} }
} }
return Backdrop; return Backdrop;

File diff suppressed because one or more lines are too long

View file

@ -1,21 +1,17 @@
/*! /*!
* Bootstrap component-functions.js v5.2.3 (https://getbootstrap.com/) * Bootstrap component-functions.js v5.3.8 (https://getbootstrap.com/)
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('../dom/event-handler'), require('./index')) : typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('../dom/event-handler.js'), require('../dom/selector-engine.js'), require('./index.js')) :
typeof define === 'function' && define.amd ? define(['exports', '../dom/event-handler', './index'], factory) : typeof define === 'function' && define.amd ? define(['exports', '../dom/event-handler', '../dom/selector-engine', './index'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ComponentFunctions = {}, global.EventHandler, global.Index)); (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ComponentFunctions = {}, global.EventHandler, global.SelectorEngine, global.Index));
})(this, (function (exports, EventHandler, index) { 'use strict'; })(this, (function (exports, EventHandler, SelectorEngine, index_js) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v5.2.3): util/component-functions.js * Bootstrap util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
@ -23,25 +19,24 @@
const enableDismissTrigger = (component, method = 'hide') => { const enableDismissTrigger = (component, method = 'hide') => {
const clickEvent = `click.dismiss${component.EVENT_KEY}`; const clickEvent = `click.dismiss${component.EVENT_KEY}`;
const name = component.NAME; const name = component.NAME;
EventHandler__default.default.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) { EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
if (['A', 'AREA'].includes(this.tagName)) { if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault(); event.preventDefault();
} }
if (index_js.isDisabled(this)) {
if (index.isDisabled(this)) {
return; return;
} }
const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`);
const instance = component.getOrCreateInstance(target);
const target = index.getElementFromSelector(this) || this.closest(`.${name}`); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
instance[method](); instance[method]();
}); });
}; };
exports.enableDismissTrigger = enableDismissTrigger; exports.enableDismissTrigger = enableDismissTrigger;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
})); }));
//# sourceMappingURL=component-functions.js.map //# sourceMappingURL=component-functions.js.map

View file

@ -1 +1 @@
{"version":3,"file":"component-functions.js","sources":["../../src/util/component-functions.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler'\nimport { getElementFromSelector, isDisabled } from './index'\n\nconst enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`\n const name = component.NAME\n\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n if (isDisabled(this)) {\n return\n }\n\n const target = getElementFromSelector(this) || this.closest(`.${name}`)\n const instance = component.getOrCreateInstance(target)\n\n // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n instance[method]()\n })\n}\n\nexport {\n enableDismissTrigger\n}\n"],"names":["enableDismissTrigger","component","method","clickEvent","EVENT_KEY","name","NAME","EventHandler","on","document","event","includes","tagName","preventDefault","isDisabled","target","getElementFromSelector","closest","instance","getOrCreateInstance"],"mappings":";;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;AAKMA,QAAAA,oBAAoB,GAAG,CAACC,SAAD,EAAYC,MAAM,GAAG,MAArB,KAAgC;EAC3D,EAAA,MAAMC,UAAU,GAAI,CAAA,aAAA,EAAeF,SAAS,CAACG,SAAU,CAAvD,CAAA,CAAA;EACA,EAAA,MAAMC,IAAI,GAAGJ,SAAS,CAACK,IAAvB,CAAA;EAEAC,EAAAA,6BAAY,CAACC,EAAb,CAAgBC,QAAhB,EAA0BN,UAA1B,EAAuC,CAAA,kBAAA,EAAoBE,IAAK,CAAA,EAAA,CAAhE,EAAqE,UAAUK,KAAV,EAAiB;MACpF,IAAI,CAAC,GAAD,EAAM,MAAN,CAAA,CAAcC,QAAd,CAAuB,IAAA,CAAKC,OAA5B,CAAJ,EAA0C;EACxCF,MAAAA,KAAK,CAACG,cAAN,EAAA,CAAA;EACD,KAAA;;EAED,IAAA,IAAIC,gBAAU,CAAC,IAAD,CAAd,EAAsB;EACpB,MAAA,OAAA;EACD,KAAA;;EAED,IAAA,MAAMC,MAAM,GAAGC,4BAAsB,CAAC,IAAD,CAAtB,IAAgC,IAAA,CAAKC,OAAL,CAAc,CAAGZ,CAAAA,EAAAA,IAAK,EAAtB,CAA/C,CAAA;MACA,MAAMa,QAAQ,GAAGjB,SAAS,CAACkB,mBAAV,CAA8BJ,MAA9B,CAAjB,CAVoF;;MAapFG,QAAQ,CAAChB,MAAD,CAAR,EAAA,CAAA;KAbF,CAAA,CAAA;EAeD;;;;;;;;;;"} {"version":3,"file":"component-functions.js","sources":["../../src/util/component-functions.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport SelectorEngine from '../dom/selector-engine.js'\nimport { isDisabled } from './index.js'\n\nconst enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`\n const name = component.NAME\n\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n if (isDisabled(this)) {\n return\n }\n\n const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`)\n const instance = component.getOrCreateInstance(target)\n\n // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n instance[method]()\n })\n}\n\nexport {\n enableDismissTrigger\n}\n"],"names":["enableDismissTrigger","component","method","clickEvent","EVENT_KEY","name","NAME","EventHandler","on","document","event","includes","tagName","preventDefault","isDisabled","target","SelectorEngine","getElementFromSelector","closest","instance","getOrCreateInstance"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;AAMA,QAAMA,oBAAoB,GAAGA,CAACC,SAAS,EAAEC,MAAM,GAAG,MAAM,KAAK;EAC3D,EAAA,MAAMC,UAAU,GAAG,CAAA,aAAA,EAAgBF,SAAS,CAACG,SAAS,CAAA,CAAE;EACxD,EAAA,MAAMC,IAAI,GAAGJ,SAAS,CAACK,IAAI;EAE3BC,EAAAA,YAAY,CAACC,EAAE,CAACC,QAAQ,EAAEN,UAAU,EAAE,CAAA,kBAAA,EAAqBE,IAAI,CAAA,EAAA,CAAI,EAAE,UAAUK,KAAK,EAAE;EACpF,IAAA,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAACC,QAAQ,CAAC,IAAI,CAACC,OAAO,CAAC,EAAE;QACxCF,KAAK,CAACG,cAAc,EAAE;EACxB,IAAA;EAEA,IAAA,IAAIC,mBAAU,CAAC,IAAI,CAAC,EAAE;EACpB,MAAA;EACF,IAAA;EAEA,IAAA,MAAMC,MAAM,GAAGC,cAAc,CAACC,sBAAsB,CAAC,IAAI,CAAC,IAAI,IAAI,CAACC,OAAO,CAAC,CAAA,CAAA,EAAIb,IAAI,EAAE,CAAC;EACtF,IAAA,MAAMc,QAAQ,GAAGlB,SAAS,CAACmB,mBAAmB,CAACL,MAAM,CAAC;;EAEtD;EACAI,IAAAA,QAAQ,CAACjB,MAAM,CAAC,EAAE;EACpB,EAAA,CAAC,CAAC;EACJ;;;;;;;;;;"}

Some files were not shown because too many files have changed in this diff Show more