gd-bs 5.5.3 → 5.5.6
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/bs.js +1 -1
- package/build/components/nav/index.js +10 -3
- package/build/components/navbar/index.js +2 -0
- package/dist/gd-bs-icons.js +14 -3
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +2 -0
- package/dist/gd-bs.js +3 -3
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/bs.scss +4 -0
- package/src/components/nav/index.ts +12 -3
- package/src/components/nav/types.d.ts +1 -0
- package/src/components/navbar/index.ts +3 -0
- package/src/components/navbar/types.d.ts +1 -0
package/package.json
CHANGED
package/src/bs.scss
CHANGED
|
@@ -80,6 +80,10 @@
|
|
|
80
80
|
background-color: #c4e4ff;
|
|
81
81
|
color: #0078d4;
|
|
82
82
|
}
|
|
83
|
+
/* Color match accordion while expanded */
|
|
84
|
+
.accordion-button:not(.collapsed)::after {
|
|
85
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%230078d4%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e");
|
|
86
|
+
}
|
|
83
87
|
/* Create a reusable 'SharePoint Blue' background color */
|
|
84
88
|
.bg-sharepoint {
|
|
85
89
|
background-color: #0078d4 !important;
|
|
@@ -17,6 +17,9 @@ class _Nav extends Base<INavProps> implements INav {
|
|
|
17
17
|
// Configure the collapse
|
|
18
18
|
this.configure(itemTemplate);
|
|
19
19
|
|
|
20
|
+
// Configure the events
|
|
21
|
+
this.configureEvents();
|
|
22
|
+
|
|
20
23
|
// Configure the parent
|
|
21
24
|
this.configureParent();
|
|
22
25
|
}
|
|
@@ -38,8 +41,14 @@ class _Nav extends Base<INavProps> implements INav {
|
|
|
38
41
|
this.renderItems(itemTemplate);
|
|
39
42
|
}
|
|
40
43
|
|
|
41
|
-
//
|
|
42
|
-
private configureEvents(
|
|
44
|
+
// Configure the events
|
|
45
|
+
private configureEvents() {
|
|
46
|
+
// Execute the event(s)
|
|
47
|
+
this.props.onRendered ? this.props.onRendered(this.el) : null;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Configures the tab link event
|
|
51
|
+
private configureTabEvents(tab: NavLink) {
|
|
43
52
|
// Add a click event
|
|
44
53
|
tab.el.addEventListener("click", () => {
|
|
45
54
|
let prevTab: INavLink = null;
|
|
@@ -88,7 +97,7 @@ class _Nav extends Base<INavProps> implements INav {
|
|
|
88
97
|
// See if we are rendering tabs
|
|
89
98
|
if (tabs) {
|
|
90
99
|
// Configure the events
|
|
91
|
-
this.
|
|
100
|
+
this.configureTabEvents(link);
|
|
92
101
|
|
|
93
102
|
// Add the tab content
|
|
94
103
|
tabs.appendChild(link.elTabContent);
|
|
@@ -93,6 +93,7 @@ export interface INavProps<T = Element> extends IBaseProps<INav> {
|
|
|
93
93
|
isVertical?: boolean;
|
|
94
94
|
onClick?: (newTab?: INavLink, prevTab?: INavLink) => void;
|
|
95
95
|
onLinkRendered?: (el?: HTMLElement, item?: INavLinkProps) => void;
|
|
96
|
+
onRendered?: (el?: HTMLElement) => void;
|
|
96
97
|
onTabRendered?: (el?: HTMLElement, item?: INavLinkProps) => void;
|
|
97
98
|
}
|
|
98
99
|
|
|
@@ -148,6 +148,7 @@ export interface INavbarProps<T = Element> extends IBaseProps<INavbar> {
|
|
|
148
148
|
itemsEnd?: Array<INavbarItem>;
|
|
149
149
|
onClick?: (item?: INavbarItem, ev?: Event) => void;
|
|
150
150
|
onItemRendered?: (el?: HTMLElement, item?: INavbarItem) => void;
|
|
151
|
+
onRendered?: (el?: HTMLElement) => void;
|
|
151
152
|
searchBox?: INavbarSearchBox;
|
|
152
153
|
type?: number;
|
|
153
154
|
}
|