@govtechsg/sgds-web-component 0.0.7 → 0.0.8
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/Mainnav/index.js +7 -2
- package/Mainnav/index.js.map +1 -1
- package/Mainnav/sgds-mainnav.d.ts +1 -0
- package/index.js +7 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/umd/index.js +7 -2
- package/umd/index.js.map +1 -1
package/package.json
CHANGED
package/umd/index.js
CHANGED
|
@@ -27100,7 +27100,7 @@ slot[name=non-collapsible] {
|
|
|
27100
27100
|
gap: 1rem;
|
|
27101
27101
|
}
|
|
27102
27102
|
|
|
27103
|
-
.slot-end::slotted(:not(
|
|
27103
|
+
.slot-end::slotted(:not([name$=-mainnav-item])) {
|
|
27104
27104
|
align-self: center;
|
|
27105
27105
|
}`;
|
|
27106
27106
|
|
|
@@ -34214,6 +34214,11 @@ slot[name=non-collapsible] {
|
|
|
34214
34214
|
});
|
|
34215
34215
|
}
|
|
34216
34216
|
}
|
|
34217
|
+
// assigning name attribute to elements added in slot="end", to use wildcard css selector to assign styles only to *-mainnav-item
|
|
34218
|
+
_handleSlotChange(e) {
|
|
34219
|
+
const childElements = e.target.assignedElements({ flatten: true });
|
|
34220
|
+
childElements.forEach(e => e.setAttribute('name', e.tagName.toLowerCase()));
|
|
34221
|
+
}
|
|
34217
34222
|
render() {
|
|
34218
34223
|
this.breakpointReached = window.innerWidth < SIZES[this.expand.toString()];
|
|
34219
34224
|
const collapseClass = "collapse navbar-collapse order-4";
|
|
@@ -34261,7 +34266,7 @@ slot[name=non-collapsible] {
|
|
|
34261
34266
|
>
|
|
34262
34267
|
<ul class="navbar-nav">
|
|
34263
34268
|
<slot></slot>
|
|
34264
|
-
<slot name="end" class=${o$2({ "slot-end": !this.breakpointReached })}></slot>
|
|
34269
|
+
<slot name="end" class=${o$2({ "slot-end": !this.breakpointReached })} @slotchange=${this._handleSlotChange}></slot>
|
|
34265
34270
|
</ul>
|
|
34266
34271
|
</div>
|
|
34267
34272
|
</nav>
|