Compare commits

..

1 Commits

Author SHA1 Message Date
Mark Otto 32930bc06e Add support for Bootstrap Icons on floating label forms 2021-05-06 15:51:23 -07:00
566 changed files with 22593 additions and 38223 deletions
+28 -28
View File
@@ -2,59 +2,59 @@
"files": [
{
"path": "./dist/css/bootstrap-grid.css",
"maxSize": "7.5 kB"
},
{
"path": "./dist/css/bootstrap-grid.min.css",
"maxSize": "6.5 kB"
},
{
"path": "./dist/css/bootstrap-reboot.css",
"maxSize": "2.5 kB"
},
{
"path": "./dist/css/bootstrap-reboot.min.css",
"maxSize": "2.5 kB"
},
{
"path": "./dist/css/bootstrap-utilities.css",
"maxSize": "7.75 kB"
},
{
"path": "./dist/css/bootstrap-utilities.min.css",
"maxSize": "7 kB"
},
{
"path": "./dist/css/bootstrap-grid.min.css",
"maxSize": "6 kB"
},
{
"path": "./dist/css/bootstrap-reboot.css",
"maxSize": "2.25 kB"
},
{
"path": "./dist/css/bootstrap-reboot.min.css",
"maxSize": "2 kB"
},
{
"path": "./dist/css/bootstrap-utilities.css",
"maxSize": "7.5 kB"
},
{
"path": "./dist/css/bootstrap-utilities.min.css",
"maxSize": "6.75 kB"
},
{
"path": "./dist/css/bootstrap.css",
"maxSize": "26 kB"
"maxSize": "24.25 kB"
},
{
"path": "./dist/css/bootstrap.min.css",
"maxSize": "24 kB"
"maxSize": "22.25 kB"
},
{
"path": "./dist/js/bootstrap.bundle.js",
"maxSize": "42.5 kB"
"maxSize": "41.25 kB"
},
{
"path": "./dist/js/bootstrap.bundle.min.js",
"maxSize": "22.75 kB"
"maxSize": "22.25 kB"
},
{
"path": "./dist/js/bootstrap.esm.js",
"maxSize": "27.5 kB"
"maxSize": "27 kB"
},
{
"path": "./dist/js/bootstrap.esm.min.js",
"maxSize": "18.5 kB"
"maxSize": "18.25 kB"
},
{
"path": "./dist/js/bootstrap.js",
"maxSize": "28.25 kB"
"maxSize": "27.25 kB"
},
{
"path": "./dist/js/bootstrap.min.js",
"maxSize": "16.25 kB"
"maxSize": "15.75 kB"
}
],
"ci": {
-122
View File
@@ -1,122 +0,0 @@
{
"version": "0.2",
"words": [
"affordance",
"allowfullscreen",
"autohide",
"autohiding",
"autoplay",
"autoplays",
"blazingly",
"Blockquotes",
"Bootstrappers",
"borderless",
"Brotli",
"browserslist",
"browserslistrc",
"btncheck",
"btnradio",
"callout",
"callouts",
"clearfix",
"Codesniffer",
"combinator",
"Contentful",
"Cpath",
"Crossfade",
"crossfading",
"cssgrid",
"Csvg",
"Datalists",
"Deque",
"discoverability",
"docsearch",
"docsref",
"dropend",
"dropleft",
"dropright",
"dropstart",
"dropup",
"errorf",
"favicon",
"favicons",
"fieldsets",
"flexbox",
"fullscreen",
"getbootstrap",
"Grayscale",
"Hoverable",
"hreflang",
"hstack",
"jsdelivr",
"Jumpstart",
"keyframes",
"libera",
"libman",
"Libsass",
"lightboxes",
"Lowercased",
"markdownify",
"mediaqueries",
"minifiers",
"monospace",
"mouseleave",
"navbars",
"navs",
"Neue",
"noindex",
"Noto",
"offcanvas",
"offcanvases",
"Packagist",
"popperjs",
"prebuild",
"precompiled",
"prefersreducedmotion",
"prepended",
"printf",
"rects",
"relref",
"rgba",
"roboto",
"RTLCSS",
"ruleset",
"screenreaders",
"scrollbars",
"scrollspy",
"Segoe",
"srcset",
"stickied",
"Stylelint",
"subnav",
"tabbable",
"textareas",
"toggleable",
"topbar",
"touchend",
"twbs",
"unitless",
"unstylable",
"unstyled",
"Uppercased",
"urlize",
"vbtn",
"viewports",
"vstack",
"walkthroughs",
"WCAG",
"zindex"
],
"language": "en-US",
"files": [
"**/*.md"
],
"ignorePaths": [
".cspell.json",
"dist/",
"*.min.*",
"**/*rtl*",
"**/tests/**"
],
"useGitignore": true
}
+6 -12
View File
@@ -8,12 +8,7 @@
"xo/browser"
],
"rules": {
"arrow-body-style": "off",
"capitalized-comments": "off",
"comma-dangle": [
"error",
"never"
],
"indent": [
"error",
2,
@@ -37,26 +32,25 @@
}
],
"no-console": "error",
"no-negated-condition": "off",
"object-curly-spacing": [
"error",
"always"
],
"operator-linebreak": [
"error",
"after"
],
"semi": [
"error",
"never"
],
"unicorn/consistent-function-scoping": "off",
"unicorn/explicit-length-check": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-method-this-argument": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/no-unused-properties": "error",
"unicorn/prefer-array-flat": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-dom-node-remove": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-spread": "off",
+1 -1
View File
@@ -20,7 +20,7 @@ restrictions:
* Please **do not** use the issue tracker for personal support requests. Stack
Overflow ([`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag),
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](/README.md#community) are better places to get help.
[Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help.
* Please **do not** derail or troll issues. Keep the discussion on topic and
respect the opinions of others.
+3
View File
@@ -0,0 +1,3 @@
# These are supported funding model platforms
open_collective: bootstrap
+20
View File
@@ -0,0 +1,20 @@
---
name: Bug report
about: Tell us about a bug you may have identified in Bootstrap.
title: ''
labels: ''
assignees: ''
---
Before opening:
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
- [Validate](https://html5.validator.nu/) any HTML to avoid common problems
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
Bug reports must include:
- Operating system and version (Windows, macOS, Android, iOS)
- Browser and version (Chrome, Firefox, Safari, Microsoft Edge, Opera, Android Browser)
- A [reduced test case](https://css-tricks.com/reduced-test-cases/) or suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
-62
View File
@@ -1,62 +0,0 @@
name: Report a bug
description: Tell us about a bug or issue you may have identified in Bootstrap.
title: "Provide a general summary of the issue"
labels: [bug]
assignees: "-"
body:
- type: checkboxes
attributes:
label: Prerequisites
description: Take a couple minutes to help our maintainers work faster.
options:
- label: I have [searched](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed issues
required: true
- label: I have [validated](https://html5.validator.nu/) any HTML to avoid common problems
required: true
- label: I have read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
required: true
- type: textarea
id: what-happened
attributes:
label: Describe the issue
description: Provide a summary of the issue and what you expected to happen, including specific steps to reproduce.
validations:
required: true
- type: textarea
id: reduced-test-case
attributes:
label: Reduced test cases
description: Include links [reduced test case](https://css-tricks.com/reduced-test-cases/) links or suggested fixes using CodePen ([v4 template](https://codepen.io/team/bootstrap/pen/yLabNQL) or [v5 template](https://codepen.io/team/bootstrap/pen/qBamdLj)).
validations:
required: true
- type: dropdown
id: os
attributes:
label: What operating system(s) are you seeing the problem on?
multiple: true
options:
- Windows
- macOS
- Android
- iOS
- Linux
validations:
required: true
- type: dropdown
id: browser
attributes:
label: What browser(s) are you seeing the problem on?
multiple: true
options:
- Chrome
- Safari
- Firefox
- Microsoft Edge
- Opera
- type: input
id: version
attributes:
label: What version of Bootstrap are you using?
placeholder: "e.g., v5.1.0 or v4.5.2"
validations:
required: true
+2 -2
View File
@@ -1,4 +1,4 @@
contact_links:
- name: Ask the community
- name: Ask a question
url: https://github.com/twbs/bootstrap/discussions/new
about: Ask and discuss questions with other Bootstrap community members.
about: Ask and discuss questions with other Bootstrap community members
+18
View File
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea for a new feature in Bootstrap.
title: ''
labels: feature
assignees: ''
---
Before opening:
- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
Feature requests must include:
- As much detail as possible for what we should add and why it's important to Bootstrap
- Relevant links to prior art, screenshots, or live demos whenever possible
@@ -1,29 +0,0 @@
name: Feature request
description: Suggest new or updated features to include in Bootstrap.
title: "Suggest a new feature"
labels: [feature]
assignees: []
body:
- type: checkboxes
attributes:
label: Prerequisites
description: Take a couple minutes to help our maintainers work faster.
options:
- label: I have [searched](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed feature requests
required: true
- label: I have read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md)
required: true
- type: textarea
id: proposal
attributes:
label: Proposal
description: Provide detailed information for what we should add, including relevant links to prior art, screenshots, or live demos whenever possible.
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation and context
description: Tell us why this change is needed or helpful, and what problems it may help solve.
validations:
required: true
+1 -1
View File
@@ -7,5 +7,5 @@ See the [contributing guidelines](CONTRIBUTING.md) for sharing bug reports.
For general troubleshooting or help getting started:
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
- 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.freenode.net` server, in the `##bootstrap` channel.
- Ask and explore Stack Overflow with the [`bootstrap-5`](https://stackoverflow.com/questions/tagged/bootstrap-5) tag.
+1 -4
View File
@@ -17,7 +17,7 @@ categories:
- 'fix'
- 'bugfix'
- 'bug'
- title: '⚡ Performance improvements'
- title: '⚡ Performance Improvements'
labels:
- 'performance'
- title: '🎨 CSS'
@@ -29,9 +29,6 @@ categories:
- title: '📖 Docs'
labels:
- 'docs'
- title: '🛠 Examples'
labels:
- 'examples'
- title: '🌎 Accessibility'
labels:
- 'accessibility'
+9 -4
View File
@@ -2,11 +2,10 @@ name: BrowserStack
on:
push:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
NODE: 14
jobs:
browserstack:
@@ -22,7 +21,14 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: "${{ env.NODE }}"
cache: npm
- name: Set up npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- name: Install npm dependencies
run: npm ci
@@ -35,4 +41,3 @@ jobs:
env:
BROWSER_STACK_ACCESS_KEY: "${{ secrets.BROWSER_STACK_ACCESS_KEY }}"
BROWSER_STACK_USERNAME: "${{ secrets.BROWSER_STACK_USERNAME }}"
GITHUB_SHA: "${{ github.sha }}"
+9 -5
View File
@@ -2,14 +2,11 @@ name: Bundlewatch
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
NODE: 14
jobs:
bundlewatch:
@@ -23,7 +20,14 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: "${{ env.NODE }}"
cache: npm
- name: Set up npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- name: Install npm dependencies
run: npm ci
+4 -5
View File
@@ -14,25 +14,24 @@ on:
- "!dependabot/**"
schedule:
- cron: "0 2 * * 5"
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: "javascript"
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
-28
View File
@@ -1,28 +0,0 @@
name: cspell
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
jobs:
cspell:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Run cspell
uses: streetsidesoftware/cspell-action@v1
with:
config: ".cspell.json"
files: "**/*.md"
inline: error
incremental_files_only: false
+9 -3
View File
@@ -5,11 +5,10 @@ on:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
NODE: 14
jobs:
css:
@@ -23,7 +22,14 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: "${{ env.NODE }}"
cache: npm
- name: Set up npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- name: Install npm dependencies
run: npm ci
+11 -16
View File
@@ -5,11 +5,10 @@ on:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
NODE: 14
jobs:
docs:
@@ -23,23 +22,19 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: "${{ env.NODE }}"
cache: npm
- run: java -version
- name: Set up npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- name: Install npm dependencies
run: npm ci
- name: Build docs
run: npm run docs-build
- name: Validate HTML
run: npm run docs-vnu
- name: Run linkinator
uses: JustinBeckwith/linkinator-action@v1
with:
paths: _site
recurse: true
verbosity: error
skip: "^(?!http://localhost)"
- name: Test docs
run: npm run docs
-19
View File
@@ -1,19 +0,0 @@
name: Close Issue Awaiting Reply
on:
schedule:
- cron: "0 0 * * *"
jobs:
issue-close-require:
runs-on: ubuntu-latest
if: github.repository == 'twbs/bootstrap'
steps:
- name: awaiting reply
uses: actions-cool/issues-helper@v3
with:
actions: "close-issues"
labels: "awaiting-reply"
inactive-day: 14
body: |
As the issue was labeled with `awaiting-reply`, but there has been no response in 14 days, this issue will be closed. If you have any questions, you can comment/reply.
-19
View File
@@ -1,19 +0,0 @@
name: Issue Labeled
on:
issues:
types: [labeled]
jobs:
issue-labeled:
if: github.repository == 'twbs/bootstrap'
runs-on: ubuntu-latest
steps:
- name: awaiting reply
if: github.event.label.name == 'awaiting-reply'
uses: actions-cool/issues-helper@v3
with:
actions: "create-comment"
token: ${{ secrets.GITHUB_TOKEN }}
body: |
Hello @${{ github.event.issue.user.login }}. Bug reports must include a **live demo** of the issue. Per our [contributing guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md), please create a reduced test case on [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/) and report back with your link, Bootstrap version, and specific browser and Operating System details.
+17 -6
View File
@@ -5,17 +5,20 @@ on:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
jobs:
run:
name: JS Tests
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [10, 12, 14, 16]
steps:
- name: Clone repository
uses: actions/checkout@v2
@@ -23,8 +26,15 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE }}
cache: npm
node-version: ${{ matrix.node }}
- name: Set up npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- name: Install npm dependencies
run: npm ci
@@ -36,7 +46,8 @@ jobs:
run: npm run js-test
- name: Run Coveralls
uses: coverallsapp/github-action@1.1.3
uses: coverallsapp/github-action@v1.1.2
if: matrix.node == 14
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
path-to-lcov: "./js/coverage/lcov.info"
+9 -3
View File
@@ -5,11 +5,10 @@ on:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
NODE: 14
jobs:
lint:
@@ -23,7 +22,14 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: "${{ env.NODE }}"
cache: npm
- name: Set up npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- name: Install npm dependencies
run: npm ci
+1 -2
View File
@@ -5,11 +5,10 @@ on:
branches-ignore:
- "dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
NODE: 14
jobs:
css:
-1
View File
@@ -4,7 +4,6 @@ on:
push:
branches:
- main
workflow_dispatch:
jobs:
update_release_draft:
+1 -2
View File
@@ -1,8 +1,7 @@
# Ignore docs files
/_site/
# Hugo files
# Hugo resources folder
/resources/
/.hugo_build.lock
# Numerous always-ignore extensions
*.diff
+1 -1
View File
@@ -1,6 +1,6 @@
{
"extends": [
"stylelint-config-twbs-bootstrap"
"stylelint-config-twbs-bootstrap/scss"
],
"rules": {
"declaration-property-value-disallowed-list": {
+2 -2
View File
@@ -1,7 +1,7 @@
The MIT License (MIT)
Copyright (c) 2011-2022 Twitter, Inc.
Copyright (c) 2011-2022 The Bootstrap Authors
Copyright (c) 2011-2021 Twitter, Inc.
Copyright (c) 2011-2021 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+66 -74
View File
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://getbootstrap.com/">
<img src="https://getbootstrap.com/docs/5.1/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
<img src="https://getbootstrap.com/docs/5.0/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165">
</a>
</p>
@@ -9,12 +9,12 @@
<p align="center">
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
<br>
<a href="https://getbootstrap.com/docs/5.1/"><strong>Explore Bootstrap docs »</strong></a>
<a href="https://getbootstrap.com/docs/5.0/"><strong>Explore Bootstrap docs »</strong></a>
<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?template=bug_report.md">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?template=feature_request.md">Request feature</a>
·
<a href="https://themes.getbootstrap.com/">Themes</a>
·
@@ -22,9 +22,9 @@
</p>
## Bootstrap 5
## Bootstrap 4
Our default branch is for development of our Bootstrap 5 release. Head to the [`v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev) to view the readme, documentation, and source code for Bootstrap 4.
Our default branch is for development of our upcoming Bootstrap 5 release. Head to the [`v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev) to view the readme, documentation, and source code for Bootstrap 4.
## Table of contents
@@ -46,14 +46,14 @@ Our default branch is for development of our Bootstrap 5 release. Head to the [`
Several quick start options are available:
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.1.3.zip)
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.0.0.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.1.3`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.0.0`
- 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.1/getting-started/introduction/) for information on the framework contents, templates, examples, and more.
Read the [Getting started page](https://getbootstrap.com/docs/5.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
## Status
@@ -65,6 +65,8 @@ Read the [Getting started page](https://getbootstrap.com/docs/5.1/getting-starte
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue)](https://atmospherejs.com/twbs/bootstrap)
[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap)](https://packagist.org/packages/twbs/bootstrap)
[![NuGet](https://img.shields.io/nuget/vpre/bootstrap)](https://www.nuget.org/packages/bootstrap/absoluteLatest)
[![peerDependencies Status](https://img.shields.io/david/peer/twbs/bootstrap)](https://david-dm.org/twbs/bootstrap?type=peer)
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap)](https://david-dm.org/twbs/bootstrap?type=dev)
[![Coverage Status](https://img.shields.io/coveralls/github/twbs/bootstrap/main)](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 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)
@@ -77,63 +79,59 @@ Read the [Getting started page](https://getbootstrap.com/docs/5.1/getting-starte
## What's 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 you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
<details>
<summary>Download contents</summary>
```text
bootstrap/
├── css/
│ ├── bootstrap-grid.css
│ ├── bootstrap-grid.css.map
│ ├── bootstrap-grid.min.css
│ ├── bootstrap-grid.min.css.map
│ ├── bootstrap-grid.rtl.css
│ ├── bootstrap-grid.rtl.css.map
│ ├── bootstrap-grid.rtl.min.css
│ ├── bootstrap-grid.rtl.min.css.map
│ ├── bootstrap-reboot.css
│ ├── bootstrap-reboot.css.map
│ ├── bootstrap-reboot.min.css
│ ├── bootstrap-reboot.min.css.map
│ ├── bootstrap-reboot.rtl.css
│ ├── bootstrap-reboot.rtl.css.map
│ ├── bootstrap-reboot.rtl.min.css
│ ├── bootstrap-reboot.rtl.min.css.map
│ ├── bootstrap-utilities.css
│ ├── bootstrap-utilities.css.map
│ ├── bootstrap-utilities.min.css
│ ├── bootstrap-utilities.min.css.map
│ ├── bootstrap-utilities.rtl.css
│ ├── bootstrap-utilities.rtl.css.map
│ ├── bootstrap-utilities.rtl.min.css
│ ├── bootstrap-utilities.rtl.min.css.map
│ ├── bootstrap.css
│ ├── bootstrap.css.map
│ ├── bootstrap.min.css
│ ├── bootstrap.min.css.map
│ ├── bootstrap.rtl.css
│ ├── bootstrap.rtl.css.map
│ ├── bootstrap.rtl.min.css
│ └── bootstrap.rtl.min.css.map
└── js/
├── bootstrap.bundle.js
├── bootstrap.bundle.js.map
├── bootstrap.bundle.min.js
├── bootstrap.bundle.min.js.map
├── bootstrap.esm.js
├── bootstrap.esm.js.map
├── bootstrap.esm.min.js
├── bootstrap.esm.min.js.map
├── bootstrap.js
├── bootstrap.js.map
├── bootstrap.min.js
└── bootstrap.min.js.map
```
```text
bootstrap/
├── css/
│ ├── bootstrap-grid.css
│ ├── bootstrap-grid.css.map
│ ├── bootstrap-grid.min.css
│ ├── bootstrap-grid.min.css.map
│ ├── bootstrap-grid.rtl.css
│ ├── bootstrap-grid.rtl.css.map
│ ├── bootstrap-grid.rtl.min.css
│ ├── bootstrap-grid.rtl.min.css.map
│ ├── bootstrap-reboot.css
│ ├── bootstrap-reboot.css.map
│ ├── bootstrap-reboot.min.css
│ ├── bootstrap-reboot.min.css.map
│ ├── bootstrap-reboot.rtl.css
│ ├── bootstrap-reboot.rtl.css.map
│ ├── bootstrap-reboot.rtl.min.css
│ ├── bootstrap-reboot.rtl.min.css.map
│ ├── bootstrap-utilities.css
│ ├── bootstrap-utilities.css.map
│ ├── bootstrap-utilities.min.css
│ ├── bootstrap-utilities.min.css.map
│ ├── bootstrap-utilities.rtl.css
│ ├── bootstrap-utilities.rtl.css.map
│ ├── bootstrap-utilities.rtl.min.css
│ ├── bootstrap-utilities.rtl.min.css.map
│ ├── bootstrap.css
│ ├── bootstrap.css.map
│ ├── bootstrap.min.css
│ ├── bootstrap.min.css.map
│ ├── bootstrap.rtl.css
│ ├── bootstrap.rtl.css.map
│ ├── bootstrap.rtl.min.css
│ └── bootstrap.rtl.min.css.map
└── js/
├── bootstrap.bundle.js
├── bootstrap.bundle.js.map
├── bootstrap.bundle.min.js
├── bootstrap.bundle.min.js.map
├── bootstrap.esm.js
├── bootstrap.esm.js.map
├── bootstrap.esm.min.js
├── bootstrap.esm.min.js.map
├── bootstrap.js
├── bootstrap.js.map
├── bootstrap.min.js
└── bootstrap.min.js.map
```
</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://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/).
## Bugs and feature requests
@@ -179,7 +177,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and
- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
- 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.freenode.net` server, in the `##bootstrap` channel.
- 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.
@@ -188,7 +186,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and
For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](https://semver.org/). Sometimes we screw up, but we adhere to those rules whenever possible.
See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release. [Release planning](https://github.com/twbs/release#upcoming-release-schedule) takes place in a separate project.
See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release.
## Creators
@@ -207,17 +205,11 @@ See [the Releases section of our GitHub project](https://github.com/twbs/bootstr
## Thanks
<a href="https://www.browserstack.com/">
<img src="https://live.browserstack.com/images/opensource/browserstack-logo.svg" alt="BrowserStack" width="192" height="42">
<img src="https://live.browserstack.com/images/opensource/browserstack-logo.svg" alt="BrowserStack Logo" width="192" height="42">
</a>
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
<a href="https://www.netlify.com/">
<img src="https://www.netlify.com/v3/img/components/full-logo-light.svg" alt="Netlify" width="147" height="40">
</a>
Thanks to [Netlify](https://www.netlify.com/) for providing us with Deploy Previews!
## Sponsors
@@ -244,4 +236,4 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
## 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 20112021 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/).
+156 -69
View File
@@ -2,8 +2,8 @@
/*!
* Script to build our plugins to use them separately.
* Copyright 2020-2022 The Bootstrap Authors
* Copyright 2020-2022 Twitter, Inc.
* Copyright 2020-2021 The Bootstrap Authors
* Copyright 2020-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -11,94 +11,181 @@
const path = require('path')
const rollup = require('rollup')
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 jsFiles = globby.sync(sourcePath + '/**/*.js')
// Array which holds the resolved plugins
const resolvedPlugins = []
// Trims the "js" extension and uppercases => first letter, hyphens, backslashes & slashes
const filenameToEntity = filename => filename.replace('.js', '')
.replace(/(?:^|-|\/|\\)[a-z]/g, str => str.slice(-1).toUpperCase())
for (const file of jsFiles) {
resolvedPlugins.push({
src: file.replace('.js', ''),
dist: file.replace('src', 'dist'),
fileName: path.basename(file),
className: filenameToEntity(path.basename(file))
// safeClassName: filenameToEntity(path.relative(sourcePath, file))
const rootPath = path.resolve(__dirname, '../js/dist/')
const plugins = [
babel({
// Only transpile our source code
exclude: 'node_modules/**',
// Include the helpers in each file, at most one copy of each
babelHelpers: 'bundled'
})
]
const bsPlugins = {
Data: path.resolve(__dirname, '../js/src/dom/data.js'),
EventHandler: path.resolve(__dirname, '../js/src/dom/event-handler.js'),
Manipulator: path.resolve(__dirname, '../js/src/dom/manipulator.js'),
SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'),
Alert: path.resolve(__dirname, '../js/src/alert.js'),
Base: path.resolve(__dirname, '../js/src/base-component.js'),
Button: path.resolve(__dirname, '../js/src/button.js'),
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
Dropdown: path.resolve(__dirname, '../js/src/dropdown.js'),
Modal: path.resolve(__dirname, '../js/src/modal.js'),
Offcanvas: path.resolve(__dirname, '../js/src/offcanvas.js'),
Popover: path.resolve(__dirname, '../js/src/popover.js'),
ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'),
Tab: path.resolve(__dirname, '../js/src/tab.js'),
Toast: path.resolve(__dirname, '../js/src/toast.js'),
Tooltip: path.resolve(__dirname, '../js/src/tooltip.js')
}
const defaultPluginConfig = {
external: [
bsPlugins.Data,
bsPlugins.Base,
bsPlugins.EventHandler,
bsPlugins.SelectorEngine
],
globals: {
[bsPlugins.Data]: 'Data',
[bsPlugins.Base]: 'Base',
[bsPlugins.EventHandler]: 'EventHandler',
[bsPlugins.SelectorEngine]: 'SelectorEngine'
}
}
const getConfigByPluginKey = pluginKey => {
if (
pluginKey === 'Data' ||
pluginKey === 'Manipulator' ||
pluginKey === 'EventHandler' ||
pluginKey === 'SelectorEngine' ||
pluginKey === 'Util' ||
pluginKey === 'Sanitizer' ||
pluginKey === 'Backdrop'
) {
return {
external: []
}
}
if (pluginKey === 'Alert' || pluginKey === 'Tab' || pluginKey === 'Offcanvas') {
return defaultPluginConfig
}
if (
pluginKey === 'Base' ||
pluginKey === 'Button' ||
pluginKey === 'Carousel' ||
pluginKey === 'Collapse' ||
pluginKey === 'Modal' ||
pluginKey === 'ScrollSpy'
) {
const config = Object.assign(defaultPluginConfig)
config.external.push(bsPlugins.Manipulator)
config.globals[bsPlugins.Manipulator] = 'Manipulator'
return config
}
if (pluginKey === 'Dropdown' || pluginKey === 'Tooltip') {
const config = Object.assign(defaultPluginConfig)
config.external.push(bsPlugins.Manipulator, '@popperjs/core')
config.globals[bsPlugins.Manipulator] = 'Manipulator'
config.globals['@popperjs/core'] = 'Popper'
return config
}
if (pluginKey === 'Popover') {
return {
external: [
bsPlugins.Data,
bsPlugins.SelectorEngine,
bsPlugins.Tooltip
],
globals: {
[bsPlugins.Data]: 'Data',
[bsPlugins.SelectorEngine]: 'SelectorEngine',
[bsPlugins.Tooltip]: 'Tooltip'
}
}
}
if (pluginKey === 'Toast') {
return {
external: [
bsPlugins.Data,
bsPlugins.Base,
bsPlugins.EventHandler,
bsPlugins.Manipulator
],
globals: {
[bsPlugins.Data]: 'Data',
[bsPlugins.Base]: 'Base',
[bsPlugins.EventHandler]: 'EventHandler',
[bsPlugins.Manipulator]: 'Manipulator'
}
}
}
}
const utilObjects = new Set([
'Util',
'Sanitizer',
'Backdrop'
])
const domObjects = new Set([
'Data',
'EventHandler',
'Manipulator',
'SelectorEngine'
])
const build = async plugin => {
const globals = {}
console.log(`Building ${plugin} plugin...`)
const { external, globals } = getConfigByPluginKey(plugin)
const pluginFilename = path.basename(bsPlugins[plugin])
let pluginPath = rootPath
if (utilObjects.has(plugin)) {
pluginPath = `${rootPath}/util/`
}
if (domObjects.has(plugin)) {
pluginPath = `${rootPath}/dom/`
}
const bundle = await rollup.rollup({
input: plugin.src,
plugins: [
babel({
// Only transpile our source code
exclude: 'node_modules/**',
// Include the helpers in each file, at most one copy of each
babelHelpers: 'bundled'
})
],
external(source) {
// Pattern to identify local files
const pattern = /^(\.{1,2})\//
// It's not a local file, e.g a Node.js package
if (!pattern.test(source)) {
globals[source] = source
return true
}
const usedPlugin = resolvedPlugins.find(plugin => {
return plugin.src.includes(source.replace(pattern, ''))
})
if (!usedPlugin) {
throw new Error(`Source ${source} is not mapped!`)
}
// We can change `Index` with `UtilIndex` etc if we use
// `safeClassName` instead of `className` everywhere
globals[path.normalize(usedPlugin.src)] = usedPlugin.className
return true
}
input: bsPlugins[plugin],
plugins,
external
})
await bundle.write({
banner: banner(plugin.fileName),
banner: banner(pluginFilename),
format: 'umd',
name: plugin.className,
name: plugin,
sourcemap: true,
globals,
generatedCode: 'es2015',
file: plugin.dist
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
})
console.log(`Built ${plugin.className}`)
console.log(`Building ${plugin} plugin... Done!`)
}
(async () => {
const main = async () => {
try {
const basename = path.basename(__filename)
const timeLabel = `[${basename}] finished`
console.log('Building individual plugins...')
console.time(timeLabel)
await Promise.all(Object.values(resolvedPlugins).map(plugin => build(plugin)))
console.timeEnd(timeLabel)
await Promise.all(Object.keys(bsPlugins).map(plugin => build(plugin)))
} catch (error) {
console.error(error)
process.exit(1)
}
})()
}
main()
+4 -4
View File
@@ -2,8 +2,8 @@
/*!
* Script to update version number references in the project.
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Copyright 2017-2021 The Bootstrap Authors
* Copyright 2017-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -57,7 +57,7 @@ async function replaceRecursively(file, oldVersion, newVersion) {
}
async function main(args) {
let [oldVersion, newVersion] = args
const [oldVersion, newVersion] = args
if (!oldVersion || !newVersion) {
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
@@ -66,7 +66,7 @@ async function main(args) {
}
// 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)
[oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)
try {
const files = await globby(GLOB, GLOBBY_OPTIONS)
+7 -7
View File
@@ -5,8 +5,8 @@
* Remember to use the same vendor files as the CDN ones,
* otherwise the hashes won't match!
*
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Copyright 2017-2021 The Bootstrap Authors
* Copyright 2017-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -47,10 +47,10 @@ const files = [
}
]
for (const file of files) {
fs.readFile(file.file, 'utf8', (error, data) => {
if (error) {
throw error
files.forEach(file => {
fs.readFile(file.file, 'utf8', (err, data) => {
if (err) {
throw err
}
const algo = 'sha384'
@@ -61,4 +61,4 @@ for (const file of files) {
sh.sed('-i', new RegExp(`^(\\s+${file.configPropertyName}:\\s+["'])\\S*(["'])`), `$1${integrity}$2`, configFile)
})
}
})
+9 -9
View File
@@ -1,19 +1,19 @@
'use strict'
const mapConfig = {
inline: false,
annotation: true,
sourcesContent: true
}
module.exports = context => {
module.exports = ctx => {
return {
map: context.file.dirname.includes('examples') ? false : mapConfig,
map: ctx.file.dirname.includes('examples') ?
false :
{
inline: false,
annotation: true,
sourcesContent: true
},
plugins: {
autoprefixer: {
cascade: false
},
rtlcss: context.env === 'RTL'
rtlcss: ctx.env === 'RTL' ? {} : false
}
}
}
+4 -5
View File
@@ -9,7 +9,7 @@ const banner = require('./banner.js')
const BUNDLE = process.env.BUNDLE === 'true'
const ESM = process.env.ESM === 'true'
let fileDestination = `bootstrap${ESM ? '.esm' : ''}`
let fileDest = `bootstrap${ESM ? '.esm' : ''}`
const external = ['@popperjs/core']
const plugins = [
babel({
@@ -24,7 +24,7 @@ const globals = {
}
if (BUNDLE) {
fileDestination += '.bundle'
fileDest += '.bundle'
// Remove last entry in external array to bundle Popper
external.pop()
delete globals['@popperjs/core']
@@ -41,10 +41,9 @@ const rollupConfig = {
input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`),
output: {
banner,
file: path.resolve(__dirname, `../dist/js/${fileDestination}.js`),
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
format: ESM ? 'esm' : 'umd',
globals,
generatedCode: 'es2015'
globals
},
external,
plugins
+59
View File
@@ -0,0 +1,59 @@
# Usage:
# install svgo globally: `npm i -g svgo`
# svgo --config=build/svgo.yml --input=foo.svg
# https://github.com/svg/svgo/blob/master/docs/how-it-works/en.md
# replace default config
multipass: true
#full: true
# https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
js2svg:
pretty: true
indent: 2
plugins:
# - addAttributesToSVGElement:
# attributes:
# - focusable: false
- cleanupAttrs: true
- cleanupEnableBackground: true
- cleanupIDs: true
- cleanupListOfValues: true
- cleanupNumericValues: true
- collapseGroups: true
- convertColors: true
- convertPathData: true
- convertShapeToPath: true
- convertStyleToAttrs: true
- convertTransform: true
- inlineStyles: true
- mergePaths: true
- minifyStyles: true
- moveElemsAttrsToGroup: true
- moveGroupAttrsToElems: true
- removeAttrs:
attrs:
- "data-name"
- removeComments: true
- removeDesc: true
- removeDoctype: true
- removeEditorsNSData: true
- removeEmptyAttrs: true
- removeEmptyContainers: true
- removeEmptyText: true
- removeHiddenElems: true
- removeMetadata: true
- removeNonInheritableGroupAttrs: true
- removeTitle: false
- removeUnknownsAndDefaults:
keepRoleAttr: true
- removeUnusedNS: true
- removeUselessDefs: true
- removeUselessStrokeAndFill: true
- removeViewBox: false
- removeXMLNS: false
- removeXMLProcInst: true
- sortAttrs: true
+19 -10
View File
@@ -2,17 +2,17 @@
/*!
* Script to run vnu-jar if Java is available.
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Copyright 2017-2021 The Bootstrap Authors
* Copyright 2017-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
'use strict'
const { execFile, spawn } = require('child_process')
const childProcess = require('child_process')
const vnu = require('vnu-jar')
execFile('java', ['-version'], (error, stdout, stderr) => {
childProcess.exec('java -version', (error, stdout, stderr) => {
if (error) {
console.error('Skipping vnu-jar test; Java is missing.')
return
@@ -21,16 +21,23 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
const is32bitJava = !/64-Bit/.test(stderr)
// vnu-jar accepts multiple ignores joined with a `|`.
// Also note that the ignores are string regular expressions.
// Also note that the ignores are regular expressions.
const ignores = [
// "autocomplete" is included in <button> and checkboxes and radio <input>s due to
// Firefox's non-standard autocomplete behavior - see https://bugzilla.mozilla.org/show_bug.cgi?id=654072
'Attribute “autocomplete” is only allowed when the input type is.*',
'Attribute “autocomplete” not allowed on element “button” at this point.',
// 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,
// 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.'
// Markup used in Components → Forms → Layout → Form grid → Horizontal form is currently invalid,
// but used this way due to lack of support for flexbox layout on <fieldset> element in most browsers
'Element “legend” not allowed as child of element “div” in this context.*',
// Content → Reboot uses various date/time inputs as a visual example.
// Documentation does not rely on them being usable.
'The “date” input type is not supported in all browsers.*',
'The “week” input type is not supported in all browsers.*',
'The “month” input type is not supported in all browsers.*',
'The “color” input type is not supported in all browsers.*',
'The “datetime-local” input type is not supported in all browsers.*',
'The “time” input type is not supported in all browsers.*'
].join('|')
const args = [
@@ -38,6 +45,8 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
`"${vnu}"`,
'--asciiquotes',
'--skip-non-html',
// Ignore the language code warnings
'--no-langdetect',
'--Werror',
`--filterpattern "${ignores}"`,
'_site/',
@@ -49,7 +58,7 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
args.splice(0, 0, '-Xss512k')
}
return spawn('java', args, {
return childProcess.spawn('java', args, {
shell: true,
stdio: 'inherit'
})
+9 -9
View File
@@ -3,7 +3,7 @@
/*!
* Script to create the built examples zip archive;
* requires the `zip` command to be present!
* Copyright 2020-2022 The Bootstrap Authors
* Copyright 2020-2021 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -57,22 +57,22 @@ sh.mkdir('-p', [
sh.cp('-Rf', `${docsDir}/examples/*`, distFolder)
for (const file of cssFiles) {
cssFiles.forEach(file => {
sh.cp('-f', `${docsDir}/dist/css/${file}`, `${distFolder}/assets/dist/css/`)
}
})
for (const file of jsFiles) {
jsFiles.forEach(file => {
sh.cp('-f', `${docsDir}/dist/js/${file}`, `${distFolder}/assets/dist/js/`)
}
})
for (const file of imgFiles) {
imgFiles.forEach(file => {
sh.cp('-f', `${docsDir}/assets/brand/${file}`, `${distFolder}/assets/brand/`)
}
})
sh.rm(`${distFolder}/index.html`)
// get all examples' HTML files
for (const file of sh.find(`${distFolder}/**/*.html`)) {
sh.find(`${distFolder}/**/*.html`).forEach(file => {
const fileContents = sh.cat(file)
.toString()
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
@@ -81,7 +81,7 @@ for (const file of sh.find(`${distFolder}/**/*.html`)) {
.replace(/(<script src="\.\.\/.*) integrity=".*>/g, '$1></script>')
.replace(/( +)<!-- favicons(.|\n)+<style>/i, ' <style>')
new sh.ShellString(fileContents).to(file)
}
})
// create the zip file
sh.exec(`zip -r9 "${distFolder}.zip" "${distFolder}"`)
+24 -34
View File
@@ -1,13 +1,7 @@
languageCode: "en"
title: "Bootstrap"
baseURL: "https://getbootstrap.com"
security:
enableInlineShortcodes: true
funcs:
getenv:
- ^HUGO_
- NETLIFY
enableInlineShortcodes: true
markup:
goldmark:
@@ -24,14 +18,14 @@ buildFuture: true
enableRobotsTXT: true
metaDataFormat: "yaml"
disableKinds: ["404", "taxonomy", "term", "RSS"]
disableKinds: ["404", "taxonomy", "taxonomyTerm", "RSS"]
publishDir: "_site"
module:
mounts:
- source: dist
target: static/docs/5.1/dist
target: static/docs/5.0/dist
- source: site/assets
target: assets
- source: site/content
@@ -42,21 +36,21 @@ module:
target: layouts
- source: site/static
target: static
- source: site/static/docs/5.1/assets/img/favicons/apple-touch-icon.png
- source: site/static/docs/5.0/assets/img/favicons/apple-touch-icon.png
target: static/apple-touch-icon.png
- source: site/static/docs/5.1/assets/img/favicons/favicon.ico
- source: site/static/docs/5.0/assets/img/favicons/favicon.ico
target: static/favicon.ico
params:
description: "The most popular HTML, CSS, and JS library in the world."
authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
social_image_path: /docs/5.1/assets/brand/bootstrap-social.png
social_logo_path: /docs/5.1/assets/brand/bootstrap-social-logo.png
social_image_path: /docs/5.0/assets/brand/bootstrap-social.png
social_logo_path: /docs/5.0/assets/brand/bootstrap-social-logo.png
current_version: "5.1.3"
current_ruby_version: "5.1.3"
docs_version: "5.1"
rfs_version: "v9.0.6"
current_version: "5.0.0"
current_ruby_version: "5.0.0"
docs_version: "5.0"
rfs_version: "9.0.3"
github_org: "https://github.com/twbs"
repo: "https://github.com/twbs/bootstrap"
twitter: "getbootstrap"
@@ -67,23 +61,19 @@ params:
icons: "https://icons.getbootstrap.com/"
download:
source: "https://github.com/twbs/bootstrap/archive/v5.1.3.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v5.1.3/bootstrap-5.1.3-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.1.3/bootstrap-5.1.3-examples.zip"
source: "https://github.com/twbs/bootstrap/archive/v5.0.0.zip"
dist: "https://github.com/twbs/bootstrap/releases/download/v5.0.0/bootstrap-5.0.0-dist.zip"
dist_examples: "https://github.com/twbs/bootstrap/releases/download/v5.0.0/bootstrap-5.0.0-examples.zip"
cdn:
# See https://www.srihash.org for info on how to generate the hashes
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
css_hash: "sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.rtl.min.css"
css_rtl_hash: "sha384-+qdLaIRZfNu4cVPK/PxJJEy0B0f3Ugv8i482AKY7gwXwhaCroABd086ybrVKTa0q"
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js"
js_hash: "sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.2/dist/umd/popper.min.js"
popper_hash: "sha384-q9CRHqZndzlxGLOj+xrdLDJa9ittGte1NksRmgJKeCV9DrM7Kz868XYqsKWPpAmn"
anchors:
min: 2
max: 5
css: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css"
css_hash: "sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0"
css_rtl: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.rtl.min.css"
css_rtl_hash: "sha384-jHiSqEim4+W1UCvv8kTcMbtCZlRF8MxbgKdfpvncia8gdN1UImBnhTpKtufREzv7"
js: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.min.js"
js_hash: "sha384-lpyLfhYuitXl2zRZ5Bn2fqnhNAKOAaM/0Kr9laMspuaMiZfGmfwRNFh8HlMy49eQ"
js_bundle: "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"
js_bundle_hash: "sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
popper_hash: "sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
+102 -156
View File
@@ -1,63 +1,9 @@
/*!
* Bootstrap Grid v5.1.3 (https://getbootstrap.com/)
* Bootstrap Grid v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--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: #212529;
--bs-body-bg: #fff;
}
.container,
.container-fluid,
.container-xxl,
@@ -102,17 +48,17 @@
--bs-gutter-y: 0;
display: flex;
flex-wrap: wrap;
margin-top: calc(-1 * var(--bs-gutter-y));
margin-right: calc(-0.5 * var(--bs-gutter-x));
margin-left: calc(-0.5 * var(--bs-gutter-x));
margin-top: calc(var(--bs-gutter-y) * -1);
margin-right: calc(var(--bs-gutter-x) / -2);
margin-left: calc(var(--bs-gutter-x) / -2);
}
.row > * {
box-sizing: border-box;
flex-shrink: 0;
width: 100%;
max-width: 100%;
padding-right: calc(var(--bs-gutter-x) * 0.5);
padding-left: calc(var(--bs-gutter-x) * 0.5);
padding-right: calc(var(--bs-gutter-x) / 2);
padding-left: calc(var(--bs-gutter-x) / 2);
margin-top: var(--bs-gutter-y);
}
@@ -162,12 +108,12 @@
.col-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-3 {
@@ -177,12 +123,12 @@
.col-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-6 {
@@ -192,12 +138,12 @@
.col-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-9 {
@@ -207,12 +153,12 @@
.col-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-12 {
@@ -221,11 +167,11 @@
}
.offset-1 {
margin-left: 8.33333333%;
margin-left: 8.3333333333%;
}
.offset-2 {
margin-left: 16.66666667%;
margin-left: 16.6666666667%;
}
.offset-3 {
@@ -233,11 +179,11 @@
}
.offset-4 {
margin-left: 33.33333333%;
margin-left: 33.3333333333%;
}
.offset-5 {
margin-left: 41.66666667%;
margin-left: 41.6666666667%;
}
.offset-6 {
@@ -245,11 +191,11 @@
}
.offset-7 {
margin-left: 58.33333333%;
margin-left: 58.3333333333%;
}
.offset-8 {
margin-left: 66.66666667%;
margin-left: 66.6666666667%;
}
.offset-9 {
@@ -257,11 +203,11 @@
}
.offset-10 {
margin-left: 83.33333333%;
margin-left: 83.3333333333%;
}
.offset-11 {
margin-left: 91.66666667%;
margin-left: 91.6666666667%;
}
.g-0,
@@ -371,12 +317,12 @@
.col-sm-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-sm-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-sm-3 {
@@ -386,12 +332,12 @@
.col-sm-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-sm-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-sm-6 {
@@ -401,12 +347,12 @@
.col-sm-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-sm-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-sm-9 {
@@ -416,12 +362,12 @@
.col-sm-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-sm-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-sm-12 {
@@ -434,11 +380,11 @@
}
.offset-sm-1 {
margin-left: 8.33333333%;
margin-left: 8.3333333333%;
}
.offset-sm-2 {
margin-left: 16.66666667%;
margin-left: 16.6666666667%;
}
.offset-sm-3 {
@@ -446,11 +392,11 @@
}
.offset-sm-4 {
margin-left: 33.33333333%;
margin-left: 33.3333333333%;
}
.offset-sm-5 {
margin-left: 41.66666667%;
margin-left: 41.6666666667%;
}
.offset-sm-6 {
@@ -458,11 +404,11 @@
}
.offset-sm-7 {
margin-left: 58.33333333%;
margin-left: 58.3333333333%;
}
.offset-sm-8 {
margin-left: 66.66666667%;
margin-left: 66.6666666667%;
}
.offset-sm-9 {
@@ -470,11 +416,11 @@
}
.offset-sm-10 {
margin-left: 83.33333333%;
margin-left: 83.3333333333%;
}
.offset-sm-11 {
margin-left: 91.66666667%;
margin-left: 91.6666666667%;
}
.g-sm-0,
@@ -584,12 +530,12 @@
.col-md-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-md-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-md-3 {
@@ -599,12 +545,12 @@
.col-md-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-md-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-md-6 {
@@ -614,12 +560,12 @@
.col-md-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-md-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-md-9 {
@@ -629,12 +575,12 @@
.col-md-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-md-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-md-12 {
@@ -647,11 +593,11 @@
}
.offset-md-1 {
margin-left: 8.33333333%;
margin-left: 8.3333333333%;
}
.offset-md-2 {
margin-left: 16.66666667%;
margin-left: 16.6666666667%;
}
.offset-md-3 {
@@ -659,11 +605,11 @@
}
.offset-md-4 {
margin-left: 33.33333333%;
margin-left: 33.3333333333%;
}
.offset-md-5 {
margin-left: 41.66666667%;
margin-left: 41.6666666667%;
}
.offset-md-6 {
@@ -671,11 +617,11 @@
}
.offset-md-7 {
margin-left: 58.33333333%;
margin-left: 58.3333333333%;
}
.offset-md-8 {
margin-left: 66.66666667%;
margin-left: 66.6666666667%;
}
.offset-md-9 {
@@ -683,11 +629,11 @@
}
.offset-md-10 {
margin-left: 83.33333333%;
margin-left: 83.3333333333%;
}
.offset-md-11 {
margin-left: 91.66666667%;
margin-left: 91.6666666667%;
}
.g-md-0,
@@ -797,12 +743,12 @@
.col-lg-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-lg-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-lg-3 {
@@ -812,12 +758,12 @@
.col-lg-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-lg-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-lg-6 {
@@ -827,12 +773,12 @@
.col-lg-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-lg-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-lg-9 {
@@ -842,12 +788,12 @@
.col-lg-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-lg-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-lg-12 {
@@ -860,11 +806,11 @@
}
.offset-lg-1 {
margin-left: 8.33333333%;
margin-left: 8.3333333333%;
}
.offset-lg-2 {
margin-left: 16.66666667%;
margin-left: 16.6666666667%;
}
.offset-lg-3 {
@@ -872,11 +818,11 @@
}
.offset-lg-4 {
margin-left: 33.33333333%;
margin-left: 33.3333333333%;
}
.offset-lg-5 {
margin-left: 41.66666667%;
margin-left: 41.6666666667%;
}
.offset-lg-6 {
@@ -884,11 +830,11 @@
}
.offset-lg-7 {
margin-left: 58.33333333%;
margin-left: 58.3333333333%;
}
.offset-lg-8 {
margin-left: 66.66666667%;
margin-left: 66.6666666667%;
}
.offset-lg-9 {
@@ -896,11 +842,11 @@
}
.offset-lg-10 {
margin-left: 83.33333333%;
margin-left: 83.3333333333%;
}
.offset-lg-11 {
margin-left: 91.66666667%;
margin-left: 91.6666666667%;
}
.g-lg-0,
@@ -1010,12 +956,12 @@
.col-xl-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-xl-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-xl-3 {
@@ -1025,12 +971,12 @@
.col-xl-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-xl-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-xl-6 {
@@ -1040,12 +986,12 @@
.col-xl-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-xl-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-xl-9 {
@@ -1055,12 +1001,12 @@
.col-xl-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-xl-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-xl-12 {
@@ -1073,11 +1019,11 @@
}
.offset-xl-1 {
margin-left: 8.33333333%;
margin-left: 8.3333333333%;
}
.offset-xl-2 {
margin-left: 16.66666667%;
margin-left: 16.6666666667%;
}
.offset-xl-3 {
@@ -1085,11 +1031,11 @@
}
.offset-xl-4 {
margin-left: 33.33333333%;
margin-left: 33.3333333333%;
}
.offset-xl-5 {
margin-left: 41.66666667%;
margin-left: 41.6666666667%;
}
.offset-xl-6 {
@@ -1097,11 +1043,11 @@
}
.offset-xl-7 {
margin-left: 58.33333333%;
margin-left: 58.3333333333%;
}
.offset-xl-8 {
margin-left: 66.66666667%;
margin-left: 66.6666666667%;
}
.offset-xl-9 {
@@ -1109,11 +1055,11 @@
}
.offset-xl-10 {
margin-left: 83.33333333%;
margin-left: 83.3333333333%;
}
.offset-xl-11 {
margin-left: 91.66666667%;
margin-left: 91.6666666667%;
}
.g-xl-0,
@@ -1223,12 +1169,12 @@
.col-xxl-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-xxl-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-xxl-3 {
@@ -1238,12 +1184,12 @@
.col-xxl-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-xxl-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-xxl-6 {
@@ -1253,12 +1199,12 @@
.col-xxl-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-xxl-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-xxl-9 {
@@ -1268,12 +1214,12 @@
.col-xxl-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-xxl-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-xxl-12 {
@@ -1286,11 +1232,11 @@
}
.offset-xxl-1 {
margin-left: 8.33333333%;
margin-left: 8.3333333333%;
}
.offset-xxl-2 {
margin-left: 16.66666667%;
margin-left: 16.6666666667%;
}
.offset-xxl-3 {
@@ -1298,11 +1244,11 @@
}
.offset-xxl-4 {
margin-left: 33.33333333%;
margin-left: 33.3333333333%;
}
.offset-xxl-5 {
margin-left: 41.66666667%;
margin-left: 41.6666666667%;
}
.offset-xxl-6 {
@@ -1310,11 +1256,11 @@
}
.offset-xxl-7 {
margin-left: 58.33333333%;
margin-left: 58.3333333333%;
}
.offset-xxl-8 {
margin-left: 66.66666667%;
margin-left: 66.6666666667%;
}
.offset-xxl-9 {
@@ -1322,11 +1268,11 @@
}
.offset-xxl-10 {
margin-left: 83.33333333%;
margin-left: 83.3333333333%;
}
.offset-xxl-11 {
margin-left: 91.66666667%;
margin-left: 91.6666666667%;
}
.g-xxl-0,
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+102 -156
View File
@@ -1,63 +1,9 @@
/*!
* Bootstrap Grid v5.1.3 (https://getbootstrap.com/)
* Bootstrap Grid v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--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: #212529;
--bs-body-bg: #fff;
}
.container,
.container-fluid,
.container-xxl,
@@ -102,17 +48,17 @@
--bs-gutter-y: 0;
display: flex;
flex-wrap: wrap;
margin-top: calc(-1 * var(--bs-gutter-y));
margin-left: calc(-0.5 * var(--bs-gutter-x));
margin-right: calc(-0.5 * var(--bs-gutter-x));
margin-top: calc(var(--bs-gutter-y) * -1);
margin-left: calc(var(--bs-gutter-x) / -2);
margin-right: calc(var(--bs-gutter-x) / -2);
}
.row > * {
box-sizing: border-box;
flex-shrink: 0;
width: 100%;
max-width: 100%;
padding-left: calc(var(--bs-gutter-x) * 0.5);
padding-right: calc(var(--bs-gutter-x) * 0.5);
padding-left: calc(var(--bs-gutter-x) / 2);
padding-right: calc(var(--bs-gutter-x) / 2);
margin-top: var(--bs-gutter-y);
}
@@ -162,12 +108,12 @@
.col-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-3 {
@@ -177,12 +123,12 @@
.col-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-6 {
@@ -192,12 +138,12 @@
.col-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-9 {
@@ -207,12 +153,12 @@
.col-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-12 {
@@ -221,11 +167,11 @@
}
.offset-1 {
margin-right: 8.33333333%;
margin-right: 8.3333333333%;
}
.offset-2 {
margin-right: 16.66666667%;
margin-right: 16.6666666667%;
}
.offset-3 {
@@ -233,11 +179,11 @@
}
.offset-4 {
margin-right: 33.33333333%;
margin-right: 33.3333333333%;
}
.offset-5 {
margin-right: 41.66666667%;
margin-right: 41.6666666667%;
}
.offset-6 {
@@ -245,11 +191,11 @@
}
.offset-7 {
margin-right: 58.33333333%;
margin-right: 58.3333333333%;
}
.offset-8 {
margin-right: 66.66666667%;
margin-right: 66.6666666667%;
}
.offset-9 {
@@ -257,11 +203,11 @@
}
.offset-10 {
margin-right: 83.33333333%;
margin-right: 83.3333333333%;
}
.offset-11 {
margin-right: 91.66666667%;
margin-right: 91.6666666667%;
}
.g-0,
@@ -371,12 +317,12 @@
.col-sm-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-sm-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-sm-3 {
@@ -386,12 +332,12 @@
.col-sm-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-sm-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-sm-6 {
@@ -401,12 +347,12 @@
.col-sm-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-sm-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-sm-9 {
@@ -416,12 +362,12 @@
.col-sm-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-sm-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-sm-12 {
@@ -434,11 +380,11 @@
}
.offset-sm-1 {
margin-right: 8.33333333%;
margin-right: 8.3333333333%;
}
.offset-sm-2 {
margin-right: 16.66666667%;
margin-right: 16.6666666667%;
}
.offset-sm-3 {
@@ -446,11 +392,11 @@
}
.offset-sm-4 {
margin-right: 33.33333333%;
margin-right: 33.3333333333%;
}
.offset-sm-5 {
margin-right: 41.66666667%;
margin-right: 41.6666666667%;
}
.offset-sm-6 {
@@ -458,11 +404,11 @@
}
.offset-sm-7 {
margin-right: 58.33333333%;
margin-right: 58.3333333333%;
}
.offset-sm-8 {
margin-right: 66.66666667%;
margin-right: 66.6666666667%;
}
.offset-sm-9 {
@@ -470,11 +416,11 @@
}
.offset-sm-10 {
margin-right: 83.33333333%;
margin-right: 83.3333333333%;
}
.offset-sm-11 {
margin-right: 91.66666667%;
margin-right: 91.6666666667%;
}
.g-sm-0,
@@ -584,12 +530,12 @@
.col-md-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-md-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-md-3 {
@@ -599,12 +545,12 @@
.col-md-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-md-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-md-6 {
@@ -614,12 +560,12 @@
.col-md-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-md-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-md-9 {
@@ -629,12 +575,12 @@
.col-md-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-md-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-md-12 {
@@ -647,11 +593,11 @@
}
.offset-md-1 {
margin-right: 8.33333333%;
margin-right: 8.3333333333%;
}
.offset-md-2 {
margin-right: 16.66666667%;
margin-right: 16.6666666667%;
}
.offset-md-3 {
@@ -659,11 +605,11 @@
}
.offset-md-4 {
margin-right: 33.33333333%;
margin-right: 33.3333333333%;
}
.offset-md-5 {
margin-right: 41.66666667%;
margin-right: 41.6666666667%;
}
.offset-md-6 {
@@ -671,11 +617,11 @@
}
.offset-md-7 {
margin-right: 58.33333333%;
margin-right: 58.3333333333%;
}
.offset-md-8 {
margin-right: 66.66666667%;
margin-right: 66.6666666667%;
}
.offset-md-9 {
@@ -683,11 +629,11 @@
}
.offset-md-10 {
margin-right: 83.33333333%;
margin-right: 83.3333333333%;
}
.offset-md-11 {
margin-right: 91.66666667%;
margin-right: 91.6666666667%;
}
.g-md-0,
@@ -797,12 +743,12 @@
.col-lg-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-lg-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-lg-3 {
@@ -812,12 +758,12 @@
.col-lg-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-lg-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-lg-6 {
@@ -827,12 +773,12 @@
.col-lg-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-lg-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-lg-9 {
@@ -842,12 +788,12 @@
.col-lg-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-lg-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-lg-12 {
@@ -860,11 +806,11 @@
}
.offset-lg-1 {
margin-right: 8.33333333%;
margin-right: 8.3333333333%;
}
.offset-lg-2 {
margin-right: 16.66666667%;
margin-right: 16.6666666667%;
}
.offset-lg-3 {
@@ -872,11 +818,11 @@
}
.offset-lg-4 {
margin-right: 33.33333333%;
margin-right: 33.3333333333%;
}
.offset-lg-5 {
margin-right: 41.66666667%;
margin-right: 41.6666666667%;
}
.offset-lg-6 {
@@ -884,11 +830,11 @@
}
.offset-lg-7 {
margin-right: 58.33333333%;
margin-right: 58.3333333333%;
}
.offset-lg-8 {
margin-right: 66.66666667%;
margin-right: 66.6666666667%;
}
.offset-lg-9 {
@@ -896,11 +842,11 @@
}
.offset-lg-10 {
margin-right: 83.33333333%;
margin-right: 83.3333333333%;
}
.offset-lg-11 {
margin-right: 91.66666667%;
margin-right: 91.6666666667%;
}
.g-lg-0,
@@ -1010,12 +956,12 @@
.col-xl-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-xl-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-xl-3 {
@@ -1025,12 +971,12 @@
.col-xl-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-xl-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-xl-6 {
@@ -1040,12 +986,12 @@
.col-xl-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-xl-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-xl-9 {
@@ -1055,12 +1001,12 @@
.col-xl-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-xl-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-xl-12 {
@@ -1073,11 +1019,11 @@
}
.offset-xl-1 {
margin-right: 8.33333333%;
margin-right: 8.3333333333%;
}
.offset-xl-2 {
margin-right: 16.66666667%;
margin-right: 16.6666666667%;
}
.offset-xl-3 {
@@ -1085,11 +1031,11 @@
}
.offset-xl-4 {
margin-right: 33.33333333%;
margin-right: 33.3333333333%;
}
.offset-xl-5 {
margin-right: 41.66666667%;
margin-right: 41.6666666667%;
}
.offset-xl-6 {
@@ -1097,11 +1043,11 @@
}
.offset-xl-7 {
margin-right: 58.33333333%;
margin-right: 58.3333333333%;
}
.offset-xl-8 {
margin-right: 66.66666667%;
margin-right: 66.6666666667%;
}
.offset-xl-9 {
@@ -1109,11 +1055,11 @@
}
.offset-xl-10 {
margin-right: 83.33333333%;
margin-right: 83.3333333333%;
}
.offset-xl-11 {
margin-right: 91.66666667%;
margin-right: 91.6666666667%;
}
.g-xl-0,
@@ -1223,12 +1169,12 @@
.col-xxl-1 {
flex: 0 0 auto;
width: 8.33333333%;
width: 8.3333333333%;
}
.col-xxl-2 {
flex: 0 0 auto;
width: 16.66666667%;
width: 16.6666666667%;
}
.col-xxl-3 {
@@ -1238,12 +1184,12 @@
.col-xxl-4 {
flex: 0 0 auto;
width: 33.33333333%;
width: 33.3333333333%;
}
.col-xxl-5 {
flex: 0 0 auto;
width: 41.66666667%;
width: 41.6666666667%;
}
.col-xxl-6 {
@@ -1253,12 +1199,12 @@
.col-xxl-7 {
flex: 0 0 auto;
width: 58.33333333%;
width: 58.3333333333%;
}
.col-xxl-8 {
flex: 0 0 auto;
width: 66.66666667%;
width: 66.6666666667%;
}
.col-xxl-9 {
@@ -1268,12 +1214,12 @@
.col-xxl-10 {
flex: 0 0 auto;
width: 83.33333333%;
width: 83.3333333333%;
}
.col-xxl-11 {
flex: 0 0 auto;
width: 91.66666667%;
width: 91.6666666667%;
}
.col-xxl-12 {
@@ -1286,11 +1232,11 @@
}
.offset-xxl-1 {
margin-right: 8.33333333%;
margin-right: 8.3333333333%;
}
.offset-xxl-2 {
margin-right: 16.66666667%;
margin-right: 16.6666666667%;
}
.offset-xxl-3 {
@@ -1298,11 +1244,11 @@
}
.offset-xxl-4 {
margin-right: 33.33333333%;
margin-right: 33.3333333333%;
}
.offset-xxl-5 {
margin-right: 41.66666667%;
margin-right: 41.6666666667%;
}
.offset-xxl-6 {
@@ -1310,11 +1256,11 @@
}
.offset-xxl-7 {
margin-right: 58.33333333%;
margin-right: 58.3333333333%;
}
.offset-xxl-8 {
margin-right: 66.66666667%;
margin-right: 66.6666666667%;
}
.offset-xxl-9 {
@@ -1322,11 +1268,11 @@
}
.offset-xxl-10 {
margin-right: 83.33333333%;
margin-right: 83.3333333333%;
}
.offset-xxl-11 {
margin-right: 91.66666667%;
margin-right: 91.6666666667%;
}
.g-xxl-0,
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
+8 -67
View File
@@ -1,64 +1,10 @@
/*!
* Bootstrap Reboot v5.1.3 (https://getbootstrap.com/)
* Bootstrap Reboot v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--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: #212529;
--bs-body-bg: #fff;
}
*,
*::before,
*::after {
@@ -73,13 +19,12 @@
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
background-color: #fff;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@@ -246,7 +191,7 @@ pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
direction: ltr /* rtl:ignore */;
unicode-bidi: bidi-override;
@@ -448,10 +393,6 @@ legend + * {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
}
::file-selector-button {
font: inherit;
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+8 -67
View File
@@ -1,64 +1,10 @@
/*!
* Bootstrap Reboot v5.1.3 (https://getbootstrap.com/)
* Bootstrap Reboot v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--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: #212529;
--bs-body-bg: #fff;
}
*,
*::before,
*::after {
@@ -73,13 +19,12 @@
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
background-color: #fff;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@@ -246,7 +191,7 @@ pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
direction: ltr ;
unicode-bidi: bidi-override;
@@ -446,10 +391,6 @@ legend + * {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
}
::file-selector-button {
font: inherit;
}
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
+27 -141
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
* Bootstrap Utilities v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -88,15 +88,15 @@
}
.ratio-4x3 {
--bs-aspect-ratio: 75%;
--bs-aspect-ratio: calc(3 / 4 * 100%);
}
.ratio-16x9 {
--bs-aspect-ratio: 56.25%;
--bs-aspect-ratio: calc(9 / 16 * 100%);
}
.ratio-21x9 {
--bs-aspect-ratio: 42.8571428571%;
--bs-aspect-ratio: calc(9 / 21 * 100%);
}
.fixed-top {
@@ -162,20 +162,6 @@
z-index: 1020;
}
}
.hstack {
display: flex;
flex-direction: row;
align-items: center;
align-self: stretch;
}
.vstack {
display: flex;
flex: 1 1 auto;
flex-direction: column;
align-self: stretch;
}
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
position: absolute !important;
@@ -205,15 +191,6 @@
white-space: nowrap;
}
.vr {
display: inline-block;
align-self: stretch;
width: 1px;
min-height: 1em;
background-color: currentColor;
opacity: 0.25;
}
.align-baseline {
vertical-align: baseline !important;
}
@@ -250,26 +227,6 @@
float: none !important;
}
.opacity-0 {
opacity: 0 !important;
}
.opacity-25 {
opacity: 0.25 !important;
}
.opacity-50 {
opacity: 0.5 !important;
}
.opacity-75 {
opacity: 0.75 !important;
}
.opacity-100 {
opacity: 1 !important;
}
.overflow-auto {
overflow: auto !important;
}
@@ -1293,176 +1250,105 @@
/* rtl:end:remove */
.text-primary {
--bs-text-opacity: 1;
color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important;
color: #0d6efd !important;
}
.text-secondary {
--bs-text-opacity: 1;
color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important;
color: #6c757d !important;
}
.text-success {
--bs-text-opacity: 1;
color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important;
color: #198754 !important;
}
.text-info {
--bs-text-opacity: 1;
color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important;
color: #0dcaf0 !important;
}
.text-warning {
--bs-text-opacity: 1;
color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important;
color: #ffc107 !important;
}
.text-danger {
--bs-text-opacity: 1;
color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important;
color: #dc3545 !important;
}
.text-light {
--bs-text-opacity: 1;
color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important;
color: #f8f9fa !important;
}
.text-dark {
--bs-text-opacity: 1;
color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
}
.text-black {
--bs-text-opacity: 1;
color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important;
color: #212529 !important;
}
.text-white {
--bs-text-opacity: 1;
color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
color: #fff !important;
}
.text-body {
--bs-text-opacity: 1;
color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important;
color: #212529 !important;
}
.text-muted {
--bs-text-opacity: 1;
color: #6c757d !important;
}
.text-black-50 {
--bs-text-opacity: 1;
color: rgba(0, 0, 0, 0.5) !important;
}
.text-white-50 {
--bs-text-opacity: 1;
color: rgba(255, 255, 255, 0.5) !important;
}
.text-reset {
--bs-text-opacity: 1;
color: inherit !important;
}
.text-opacity-25 {
--bs-text-opacity: 0.25;
}
.text-opacity-50 {
--bs-text-opacity: 0.5;
}
.text-opacity-75 {
--bs-text-opacity: 0.75;
}
.text-opacity-100 {
--bs-text-opacity: 1;
}
.bg-primary {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
background-color: #0d6efd !important;
}
.bg-secondary {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important;
background-color: #6c757d !important;
}
.bg-success {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important;
background-color: #198754 !important;
}
.bg-info {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important;
background-color: #0dcaf0 !important;
}
.bg-warning {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important;
background-color: #ffc107 !important;
}
.bg-danger {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important;
background-color: #dc3545 !important;
}
.bg-light {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
background-color: #f8f9fa !important;
}
.bg-dark {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
}
.bg-black {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important;
}
.bg-white {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important;
background-color: #212529 !important;
}
.bg-body {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
background-color: #fff !important;
}
.bg-white {
background-color: #fff !important;
}
.bg-transparent {
--bs-bg-opacity: 1;
background-color: transparent !important;
}
.bg-opacity-10 {
--bs-bg-opacity: 0.1;
}
.bg-opacity-25 {
--bs-bg-opacity: 0.25;
}
.bg-opacity-50 {
--bs-bg-opacity: 0.5;
}
.bg-opacity-75 {
--bs-bg-opacity: 0.75;
}
.bg-opacity-100 {
--bs-bg-opacity: 1;
}
.bg-gradient {
background-image: var(--bs-gradient) !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
+27 -141
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
* Bootstrap Utilities v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -88,15 +88,15 @@
}
.ratio-4x3 {
--bs-aspect-ratio: 75%;
--bs-aspect-ratio: calc(3 / 4 * 100%);
}
.ratio-16x9 {
--bs-aspect-ratio: 56.25%;
--bs-aspect-ratio: calc(9 / 16 * 100%);
}
.ratio-21x9 {
--bs-aspect-ratio: 42.8571428571%;
--bs-aspect-ratio: calc(9 / 21 * 100%);
}
.fixed-top {
@@ -162,20 +162,6 @@
z-index: 1020;
}
}
.hstack {
display: flex;
flex-direction: row;
align-items: center;
align-self: stretch;
}
.vstack {
display: flex;
flex: 1 1 auto;
flex-direction: column;
align-self: stretch;
}
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
position: absolute !important;
@@ -205,15 +191,6 @@
white-space: nowrap;
}
.vr {
display: inline-block;
align-self: stretch;
width: 1px;
min-height: 1em;
background-color: currentColor;
opacity: 0.25;
}
.align-baseline {
vertical-align: baseline !important;
}
@@ -250,26 +227,6 @@
float: none !important;
}
.opacity-0 {
opacity: 0 !important;
}
.opacity-25 {
opacity: 0.25 !important;
}
.opacity-50 {
opacity: 0.5 !important;
}
.opacity-75 {
opacity: 0.75 !important;
}
.opacity-100 {
opacity: 1 !important;
}
.overflow-auto {
overflow: auto !important;
}
@@ -1285,176 +1242,105 @@
white-space: nowrap !important;
}
.text-primary {
--bs-text-opacity: 1;
color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important;
color: #0d6efd !important;
}
.text-secondary {
--bs-text-opacity: 1;
color: rgba(var(--bs-secondary-rgb), var(--bs-text-opacity)) !important;
color: #6c757d !important;
}
.text-success {
--bs-text-opacity: 1;
color: rgba(var(--bs-success-rgb), var(--bs-text-opacity)) !important;
color: #198754 !important;
}
.text-info {
--bs-text-opacity: 1;
color: rgba(var(--bs-info-rgb), var(--bs-text-opacity)) !important;
color: #0dcaf0 !important;
}
.text-warning {
--bs-text-opacity: 1;
color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important;
color: #ffc107 !important;
}
.text-danger {
--bs-text-opacity: 1;
color: rgba(var(--bs-danger-rgb), var(--bs-text-opacity)) !important;
color: #dc3545 !important;
}
.text-light {
--bs-text-opacity: 1;
color: rgba(var(--bs-light-rgb), var(--bs-text-opacity)) !important;
color: #f8f9fa !important;
}
.text-dark {
--bs-text-opacity: 1;
color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
}
.text-black {
--bs-text-opacity: 1;
color: rgba(var(--bs-black-rgb), var(--bs-text-opacity)) !important;
color: #212529 !important;
}
.text-white {
--bs-text-opacity: 1;
color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
color: #fff !important;
}
.text-body {
--bs-text-opacity: 1;
color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important;
color: #212529 !important;
}
.text-muted {
--bs-text-opacity: 1;
color: #6c757d !important;
}
.text-black-50 {
--bs-text-opacity: 1;
color: rgba(0, 0, 0, 0.5) !important;
}
.text-white-50 {
--bs-text-opacity: 1;
color: rgba(255, 255, 255, 0.5) !important;
}
.text-reset {
--bs-text-opacity: 1;
color: inherit !important;
}
.text-opacity-25 {
--bs-text-opacity: 0.25;
}
.text-opacity-50 {
--bs-text-opacity: 0.5;
}
.text-opacity-75 {
--bs-text-opacity: 0.75;
}
.text-opacity-100 {
--bs-text-opacity: 1;
}
.bg-primary {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
background-color: #0d6efd !important;
}
.bg-secondary {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important;
background-color: #6c757d !important;
}
.bg-success {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important;
background-color: #198754 !important;
}
.bg-info {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important;
background-color: #0dcaf0 !important;
}
.bg-warning {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important;
background-color: #ffc107 !important;
}
.bg-danger {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important;
background-color: #dc3545 !important;
}
.bg-light {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
background-color: #f8f9fa !important;
}
.bg-dark {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
}
.bg-black {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important;
}
.bg-white {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-white-rgb), var(--bs-bg-opacity)) !important;
background-color: #212529 !important;
}
.bg-body {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
background-color: #fff !important;
}
.bg-white {
background-color: #fff !important;
}
.bg-transparent {
--bs-bg-opacity: 1;
background-color: transparent !important;
}
.bg-opacity-10 {
--bs-bg-opacity: 0.1;
}
.bg-opacity-25 {
--bs-bg-opacity: 0.25;
}
.bg-opacity-50 {
--bs-bg-opacity: 0.5;
}
.bg-opacity-75 {
--bs-bg-opacity: 0.75;
}
.bg-opacity-100 {
--bs-bg-opacity: 1;
}
.bg-gradient {
background-image: var(--bs-gradient) !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
+197 -634
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+197 -634
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1141 -1178
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1074 -1079
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1087 -1090
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+114 -85
View File
@@ -1,25 +1,28 @@
/*!
* Bootstrap alert.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap alert.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.EventHandler, global.Base));
})(this, (function (EventHandler, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Data, global.EventHandler, global.Base));
}(this, (function (Data, EventHandler, BaseComponent) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): util/index.js
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const getSelector = element => {
let selector = element.getAttribute('data-bs-target');
@@ -50,20 +53,49 @@
return selector ? document.querySelector(selector) : null;
};
const isDisabled = element => {
if (!element || element.nodeType !== Node.ELEMENT_NODE) {
return true;
const getTransitionDurationFromElement = element => {
if (!element) {
return 0;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
if (element.classList.contains('disabled')) {
return true;
}
if (typeof element.disabled !== 'undefined') {
return element.disabled;
}
return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
element.addEventListener(TRANSITION_END, listener);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
const getjQuery = () => {
@@ -78,30 +110,20 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
const defineJQueryPlugin = plugin => {
const defineJQueryPlugin = (name, plugin) => {
onDOMContentLoaded(() => {
const $ = getjQuery();
/* istanbul ignore if */
if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin;
@@ -116,33 +138,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const enableDismissTrigger = (component, method = 'hide') => {
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
const name = component.NAME;
EventHandler__default.default.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault();
}
if (isDisabled(this)) {
return;
}
const target = getElementFromSelector(this) || this.closest(`.${name}`);
const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
instance[method]();
});
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): alert.js
* Bootstrap (v5.0.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -155,8 +151,12 @@
const NAME = 'alert';
const DATA_KEY = 'bs.alert';
const EVENT_KEY = `.${DATA_KEY}`;
const DATA_API_KEY = '.data-api';
const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
const EVENT_CLOSE = `close${EVENT_KEY}`;
const EVENT_CLOSED = `closed${EVENT_KEY}`;
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
const CLASS_NAME_ALERT = 'alert';
const CLASS_NAME_FADE = 'fade';
const CLASS_NAME_SHOW = 'show';
/**
@@ -165,52 +165,81 @@
* ------------------------------------------------------------------------
*/
class Alert extends BaseComponent__default.default {
class Alert extends BaseComponent__default['default'] {
// Getters
static get NAME() {
return NAME;
static get DATA_KEY() {
return DATA_KEY;
} // Public
close() {
const closeEvent = EventHandler__default.default.trigger(this._element, EVENT_CLOSE);
close(element) {
const rootElement = element ? this._getRootElement(element) : this._element;
if (closeEvent.defaultPrevented) {
const customEvent = this._triggerCloseEvent(rootElement);
if (customEvent === null || customEvent.defaultPrevented) {
return;
}
this._element.classList.remove(CLASS_NAME_SHOW);
const isAnimated = this._element.classList.contains(CLASS_NAME_FADE);
this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
this._removeElement(rootElement);
} // Private
_destroyElement() {
this._element.remove();
_getRootElement(element) {
return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`);
}
EventHandler__default.default.trigger(this._element, EVENT_CLOSED);
this.dispose();
_triggerCloseEvent(element) {
return EventHandler__default['default'].trigger(element, EVENT_CLOSE);
}
_removeElement(element) {
element.classList.remove(CLASS_NAME_SHOW);
if (!element.classList.contains(CLASS_NAME_FADE)) {
this._destroyElement(element);
return;
}
const transitionDuration = getTransitionDurationFromElement(element);
EventHandler__default['default'].one(element, 'transitionend', () => this._destroyElement(element));
emulateTransitionEnd(element, transitionDuration);
}
_destroyElement(element) {
if (element.parentNode) {
element.parentNode.removeChild(element);
}
EventHandler__default['default'].trigger(element, EVENT_CLOSED);
} // Static
static jQueryInterface(config) {
return this.each(function () {
const data = Alert.getOrCreateInstance(this);
let data = Data__default['default'].get(this, DATA_KEY);
if (typeof config !== 'string') {
return;
if (!data) {
data = new Alert(this);
}
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`);
if (config === 'close') {
data[config](this);
}
data[config](this);
});
}
static handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault();
}
alertInstance.close(this);
};
}
}
/**
* ------------------------------------------------------------------------
@@ -219,7 +248,7 @@
*/
enableDismissTrigger(Alert, 'close');
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery
@@ -227,9 +256,9 @@
* add .Alert to jQuery only if jQuery is present
*/
defineJQueryPlugin(Alert);
defineJQueryPlugin(NAME, Alert);
return Alert;
}));
})));
//# sourceMappingURL=alert.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+14 -133
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap base-component.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap base-component.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -7,113 +7,16 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Base = factory(global.Data, global.EventHandler));
})(this, (function (Data, EventHandler) { 'use strict';
}(this, (function (Data, EventHandler) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const getTransitionDurationFromElement = element => {
if (!element) {
return 0;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return document.querySelector(obj);
}
return null;
};
const execute = callback => {
if (typeof callback === 'function') {
callback();
}
};
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
if (!waitForTransition) {
execute(callback);
return;
}
const durationPadding = 5;
const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
let called = false;
const handler = ({
target
}) => {
if (target !== transitionElement) {
return;
}
called = true;
transitionElement.removeEventListener(TRANSITION_END, handler);
execute(callback);
};
transitionElement.addEventListener(TRANSITION_END, handler);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(transitionElement);
}
}, emulatedDuration);
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): base-component.js
* Bootstrap (v5.0.0): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -123,61 +26,39 @@
* ------------------------------------------------------------------------
*/
const VERSION = '5.1.3';
const VERSION = '5.0.0';
class BaseComponent {
constructor(element) {
element = getElement(element);
element = typeof element === 'string' ? document.querySelector(element) : element;
if (!element) {
return;
}
this._element = element;
Data__default.default.set(this._element, this.constructor.DATA_KEY, this);
Data__default['default'].set(this._element, this.constructor.DATA_KEY, this);
}
dispose() {
Data__default.default.remove(this._element, this.constructor.DATA_KEY);
EventHandler__default.default.off(this._element, this.constructor.EVENT_KEY);
Object.getOwnPropertyNames(this).forEach(propertyName => {
this[propertyName] = null;
});
}
_queueCallback(callback, element, isAnimated = true) {
executeAfterTransition(callback, element, isAnimated);
Data__default['default'].remove(this._element, this.constructor.DATA_KEY);
EventHandler__default['default'].off(this._element, `.${this.constructor.DATA_KEY}`);
this._element = null;
}
/** Static */
static getInstance(element) {
return Data__default.default.get(getElement(element), this.DATA_KEY);
}
static getOrCreateInstance(element, config = {}) {
return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
return Data__default['default'].get(element, this.DATA_KEY);
}
static get VERSION() {
return VERSION;
}
static get NAME() {
throw new Error('You have to implement the static method "NAME", for each component!');
}
static get DATA_KEY() {
return `bs.${this.NAME}`;
}
static get EVENT_KEY() {
return `.${this.DATA_KEY}`;
}
}
return BaseComponent;
}));
})));
//# sourceMappingURL=base-component.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+30 -30
View File
@@ -1,22 +1,23 @@
/*!
* Bootstrap button.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap button.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.EventHandler, global.Base));
})(this, (function (EventHandler, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Data, global.EventHandler, global.Base));
}(this, (function (Data, EventHandler, BaseComponent) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): util/index.js
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -33,30 +34,20 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
const defineJQueryPlugin = plugin => {
const defineJQueryPlugin = (name, plugin) => {
onDOMContentLoaded(() => {
const $ = getjQuery();
/* istanbul ignore if */
if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin;
@@ -71,7 +62,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): button.js
* Bootstrap (v5.0.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -94,10 +85,10 @@
* ------------------------------------------------------------------------
*/
class Button extends BaseComponent__default.default {
class Button extends BaseComponent__default['default'] {
// Getters
static get NAME() {
return NAME;
static get DATA_KEY() {
return DATA_KEY;
} // Public
@@ -109,7 +100,11 @@
static jQueryInterface(config) {
return this.each(function () {
const data = Button.getOrCreateInstance(this);
let data = Data__default['default'].get(this, DATA_KEY);
if (!data) {
data = new Button(this);
}
if (config === 'toggle') {
data[config]();
@@ -125,10 +120,15 @@
*/
EventHandler__default.default.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();
const button = event.target.closest(SELECTOR_DATA_TOGGLE);
const data = Button.getOrCreateInstance(button);
let data = Data__default['default'].get(button, DATA_KEY);
if (!data) {
data = new Button(button);
}
data.toggle();
});
/**
@@ -138,9 +138,9 @@
* add .Button to jQuery only if jQuery is present
*/
defineJQueryPlugin(Button);
defineJQueryPlugin(NAME, Button);
return Button;
}));
})));
//# sourceMappingURL=button.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+163 -150
View File
@@ -1,27 +1,29 @@
/*!
* Bootstrap carousel.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap carousel.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
})(this, (function (EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
function _interopDefaultLegacy (e) { return 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 BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): util/index.js
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const toType = obj => {
@@ -61,20 +63,51 @@
return selector ? document.querySelector(selector) : null;
};
const getTransitionDurationFromElement = element => {
if (!element) {
return 0;
} // Get transition-duration of the element
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
const isElement = obj => (obj[0] || obj).nodeType;
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
element.addEventListener(TRANSITION_END, listener);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
const typeCheckConfig = (componentName, config, configTypes) => {
@@ -90,27 +123,21 @@
};
const isVisible = element => {
if (!isElement(element) || element.getClientRects().length === 0) {
if (!element) {
return false;
}
return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
};
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
if (element.style && element.parentNode && element.parentNode.style) {
const elementStyle = getComputedStyle(element);
const parentNodeStyle = getComputedStyle(element.parentNode);
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
}
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
return false;
};
const reflow = element => element.offsetHeight;
const getjQuery = () => {
const {
jQuery
@@ -123,18 +150,9 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
@@ -142,13 +160,12 @@
const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = plugin => {
const defineJQueryPlugin = (name, plugin) => {
onDOMContentLoaded(() => {
const $ = getjQuery();
/* istanbul ignore if */
if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin;
@@ -160,37 +177,10 @@
}
});
};
/**
* Return the previous/next element of a list.
*
* @param {array} list The list of elements
* @param activeElement The active element
* @param shouldGetNext Choose to get next or previous element
* @param isCycleAllowed
* @return {Element|elem} The proper element
*/
const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
let index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed
if (index === -1) {
return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0];
}
const listLength = list.length;
index += shouldGetNext ? 1 : -1;
if (isCycleAllowed) {
index = (index + listLength) % listLength;
}
return list[Math.max(0, Math.min(index, listLength - 1))];
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): carousel.js
* Bootstrap (v5.0.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -229,10 +219,6 @@
const ORDER_PREV = 'prev';
const DIRECTION_LEFT = 'left';
const DIRECTION_RIGHT = 'right';
const KEY_TO_DIRECTION = {
[ARROW_LEFT_KEY]: DIRECTION_RIGHT,
[ARROW_RIGHT_KEY]: DIRECTION_LEFT
};
const EVENT_SLIDE = `slide${EVENT_KEY}`;
const EVENT_SLID = `slid${EVENT_KEY}`;
const EVENT_KEYDOWN = `keydown${EVENT_KEY}`;
@@ -271,7 +257,7 @@
* ------------------------------------------------------------------------
*/
class Carousel extends BaseComponent__default.default {
class Carousel extends BaseComponent__default['default'] {
constructor(element, config) {
super(element);
this._items = null;
@@ -283,7 +269,7 @@
this.touchStartX = 0;
this.touchDeltaX = 0;
this._config = this._getConfig(config);
this._indicatorsElement = SelectorEngine__default.default.findOne(SELECTOR_INDICATORS, this._element);
this._indicatorsElement = SelectorEngine__default['default'].findOne(SELECTOR_INDICATORS, this._element);
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
this._pointerEvent = Boolean(window.PointerEvent);
@@ -295,13 +281,15 @@
return Default;
}
static get NAME() {
return NAME;
static get DATA_KEY() {
return DATA_KEY;
} // Public
next() {
this._slide(ORDER_NEXT);
if (!this._isSliding) {
this._slide(ORDER_NEXT);
}
}
nextWhenVisible() {
@@ -313,7 +301,9 @@
}
prev() {
this._slide(ORDER_PREV);
if (!this._isSliding) {
this._slide(ORDER_PREV);
}
}
pause(event) {
@@ -321,7 +311,7 @@
this._isPaused = true;
}
if (SelectorEngine__default.default.findOne(SELECTOR_NEXT_PREV, this._element)) {
if (SelectorEngine__default['default'].findOne(SELECTOR_NEXT_PREV, this._element)) {
triggerTransitionEnd(this._element);
this.cycle(true);
}
@@ -348,7 +338,7 @@
}
to(index) {
this._activeElement = SelectorEngine__default.default.findOne(SELECTOR_ACTIVE_ITEM, this._element);
this._activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
const activeIndex = this._getItemIndex(this._activeElement);
@@ -357,7 +347,7 @@
}
if (this._isSliding) {
EventHandler__default.default.one(this._element, EVENT_SLID, () => this.to(index));
EventHandler__default['default'].one(this._element, EVENT_SLID, () => this.to(index));
return;
}
@@ -370,13 +360,23 @@
const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
this._slide(order, this._items[index]);
}
dispose() {
this._items = null;
this._config = null;
this._interval = null;
this._isPaused = null;
this._isSliding = null;
this._activeElement = null;
this._indicatorsElement = null;
super.dispose();
} // Private
_getConfig(config) {
config = { ...Default,
...Manipulator__default.default.getDataAttributes(this._element),
...(typeof config === 'object' ? config : {})
...config
};
typeCheckConfig(NAME, config, DefaultType);
return config;
@@ -401,12 +401,12 @@
_addEventListeners() {
if (this._config.keyboard) {
EventHandler__default.default.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
EventHandler__default['default'].on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
}
if (this._config.pause === 'hover') {
EventHandler__default.default.on(this._element, EVENT_MOUSEENTER, event => this.pause(event));
EventHandler__default.default.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));
EventHandler__default['default'].on(this._element, EVENT_MOUSEENTER, event => this.pause(event));
EventHandler__default['default'].on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));
}
if (this._config.touch && this._touchSupported) {
@@ -415,12 +415,8 @@
}
_addTouchEventListeners() {
const hasPointerPenTouch = event => {
return this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
};
const start = event => {
if (hasPointerPenTouch(event)) {
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
this.touchStartX = event.clientX;
} else if (!this._pointerEvent) {
this.touchStartX = event.touches[0].clientX;
@@ -433,7 +429,7 @@
};
const end = event => {
if (hasPointerPenTouch(event)) {
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
this.touchDeltaX = event.clientX - this.touchStartX;
}
@@ -457,19 +453,19 @@
}
};
SelectorEngine__default.default.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
EventHandler__default.default.on(itemImg, EVENT_DRAG_START, event => event.preventDefault());
SelectorEngine__default['default'].find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
EventHandler__default['default'].on(itemImg, EVENT_DRAG_START, e => e.preventDefault());
});
if (this._pointerEvent) {
EventHandler__default.default.on(this._element, EVENT_POINTERDOWN, event => start(event));
EventHandler__default.default.on(this._element, EVENT_POINTERUP, event => end(event));
EventHandler__default['default'].on(this._element, EVENT_POINTERDOWN, event => start(event));
EventHandler__default['default'].on(this._element, EVENT_POINTERUP, event => end(event));
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
} else {
EventHandler__default.default.on(this._element, EVENT_TOUCHSTART, event => start(event));
EventHandler__default.default.on(this._element, EVENT_TOUCHMOVE, event => move(event));
EventHandler__default.default.on(this._element, EVENT_TOUCHEND, event => end(event));
EventHandler__default['default'].on(this._element, EVENT_TOUCHSTART, event => start(event));
EventHandler__default['default'].on(this._element, EVENT_TOUCHMOVE, event => move(event));
EventHandler__default['default'].on(this._element, EVENT_TOUCHEND, event => end(event));
}
}
@@ -478,31 +474,46 @@
return;
}
const direction = KEY_TO_DIRECTION[event.key];
if (direction) {
if (event.key === ARROW_LEFT_KEY) {
event.preventDefault();
this._slide(direction);
this._slide(DIRECTION_RIGHT);
} else if (event.key === ARROW_RIGHT_KEY) {
event.preventDefault();
this._slide(DIRECTION_LEFT);
}
}
_getItemIndex(element) {
this._items = element && element.parentNode ? SelectorEngine__default.default.find(SELECTOR_ITEM, element.parentNode) : [];
this._items = element && element.parentNode ? SelectorEngine__default['default'].find(SELECTOR_ITEM, element.parentNode) : [];
return this._items.indexOf(element);
}
_getItemByOrder(order, activeElement) {
const isNext = order === ORDER_NEXT;
return getNextActiveElement(this._items, activeElement, isNext, this._config.wrap);
const isPrev = order === ORDER_PREV;
const activeIndex = this._getItemIndex(activeElement);
const lastItemIndex = this._items.length - 1;
const isGoingToWrap = isPrev && activeIndex === 0 || isNext && activeIndex === lastItemIndex;
if (isGoingToWrap && !this._config.wrap) {
return activeElement;
}
const delta = isPrev ? -1 : 1;
const itemIndex = (activeIndex + delta) % this._items.length;
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
}
_triggerSlideEvent(relatedTarget, eventDirectionName) {
const targetIndex = this._getItemIndex(relatedTarget);
const fromIndex = this._getItemIndex(SelectorEngine__default.default.findOne(SELECTOR_ACTIVE_ITEM, this._element));
const fromIndex = this._getItemIndex(SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element));
return EventHandler__default.default.trigger(this._element, EVENT_SLIDE, {
return EventHandler__default['default'].trigger(this._element, EVENT_SLIDE, {
relatedTarget,
direction: eventDirectionName,
from: fromIndex,
@@ -512,10 +523,10 @@
_setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
const activeIndicator = SelectorEngine__default.default.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
const activeIndicator = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE, this._indicatorsElement);
activeIndicator.classList.remove(CLASS_NAME_ACTIVE);
activeIndicator.removeAttribute('aria-current');
const indicators = SelectorEngine__default.default.find(SELECTOR_INDICATOR, this._indicatorsElement);
const indicators = SelectorEngine__default['default'].find(SELECTOR_INDICATOR, this._indicatorsElement);
for (let i = 0; i < indicators.length; i++) {
if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {
@@ -528,7 +539,7 @@
}
_updateInterval() {
const element = this._activeElement || SelectorEngine__default.default.findOne(SELECTOR_ACTIVE_ITEM, this._element);
const element = this._activeElement || SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
if (!element) {
return;
@@ -547,7 +558,7 @@
_slide(directionOrOrder, element) {
const order = this._directionToOrder(directionOrOrder);
const activeElement = SelectorEngine__default.default.findOne(SELECTOR_ACTIVE_ITEM, this._element);
const activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
const activeElementIndex = this._getItemIndex(activeElement);
@@ -567,10 +578,6 @@
return;
}
if (this._isSliding) {
return;
}
const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
if (slideEvent.defaultPrevented) {
@@ -592,35 +599,37 @@
this._activeElement = nextElement;
const triggerSlidEvent = () => {
EventHandler__default.default.trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
};
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
const completeCallBack = () => {
const transitionDuration = getTransitionDurationFromElement(activeElement);
EventHandler__default['default'].one(activeElement, 'transitionend', () => {
nextElement.classList.remove(directionalClassName, orderClassName);
nextElement.classList.add(CLASS_NAME_ACTIVE);
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
this._isSliding = false;
setTimeout(triggerSlidEvent, 0);
};
this._queueCallback(completeCallBack, activeElement, true);
setTimeout(() => {
EventHandler__default['default'].trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}, 0);
});
emulateTransitionEnd(activeElement, transitionDuration);
} else {
activeElement.classList.remove(CLASS_NAME_ACTIVE);
nextElement.classList.add(CLASS_NAME_ACTIVE);
this._isSliding = false;
triggerSlidEvent();
EventHandler__default['default'].trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}
if (isCycling) {
@@ -654,10 +663,10 @@
static carouselInterface(element, config) {
const data = Carousel.getOrCreateInstance(element, config);
let {
_config
} = data;
let data = Data__default['default'].get(element, DATA_KEY);
let _config = { ...Default,
...Manipulator__default['default'].getDataAttributes(element)
};
if (typeof config === 'object') {
_config = { ..._config,
@@ -667,6 +676,10 @@
const action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(element, _config);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
@@ -694,8 +707,8 @@
return;
}
const config = { ...Manipulator__default.default.getDataAttributes(target),
...Manipulator__default.default.getDataAttributes(this)
const config = { ...Manipulator__default['default'].getDataAttributes(target),
...Manipulator__default['default'].getDataAttributes(this)
};
const slideIndex = this.getAttribute('data-bs-slide-to');
@@ -706,7 +719,7 @@
Carousel.carouselInterface(target, config);
if (slideIndex) {
Carousel.getInstance(target).to(slideIndex);
Data__default['default'].get(target, DATA_KEY).to(slideIndex);
}
event.preventDefault();
@@ -720,12 +733,12 @@
*/
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
EventHandler__default.default.on(window, EVENT_LOAD_DATA_API, () => {
const carousels = SelectorEngine__default.default.find(SELECTOR_DATA_RIDE);
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, () => {
const carousels = SelectorEngine__default['default'].find(SELECTOR_DATA_RIDE);
for (let i = 0, len = carousels.length; i < len; i++) {
Carousel.carouselInterface(carousels[i], Carousel.getInstance(carousels[i]));
Carousel.carouselInterface(carousels[i], Data__default['default'].get(carousels[i], DATA_KEY));
}
});
/**
@@ -735,9 +748,9 @@
* add .Carousel to jQuery only if jQuery is present
*/
defineJQueryPlugin(Carousel);
defineJQueryPlugin(NAME, Carousel);
return Carousel;
}));
})));
//# sourceMappingURL=carousel.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+198 -142
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap collapse.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap collapse.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -7,22 +7,24 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
})(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): util/index.js
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const MILLISECONDS_MULTIPLIER = 1000;
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
const toType = obj => {
if (obj === null || obj === undefined) {
@@ -71,29 +73,51 @@
return selector ? document.querySelector(selector) : null;
};
const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
const getTransitionDurationFromElement = element => {
if (!element) {
return 0;
} // Get transition-duration of the element
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
let {
transitionDuration,
transitionDelay
} = window.getComputedStyle(element);
const floatTransitionDuration = Number.parseFloat(transitionDuration);
const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
const triggerTransitionEnd = element => {
element.dispatchEvent(new Event(TRANSITION_END));
};
const isElement = obj => (obj[0] || obj).nodeType;
const emulateTransitionEnd = (element, duration) => {
let called = false;
const durationPadding = 5;
const emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
if (typeof obj === 'string' && obj.length > 0) {
return document.querySelector(obj);
}
return null;
element.addEventListener(TRANSITION_END, listener);
setTimeout(() => {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
const typeCheckConfig = (componentName, config, configTypes) => {
@@ -107,20 +131,8 @@
}
});
};
/**
* Trick to restart an element's animation
*
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => {
// eslint-disable-next-line no-unused-expressions
element.offsetHeight;
};
const reflow = element => element.offsetHeight;
const getjQuery = () => {
const {
@@ -134,30 +146,20 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
};
const defineJQueryPlugin = plugin => {
const defineJQueryPlugin = (name, plugin) => {
onDOMContentLoaded(() => {
const $ = getjQuery();
/* istanbul ignore if */
if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin;
@@ -172,7 +174,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): collapse.js
* Bootstrap (v5.0.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -188,11 +190,11 @@
const DATA_API_KEY = '.data-api';
const Default = {
toggle: true,
parent: null
parent: ''
};
const DefaultType = {
toggle: 'boolean',
parent: '(null|element)'
parent: '(string|element)'
};
const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`;
@@ -203,11 +205,9 @@
const CLASS_NAME_COLLAPSE = 'collapse';
const CLASS_NAME_COLLAPSING = 'collapsing';
const CLASS_NAME_COLLAPSED = 'collapsed';
const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
const WIDTH = 'width';
const HEIGHT = 'height';
const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
const SELECTOR_ACTIVES = '.show, .collapsing';
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]';
/**
* ------------------------------------------------------------------------
@@ -215,18 +215,18 @@
* ------------------------------------------------------------------------
*/
class Collapse extends BaseComponent__default.default {
class Collapse extends BaseComponent__default['default'] {
constructor(element, config) {
super(element);
this._isTransitioning = false;
this._config = this._getConfig(config);
this._triggerArray = [];
const toggleList = SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE);
this._triggerArray = SelectorEngine__default['default'].find(`${SELECTOR_DATA_TOGGLE}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE}[data-bs-target="#${this._element.id}"]`);
const toggleList = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
for (let i = 0, len = toggleList.length; i < len; i++) {
const elem = toggleList[i];
const selector = getSelectorFromElement(elem);
const filterElement = SelectorEngine__default.default.find(selector).filter(foundElem => foundElem === this._element);
const filterElement = SelectorEngine__default['default'].find(selector).filter(foundElem => foundElem === this._element);
if (selector !== null && filterElement.length) {
this._selector = selector;
@@ -235,10 +235,10 @@
}
}
this._initializeChildren();
this._parent = this._config.parent ? this._getParent() : null;
if (!this._config.parent) {
this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
}
if (this._config.toggle) {
@@ -251,13 +251,13 @@
return Default;
}
static get NAME() {
return NAME;
static get DATA_KEY() {
return DATA_KEY;
} // Public
toggle() {
if (this._isShown()) {
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this.hide();
} else {
this.show();
@@ -265,46 +265,55 @@
}
show() {
if (this._isTransitioning || this._isShown()) {
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
let actives = [];
let actives;
let activesData;
if (this._config.parent) {
const children = SelectorEngine__default.default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
actives = SelectorEngine__default.default.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
if (this._parent) {
actives = SelectorEngine__default['default'].find(SELECTOR_ACTIVES, this._parent).filter(elem => {
if (typeof this._config.parent === 'string') {
return elem.getAttribute('data-bs-parent') === this._config.parent;
}
return elem.classList.contains(CLASS_NAME_COLLAPSE);
});
if (actives.length === 0) {
actives = null;
}
}
const container = SelectorEngine__default.default.findOne(this._selector);
const container = SelectorEngine__default['default'].findOne(this._selector);
if (actives.length) {
if (actives) {
const tempActiveData = actives.find(elem => container !== elem);
activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;
activesData = tempActiveData ? Data__default['default'].get(tempActiveData, DATA_KEY) : null;
if (activesData && activesData._isTransitioning) {
return;
}
}
const startEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW);
const startEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW);
if (startEvent.defaultPrevented) {
return;
}
actives.forEach(elemActive => {
if (container !== elemActive) {
Collapse.getOrCreateInstance(elemActive, {
toggle: false
}).hide();
}
if (actives) {
actives.forEach(elemActive => {
if (container !== elemActive) {
Collapse.collapseInterface(elemActive, 'hide');
}
if (!activesData) {
Data__default.default.set(elemActive, DATA_KEY, null);
}
});
if (!activesData) {
Data__default['default'].set(elemActive, DATA_KEY, null);
}
});
}
const dimension = this._getDimension();
@@ -314,35 +323,39 @@
this._element.style[dimension] = 0;
this._addAriaAndCollapsedClass(this._triggerArray, true);
if (this._triggerArray.length) {
this._triggerArray.forEach(element => {
element.classList.remove(CLASS_NAME_COLLAPSED);
element.setAttribute('aria-expanded', true);
});
}
this._isTransitioning = true;
this.setTransitioning(true);
const complete = () => {
this._isTransitioning = false;
this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
this._element.style[dimension] = '';
EventHandler__default.default.trigger(this._element, EVENT_SHOWN);
this.setTransitioning(false);
EventHandler__default['default'].trigger(this._element, EVENT_SHOWN);
};
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
const scrollSize = `scroll${capitalizedDimension}`;
this._queueCallback(complete, this._element, true);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = `${this._element[scrollSize]}px`;
}
hide() {
if (this._isTransitioning || !this._isShown()) {
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
const startEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);
const startEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
if (startEvent.defaultPrevented) {
return;
@@ -359,73 +372,92 @@
const triggerArrayLength = this._triggerArray.length;
for (let i = 0; i < triggerArrayLength; i++) {
const trigger = this._triggerArray[i];
const elem = getElementFromSelector(trigger);
if (triggerArrayLength > 0) {
for (let i = 0; i < triggerArrayLength; i++) {
const trigger = this._triggerArray[i];
const elem = getElementFromSelector(trigger);
if (elem && !this._isShown(elem)) {
this._addAriaAndCollapsedClass([trigger], false);
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
trigger.classList.add(CLASS_NAME_COLLAPSED);
trigger.setAttribute('aria-expanded', false);
}
}
}
this._isTransitioning = true;
this.setTransitioning(true);
const complete = () => {
this._isTransitioning = false;
this.setTransitioning(false);
this._element.classList.remove(CLASS_NAME_COLLAPSING);
this._element.classList.add(CLASS_NAME_COLLAPSE);
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);
EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
};
this._element.style[dimension] = '';
this._queueCallback(complete, this._element, true);
const transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler__default['default'].one(this._element, 'transitionend', complete);
emulateTransitionEnd(this._element, transitionDuration);
}
_isShown(element = this._element) {
return element.classList.contains(CLASS_NAME_SHOW);
setTransitioning(isTransitioning) {
this._isTransitioning = isTransitioning;
}
dispose() {
super.dispose();
this._config = null;
this._parent = null;
this._triggerArray = null;
this._isTransitioning = null;
} // Private
_getConfig(config) {
config = { ...Default,
...Manipulator__default.default.getDataAttributes(this._element),
...config
};
config.toggle = Boolean(config.toggle); // Coerce string values
config.parent = getElement(config.parent);
typeCheckConfig(NAME, config, DefaultType);
return config;
}
_getDimension() {
return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
}
_initializeChildren() {
if (!this._config.parent) {
return;
_getParent() {
let {
parent
} = this._config;
if (isElement(parent)) {
// it's a jQuery object
if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
parent = parent[0];
}
} else {
parent = SelectorEngine__default['default'].findOne(parent);
}
const children = SelectorEngine__default.default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent="${parent}"]`;
SelectorEngine__default['default'].find(selector, parent).forEach(element => {
const selected = getElementFromSelector(element);
if (selected) {
this._addAriaAndCollapsedClass([element], this._isShown(selected));
}
this._addAriaAndCollapsedClass(selected, [element]);
});
return parent;
}
_addAriaAndCollapsedClass(triggerArray, isOpen) {
if (!triggerArray.length) {
_addAriaAndCollapsedClass(element, triggerArray) {
if (!element || !triggerArray.length) {
return;
}
const isOpen = element.classList.contains(CLASS_NAME_SHOW);
triggerArray.forEach(elem => {
if (isOpen) {
elem.classList.remove(CLASS_NAME_COLLAPSED);
@@ -438,23 +470,33 @@
} // Static
static collapseInterface(element, config) {
let data = Data__default['default'].get(element, DATA_KEY);
const _config = { ...Default,
...Manipulator__default['default'].getDataAttributes(element),
...(typeof config === 'object' && config ? config : {})
};
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false;
}
if (!data) {
data = new Collapse(element, _config);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}
}
static jQueryInterface(config) {
return this.each(function () {
const _config = {};
if (typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false;
}
const data = Collapse.getOrCreateInstance(this, _config);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}
Collapse.collapseInterface(this, config);
});
}
@@ -466,18 +508,32 @@
*/
EventHandler__default.default.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
if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
event.preventDefault();
}
const triggerData = Manipulator__default['default'].getDataAttributes(this);
const selector = getSelectorFromElement(this);
const selectorElements = SelectorEngine__default.default.find(selector);
const selectorElements = SelectorEngine__default['default'].find(selector);
selectorElements.forEach(element => {
Collapse.getOrCreateInstance(element, {
toggle: false
}).toggle();
const data = Data__default['default'].get(element, DATA_KEY);
let config;
if (data) {
// update parent attribute
if (data._parent === null && typeof triggerData.parent === 'string') {
data._config.parent = triggerData.parent;
data._parent = data._getParent();
}
config = 'toggle';
} else {
config = triggerData;
}
Collapse.collapseInterface(element, config);
});
});
/**
@@ -487,9 +543,9 @@
* add .Collapse to jQuery only if jQuery is present
*/
defineJQueryPlugin(Collapse);
defineJQueryPlugin(NAME, Collapse);
return Collapse;
}));
})));
//# sourceMappingURL=collapse.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap data.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap data.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -7,11 +7,11 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Data = factory());
})(this, (function () { 'use strict';
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): dom/data.js
* Bootstrap (v5.0.0): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -22,7 +22,7 @@
* ------------------------------------------------------------------------
*/
const elementMap = new Map();
const data = {
var data = {
set(element, key, instance) {
if (!elementMap.has(element)) {
elementMap.set(element, new Map());
@@ -65,5 +65,5 @@
return data;
}));
})));
//# sourceMappingURL=data.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\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;EACA;EACA;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAJ,EAAnB;AAEA,eAAe;EACbC,EAAAA,GAAG,CAACC,OAAD,EAAUC,GAAV,EAAeC,QAAf,EAAyB;EAC1B,QAAI,CAACL,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5BH,MAAAA,UAAU,CAACE,GAAX,CAAeC,OAAf,EAAwB,IAAIF,GAAJ,EAAxB;EACD;;EAED,UAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAL0B;EAQ1B;;EACA,QAAI,CAACI,WAAW,CAACD,GAAZ,CAAgBF,GAAhB,CAAD,IAAyBG,WAAW,CAACE,IAAZ,KAAqB,CAAlD,EAAqD;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAR,CAAe,+EAA8EC,KAAK,CAACC,IAAN,CAAWN,WAAW,CAACO,IAAZ,EAAX,EAA+B,CAA/B,CAAkC,GAA/H;EACA;EACD;;EAEDP,IAAAA,WAAW,CAACL,GAAZ,CAAgBE,GAAhB,EAAqBC,QAArB;EACD,GAjBY;;EAmBbG,EAAAA,GAAG,CAACL,OAAD,EAAUC,GAAV,EAAe;EAChB,QAAIJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAJ,EAA6B;EAC3B,aAAOH,UAAU,CAACQ,GAAX,CAAeL,OAAf,EAAwBK,GAAxB,CAA4BJ,GAA5B,KAAoC,IAA3C;EACD;;EAED,WAAO,IAAP;EACD,GAzBY;;EA2BbW,EAAAA,MAAM,CAACZ,OAAD,EAAUC,GAAV,EAAe;EACnB,QAAI,CAACJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5B;EACD;;EAED,UAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB;EAEAI,IAAAA,WAAW,CAACS,MAAZ,CAAmBZ,GAAnB,EAPmB;;EAUnB,QAAIG,WAAW,CAACE,IAAZ,KAAqB,CAAzB,EAA4B;EAC1BT,MAAAA,UAAU,CAACgB,MAAX,CAAkBb,OAAlB;EACD;EACF;;EAxCY,CAAf;;;;;;;;"}
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\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;EACA;EACA;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAJ,EAAnB;AAEA,aAAe;EACbC,EAAAA,GAAG,CAACC,OAAD,EAAUC,GAAV,EAAeC,QAAf,EAAyB;EAC1B,QAAI,CAACL,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5BH,MAAAA,UAAU,CAACE,GAAX,CAAeC,OAAf,EAAwB,IAAIF,GAAJ,EAAxB;EACD;;EAED,UAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB,CAL0B;EAQ1B;;EACA,QAAI,CAACI,WAAW,CAACD,GAAZ,CAAgBF,GAAhB,CAAD,IAAyBG,WAAW,CAACE,IAAZ,KAAqB,CAAlD,EAAqD;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAR,CAAe,+EAA8EC,KAAK,CAACC,IAAN,CAAWN,WAAW,CAACO,IAAZ,EAAX,EAA+B,CAA/B,CAAkC,GAA/H;EACA;EACD;;EAEDP,IAAAA,WAAW,CAACL,GAAZ,CAAgBE,GAAhB,EAAqBC,QAArB;EACD,GAjBY;;EAmBbG,EAAAA,GAAG,CAACL,OAAD,EAAUC,GAAV,EAAe;EAChB,QAAIJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAJ,EAA6B;EAC3B,aAAOH,UAAU,CAACQ,GAAX,CAAeL,OAAf,EAAwBK,GAAxB,CAA4BJ,GAA5B,KAAoC,IAA3C;EACD;;EAED,WAAO,IAAP;EACD,GAzBY;;EA2BbW,EAAAA,MAAM,CAACZ,OAAD,EAAUC,GAAV,EAAe;EACnB,QAAI,CAACJ,UAAU,CAACM,GAAX,CAAeH,OAAf,CAAL,EAA8B;EAC5B;EACD;;EAED,UAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAX,CAAeL,OAAf,CAApB;EAEAI,IAAAA,WAAW,CAACS,MAAZ,CAAmBZ,GAAnB,EAPmB;;EAUnB,QAAIG,WAAW,CAACE,IAAZ,KAAqB,CAAzB,EAA4B;EAC1BT,MAAAA,UAAU,CAACgB,MAAX,CAAkBb,OAAlB;EACD;EACF;;EAxCY,CAAf;;;;;;;;"}
+6 -5
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap event-handler.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap event-handler.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -7,11 +7,11 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory());
})(this, (function () { 'use strict';
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): util/index.js
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -30,7 +30,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): dom/event-handler.js
* Bootstrap (v5.0.0): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -93,6 +93,7 @@
event.delegateTarget = target;
if (handler.oneOff) {
// eslint-disable-next-line unicorn/consistent-destructuring
EventHandler.off(element, event.type, selector, fn);
}
@@ -318,5 +319,5 @@
return EventHandler;
}));
})));
//# sourceMappingURL=event-handler.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -6
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap manipulator.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap manipulator.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -7,11 +7,11 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Manipulator = factory());
})(this, (function () { 'use strict';
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): dom/manipulator.js
* Bootstrap (v5.0.0): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -69,8 +69,8 @@
offset(element) {
const rect = element.getBoundingClientRect();
return {
top: rect.top + window.pageYOffset,
left: rect.left + window.pageXOffset
top: rect.top + document.body.scrollTop,
left: rect.left + document.body.scrollLeft
};
},
@@ -85,5 +85,5 @@
return Manipulator;
}));
})));
//# sourceMappingURL=manipulator.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\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\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\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 offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + window.pageYOffset,\n left: rect.left + window.pageXOffset\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","window","pageYOffset","left","pageXOffset","position","offsetTop","offsetLeft"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsBC,GAAG,IAAK,IAAGA,GAAG,CAACC,WAAJ,EAAkB,EAAnD,CAAP;EACD;;QAEKC,WAAW,GAAG;EAClBC,EAAAA,gBAAgB,CAACC,OAAD,EAAUN,GAAV,EAAeO,KAAf,EAAsB;EACpCD,IAAAA,OAAO,CAACE,YAAR,CAAsB,WAAUT,gBAAgB,CAACC,GAAD,CAAM,EAAtD,EAAyDO,KAAzD;EACD,GAHiB;;EAKlBE,EAAAA,mBAAmB,CAACH,OAAD,EAAUN,GAAV,EAAe;EAChCM,IAAAA,OAAO,CAACI,eAAR,CAAyB,WAAUX,gBAAgB,CAACC,GAAD,CAAM,EAAzD;EACD,GAPiB;;EASlBW,EAAAA,iBAAiB,CAACL,OAAD,EAAU;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,UAAMM,UAAU,GAAG,EAAnB;EAEAC,IAAAA,MAAM,CAACC,IAAP,CAAYR,OAAO,CAACS,OAApB,EACGC,MADH,CACUhB,GAAG,IAAIA,GAAG,CAACiB,UAAJ,CAAe,IAAf,CADjB,EAEGC,OAFH,CAEWlB,GAAG,IAAI;EACd,UAAImB,OAAO,GAAGnB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd;EACAkB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBjB,WAAlB,KAAkCgB,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsBxB,aAAa,CAACW,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC;EACD,KANH;EAQA,WAAOY,UAAP;EACD,GAzBiB;;EA2BlBW,EAAAA,gBAAgB,CAACjB,OAAD,EAAUN,GAAV,EAAe;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACkB,YAAR,CAAsB,WAAUzB,gBAAgB,CAACC,GAAD,CAAM,EAAtD,CAAD,CAApB;EACD,GA7BiB;;EA+BlByB,EAAAA,MAAM,CAACnB,OAAD,EAAU;EACd,UAAMoB,IAAI,GAAGpB,OAAO,CAACqB,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,MAAM,CAACC,WADlB;EAELC,MAAAA,IAAI,EAAEL,IAAI,CAACK,IAAL,GAAYF,MAAM,CAACG;EAFpB,KAAP;EAID,GAtCiB;;EAwClBC,EAAAA,QAAQ,CAAC3B,OAAD,EAAU;EAChB,WAAO;EACLsB,MAAAA,GAAG,EAAEtB,OAAO,CAAC4B,SADR;EAELH,MAAAA,IAAI,EAAEzB,OAAO,CAAC6B;EAFT,KAAP;EAID;;EA7CiB;;;;;;;;"}
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\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\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\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 offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","Object","keys","dataset","filter","startsWith","forEach","pureKey","charAt","slice","length","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsBC,GAAG,IAAK,IAAGA,GAAG,CAACC,WAAJ,EAAkB,EAAnD,CAAP;EACD;;QAEKC,WAAW,GAAG;EAClBC,EAAAA,gBAAgB,CAACC,OAAD,EAAUN,GAAV,EAAeO,KAAf,EAAsB;EACpCD,IAAAA,OAAO,CAACE,YAAR,CAAsB,WAAUT,gBAAgB,CAACC,GAAD,CAAM,EAAtD,EAAyDO,KAAzD;EACD,GAHiB;;EAKlBE,EAAAA,mBAAmB,CAACH,OAAD,EAAUN,GAAV,EAAe;EAChCM,IAAAA,OAAO,CAACI,eAAR,CAAyB,WAAUX,gBAAgB,CAACC,GAAD,CAAM,EAAzD;EACD,GAPiB;;EASlBW,EAAAA,iBAAiB,CAACL,OAAD,EAAU;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,UAAMM,UAAU,GAAG,EAAnB;EAEAC,IAAAA,MAAM,CAACC,IAAP,CAAYR,OAAO,CAACS,OAApB,EACGC,MADH,CACUhB,GAAG,IAAIA,GAAG,CAACiB,UAAJ,CAAe,IAAf,CADjB,EAEGC,OAFH,CAEWlB,GAAG,IAAI;EACd,UAAImB,OAAO,GAAGnB,GAAG,CAACC,OAAJ,CAAY,KAAZ,EAAmB,EAAnB,CAAd;EACAkB,MAAAA,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,CAAf,EAAkBjB,WAAlB,KAAkCgB,OAAO,CAACE,KAAR,CAAc,CAAd,EAAiBF,OAAO,CAACG,MAAzB,CAA5C;EACAV,MAAAA,UAAU,CAACO,OAAD,CAAV,GAAsBxB,aAAa,CAACW,OAAO,CAACS,OAAR,CAAgBf,GAAhB,CAAD,CAAnC;EACD,KANH;EAQA,WAAOY,UAAP;EACD,GAzBiB;;EA2BlBW,EAAAA,gBAAgB,CAACjB,OAAD,EAAUN,GAAV,EAAe;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACkB,YAAR,CAAsB,WAAUzB,gBAAgB,CAACC,GAAD,CAAM,EAAtD,CAAD,CAApB;EACD,GA7BiB;;EA+BlByB,EAAAA,MAAM,CAACnB,OAAD,EAAU;EACd,UAAMoB,IAAI,GAAGpB,OAAO,CAACqB,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,QAAQ,CAACC,IAAT,CAAcC,SADzB;EAELC,MAAAA,IAAI,EAAEN,IAAI,CAACM,IAAL,GAAYH,QAAQ,CAACC,IAAT,CAAcG;EAF3B,KAAP;EAID,GAtCiB;;EAwClBC,EAAAA,QAAQ,CAAC5B,OAAD,EAAU;EAChB,WAAO;EACLsB,MAAAA,GAAG,EAAEtB,OAAO,CAAC6B,SADR;EAELH,MAAAA,IAAI,EAAE1B,OAAO,CAAC8B;EAFT,KAAP;EAID;;EA7CiB;;;;;;;;"}
+7 -49
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap selector-engine.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap selector-engine.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -7,56 +7,19 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory());
})(this, (function () { 'use strict';
}(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): util/index.js
* Bootstrap (v5.0.0): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const isVisible = element => {
if (!isElement(element) || element.getClientRects().length === 0) {
return false;
}
return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
};
const isDisabled = element => {
if (!element || element.nodeType !== Node.ELEMENT_NODE) {
return true;
}
if (element.classList.contains('disabled')) {
return true;
}
if (typeof element.disabled !== 'undefined') {
return element.disabled;
}
return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
@@ -113,16 +76,11 @@
}
return [];
},
focusableChildren(element) {
const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(', ');
return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
}
};
return SelectorEngine;
}));
})));
//# sourceMappingURL=selector-engine.js.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+163 -173
View File
@@ -1,43 +1,46 @@
/*!
* Bootstrap dropdown.js v5.1.3 (https://getbootstrap.com/)
* Bootstrap dropdown.js v5.0.0 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
})(this, (function (Popper, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js'), require('./base-component.js')) :
typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/data', './dom/event-handler', './dom/manipulator', './dom/selector-engine', './base-component'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine, global.Base));
}(this, (function (Popper, Data, EventHandler, Manipulator, SelectorEngine, BaseComponent) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
const n = Object.create(null);
var n = Object.create(null);
if (e) {
for (const k in e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
const d = Object.getOwnPropertyDescriptor(e, k);
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: () => e[k]
get: function () {
return e[k];
}
});
}
}
});
}
n.default = e;
n['default'] = e;
return Object.freeze(n);
}
const Popper__namespace = /*#__PURE__*/_interopNamespace(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);
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): util/index.js
* Bootstrap (v5.0.0): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -79,30 +82,7 @@
return selector ? document.querySelector(selector) : null;
};
const isElement = obj => {
if (!obj || typeof obj !== 'object') {
return false;
}
if (typeof obj.jquery !== 'undefined') {
obj = obj[0];
}
return typeof obj.nodeType !== 'undefined';
};
const getElement = obj => {
if (isElement(obj)) {
// it's a jQuery object or a node element
return obj.jquery ? obj[0] : obj;
}
if (typeof obj === 'string' && obj.length > 0) {
return document.querySelector(obj);
}
return null;
};
const isElement = obj => (obj[0] || obj).nodeType;
const typeCheckConfig = (componentName, config, configTypes) => {
Object.keys(configTypes).forEach(property => {
@@ -117,11 +97,17 @@
};
const isVisible = element => {
if (!isElement(element) || element.getClientRects().length === 0) {
if (!element) {
return false;
}
return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
if (element.style && element.parentNode && element.parentNode.style) {
const elementStyle = getComputedStyle(element);
const parentNodeStyle = getComputedStyle(element.parentNode);
return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
}
return false;
};
const isDisabled = element => {
@@ -154,18 +140,9 @@
return null;
};
const DOMContentLoadedCallbacks = [];
const onDOMContentLoaded = callback => {
if (document.readyState === 'loading') {
// add listener on the first call when the document is in loading state
if (!DOMContentLoadedCallbacks.length) {
document.addEventListener('DOMContentLoaded', () => {
DOMContentLoadedCallbacks.forEach(callback => callback());
});
}
DOMContentLoadedCallbacks.push(callback);
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
@@ -173,13 +150,12 @@
const isRTL = () => document.documentElement.dir === 'rtl';
const defineJQueryPlugin = plugin => {
const defineJQueryPlugin = (name, plugin) => {
onDOMContentLoaded(() => {
const $ = getjQuery();
/* istanbul ignore if */
if ($) {
const name = plugin.NAME;
const JQUERY_NO_CONFLICT = $.fn[name];
$.fn[name] = plugin.jQueryInterface;
$.fn[name].Constructor = plugin;
@@ -191,37 +167,10 @@
}
});
};
/**
* Return the previous/next element of a list.
*
* @param {array} list The list of elements
* @param activeElement The active element
* @param shouldGetNext Choose to get next or previous element
* @param isCycleAllowed
* @return {Element|elem} The proper element
*/
const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
let index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed
if (index === -1) {
return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0];
}
const listLength = list.length;
index += shouldGetNext ? 1 : -1;
if (isCycleAllowed) {
index = (index + listLength) % listLength;
}
return list[Math.max(0, Math.min(index, listLength - 1))];
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.3): dropdown.js
* Bootstrap (v5.0.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -247,6 +196,7 @@
const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
const EVENT_SHOW = `show${EVENT_KEY}`;
const EVENT_SHOWN = `shown${EVENT_KEY}`;
const EVENT_CLICK = `click${EVENT_KEY}`;
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`;
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`;
@@ -287,13 +237,15 @@
* ------------------------------------------------------------------------
*/
class Dropdown extends BaseComponent__default.default {
class Dropdown extends BaseComponent__default['default'] {
constructor(element, config) {
super(element);
this._popper = null;
this._config = this._getConfig(config);
this._menu = this._getMenuElement();
this._inNavbar = this._detectNavbar();
this._addEventListeners();
} // Getters
@@ -305,35 +257,71 @@
return DefaultType;
}
static get NAME() {
return NAME;
static get DATA_KEY() {
return DATA_KEY;
} // Public
toggle() {
return this._isShown() ? this.hide() : this.show();
if (isDisabled(this._element)) {
return;
}
const isActive = this._element.classList.contains(CLASS_NAME_SHOW);
if (isActive) {
this.hide();
return;
}
this.show();
}
show() {
if (isDisabled(this._element) || this._isShown(this._menu)) {
if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW)) {
return;
}
const parent = Dropdown.getParentFromElement(this._element);
const relatedTarget = {
relatedTarget: this._element
};
const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW, relatedTarget);
const showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, relatedTarget);
if (showEvent.defaultPrevented) {
return;
}
} // Totally disable Popper for Dropdowns in Navbar
const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar
if (this._inNavbar) {
Manipulator__default.default.setDataAttribute(this._menu, 'popper', 'none');
Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'none');
} else {
this._createPopper(parent);
if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element
if (typeof this._config.reference.jquery !== 'undefined') {
referenceElement = this._config.reference[0];
}
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'static');
}
} // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
@@ -341,22 +329,22 @@
if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
[].concat(...document.body.children).forEach(elem => EventHandler__default.default.on(elem, 'mouseover', noop));
[].concat(...document.body.children).forEach(elem => EventHandler__default['default'].on(elem, 'mouseover', noop));
}
this._element.focus();
this._element.setAttribute('aria-expanded', true);
this._menu.classList.add(CLASS_NAME_SHOW);
this._menu.classList.toggle(CLASS_NAME_SHOW);
this._element.classList.add(CLASS_NAME_SHOW);
this._element.classList.toggle(CLASS_NAME_SHOW);
EventHandler__default.default.trigger(this._element, EVENT_SHOWN, relatedTarget);
EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, relatedTarget);
}
hide() {
if (isDisabled(this._element) || !this._isShown(this._menu)) {
if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {
return;
}
@@ -368,8 +356,12 @@
}
dispose() {
this._menu = null;
if (this._popper) {
this._popper.destroy();
this._popper = null;
}
super.dispose();
@@ -384,8 +376,15 @@
} // Private
_addEventListeners() {
EventHandler__default['default'].on(this._element, EVENT_CLICK, event => {
event.preventDefault();
this.toggle();
});
}
_completeHide(relatedTarget) {
const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE, relatedTarget);
const hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE, relatedTarget);
if (hideEvent.defaultPrevented) {
return;
@@ -394,7 +393,7 @@
if ('ontouchstart' in document.documentElement) {
[].concat(...document.body.children).forEach(elem => EventHandler__default.default.off(elem, 'mouseover', noop));
[].concat(...document.body.children).forEach(elem => EventHandler__default['default'].off(elem, 'mouseover', noop));
}
if (this._popper) {
@@ -407,13 +406,13 @@
this._element.setAttribute('aria-expanded', 'false');
Manipulator__default.default.removeDataAttribute(this._menu, 'popper');
EventHandler__default.default.trigger(this._element, EVENT_HIDDEN, relatedTarget);
Manipulator__default['default'].removeDataAttribute(this._menu, 'popper');
EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN, relatedTarget);
}
_getConfig(config) {
config = { ...this.constructor.Default,
...Manipulator__default.default.getDataAttributes(this._element),
...Manipulator__default['default'].getDataAttributes(this._element),
...config
};
typeCheckConfig(NAME, config, this.constructor.DefaultType);
@@ -426,37 +425,8 @@
return config;
}
_createPopper(parent) {
if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (isElement(this._config.reference)) {
referenceElement = getElement(this._config.reference);
} else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference;
}
const popperConfig = this._getPopperConfig();
const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
if (isDisplayStatic) {
Manipulator__default.default.setDataAttribute(this._menu, 'popper', 'static');
}
}
_isShown(element = this._element) {
return element.classList.contains(CLASS_NAME_SHOW);
}
_getMenuElement() {
return SelectorEngine__default.default.next(this._element, SELECTOR_MENU)[0];
return SelectorEngine__default['default'].next(this._element, SELECTOR_MENU)[0];
}
_getPlacement() {
@@ -528,53 +498,75 @@
};
}
_selectMenuItem({
key,
target
}) {
const items = SelectorEngine__default.default.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
_selectMenuItem(event) {
const items = SelectorEngine__default['default'].find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
if (!items.length) {
return;
} // 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
}
let index = items.indexOf(event.target); // Up
if (event.key === ARROW_UP_KEY && index > 0) {
index--;
} // Down
getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus();
if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
index++;
} // index is -1 if the first keydown is an ArrowUp
index = index === -1 ? 0 : index;
items[index].focus();
} // Static
static jQueryInterface(config) {
return this.each(function () {
const data = Dropdown.getOrCreateInstance(this, config);
static dropdownInterface(element, config) {
let data = Data__default['default'].get(element, DATA_KEY);
if (typeof config !== 'string') {
return;
}
const _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(element, _config);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError(`No method named "${config}"`);
}
data[config]();
}
}
static jQueryInterface(config) {
return this.each(function () {
Dropdown.dropdownInterface(this, config);
});
}
static clearMenus(event) {
if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
return;
if (event) {
if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) {
return;
}
if (/input|select|option|textarea|form/i.test(event.target.tagName)) {
return;
}
}
const toggles = SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE);
const toggles = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
for (let i = 0, len = toggles.length; i < len; i++) {
const context = Dropdown.getInstance(toggles[i]);
const context = Data__default['default'].get(toggles[i], DATA_KEY);
if (!context || context._config.autoClose === false) {
continue;
}
if (!context._isShown()) {
if (!context._element.classList.contains(CLASS_NAME_SHOW)) {
continue;
}
@@ -588,10 +580,10 @@
if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
continue;
} // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
} // Tab navigation through the dropdown menu 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 (event.type === 'keyup' && event.key === TAB_KEY && context._menu.contains(event.target)) {
continue;
}
@@ -633,27 +625,25 @@
return;
}
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default.default.prev(this, SELECTOR_DATA_TOGGLE)[0];
const instance = Dropdown.getOrCreateInstance(getToggleButton);
const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default['default'].prev(this, SELECTOR_DATA_TOGGLE)[0];
if (event.key === ESCAPE_KEY) {
instance.hide();
getToggleButton().focus();
Dropdown.clearMenus();
return;
}
if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {
if (!isActive) {
instance.show();
}
instance._selectMenuItem(event);
if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
getToggleButton().click();
return;
}
if (!isActive || event.key === SPACE_KEY) {
Dropdown.clearMenus();
return;
}
Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
}
}
@@ -664,13 +654,13 @@
*/
EventHandler__default.default.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler);
EventHandler__default.default.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
EventHandler__default.default.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
EventHandler__default['default'].on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler);
EventHandler__default['default'].on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
EventHandler__default['default'].on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault();
Dropdown.getOrCreateInstance(this).toggle();
Dropdown.dropdownInterface(this);
});
/**
* ------------------------------------------------------------------------
@@ -679,9 +669,9 @@
* add .Dropdown to jQuery only if jQuery is present
*/
defineJQueryPlugin(Dropdown);
defineJQueryPlugin(NAME, Dropdown);
return Dropdown;
}));
})));
//# sourceMappingURL=dropdown.js.map

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