diff --git a/docs/functions/client_color_switch_color_switch.ColorSwitch.html b/docs/functions/client_color_switch_color_switch.ColorSwitch.html index 84e0967f..88b34334 100644 --- a/docs/functions/client_color_switch_color_switch.ColorSwitch.html +++ b/docs/functions/client_color_switch_color_switch.ColorSwitch.html @@ -6,4 +6,4 @@
<ColorSwitch size={20} skipSystem />
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/client_force_color_scheme_force_color_scheme.ForceColorScheme.html b/docs/functions/client_force_color_scheme_force_color_scheme.ForceColorScheme.html index e811ba22..c22b6538 100644 --- a/docs/functions/client_force_color_scheme_force_color_scheme.ForceColorScheme.html +++ b/docs/functions/client_force_color_scheme_force_color_scheme.ForceColorScheme.html @@ -1,2 +1,2 @@ ForceColorScheme | Nextjs Themes

Force color scheme on a page

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/client_force_theme_force_theme.ForceTheme.html b/docs/functions/client_force_theme_force_theme.ForceTheme.html index 8b937e0e..3a9800f3 100644 --- a/docs/functions/client_force_theme_force_theme.ForceTheme.html +++ b/docs/functions/client_force_theme_force_theme.ForceTheme.html @@ -1,2 +1,2 @@ ForceTheme | Nextjs Themes

Force theme on a page

-
  • Parameters

    • props: {
          targetSelector?: string;
          theme: string;
      }
      • OptionaltargetSelector?: string
      • theme: string

    Returns null

\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/client_switcher_switcher.Switcher.html b/docs/functions/client_switcher_switcher.Switcher.html index 6a5b0286..eaf4b416 100644 --- a/docs/functions/client_switcher_switcher.Switcher.html +++ b/docs/functions/client_switcher_switcher.Switcher.html @@ -3,4 +3,4 @@
<Switcher targetSelector="#container1" />
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/client_theme_switcher_theme_switcher.ThemeSwitcher.html b/docs/functions/client_theme_switcher_theme_switcher.ThemeSwitcher.html index 9da04507..198020d8 100644 --- a/docs/functions/client_theme_switcher_theme_switcher.ThemeSwitcher.html +++ b/docs/functions/client_theme_switcher_theme_switcher.ThemeSwitcher.html @@ -3,4 +3,4 @@
<ThemeSwitcher [...props] />
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/hooks_use_theme.useTheme.html b/docs/functions/hooks_use_theme.useTheme.html index 463252e5..d699cc49 100644 --- a/docs/functions/hooks_use_theme.useTheme.html +++ b/docs/functions/hooks_use_theme.useTheme.html @@ -1,4 +1,4 @@ useTheme | Nextjs Themes
const [] = useTheme(options);
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/interfaces/client_color_switch_color_switch.ColorSwitchProps.html b/docs/interfaces/client_color_switch_color_switch.ColorSwitchProps.html index 7410e232..96b5439b 100644 --- a/docs/interfaces/client_color_switch_color_switch.ColorSwitchProps.html +++ b/docs/interfaces/client_color_switch_color_switch.ColorSwitchProps.html @@ -1,6 +1,6 @@ -ColorSwitchProps | Nextjs Themes
interface ColorSwitchProps {
    size?: number;
    skipSystem?: boolean;
    targetSelector?: string;
}

Hierarchy

Properties

size? +ColorSwitchProps | Nextjs Themes
interface ColorSwitchProps {
    size?: number;
    skipSystem?: boolean;
    targetSelector?: string;
}

Hierarchy

Properties

size?: number

Diameter of the color switch

-
skipSystem?: boolean

Skip system colorScheme while toggling

-
targetSelector?: string
\ No newline at end of file +
skipSystem?: boolean

Skip system colorScheme while toggling

+
targetSelector?: string
\ No newline at end of file diff --git a/docs/interfaces/client_theme_switcher_theme_switcher.ThemeSwitcherProps.html b/docs/interfaces/client_theme_switcher_theme_switcher.ThemeSwitcherProps.html index 975087cd..040cd041 100644 --- a/docs/interfaces/client_theme_switcher_theme_switcher.ThemeSwitcherProps.html +++ b/docs/interfaces/client_theme_switcher_theme_switcher.ThemeSwitcherProps.html @@ -1,4 +1,4 @@ -ThemeSwitcherProps | Nextjs Themes
interface ThemeSwitcherProps {
    forcedColorScheme?: ColorSchemeType;
    forcedTheme?: string;
    nonce?: string;
    styles?: Record<string, string>;
    targetSelector?: string;
    themeTransition?: string;
}

