gd-bs 6.6.18 → 6.6.20

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/generateIcons.js CHANGED
@@ -135,7 +135,15 @@ fs.readdir(dirIcons, function (err, files) {
135
135
  stream = fs.createWriteStream("./src/icons/generate.ts");
136
136
  stream.write([
137
137
  '// Generates the html for an icon',
138
- 'export const generateIcon = (svg: string, height: number = 32, width: number = 32, className?: string) => {',
138
+ 'export const generateIcon = (svg: string, height: number = 32, width: number = 32, className?: string, placeholders?: number) => {',
139
+ '\t// See if placeholders exist',
140
+ '\tif (placeholders > 0) {',
141
+ '\t\t// Parse the number of placeholders',
142
+ '\t\tfor (let i = 0; i < placeholders; i++) {',
143
+ '\t\t// Replace the placeholder',
144
+ '\t\tsvg = svg.replace("{" + i + "}", Date.now().toString());',
145
+ '\t\t}',
146
+ '\t}\n',
139
147
  '\t// Get the icon element',
140
148
  '\tlet elDiv = document.createElement("div");',
141
149
  '\telDiv.innerHTML = svg;',
@@ -151,7 +159,7 @@ fs.readdir(dirIcons, function (err, files) {
151
159
  '\t }',
152
160
  '\t }\n',
153
161
  '\t // Make this icon invisible to the screen reader',
154
- '\t icon.setAttribute("aria-hidden", "true");\n',
162
+ '\t icon.setAttribute("aria-hidden", "true");\n',
155
163
  '\t // Set the height/width',
156
164
  '\t icon.setAttribute("height", (height ? height : 32).toString());',
157
165
  '\t icon.setAttribute("width", (width ? width : 32).toString());\n',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.6.18",
3
+ "version": "6.6.20",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -1,5 +1,14 @@
1
1
  // Generates the html for an icon
2
- export const generateIcon = (svg: string, height: number = 32, width: number = 32, className?: string) => {
2
+ export const generateIcon = (svg: string, height: number = 32, width: number = 32, className?: string, placeholders?: number) => {
3
+ // See if placeholders exist
4
+ if (placeholders > 0) {
5
+ // Parse the number of placeholders
6
+ for (let i = 0; i < placeholders; i++) {
7
+ // Replace the placeholder
8
+ svg = svg.replace("{" + i + "}", Date.now().toString());
9
+ }
10
+ }
11
+
3
12
  // Get the icon element
4
13
  let elDiv = document.createElement("div");
5
14
  elDiv.innerHTML = svg;
@@ -414,9 +414,9 @@
414
414
  .mw-fit {
415
415
  max-width: fit-content !important;
416
416
  }
417
- /* Set color for nav links */
418
- .nav-link {
419
- color: var(--sp-theme-primary, #0078d4);
417
+ /* Set color for active nav links */
418
+ .nav-link:active, .navbar-brand:active {
419
+ color: var(--bs-navbar-active-color);
420
420
  }
421
421
  .nav-tabs {
422
422
  border-bottom: 0;