gd-bs 5.9.5 → 5.9.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "5.9.5",
3
+ "version": "5.9.7",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -50,14 +50,17 @@ export const configureParent = (component: Element, parent: Element): Element =>
50
50
  }
51
51
 
52
52
  export const setClassNames = (el: HTMLElement, className = "") => {
53
- // Set the class names
54
- let classNames = className.split(' ');
55
- for (let i = 0; i < classNames.length; i++) {
56
- // Ensure the class name exists
57
- let className = classNames[i];
58
- if (className) {
59
- // Add the class
60
- el.classList.add(className);
53
+ // Ensure the element exists
54
+ if (el) {
55
+ // Set the class names
56
+ let classNames = className.split(' ');
57
+ for (let i = 0; i < classNames.length; i++) {
58
+ // Ensure the class name exists
59
+ let className = classNames[i];
60
+ if (className) {
61
+ // Add the class
62
+ el.classList.add(className);
63
+ }
61
64
  }
62
65
  }
63
66
  }
@@ -31,7 +31,7 @@ export class NavbarItem {
31
31
 
32
32
  // Configures the item
33
33
  private configure() {
34
- let link: HTMLAnchorElement = null;
34
+ let link: HTMLAnchorElement = this._el.querySelector("a");
35
35
 
36
36
  // See if this is a dropdown
37
37
  if (this._props.items) {
@@ -60,7 +60,6 @@ export class NavbarItem {
60
60
  // Else, ensure there is text
61
61
  else if (this._props.text) {
62
62
  // Update the link
63
- link = this._el.querySelector("a");
64
63
  if (link) {
65
64
  this._props.isActive ? link.classList.add("active") : link.removeChild(link.querySelector('span'));
66
65
  link.innerHTML = this._props.text == null ? "" : this._props.text;
@@ -199,6 +199,7 @@
199
199
  }
200
200
  /* Set cursor on hover */
201
201
  .form-select:hover {
202
+ border-color: #c7e0f4;
202
203
  cursor: pointer;
203
204
  }
204
205
  /* Color match form-select active */