@noxlovette/material 0.1.13 → 0.1.15
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.
|
@@ -8,7 +8,6 @@ It manages the Material 3 Dynamic Theme, dark mode, and icon providers.
|
|
|
8
8
|
import { Tooltip } from 'bits-ui';
|
|
9
9
|
import { app } from './theme';
|
|
10
10
|
import type { AppProps } from './types';
|
|
11
|
-
import { ModeWatcher } from 'mode-watcher';
|
|
12
11
|
import ThemeScript from '../../../utils/ThemeScript.svelte';
|
|
13
12
|
|
|
14
13
|
let { children, class: className, iconProviderProps = {}, ...restProps }: AppProps = $props();
|
|
@@ -19,7 +18,6 @@ It manages the Material 3 Dynamic Theme, dark mode, and icon providers.
|
|
|
19
18
|
<ThemeScript />
|
|
20
19
|
<Theme />
|
|
21
20
|
<MaterialSymbolsProvider {...iconProviderProps} />
|
|
22
|
-
<ModeWatcher />
|
|
23
21
|
<Tooltip.Provider>
|
|
24
22
|
<div class={baseCls} {...restProps}>
|
|
25
23
|
{@render children()}
|
|
@@ -114,7 +114,8 @@ export function generateThemeCSS(config, isDark) {
|
|
|
114
114
|
'surface-container-high': MaterialDynamicColors.surfaceContainerHigh,
|
|
115
115
|
'surface-container-highest': MaterialDynamicColors.surfaceContainerHighest
|
|
116
116
|
};
|
|
117
|
-
|
|
117
|
+
const selector = dark ? ':root.dark' : ':root';
|
|
118
|
+
let css = `${selector} { /* Dynamic M3 Theme */\n`;
|
|
118
119
|
for (const [key, dynamicColor] of Object.entries(colors)) {
|
|
119
120
|
const argb = dynamicColor.getArgb(dynamicScheme);
|
|
120
121
|
const r = (argb >> 16) & 255;
|