Properties

forcedColorScheme? +ThemeSwitcherProps | Nextjs Themes
interface ThemeSwitcherProps {
    forcedColorScheme?: ColorSchemeType;
    forcedTheme?: string;
    nonce?: string;
    styles?: Record<string, string>;
    targetSelector?: string;
    themeTransition?: string;
}

Properties

forcedColorScheme?: ColorSchemeType

Forced color scheme for the current page

forcedTheme?: string

Forced theme name for the current page

+
forcedTheme?: string

Forced theme name for the current page

nonce?: string

The nonce value for your Content Security Policy.

-
styles?: Record<string, string>

Provide a styles object imported from CSS/SCSS modules if you are using these modules to define theme and color-scheme classes. +

nonce?: string

The nonce value for your Content Security Policy.

+
styles?: Record<string, string>

Provide a styles object imported from CSS/SCSS modules if you are using these modules to define theme and color-scheme classes. All classes applied to the target are modified using the styles object as follows: if (styles) classes = classes.map(cls => styles[cls] ?? cls);

-
targetSelector?: string

CSS selector for the target element to apply the theme. +

targetSelector?: string

CSS selector for the target element to apply the theme. Use this to specify a different target element than the default (html or documentElement). This is particularly useful for controlling the theme of different parts of the page independently.

-
themeTransition?: string

The transition property to enforce on all elements, preventing unwanted transitions during theme changes.

+
themeTransition?: string

The transition property to enforce on all elements, preventing unwanted transitions during theme changes.

'background .3s'
 
'none'
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/interfaces/hooks_use_theme.UseThemeYield.html b/docs/interfaces/hooks_use_theme.UseThemeYield.html index f2837bf4..5ef0a502 100644 --- a/docs/interfaces/hooks_use_theme.UseThemeYield.html +++ b/docs/interfaces/hooks_use_theme.UseThemeYield.html @@ -1,4 +1,4 @@ -UseThemeYield | Nextjs Themes
interface UseThemeYield {
    colorSchemePref: ColorSchemeType;
    darkTheme: string;
    lightTheme: string;
    resolvedColorScheme: ResolvedColorSchemeType;
    resolvedTheme: string;
    setColorSchemePref: ((colorSchemePref: ColorSchemeType) => void);
    setDarkTheme: ((darkTheme: string) => void);
    setForcedColorScheme: ((forcedColorScheme: ColorSchemeType) => void);
    setForcedTheme: ((forcedTheme: string) => void);
    setLightTheme: ((lightTheme: string) => void);
    setTheme: ((theme: string) => void);
    setThemeSet: ((themeSet: {
        darkTheme: string;
        lightTheme: string;
    }) => void);
    systemColorScheme: ResolvedColorSchemeType;
    theme: string;
    toggleColorScheme: ((skipSystem?: boolean) => void);
}

Properties

colorSchemePref +UseThemeYield | Nextjs Themes
interface UseThemeYield {
    colorSchemePref: ColorSchemeType;
    darkTheme: string;
    lightTheme: string;
    resolvedColorScheme: ResolvedColorSchemeType;
    resolvedTheme: string;
    setColorSchemePref: ((colorSchemePref: ColorSchemeType) => void);
    setDarkTheme: ((darkTheme: string) => void);
    setForcedColorScheme: ((forcedColorScheme: ColorSchemeType) => void);
    setForcedTheme: ((forcedTheme: string) => void);
    setLightTheme: ((lightTheme: string) => void);
    setTheme: ((theme: string) => void);
    setThemeSet: ((themeSet: {
        darkTheme: string;
        lightTheme: string;
    }) => void);
    systemColorScheme: ResolvedColorSchemeType;
    theme: string;
    toggleColorScheme: ((skipSystem?: boolean) => void);
}

Properties

colorSchemePref: ColorSchemeType
darkTheme: string
lightTheme: string
resolvedColorScheme: ResolvedColorSchemeType
resolvedTheme: string
setColorSchemePref: ((colorSchemePref: ColorSchemeType) => void)
setDarkTheme: ((darkTheme: string) => void)
setForcedColorScheme: ((forcedColorScheme: ColorSchemeType) => void)
setForcedTheme: ((forcedTheme: string) => void)
setLightTheme: ((lightTheme: string) => void)
setTheme: ((theme: string) => void)

actions

