gd-bs 6.6.41 → 6.6.43

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/index.html CHANGED
@@ -1351,6 +1351,7 @@
1351
1351
  });
1352
1352
  window["navbar"] = GD.Components.Navbar({
1353
1353
  el: document.querySelector("#navbar"),
1354
+ brand: "Test",
1354
1355
  onClick: function(item) {
1355
1356
  // Log
1356
1357
  console.log("Nav Item Clicked: " + item.text);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.6.41",
3
+ "version": "6.6.43",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -34,9 +34,9 @@
34
34
  "homepage": "https://dattabase.com/extras/bs",
35
35
  "dependencies": {
36
36
  "@popperjs/core": "^2.11.8",
37
- "bootstrap": "^5.3.2",
37
+ "bootstrap": "^5.3.3",
38
38
  "bootstrap-icons": "^1.11.3",
39
- "core-js": "^3.33.3",
39
+ "core-js": "^3.38.1",
40
40
  "tippy.js": "^6.3.7"
41
41
  },
42
42
  "devDependencies": {
@@ -40,19 +40,36 @@ class _Navbar extends Base<INavbarProps> implements INavbar {
40
40
 
41
41
  // Configure the card group
42
42
  private configure(itemTemplate: string) {
43
- // See if there is a brand
44
- let brand = this.el.querySelector(".navbar-brand") as HTMLAnchorElement;
45
- if (brand) {
46
- if (this.props.brand) {
43
+ // See if we are applying a brand
44
+ if (this.props.brand) {
45
+ let elBrand = this.el.querySelector("span.navbar-brand") as HTMLSpanElement;
46
+ let elBrandLink = this.el.querySelector("a.navbar-brand") as HTMLAnchorElement;
47
+
48
+ // See if we are using a link
49
+ if (this.props.brandUrl || this.props.onClickBrand) {
50
+ // Remove the element
51
+ elBrand ? elBrand.parentElement.removeChild(elBrand) : null;
52
+
47
53
  // Update the brand
48
- this.props.brandUrl ? brand.href = this.props.brandUrl : null;
54
+ elBrandLink ? elBrandLink.href = this.props.brandUrl : null;
49
55
 
50
56
  // Append the content
51
- appendContent(brand, this.props.brand);
57
+ appendContent(elBrandLink, this.props.brand);
52
58
  } else {
53
- // Remove the brand
54
- brand.parentNode.removeChild(brand);
59
+ // Remove the link element
60
+ elBrandLink ? elBrandLink.parentElement.removeChild(elBrandLink) : null;
61
+
62
+ // Append the content
63
+ appendContent(elBrand, this.props.brand);
55
64
  }
65
+ } else {
66
+ // Remove the brand link
67
+ let elBrandLink = this.el.querySelector("a.navbar-brand");
68
+ if (elBrandLink) { elBrandLink.parentNode.removeChild(elBrandLink); }
69
+
70
+ // Remove the brand element
71
+ let elBrand = this.el.querySelector("span.navbar-brand");
72
+ if (elBrand) { elBrand.parentNode.removeChild(elBrand); }
56
73
  }
57
74
 
58
75
  // Update the nav bar
@@ -3,6 +3,7 @@ export const HTML = `
3
3
  <nav class="navbar navbar-expand-lg">
4
4
  <div class="container-fluid">
5
5
  <a class="navbar-brand" href="#"></a>
6
+ <span class="navbar-brand mb-0 h1"></span>
6
7
  <button class="navbar-toggler" type="button" data-bs-toggle="collapse" aria-expanded="false"
7
8
  aria-label="Toggle Navigation">
8
9
  <span class="navbar-toggler-icon"></span>
@@ -277,6 +277,7 @@
277
277
  }
278
278
  /* Adjust checkbox size */
279
279
  .form-check:not(.form-switch) .form-check-input[type=checkbox] {
280
+ display: inline;
280
281
  height: 1.25rem;
281
282
  width: 1.25rem;
282
283
  }