globuswebcomponents 2.2.9 → 2.3.0
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/dist/cjs/gb-avatar_28.cjs.entry.js +10 -7
- package/dist/cjs/gb-avatar_28.cjs.entry.js.map +1 -1
- package/dist/cjs/globuscomponents.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gb-simple-side-bar-item/gb-simple-side-bar-item.js +15 -8
- package/dist/collection/components/gb-simple-side-bar-item/gb-simple-side-bar-item.js.map +1 -1
- package/dist/components/gb-sidebar.js +1 -1
- package/dist/components/gb-simple-side-bar-item.js +1 -1
- package/dist/components/{p-BpV5qQtR.js → p-CeHRpUkW.js} +16 -10
- package/dist/components/p-CeHRpUkW.js.map +1 -0
- package/dist/docs.json +1 -1
- package/dist/esm/gb-avatar_28.entry.js +10 -7
- package/dist/esm/gb-avatar_28.entry.js.map +1 -1
- package/dist/esm/globuscomponents.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/globuscomponents/globuscomponents.esm.js +1 -1
- package/dist/globuscomponents/{p-da119a99.entry.js → p-94aa3ed3.entry.js} +2 -2
- package/dist/globuscomponents/p-94aa3ed3.entry.js.map +1 -0
- package/dist/types/components/gb-simple-side-bar-item/gb-simple-side-bar-item.d.ts +2 -0
- package/package.json +1 -1
- package/dist/components/p-BpV5qQtR.js.map +0 -1
- package/dist/globuscomponents/p-da119a99.entry.js.map +0 -1
|
@@ -1340,6 +1340,7 @@ const GbSimpleSideBarItem = class {
|
|
|
1340
1340
|
this.showBadge = false;
|
|
1341
1341
|
this.showTooltip = false;
|
|
1342
1342
|
this.leadingIconSvg = '';
|
|
1343
|
+
this.internalIcon = '';
|
|
1343
1344
|
}
|
|
1344
1345
|
async loadIcon(iconName) {
|
|
1345
1346
|
const iconPath = index.getAssetPath(`${iconName}`);
|
|
@@ -1355,26 +1356,28 @@ const GbSimpleSideBarItem = class {
|
|
|
1355
1356
|
});
|
|
1356
1357
|
// Serialize and store
|
|
1357
1358
|
const modifiedSvg = svgElement.outerHTML;
|
|
1358
|
-
console.log(modifiedSvg)
|
|
1359
|
+
// console.log(modifiedSvg)
|
|
1359
1360
|
this.leadingIconSvg = modifiedSvg;
|
|
1360
1361
|
}
|
|
1362
|
+
updateSidebarIcon(_oldValue, newValue) {
|
|
1363
|
+
this.internalIcon = newValue;
|
|
1364
|
+
}
|
|
1361
1365
|
componentWillLoad() {
|
|
1362
1366
|
this.loadIcon(this.icon);
|
|
1363
|
-
|
|
1367
|
+
this.internalIcon = this.icon;
|
|
1364
1368
|
}
|
|
1365
1369
|
onSideBarItemClicked() {
|
|
1366
1370
|
this.sideBarItemClicked.emit();
|
|
1367
1371
|
}
|
|
1368
|
-
// getLabel() {
|
|
1369
|
-
// const slottedLabel = this.el.querySelector('slot');
|
|
1370
|
-
// return slottedLabel.textContent;
|
|
1371
|
-
// }
|
|
1372
1372
|
render() {
|
|
1373
1373
|
const redBarSrc = index.getAssetPath(`assets/bar.svg`);
|
|
1374
1374
|
const whiteBarSrc = index.getAssetPath(`assets/bar_white.svg`);
|
|
1375
|
-
return (index.h("div", { key: '
|
|
1375
|
+
return (index.h("div", { key: '60eee8c60123f64e69e0baccf05c98bf68837f70', class: `side_bar_item_container`, onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, index.h("div", { key: 'd12ab9fadc0c86be8980af46abedde8b05550e4e', class: `nav_item_base ${this.state} ${this.type} ${this.category}` }, this.state === 'active' && this.category === 'plain_background' && index.h("img", { key: '17d24518519ab387534e55748e7d391cc474a180', src: redBarSrc, alt: "", class: "bar" }), this.state === 'active' && this.category === 'colored_background' && index.h("img", { key: '61d1e6f40a32b8af4db8ebf9c01ce3c380c95b2e', src: whiteBarSrc, alt: "", class: "bar" }), index.h("div", { key: '7deec2649a3b97ac9ff0d8ae796a3075c2ec1cdc', class: "content" }, index.h("div", { key: '920df27fed25f00b7ac444811c54920a3ce88555', class: `icon ${this.state} ${this.category}`, innerHTML: this.leadingIconSvg }), this.type === 'full_with_label' && (index.h("p", { key: '7b72a9b789e610b01c6285b4d8d002a0d32b0715', class: `label_text ${this.category} ${this.state} ${this.state === 'active' ? 'text-md-semi-bold' : 'text-md-medium'}` }, this.label))), this.type === 'full_with_label' && (index.h(index.Fragment, null, this.showBadge && (index.h("gb-badge", { key: 'bff6f2135eb26d83822592d5bb91b744580b86e0', size: "sm", type: "pill_outline", color: this.state === 'active' ? 'information' : 'gray' }, index.h("p", { key: '8f574bffd79cfd43f0685659d36d015dce6d12fe' }, "10"))), this.showArrow && (index.h("svg", { key: '833b814c400a6ab845ea1cd707f2f9c713555e8a', xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", class: `arrow ${this.state} ${this.category}` }, index.h("path", { key: '683b59136dc98448e9c7fd8bdab6b44a7cd5306b', d: "M6.00003 4C6.00003 4 9.99999 6.94596 10 8.00003C10 9.05411 6 12 6 12", stroke: "#212C65", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), this.type === 'icon_only' && this.showTooltip && (index.h("gb-tooltip", { key: 'dd9304f2d03ee9470bb8d016422d021d15b946f8', "show-arrow": true, arrow: "left", class: "tooltip" }, index.h("p", { key: '8597fd268c9ab5f747319cf330a39de2d5c08ff5', slot: "label" }, this.label)))));
|
|
1376
1376
|
}
|
|
1377
1377
|
get el() { return index.getElement(this); }
|
|
1378
|
+
static get watchers() { return {
|
|
1379
|
+
"icon": ["updateSidebarIcon"]
|
|
1380
|
+
}; }
|
|
1378
1381
|
};
|
|
1379
1382
|
GbSimpleSideBarItem.style = gbSimpleSideBarItemCss;
|
|
1380
1383
|
|