-
setThemeSet: ((themeSet: {
    darkTheme: string;
    lightTheme: string;
}) => void)
systemColorScheme: ResolvedColorSchemeType
theme: string
toggleColorScheme: ((skipSystem?: boolean) => void)
\ No newline at end of file +

Properties

colorSchemePref: ColorSchemeType
darkTheme: string
lightTheme: string
resolvedColorScheme: ResolvedColorSchemeType
resolvedTheme: string
setColorSchemePref: ((colorSchemePref: ColorSchemeType) => void)
setDarkTheme: ((darkTheme: string) => void)
setForcedColorScheme: ((forcedColorScheme: ColorSchemeType) => void)
setForcedTheme: ((forcedTheme: string) => void)
setLightTheme: ((lightTheme: string) => void)
setTheme: ((theme: string) => void)

actions

+
setThemeSet: ((themeSet: {
    darkTheme: string;
    lightTheme: string;
}) => void)
systemColorScheme: ResolvedColorSchemeType
theme: string
toggleColorScheme: ((skipSystem?: boolean) => void)
\ No newline at end of file diff --git a/docs/modules/client_color_switch_color_switch.html b/docs/modules/client_color_switch_color_switch.html index dc075b53..a4d8c61c 100644 --- a/docs/modules/client_color_switch_color_switch.html +++ b/docs/modules/client_color_switch_color_switch.html @@ -1,3 +1,3 @@ -client/color-switch/color-switch | Nextjs Themes

Module client/color-switch/color-switch

Index

Interfaces

ColorSwitchProps +client/color-switch/color-switch | Nextjs Themes

Module client/color-switch/color-switch

Index

Interfaces

Functions

\ No newline at end of file diff --git a/docs/modules/client_force_color_scheme_force_color_scheme.html b/docs/modules/client_force_color_scheme_force_color_scheme.html index 8b90aa11..0678465c 100644 --- a/docs/modules/client_force_color_scheme_force_color_scheme.html +++ b/docs/modules/client_force_color_scheme_force_color_scheme.html @@ -1,2 +1,2 @@ -client/force-color-scheme/force-color-scheme | Nextjs Themes

Module client/force-color-scheme/force-color-scheme

Index

Functions

ForceColorScheme +client/force-color-scheme/force-color-scheme | Nextjs Themes
\ No newline at end of file diff --git a/docs/modules/client_force_theme_force_theme.html b/docs/modules/client_force_theme_force_theme.html index 57bb5c0f..cfcdf202 100644 --- a/docs/modules/client_force_theme_force_theme.html +++ b/docs/modules/client_force_theme_force_theme.html @@ -1,2 +1,2 @@ -client/force-theme/force-theme | Nextjs Themes

Module client/force-theme/force-theme

Index

Functions

ForceTheme +client/force-theme/force-theme | Nextjs Themes

Module client/force-theme/force-theme

Index

Functions

\ No newline at end of file diff --git a/docs/modules/client_switcher_switcher.html b/docs/modules/client_switcher_switcher.html index 28874808..3e8a69ed 100644 --- a/docs/modules/client_switcher_switcher.html +++ b/docs/modules/client_switcher_switcher.html @@ -1,2 +1,2 @@ -client/switcher/switcher | Nextjs Themes

Module client/switcher/switcher

Index

Functions

Switcher +client/switcher/switcher | Nextjs Themes

Module client/switcher/switcher

Index

Functions

\ No newline at end of file diff --git a/docs/modules/client_theme_switcher_theme_switcher.html b/docs/modules/client_theme_switcher_theme_switcher.html index 22a8c8ea..75f7dce5 100644 --- a/docs/modules/client_theme_switcher_theme_switcher.html +++ b/docs/modules/client_theme_switcher_theme_switcher.html @@ -1,3 +1,3 @@ -client/theme-switcher/theme-switcher | Nextjs Themes

Module client/theme-switcher/theme-switcher

Index

Interfaces

ThemeSwitcherProps +client/theme-switcher/theme-switcher | Nextjs Themes
\ No newline at end of file diff --git a/docs/modules/hooks_use_theme.html b/docs/modules/hooks_use_theme.html index f930377a..53881aac 100644 --- a/docs/modules/hooks_use_theme.html +++ b/docs/modules/hooks_use_theme.html @@ -1,3 +1,3 @@ -hooks/use-theme | Nextjs Themes

Module hooks/use-theme

Index

Interfaces

UseThemeYield +hooks/use-theme | Nextjs Themes

Module hooks/use-theme

