@sixbell-telco/sdk 4.1.0 → 4.1.2
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/CHANGELOG.md +15 -1
- package/fesm2022/sixbell-telco-sdk-layouts.mjs +7 -5
- package/fesm2022/sixbell-telco-sdk-layouts.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +4 -0
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
- package/layouts/src/page-banner/page-banner.component.d.ts +4 -2
- package/package.json +19 -19
- package/utils/theme/src/theme-dom/theme-dom.service.d.ts +2 -0
|
@@ -1151,6 +1151,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1151
1151
|
*/
|
|
1152
1152
|
class ThemeDomService {
|
|
1153
1153
|
renderer;
|
|
1154
|
+
/** Bumps on every theme switch so template reads of `themeOf()` re-evaluate in open overlays. */
|
|
1155
|
+
activeTheme = signal(null);
|
|
1154
1156
|
rendererFactory = inject(RendererFactory2);
|
|
1155
1157
|
document = inject(DOCUMENT);
|
|
1156
1158
|
constructor() {
|
|
@@ -1208,9 +1210,11 @@ class ThemeDomService {
|
|
|
1208
1210
|
*/
|
|
1209
1211
|
setActiveTheme(themeIdentifier) {
|
|
1210
1212
|
this.renderer.setAttribute(this.document.body, THEME_ATTRIBUTE_NAME, themeIdentifier);
|
|
1213
|
+
this.activeTheme.set(themeIdentifier);
|
|
1211
1214
|
}
|
|
1212
1215
|
/** Nearest `data-theme` value for a trigger or other in-scope origin. */
|
|
1213
1216
|
themeOf(source) {
|
|
1217
|
+
this.activeTheme();
|
|
1214
1218
|
return source?.closest(`[${THEME_ATTRIBUTE_NAME}]`)?.getAttribute(THEME_ATTRIBUTE_NAME) ?? null;
|
|
1215
1219
|
}
|
|
1216
1220
|
/** Copies the nearest theme onto overlay content. Never put `data-theme` on a CDK pane or backdrop. */
|