diff --git a/angular/demo/src/app/app.component.ts b/angular/demo/src/app/app.component.ts index 223b5058a9..f53abaa24c 100644 --- a/angular/demo/src/app/app.component.ts +++ b/angular/demo/src/app/app.component.ts @@ -1,3 +1,4 @@ +import type {OnInit} from '@angular/core'; import {Component} from '@angular/core'; import {RouterModule} from '@angular/router'; @@ -11,4 +12,14 @@ import {RouterModule} from '@angular/router'; `, }) -export class AppComponent {} +export class AppComponent implements OnInit { + ngOnInit() { + window.addEventListener('storage', (event) => { + if (event.key === 'theme') { + if (event.newValue) { + document.documentElement.setAttribute('data-bs-theme', event.newValue); + } + } + }); + } +} diff --git a/angular/demo/src/app/samples/rating/form.route.ts b/angular/demo/src/app/samples/rating/form.route.ts index e541e87d02..314b88e688 100644 --- a/angular/demo/src/app/samples/rating/form.route.ts +++ b/angular/demo/src/app/samples/rating/form.route.ts @@ -13,7 +13,7 @@ import {FormControl, ReactiveFormsModule, Validators} from '@angular/forms';
Thanks!
} @if (ctrl.invalid) { -
Please rate us
+
Please rate us
}
Model: {{ ctrl.value }}
diff --git a/angular/demo/src/index.html b/angular/demo/src/index.html index 6efa1bc4db..f0c1c9e689 100644 --- a/angular/demo/src/index.html +++ b/angular/demo/src/index.html @@ -6,6 +6,12 @@ Demo +
diff --git a/common/demo.scss b/common/demo.scss index 87c76ea530..d413139b9f 100644 --- a/common/demo.scss +++ b/common/demo.scss @@ -14,3 +14,18 @@ main { height: 30px; } } + +[data-bs-theme='dark'] { + .btn-outline-primary { + --bs-btn-color: #3f8bfd; + } + .btn-outline-secondary { + --bs-btn-color: #848d94; + } + .btn-outline-danger { + --bs-btn-color: #e36370; + } + .btn-outline-success { + --bs-btn-color: #1d9f63; + } +} diff --git a/common/samples/progressbar/custom.scss b/common/samples/progressbar/custom.scss index e5402cdd37..252bf854c2 100644 --- a/common/samples/progressbar/custom.scss +++ b/common/samples/progressbar/custom.scss @@ -2,7 +2,7 @@ padding: 0; height: 210px; width: 190px; - border: 10px solid #030303; + border: 10px solid var(--bs-body-color); position: absolute; transform: translate(-50%, -50%); top: 50%; @@ -42,7 +42,7 @@ position: absolute; height: 80px; width: 60px; - border: 10px solid #030303; + border: 10px solid var(--bs-body-color); border-left: none; right: -70px; top: 30px; @@ -53,7 +53,7 @@ content: ''; height: 10px; width: 260px; - background-color: #030303; + background-color: var(--bs-body-color); left: -45px; bottom: -10px; border-radius: 10px; diff --git a/demo/src/lib/layout/Sample.svelte b/demo/src/lib/layout/Sample.svelte index 0f77627a13..bc61c4a2a1 100644 --- a/demo/src/lib/layout/Sample.svelte +++ b/demo/src/lib/layout/Sample.svelte @@ -83,7 +83,7 @@
-
+
{#if $showSpinner$}
diff --git a/demo/src/lib/layout/iframe.ts b/demo/src/lib/layout/iframe.ts index 0567ca3348..3eb510386c 100644 --- a/demo/src/lib/layout/iframe.ts +++ b/demo/src/lib/layout/iframe.ts @@ -41,6 +41,7 @@ export function createIframeHandler(defaultHeight: number, resize = true, messag const onLoad = (event: Event) => { if (event.target instanceof HTMLIFrameElement) { setupObserver(event.target); + event.target.classList.add('loaded'); } }; @@ -58,7 +59,12 @@ export function createIframeHandler(defaultHeight: number, resize = true, messag } const update = (baseSrc: string) => { - if (!iframe.contentWindow?.location?.href?.startsWith(baseSrc)) { + if ( + !iframe.contentWindow?.location?.href?.startsWith(baseSrc) || + !iframe.contentDocument || + iframe.contentDocument.readyState === 'loading' + ) { + iframe.classList.remove('loaded'); _iframeLoaded$.set(false); if (spinnerTimer) { clearTimeout(spinnerTimer); @@ -79,6 +85,7 @@ export function createIframeHandler(defaultHeight: number, resize = true, messag } _iframeLoaded$.set(true); _showSpinner$.set(false); + iframe.classList.add('loaded'); } }; window.addEventListener('message', sampleLoad, false); diff --git a/demo/src/routes/styles.scss b/demo/src/routes/styles.scss index bae0a895ff..73e1ec3b14 100644 --- a/demo/src/routes/styles.scss +++ b/demo/src/routes/styles.scss @@ -204,11 +204,22 @@ header { } } +iframe { + opacity: 0; + &.loaded { + opacity: 1; + } +} + // Dark mode override @if $enable-dark-mode { @include color-mode(dark, true) { color-scheme: dark; + .iframe-container { + background-color: #212529; + } + @each $color, $value in $theme-colors-dark-rgb { --#{$prefix}#{$color}-rgb: #{$value}; } diff --git a/e2e/samplesMarkup.e2e-spec.ts-snapshots/rating-form.html b/e2e/samplesMarkup.e2e-spec.ts-snapshots/rating-form.html index 5c63526887..9bffbc2295 100644 --- a/e2e/samplesMarkup.e2e-spec.ts-snapshots/rating-form.html +++ b/e2e/samplesMarkup.e2e-spec.ts-snapshots/rating-form.html @@ -139,7 +139,7 @@ id="form-msg" >
"Please rate us"
diff --git a/react/demo/src/app/samples/rating/Form.route.tsx b/react/demo/src/app/samples/rating/Form.route.tsx index d01f4c5ba7..c8cb7e037d 100644 --- a/react/demo/src/app/samples/rating/Form.route.tsx +++ b/react/demo/src/app/samples/rating/Form.route.tsx @@ -27,7 +27,7 @@ const RatingDemo = () => { updateCtrl({value})} ariaLabelledBy="ratingLabel" />
{ctrl.valid &&
Thanks!
} - {ctrl.invalid &&
Please rate us
} + {ctrl.invalid &&
Please rate us
}
 				Model:{' '}
diff --git a/react/demo/src/index.html b/react/demo/src/index.html
index 94e1103750..89c901a3be 100644
--- a/react/demo/src/index.html
+++ b/react/demo/src/index.html
@@ -6,6 +6,12 @@
 		
 		
 		Vite App
+		
 	
 	
 		
diff --git a/react/demo/src/main.tsx b/react/demo/src/main.tsx index a57e093c95..e24017b970 100644 --- a/react/demo/src/main.tsx +++ b/react/demo/src/main.tsx @@ -53,6 +53,14 @@ const router = createHashRouter([ }, ]); +window.addEventListener('storage', (event) => { + if (event.key === 'theme') { + if (event.newValue) { + document.documentElement.setAttribute('data-bs-theme', event.newValue); + } + } +}); + ReactDOM.createRoot(document.getElementById('root')!).render(
diff --git a/svelte/demo/src/app/App.svelte b/svelte/demo/src/app/App.svelte index 319b48366a..9f3f600f2b 100644 --- a/svelte/demo/src/app/App.svelte +++ b/svelte/demo/src/app/App.svelte @@ -1,7 +1,17 @@
diff --git a/svelte/demo/src/app/index.html b/svelte/demo/src/app/index.html index 5183465197..74b39c9a7f 100644 --- a/svelte/demo/src/app/index.html +++ b/svelte/demo/src/app/index.html @@ -6,6 +6,12 @@ Svelte App +
diff --git a/svelte/demo/src/app/samples/rating/Form.route.svelte b/svelte/demo/src/app/samples/rating/Form.route.svelte index 4e8137ef0c..50924dd739 100644 --- a/svelte/demo/src/app/samples/rating/Form.route.svelte +++ b/svelte/demo/src/app/samples/rating/Form.route.svelte @@ -17,7 +17,7 @@
Thanks!
{/if} {#if ctrl.invalid} -
Please rate us
+
Please rate us
{/if}
Model: {ctrl.value}