Index

Interfaces

Functions

\ No newline at end of file diff --git a/docs/modules/types.html b/docs/modules/types.html index f1b0c4c5..ce0cec32 100644 --- a/docs/modules/types.html +++ b/docs/modules/types.html @@ -1,3 +1,3 @@ -types | Nextjs Themes

Module types

Index

Type Aliases

ColorSchemeType +types | Nextjs Themes
\ No newline at end of file diff --git a/docs/types/types.ColorSchemeType.html b/docs/types/types.ColorSchemeType.html index 51529c54..f06bdc55 100644 --- a/docs/types/types.ColorSchemeType.html +++ b/docs/types/types.ColorSchemeType.html @@ -1,2 +1,2 @@ ColorSchemeType | Nextjs Themes

Type Alias ColorSchemeType

ColorSchemeType:
    | ""
    | "system"
    | "dark"
    | "light"

Types to be exposed to users

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/types/types.ResolvedColorSchemeType.html b/docs/types/types.ResolvedColorSchemeType.html index c66d80ea..5f726d75 100644 --- a/docs/types/types.ResolvedColorSchemeType.html +++ b/docs/types/types.ResolvedColorSchemeType.html @@ -1 +1 @@ -ResolvedColorSchemeType | Nextjs Themes

Type Alias ResolvedColorSchemeType

ResolvedColorSchemeType: "dark" | "light"
\ No newline at end of file +ResolvedColorSchemeType | Nextjs Themes

Type Alias ResolvedColorSchemeType

ResolvedColorSchemeType: "dark" | "light"
\ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6d20213..a39cf1a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -299,7 +299,7 @@ importers: version: link:../packages/config-typescript '@testing-library/react': specifier: ^16.0.0 - version: 16.0.0(@testing-library/dom@10.2.0)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 16.0.0(@testing-library/dom@10.3.0)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/node': specifier: ^20.14.9 version: 20.14.9 @@ -401,7 +401,7 @@ importers: version: link:../config-typescript '@testing-library/react': specifier: ^16.0.0 - version: 16.0.0(@testing-library/dom@10.2.0)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 16.0.0(@testing-library/dom@10.3.0)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/node': specifier: ^20.14.9 version: 20.14.9 @@ -1058,8 +1058,8 @@ packages: '@swc/helpers@0.5.5': resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} - '@testing-library/dom@10.2.0': - resolution: {integrity: sha512-CytIvb6tVOADRngTHGWNxH8LPgO/3hi/BdCEHOf7Qd2GvZVClhVP0Wo/QHzWhpki49Bk0b4VT6xpt3fx8HTSIw==} + '@testing-library/dom@10.3.0': + resolution: {integrity: sha512-pT/TYB2+IyMYkkB6lqpkzD7VFbsR0JBJtflK3cS68sCNWxmOhWwRm1XvVHlseNEorsNcxkYsb4sRDV3aNIpttg==} engines: {node: '>=18'} '@testing-library/react@16.0.0': @@ -2765,8 +2765,8 @@ packages: resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} engines: {node: '>=10'} - istanbul-lib-source-maps@5.0.5: - resolution: {integrity: sha512-gKf4eJ8bHmSX/ljiOCpnd8vtmHTwG71uugm0kXYd5aqFCl6z8cj8k7QduXSwU6QOst6LCdSXTlaoc8W4554crQ==} + istanbul-lib-source-maps@5.0.6: + resolution: {integrity: sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==} engines: {node: '>=10'} istanbul-reports@3.1.7: @@ -5345,7 +5345,7 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.6.3 - '@testing-library/dom@10.2.0': + '@testing-library/dom@10.3.0': dependencies: '@babel/code-frame': 7.24.7 '@babel/runtime': 7.24.7 @@ -5356,10 +5356,10 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 - '@testing-library/react@16.0.0(@testing-library/dom@10.2.0)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@testing-library/react@16.0.0(@testing-library/dom@10.3.0)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.24.7 - '@testing-library/dom': 10.2.0 + '@testing-library/dom': 10.3.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: @@ -5646,7 +5646,7 @@ snapshots: debug: 4.3.5 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 5.0.5 + istanbul-lib-source-maps: 5.0.6 istanbul-reports: 3.1.7 magic-string: 0.30.10 magicast: 0.3.4 @@ -7375,7 +7375,7 @@ snapshots: make-dir: 4.0.0 supports-color: 7.2.0 - istanbul-lib-source-maps@5.0.5: + istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 debug: 4.3.5