gd-bs 6.9.11 → 6.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/carousel/index.js +2 -2
- package/build/components/floating-ui/index.js +5 -2
- package/build/components/modal/index.js +1 -1
- package/build/components/navbar/index.js +1 -1
- package/build/components/offcanvas/index.js +1 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.js.LICENSE.txt +4 -4
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +1 -0
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.js.LICENSE.txt +4 -4
- package/dist/gd-bs.min.js +1 -1
- package/package.json +2 -2
- package/src/components/carousel/index.ts +2 -2
- package/src/components/floating-ui/index.ts +6 -2
- package/src/components/floating-ui/types.d.ts +1 -0
- package/src/components/modal/index.ts +1 -1
- package/src/components/navbar/index.ts +1 -1
- package/src/components/offcanvas/index.ts +1 -1
|
@@ -82,12 +82,12 @@ var _Carousel = /** @class */ (function (_super) {
|
|
|
82
82
|
// Add a keydown event
|
|
83
83
|
el.addEventListener("keydown", function (ev) {
|
|
84
84
|
// See if the left arrow was pressed
|
|
85
|
-
if (ev.
|
|
85
|
+
if (ev.key == "ArrowLeft" || ev.keyCode == 37) {
|
|
86
86
|
// Move to the previous slide
|
|
87
87
|
_this.previous();
|
|
88
88
|
}
|
|
89
89
|
// Else, see if the right arrow was pressed
|
|
90
|
-
else if (ev.
|
|
90
|
+
else if (ev.key == "ArrowRight" || ev.keyCode == 39) {
|
|
91
91
|
// Move tot he next slide
|
|
92
92
|
_this.next();
|
|
93
93
|
}
|
|
@@ -62,6 +62,7 @@ var _FloatingUI = /** @class */ (function () {
|
|
|
62
62
|
this._elContent = document.createElement("div");
|
|
63
63
|
this._elContent.classList.add("bs");
|
|
64
64
|
this._elContent.classList.add("floating-ui");
|
|
65
|
+
this._elContent.id = props.id || "fui-" + Date.now();
|
|
65
66
|
this._elContent.appendChild(props.elContent);
|
|
66
67
|
this._elContent.setAttribute("data-theme", this.getTheme(this._props.theme));
|
|
67
68
|
(0, common_1.setClassNames)(this._elContent, this._props.className);
|
|
@@ -352,9 +353,11 @@ var _FloatingUI = /** @class */ (function () {
|
|
|
352
353
|
_FloatingUI.prototype.hide = function () {
|
|
353
354
|
// Remove it from the document
|
|
354
355
|
this._elContent.classList.add("d-none");
|
|
355
|
-
|
|
356
|
+
// Get the element
|
|
357
|
+
var elContent = document.getElementById(this._elContent.id);
|
|
358
|
+
if (elContent) {
|
|
356
359
|
// Remove the element from the page
|
|
357
|
-
document.body.removeChild(
|
|
360
|
+
document.body.removeChild(elContent);
|
|
358
361
|
// Call the event
|
|
359
362
|
this._props.onHide ? this._props.onHide() : null;
|
|
360
363
|
}
|
|
@@ -201,7 +201,7 @@ var _Modal = /** @class */ (function (_super) {
|
|
|
201
201
|
// Add a click event
|
|
202
202
|
this.el.addEventListener("keydown", function (ev) {
|
|
203
203
|
// See if the escape key was clicked and the modal is visible
|
|
204
|
-
if (ev.
|
|
204
|
+
if ((ev.key === "Escape" || ev.keyCode == 27) && _this.isVisible) {
|
|
205
205
|
// Toggle the modal
|
|
206
206
|
_this.toggle();
|
|
207
207
|
}
|
|
@@ -127,7 +127,7 @@ var _Navbar = /** @class */ (function (_super) {
|
|
|
127
127
|
// Set a keydown event to catch the "Enter" key being pressed
|
|
128
128
|
searchbox.addEventListener("keydown", function (ev) {
|
|
129
129
|
// See if the "Enter" key was pressed
|
|
130
|
-
if (ev.
|
|
130
|
+
if (ev.key == "Enter") {
|
|
131
131
|
// Disable the postback
|
|
132
132
|
ev.preventDefault();
|
|
133
133
|
// See if there is a search event
|
|
@@ -203,7 +203,7 @@ var _Offcanvas = /** @class */ (function (_super) {
|
|
|
203
203
|
// Add a click event
|
|
204
204
|
this.el.addEventListener("keydown", function (ev) {
|
|
205
205
|
// See if the escape key was clicked and the modal is visible
|
|
206
|
-
if (ev.
|
|
206
|
+
if ((ev.key === "Escape" || ev.keyCode == 27) && _this.isVisible) {
|
|
207
207
|
// Toggle the modal
|
|
208
208
|
_this.toggle();
|
|
209
209
|
}
|