-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Cypress tests ~99% coverage * Removed V4, to be moved to a different branch * Fixing Tab issue #444 * Minor fix for Button.isActive property * Carousel no longer use touch events but a standardized pointer event listener setup * Dropdown improvements for automatic positioning * Tooltip, Popover small fixes with their shared utilities Modal and Offcanvas will use a callback for dispose() method combined with specific hide() / close() method * Minor fixes to allow working with iframes, bugs revealed by Cypress testing * Code cleanup * Update Types TO DO: * update to latest Bootstrap v5.2.0
- Loading branch information
Showing
122 changed files
with
24,155 additions
and
23,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,9 @@ jobs: | |
- uses: bahmutov/npm-install@v1 | ||
- run: npm run lint:js | ||
- run: npm run build-esm | ||
# - run: npm run test | ||
- run: npm run test | ||
|
||
# - name: Upload coverage report on Node 16 to coveralls.io... | ||
# uses: coverallsapp/[email protected] | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload coverage report on Node 16 to coveralls.io... | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
.nyc_output | ||
.npmignore | ||
.vscode | ||
node_modules | ||
experiments | ||
coverage | ||
cypress/videos | ||
cypress/screenshots | ||
cypress/coverage | ||
cypress/instrumented |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
.nyc_output | ||
.github | ||
.gitignore | ||
.vscode | ||
assets | ||
node_modules | ||
experiments | ||
docs | ||
docs | ||
coverage | ||
cypress/videos | ||
cypress/screenshots | ||
cypress/coverage | ||
cypress/instrumented |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"video": false, | ||
"screenshot": false, | ||
"env": { | ||
"sourceFolder": "src" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>BSN Testing Page</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
</head> | ||
<body class="container" style="padding: 3rem"> | ||
<h3>Alert Examples</h3> | ||
<div id="alertDemo" class="alert alert-warning alert-dismissible fade show" data-cy="alert" role="alert"> | ||
<button type="button" class="btn-close" data-bs-target="alertDemo" data-bs-dismiss="alert" aria-label="Close"></button> | ||
<b>Holy guacamole!</b> Best check yo self, you're not looking too good. | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>BSN Testing Page</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
</head> | ||
<body class="container" style="padding: 3rem"> | ||
<h3>Button Example</h3> | ||
<button type="button" class="btn btn-primary" data-bs-toggle="button" data-cy="button" aria-pressed="false">Toggle button</button> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>BSN Testing Page</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
<style> | ||
.item-bg { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 500px; | ||
} | ||
.carousel-item { transition-duration: 0.2s;} | ||
.carousel-item, | ||
.carousel { | ||
width: 100%; | ||
height: 500px; | ||
} | ||
</style> | ||
</head> | ||
<body class="container" style="padding: 3rem"> | ||
<h3>Carousel Example</h3> | ||
|
||
<div id="myCarousel" class="carousel slide" data-bs-ride="carousel" data-bs-interval="7000" data-bs-pause="hover" data-bs-keyboard="true" data-cy="carousel"> | ||
<div class="carousel-indicators"> | ||
<button aria-label="Carousel Slide 1" data-bs-target="#myCarousel" data-bs-slide-to="0"></button> | ||
<button aria-label="Carousel Slide 2" data-bs-target="#myCarousel" data-bs-slide-to="1"></button> | ||
<button aria-label="Carousel Slide 3" data-bs-target="#myCarousel" data-bs-slide-to="2"></button> | ||
</div> | ||
<div class="carousel-inner" role="listbox"> | ||
<div class="carousel-item"> | ||
<div class="item-bg bg-warning"></div> | ||
<div class="container d-flex align-items-end h-100"> | ||
<div class="position-relative text-dark text-left mb-5"> | ||
<h1>Slide 1 Title Should Be A Little Longer</h1> | ||
<p class="lead">Slide 1 Text Should Be A Little Longer.</p> | ||
<p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. | ||
Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers | ||
irure four loko, cupidatat terry richardson master cleanse.</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="carousel-item"> | ||
<div class="item-bg bg-info"></div> | ||
<div class="container d-flex align-items-end h-100"> | ||
<div class="position-relative text-dark w-100 mb-5"> | ||
<h1>Slide 2 Title Should Be A Little Longer</h1> | ||
<p class="lead">Slide 2 Text Should Be A Little Longer.</p> | ||
<p>Assumenda you probably haven't heard of them | ||
art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh | ||
mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud | ||
mlkshk brooklyn nesciunt.</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="carousel-item"> | ||
<div class="item-bg bg-danger"></div> | ||
<div class="container d-flex align-items-end h-100"> | ||
<div class="position-relative text-white text-right w-100 mb-5"> | ||
<h1>Slide 3 Title Should Be A Little Longer</h1> | ||
<p class="lead">Slide 3 Text Should Be A Little Longer.</p> | ||
<p>Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers | ||
irure four loko, cupidatat terry richardson master cleanse. Elit wolf voluptate, lo-fi ea portland before | ||
they sold out four loko</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<a class="carousel-control-prev" href="#myCarousel" role="button" data-bs-slide="prev"> | ||
<span class="carousel-control-prev-icon" aria-hidden="true"></span> | ||
<span class="visually-hidden">Previous</span> | ||
</a> | ||
<a class="carousel-control-next" href="#myCarousel" role="button" data-bs-slide="next"> | ||
<span class="carousel-control-next-icon" aria-hidden="true"></span> | ||
<span class="visually-hidden">Next</span> | ||
</a> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>BSN Testing Page</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
<style> | ||
.collapse.collapsing { transition-duration: .15s } | ||
</style> | ||
</head> | ||
<body class="container" style="padding: 3rem"> | ||
<h3>Collapse Example</h3> | ||
<p> | ||
<span class="btn-group"> | ||
<a class="btn btn-primary" data-bs-toggle="collapse" href="#collapseExample" aria-expanded="true" aria-controls="collapseExample"> | ||
HREF | ||
</a> | ||
<button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="true" aria-controls="collapseExample">data-bs-target</button> | ||
</span> | ||
</p> | ||
<div class="collapse" id="collapseExample"> | ||
<div class="card card-body mb-3"> | ||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim | ||
keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. | ||
</div> | ||
</div> | ||
|
||
<h3>Accordion Example</h3> | ||
<div class="accordion mb-3" id="accordionExample"> | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="headingOne"> | ||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne"> | ||
Accordion Item #1 | ||
</button> | ||
</h2> | ||
<div id="collapseOne" class="accordion-collapse collapse" aria-labelledby="headingOne" data-bs-parent="#accordionExample"> | ||
<div class="accordion-body"> | ||
<strong>This is the first item's accordion body.</strong> It is hidden by default, until the collapse plugin adds | ||
the appropriate classes that we use to style each element. These classes control the overall appearance, as well | ||
as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. | ||
It's also worth noting that just about any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow. | ||
</div> | ||
</div> | ||
</div> | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="headingTwo"> | ||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> | ||
Accordion Item #2 | ||
</button> | ||
</h2> | ||
<div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample"> | ||
<div class="accordion-body"> | ||
<strong>This is the second item's accordion body.</strong> It is hidden by default, until the collapse plugin adds the appropriate | ||
classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS | ||
transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about | ||
any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow. | ||
</div> | ||
</div> | ||
</div> | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="headingThree"> | ||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> | ||
Accordion Item #3 | ||
</button> | ||
</h2> | ||
<div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample"> | ||
<div class="accordion-body"> | ||
<strong>This is the third item's accordion body.</strong> It is hidden by default, until the collapse plugin adds the appropriate | ||
classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS | ||
transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about | ||
any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow. | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>BSN Testing Page</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"> | ||
<style> | ||
.form-vertical {width: 250px} | ||
</style> | ||
</head> | ||
<body class="container" style="padding: 3rem"> | ||
<h3>Dropdown Examples</h3> | ||
<div class="btn-toolbar mb-3"> | ||
<div class="btn-group dropdown me-2"> | ||
<a class="btn btn-secondary dropdown-toggle" href="#" id="dropdownButton4" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
Form | ||
</a> | ||
<form class="px-3 dropdown-menu form-vertical" aria-expanded="false" aria-labelledby="dropdownButton4"> | ||
<div class="mb-3"> | ||
<label for="inputEmail3" class="control-label">Email</label> | ||
<div class=""><input type="email" class="form-control" id="inputEmail3" placeholder="Email" autocomplete="email"></div> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="inputPassword3" class="control-label">Password</label> | ||
<div class=""><input type="password" class="form-control" id="inputPassword3" placeholder="Password" autocomplete="current-password"></div> | ||
</div> | ||
<div class="mb-3"> | ||
<div class=""> | ||
<div class="checkbox"><label><input type="checkbox"> Remember me</label></div> | ||
</div> | ||
</div> | ||
<div class="mb-3"> | ||
<div class="btn-group"><button type="submit" class="btn btn-secondary">Sign in</button></div> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="btn-group dropup me-2"> | ||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
Dropup | ||
</button> | ||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> | ||
<a class="dropdown-item" href="#">First Action</a> | ||
<a class="dropdown-item" href="#">Second Action</a> | ||
<a class="dropdown-item" href="#">Third Action</a> | ||
<a class="dropdown-item" href="#">Another Action</a> | ||
<a class="dropdown-item" href="#">Something else here</a> | ||
</div> | ||
</div> | ||
<div class="btn-group dropstart me-2"> | ||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
Menu Start | ||
</button> | ||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton1"> | ||
<a class="dropdown-item" href="#">Action</a> | ||
<a class="dropdown-item" href="#">Another action</a> | ||
<a class="dropdown-item" href="#">Something else here</a> | ||
</div> | ||
</div> | ||
<div class="btn-group dropend"> | ||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton2" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
Menu End | ||
</button> | ||
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton2"> | ||
<li><a class="dropdown-item" href="#">Action</a></li> | ||
<li><a class="dropdown-item" href="#">Another action</a></li> | ||
<li><a class="dropdown-item" href="#">Something else here</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Sets the `dir` attribute for `<html>` element. | ||
* @param {HTMLElement} element target | ||
* @param {string=} requestedDir requested language direction | ||
*/ | ||
export default function changeDirection(element, requestedDir) { | ||
const doc = element.ownerDocument; | ||
const dir = requestedDir === 'rtl' ? 'rtl' : ''; | ||
const HTML = doc.documentElement; | ||
const STYLE = doc.querySelector('link'); | ||
let HREF = 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'; | ||
// set RTL mode | ||
if (dir) { | ||
HTML.setAttribute('dir', 'rtl'); | ||
STYLE.setAttribute('href', HREF.replace('.min', '.rtl.min')); | ||
} else { | ||
HTML.removeAttribute('dir'); | ||
STYLE.setAttribute('href', HREF); | ||
} | ||
} |
Oops, something went wrong.