Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/c-color-mode

Package Overview
Dependencies
Maintainers
4
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/c-color-mode - npm Package Compare versions

Comparing version 0.1.0-alpha.3 to 0.1.0-alpha.5

8

dist/cjs/color-mode-provider.js

@@ -31,4 +31,4 @@ "use strict";

*
* @param light the light mode value
* @param dark the dark mode value
* @param lightValue the light mode value
* @param darkValue the dark mode value
*

@@ -45,3 +45,3 @@ * @example

function useColorModeValue(light, dark) {
function useColorModeValue(lightValue, darkValue) {
var _useColorMode = useColorMode(),

@@ -52,3 +52,3 @@ colorMode = _useColorMode.colorMode;

(0, _vue.watchEffect)(function () {
modeValue.value = colorMode.value === 'dark' ? dark : light;
modeValue.value = colorMode.value === 'dark' ? darkValue : lightValue;
});

@@ -55,0 +55,0 @@ return modeValue;

@@ -25,4 +25,4 @@ import { inject, isRef, ref, watchEffect } from 'vue';

*
* @param light the light mode value
* @param dark the dark mode value
* @param lightValue the light mode value
* @param darkValue the dark mode value
*

@@ -36,3 +36,3 @@ * @example

export function useColorModeValue(light, dark) {
export function useColorModeValue(lightValue, darkValue) {
var {

@@ -43,3 +43,3 @@ colorMode

watchEffect(() => {
modeValue.value = colorMode.value === 'dark' ? dark : light;
modeValue.value = colorMode.value === 'dark' ? darkValue : lightValue;
});

@@ -46,0 +46,0 @@ return modeValue;

@@ -1,9 +0,9 @@

import { ColorMode } from './color-mode.utils';
export type { ColorMode };
import { ColorModeRef } from './color-mode.utils';
export type { ColorModeRef };
export interface ColorModeOptions {
initialColorMode?: ColorMode;
initialColorMode?: ColorModeRef;
useSystemColorMode?: boolean;
}
export declare type ColorModeContext = {
colorMode: ColorMode;
colorMode: ColorModeRef;
toggleColorMode: () => void;

@@ -16,4 +16,4 @@ };

*
* @param light the light mode value
* @param dark the dark mode value
* @param lightValue the light mode value
* @param darkValue the dark mode value
*

@@ -26,2 +26,2 @@ * @example

*/
export declare function useColorModeValue<TLight = unknown, TDark = unknown>(light: TLight, dark: TDark): import("vue").Ref<any>;
export declare function useColorModeValue<TLight = unknown, TDark = unknown>(lightValue: TLight, darkValue: TDark): import("vue").Ref<any>;
import { Ref } from 'vue';
export declare type ColorMode = Ref<'light' | 'dark'>;
export declare type ColorModeRef = Ref<'light' | 'dark'>;
/**

@@ -13,3 +13,3 @@ * Function to add/remove class from `body` based on color mode

export declare const darkQuery: string;
export declare function getColorScheme(fallback?: ColorMode): "light" | "dark";
export declare function getColorScheme(fallback?: ColorModeRef): "light" | "dark";
/**

@@ -22,3 +22,3 @@ * Adds system os color mode listener, and run the callback

get: () => "light" | "dark";
set: (mode: ColorMode) => void;
set: (mode: ColorModeRef) => void;
};

@@ -1,7 +0,7 @@

import { ColorMode } from './color-mode.utils';
import { ColorModeRef } from './color-mode.utils';
export declare const storageKey = "chakra-ui-color-mode";
declare type MaybeColorMode = ColorMode['value'] | undefined;
declare type MaybeColorMode = ColorModeRef['value'] | undefined;
export interface StorageManager {
get(init?: ColorMode['value']): MaybeColorMode;
set(value: ColorMode['value']): void;
get(init?: ColorModeRef['value']): MaybeColorMode;
set(value: ColorModeRef['value']): void;
type: 'cookie' | 'localStorage';

@@ -8,0 +8,0 @@ }

{
"name": "@chakra-ui/c-color-mode",
"version": "0.1.0-alpha.3",
"version": "0.1.0-alpha.5",
"main": "dist/cjs/index.js",

@@ -42,4 +42,4 @@ "module": "dist/esm/index.js",

"devDependencies": {
"vue": "^3.0.11"
"vue": "^3.1.4"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc